From fe8cbd5b705a940c13f7caa2c0d5554341869012 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Thu, 20 Jun 2013 09:41:07 +0200 Subject: GUI: make code mapping preference persistent --- gui.js | 15 +++++++++++++-- history.txt | 4 ++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/gui.js b/gui.js index df6c5e7..3d4d44f 100644 --- a/gui.js +++ b/gui.js @@ -68,7 +68,7 @@ sb, CommentMorph, CommandBlockMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2013-June-18'; +modules.gui = '2013-June-20'; // Declarations @@ -1677,7 +1677,8 @@ IDE_Morph.prototype.applySavedSettings = function () { zoom = this.getSetting('zoom'), language = this.getSetting('language'), click = this.getSetting('click'), - longform = this.getSetting('longform'); + longform = this.getSetting('longform'), + code = this.getSetting('code'); // design if (design === 'flat') { @@ -1709,6 +1710,11 @@ IDE_Morph.prototype.applySavedSettings = function () { if (longform) { InputSlotDialogMorph.prototype.isLaunchingExpanded = true; } + + // code mapping + if (code && !StageMorph.prototype.enableCodeMapping) { + StageMorph.prototype.enableCodeMapping = true; + } }; IDE_Morph.prototype.saveSetting = function (key, value) { @@ -2153,6 +2159,11 @@ IDE_Morph.prototype.settingsMenu = function () { function () { StageMorph.prototype.enableCodeMapping = !StageMorph.prototype.enableCodeMapping; + if (StageMorph.prototype.enableCodeMapping) { + myself.saveSetting('code', true); + } else { + myself.removeSetting('code'); + } myself.currentSprite.blocksCache.variables = null; myself.currentSprite.paletteCache.variables = null; myself.refreshPalette(); diff --git a/history.txt b/history.txt index 5c2d9cc..c91366e 100755 --- a/history.txt +++ b/history.txt @@ -1741,3 +1741,7 @@ ______ 130619 ------ * Store: persisting code mappings in project and block library files + +130620 +------ +* GUI: add code mapping preference to persistent settings -- cgit v1.3.1