summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-04-23 17:57:38 +0200
committerjmoenig <jens@moenig.org>2013-04-23 17:57:38 +0200
commit6bafe43b8f131abc283d326a887b1ac105a05e80 (patch)
treed881087ccd134aa633f275e876aaf511b0c04242
parent49998bb0dee32016c5e6242274814dd43e38f681 (diff)
downloadsnap-6bafe43b8f131abc283d326a887b1ac105a05e80.tar.gz
snap-6bafe43b8f131abc283d326a887b1ac105a05e80.zip
Release clean-ups & translation update
-rw-r--r--blocks.js2
-rw-r--r--byob.js2
-rw-r--r--gui.js2
-rwxr-xr-xhistory.txt2
-rw-r--r--lang-de.js4
-rw-r--r--locale.js4
-rw-r--r--widgets.js18
7 files changed, 25 insertions, 9 deletions
diff --git a/blocks.js b/blocks.js
index 588b4a6..449bd14 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 7358243..ffcc349 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 3d6654f..12897ad 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 76dbc16..7ef0d44 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 85dacc8..b73761d 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 eb2feae..123fd04 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 0f39d63..2cb8bc4 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;