Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Wynn
purr-data
Commits
190fd653
Commit
190fd653
authored
Dec 26, 2015
by
Jonathan Wilkes
Browse files
add keyboard shortcut for clearing console to pd window and canvas window
parent
c4a8fd97
Changes
4
Hide whitespace changes
Inline
Side-by-side
pd/nw/index.js
View file @
190fd653
...
...
@@ -445,6 +445,10 @@ function nw_create_pd_window_menus(gui, w) {
}
}
});
minit
(
m
.
edit
.
clear_console
,
{
enabled
:
true
,
click
:
pdgui
.
clear_console
});
if
(
osx
)
{
minit
(
m
.
edit
.
reselect
,
{
enabled
:
false
});
}
...
...
@@ -455,12 +459,6 @@ function nw_create_pd_window_menus(gui, w) {
minit
(
m
.
edit
.
font
,
{
enabled
:
false
});
minit
(
m
.
edit
.
cordinspector
,
{
enabled
:
false
});
}
minit
(
m
.
edit
.
clear_console
,
{
click
:
function
()
{
var
container
=
w
.
document
.
getElementById
(
"
p1
"
);
container
.
textContent
=
""
;
}
});
minit
(
m
.
edit
.
find
,
{
click
:
function
()
{
var
find_bar
=
w
.
document
.
getElementById
(
"
console_find
"
),
...
...
pd/nw/pd_canvas.js
View file @
190fd653
...
...
@@ -822,9 +822,13 @@ function nw_create_patch_window_menus(gui, w, name) {
}
}
});
minit
(
m
.
edit
.
clear_console
,
{
enabled
:
true
,
click
:
pdgui
.
clear_console
});
minit
(
m
.
edit
.
reselect
,
{
enabled
:
true
,
click
:
function
()
{
pdgui
.
pdsend
(
name
,
"
reselect
"
);
}
click
:
function
()
{
pdgui
.
pdsend
(
name
,
"
reselect
"
);
}
});
minit
(
m
.
edit
.
tidyup
,
{
enabled
:
true
,
...
...
pd/nw/pd_menus.js
View file @
190fd653
...
...
@@ -158,13 +158,13 @@ function create_menu(gui, type) {
}));
}
editMenu
.
append
(
new
gui
.
MenuItem
({
type
:
"
separator
"
}));
if
(
!
canvas_menu
)
{
editMenu
.
append
(
m
.
edit
.
clear_console
=
new
gui
.
MenuItem
({
label
:
l
(
"
menu.clear_console
"
),
tooltip
:
l
(
"
menu.clear_console
"
)
}));
editMenu
.
append
(
m
.
edit
.
clear_console
=
new
gui
.
MenuItem
({
label
:
l
(
"
menu.clear_console
"
),
tooltip
:
l
(
"
menu.clear_console
"
),
key
:
"
l
"
,
modifiers
:
"
shift+
"
+
cmd_or_ctrl
}));
editMenu
.
append
(
new
gui
.
MenuItem
({
type
:
"
separator
"
}));
}
if
(
canvas_menu
)
{
editMenu
.
append
(
m
.
edit
.
tidyup
=
new
gui
.
MenuItem
({
label
:
l
(
"
menu.tidyup
"
),
...
...
pd/nw/pdgui.js
View file @
190fd653
...
...
@@ -315,6 +315,13 @@ function gui_post_error(objectid, loglevel, errormsg) {
}
}
function
clear_console
()
{
var
container
=
pd_window
.
document
.
getElementById
(
"
p1
"
);
container
.
textContent
=
""
;
}
exports
.
clear_console
=
clear_console
;
// convert canvas dimensions to old tcl/tk geometry
// string format. Unfortunately this is exposed (and
// documented) to the user with the "relocate" message
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment