summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-06-20 09:41:07 +0200
committerjmoenig <jens@moenig.org>2013-06-20 09:41:07 +0200
commitfe8cbd5b705a940c13f7caa2c0d5554341869012 (patch)
treeff09d6395b8a4bd8cb6f6c534f93bdbaffafcb6f
parente2aeaec7cfe0986ad13263b2eded6b8115b9b476 (diff)
downloadsnap-byow-fe8cbd5b705a940c13f7caa2c0d5554341869012.tar.gz
snap-byow-fe8cbd5b705a940c13f7caa2c0d5554341869012.zip
GUI: make code mapping preference persistent
-rw-r--r--gui.js15
-rwxr-xr-xhistory.txt4
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