Commit 10ec8722 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

set the editmode checkbox in menu when the patch gets created

parent 888be938
......@@ -627,7 +627,7 @@ var canvas_events = (function() {
// This gets called from the nw_create_window function in index.html
// It provides us with our canvas id from the C side. Once we have it
// we can create the menu and register event callbacks
function register_canvas_id(cid) {
function register_canvas_id(cid, attr_array) {
name = cid; // hack
// We create the window menus and popup menu before doing anything else
// to ensure that we don't try to set the svg size before these are done.
......@@ -646,6 +646,7 @@ function register_canvas_id(cid) {
nw_window_focus_callback();
canvas_events.normal();
pdgui.canvas_map(cid); // side-effect: triggers gui_canvas_getscroll from Pd
set_editmode_checkbox(attr_array.editmode !== 0 ? true : false);
}
function create_popup_menu(name) {
......
......@@ -888,7 +888,7 @@ function gui_canvas_set_title(cid, name, args, dir, dirty_flag) {
// create a new canvas
// todo: rename parameter "name" to "cid"
function gui_canvas_new(cid, width, height, geometry, editable, name, dir, dirty_flag, cargs) {
function gui_canvas_new(cid, width, height, geometry, editmode, name, dir, dirty_flag, cargs) {
// hack for buggy tcl popups... should go away for node-webkit
//reset_ctrl_on_popup_window
......@@ -937,7 +937,8 @@ function gui_canvas_new(cid, width, height, geometry, editable, name, dir, dirty
name: name,
dir: dir,
dirty: dirty_flag,
args: cargs
args: cargs,
editmode: editmode
});
// initialize variable to reflect that this window has been opened
loaded[cid] = 1;
......
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