summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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