From 1f9d5d384d73432c42e711eb05bb2ff9a31e9b34 Mon Sep 17 00:00:00 2001 From: Jens Mönig Date: Fri, 1 May 2015 12:01:51 -0400 Subject: hide “save to disk” option behind shift-click again (has issues in Chrome) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'gui.js') diff --git a/gui.js b/gui.js index 4cd2a9b..69b4a9d 100644 --- a/gui.js +++ b/gui.js @@ -69,7 +69,7 @@ SpeechBubbleMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2015-March-21'; +modules.gui = '2015-May-01'; // Declarations @@ -2384,12 +2384,15 @@ IDE_Morph.prototype.projectMenu = function () { menu.addItem('New', 'createNewProject'); menu.addItem('Open...', 'openProjectsBrowser'); menu.addItem('Save', "save"); - menu.addItem( - 'Save to disk', - 'saveProjectToDisk', - 'store this project\nin the downloads folder\n' - + '(in supporting browsers)' - ); + if (shiftClicked) { + menu.addItem( + 'Save to disk', + 'saveProjectToDisk', + 'store this project\nin the downloads folder\n' + + '(in supporting browsers)', + new Color(100, 0, 0) + ); + } menu.addItem('Save As...', 'saveProjectsBrowser'); menu.addLine(); menu.addItem( -- cgit v1.3.1 From 8fa2b2c1f2d1b8d0b71204a7fb4a8b783762ff1a Mon Sep 17 00:00:00 2001 From: Jens Mönig Date: Fri, 1 May 2015 12:18:16 -0400 Subject: parameters for embedding projects Thanks, Bernat! --- gui.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'gui.js') diff --git a/gui.js b/gui.js index 69b4a9d..0d866b4 100644 --- a/gui.js +++ b/gui.js @@ -384,8 +384,21 @@ IDE_Morph.prototype.openIn = function (world) { myself.shield.destroy(); myself.shield = null; msg.destroy(); - myself.toggleAppMode(true); - myself.runScripts(); + + if (dict.editMode) { + myself.toggleAppMode(false); + } else { + myself.toggleAppMode(true); + } + + if (!dict.noRun) { + myself.runScripts(); + } + + if (dict.hideControls) { + myself.controlBar.hide(); + window.onbeforeunload = function () {nop(); }; + } } ]); }, -- cgit v1.3.1