summaryrefslogtreecommitdiff
path: root/gui.js
diff options
context:
space:
mode:
Diffstat (limited to 'gui.js')
-rw-r--r--gui.js22
1 files changed, 14 insertions, 8 deletions
diff --git a/gui.js b/gui.js
index 83aa666..d1cac6c 100644
--- a/gui.js
+++ b/gui.js
@@ -69,7 +69,7 @@ SpeechBubbleMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.gui = '2014-Jun-04';
+modules.gui = '2014-July-08';
// Declarations
@@ -922,6 +922,8 @@ IDE_Morph.prototype.createSpriteBar = function () {
tabColors = this.tabColors,
tabBar = new AlignmentMorph('row', -tabCorner * 2),
tab,
+ symbols = ['\u2192', '\u21BB', '\u2194'],
+ labels = ['don\'t rotate', 'can rotate', 'only face left/right'],
myself = this;
if (this.spriteBar) {
@@ -950,17 +952,13 @@ IDE_Morph.prototype.createSpriteBar = function () {
each.refresh();
});
},
- ['\u2192', '\u21BB', '\u2194'][rotationStyle], // label
+ symbols[rotationStyle], // label
function () { // query
return myself.currentSprite instanceof SpriteMorph
&& myself.currentSprite.rotationStyle === rotationStyle;
},
null, // environment
- localize(
- [
- 'don\'t rotate', 'can rotate', 'only face left/right'
- ][rotationStyle]
- )
+ localize(labels[rotationStyle])
);
button.corner = 8;
@@ -1945,7 +1943,7 @@ IDE_Morph.prototype.cloudMenu = function () {
);
} else {
menu.addItem(
- 'Logout',
+ localize('Logout') + ' ' + SnapCloud.username,
'logout'
);
menu.addItem(
@@ -4834,9 +4832,13 @@ ProjectDialogMorph.prototype.shareProject = function () {
function () {
SnapCloud.disconnect();
proj.Public = 'true';
+ myself.unshareButton.show();
+ myself.shareButton.hide();
entry.label.isBold = true;
entry.label.drawNew();
entry.label.changed();
+ myself.buttons.fixLayout();
+ myself.drawNew();
myself.ide.showMessage('shared.', 2);
},
myself.ide.cloudError(),
@@ -4871,9 +4873,13 @@ ProjectDialogMorph.prototype.unshareProject = function () {
function () {
SnapCloud.disconnect();
proj.Public = 'false';
+ myself.shareButton.show();
+ myself.unshareButton.hide();
entry.label.isBold = false;
entry.label.drawNew();
entry.label.changed();
+ myself.buttons.fixLayout();
+ myself.drawNew();
myself.ide.showMessage('unshared.', 2);
},
myself.ide.cloudError(),