diff --git a/blocks.js b/blocks.js index 588b4a65..449bd141 100644 --- a/blocks.js +++ b/blocks.js @@ -153,7 +153,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.blocks = '2013-April-21'; +modules.blocks = '2013-April-23'; var SyntaxElementMorph; var BlockMorph; diff --git a/byob.js b/byob.js index 73582431..ffcc3493 100644 --- a/byob.js +++ b/byob.js @@ -105,7 +105,7 @@ CommentMorph, localize, CSlotMorph, SpeechBubbleMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.byob = '2013-April-12'; +modules.byob = '2013-April-23'; // Declarations diff --git a/gui.js b/gui.js index 3d6654f6..12897ad8 100644 --- a/gui.js +++ b/gui.js @@ -68,7 +68,7 @@ sb, CommentMorph, CommandBlockMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2013-April-22'; +modules.gui = '2013-April-23'; // Declarations diff --git a/history.txt b/history.txt index 76dbc164..7ef0d44b 100755 --- a/history.txt +++ b/history.txt @@ -1657,3 +1657,5 @@ ______ 130423 ------ * Lists, Objects: Circularity no longer breaks watchers +* Widgets: Multiple Dialogs of the same kind are prevented except for a few (e.g. BlockEditor). Thanks for this fix, Nathan! (and for the many little UI things you've fixed as well) +* German translation update diff --git a/lang-de.js b/lang-de.js index 85dacc8f..b73761d8 100644 --- a/lang-de.js +++ b/lang-de.js @@ -185,7 +185,7 @@ SnapTranslator.dict.de = { 'translator_e-mail': 'jens@moenig.org', // optional 'last_changed': - '2013-04-19', // this, too, will appear in the Translators tab + '2013-04-23', // this, too, will appear in the Translators tab // GUI // control bar: @@ -559,6 +559,8 @@ SnapTranslator.dict.de = { 'Neue Variable', 'Variable name': 'Variablenname', + 'Script variable name': + 'Skriptvariablenname', 'Delete a variable': 'Variable l\u00f6schen', diff --git a/locale.js b/locale.js index eb2feae8..123fd04e 100644 --- a/locale.js +++ b/locale.js @@ -42,7 +42,7 @@ /*global modules, contains*/ -modules.locale = '2013-April-19'; +modules.locale = '2013-April-23'; // Global stuff @@ -149,7 +149,7 @@ SnapTranslator.dict.de = { 'translator_e-mail': 'jens@moenig.org', 'last_changed': - '2013-04-19' + '2013-04-23' }; SnapTranslator.dict.it = { diff --git a/widgets.js b/widgets.js index 0f39d632..2cb8bc43 100644 --- a/widgets.js +++ b/widgets.js @@ -73,7 +73,7 @@ newCanvas, StringMorph, Morph, TextMorph, nop, detect, StringFieldMorph, HTMLCanvasElement, fontHeight, SymbolMorph, localize, SpeechBubbleMorph, ArrowMorph, MenuMorph, isString, isNil, SliderMorph*/ -modules.widgets = '2013-April-19'; +modules.widgets = '2013-April-23'; var PushButtonMorph; var ToggleButtonMorph; @@ -1391,7 +1391,16 @@ ToggleElementMorph.prototype.mouseClickLeft // DialogBoxMorph ///////////////////////////////////////////////////// -// I am a DialogBox frame +/* + I am a DialogBox frame. + + Note: + ----- + I add a property "dialogs" to whichever World I'm popped up in, which + keeps track of my instances, preventing double instances of the same type + and on the same objects, while allowing multiple instance where + appropriate +*/ // DialogBoxMorph inherits from Morph: @@ -1438,6 +1447,8 @@ DialogBoxMorph.prototype.init = function (target, action, environment) { this.target = target || null; this.action = action || null; this.environment = environment || null; + this.popUpWorld = null; // keep track of open instances per world + this.key = null; // keep track of my purpose to prevent mulitple instances this.labelString = null; this.label = null; @@ -2034,7 +2045,8 @@ DialogBoxMorph.prototype.withKey = function (key) { DialogBoxMorph.prototype.popUp = function (world) { if (world) { if (this.key) { - if ((world.dialogs || (world.dialogs = {}))[this.key]) { + if (!world.dialogs) {world.dialogs = {}; } // lazy init + if (world.dialogs[this.key]) { world.dialogs[this.key].destroy(); } world.dialogs[this.key] = this;