Commit c4a8fd97 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

add "Clear Console" menu item

parent 3158ead2
......@@ -455,6 +455,12 @@ 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"),
......
......@@ -130,6 +130,8 @@
"find_tt": "Find text in the console output",
"tidyup": "Tidy Up",
"tidyup_tt": "Line up the selected objects in straight rows and columns",
"clear_console": "Clear Console",
"clear_console_tt": "Clear the Pd Window Console",
"tofront": "Bring to Front",
"tofront_tt": "Bring the selected object visually in front of all other objects",
"toback": "Send to Back",
......
......@@ -158,7 +158,13 @@ function create_menu(gui, type) {
}));
}
editMenu.append(new gui.MenuItem({ type: "separator" }));
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(new gui.MenuItem({ type: "separator" }));
}
if (canvas_menu) {
editMenu.append(m.edit.tidyup = new gui.MenuItem({
label: l("menu.tidyup"),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment