Commit ecbd8303 authored by nerrons's avatar nerrons
Browse files

pd_menus.js: Use the K12 Mode related functions in pdgui.js to determine if in K12 Mode

parent 2315cdbf
......@@ -17,6 +17,7 @@ function create_menu(gui, type) {
// won't let you update the keyboard shortcut binding later.)
var m = {},
osx = process.platform === "darwin",
k12_mode = pdgui.get_k12_mode(),
canvas_menu, // menu for canvas = true, menu for Pd console = false
window_menu, // window menu bar, or-- for OSX-- app menu bar
file_menu, // submenus for window menubar...
......@@ -79,7 +80,7 @@ function create_menu(gui, type) {
submenu: recent_files_submenu,
tooltip: l("menu.recent_files_tt")
}));
if (pdgui.k12_mode == 1) {
if (k12_mode === 1) {
file_menu.append(m.file.k12 = new gui.MenuItem({
label: l("menu.k12_demos"),
tooltip: l("menu.k12_demos_tt")
......@@ -106,18 +107,12 @@ function create_menu(gui, type) {
tooltip: l("menu.print_tt")
}));
}
if (pdgui.k12_mode == 0) {
file_menu.append(new gui.MenuItem({ type: "separator" }));
}
file_menu.append(m.file.message = new gui.MenuItem({
label: l("menu.message"),
key: shortcuts.menu.message.key,
modifiers: shortcuts.menu.message.modifiers,
tooltip: l("menu.message_tt")
}));
if (pdgui.k12_mode == 0) {
file_menu.append(new gui.MenuItem({ type: "separator" }));
}
if (canvas_menu) {
file_menu.append(m.file.close = new gui.MenuItem({
label: l("menu.close"),
......
Markdown is supported
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