diff options
| author | jmoenig <jens@moenig.org> | 2013-04-21 20:40:24 +0200 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2013-04-21 20:40:24 +0200 |
| commit | f21416527fd7f53b7c7eff6027a5511c4bccfaa7 (patch) | |
| tree | c31f3009af9d6798c0c943ef1c601a9e1f10c484 /gui.js | |
| parent | 977da0314c01ce8d3cda160cb913e12d4a980f36 (diff) | |
| download | snap-yow-f21416527fd7f53b7c7eff6027a5511c4bccfaa7.tar.gz snap-yow-f21416527fd7f53b7c7eff6027a5511c4bccfaa7.zip | |
Double click support for project dialogs
double clicking a project in the project dialog now performs the
specified action for the dialog (open / save) on it.
Diffstat (limited to 'gui.js')
| -rw-r--r-- | gui.js | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -68,7 +68,7 @@ sb, CommentMorph, CommandBlockMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2013-April-19'; +modules.gui = '2013-April-21'; // Declarations @@ -3738,7 +3738,9 @@ ProjectDialogMorph.prototype.setSource = function (source) { this.projectList.length > 0 ? function (element) { return element.name; - } : null + } : null, + null, + function () {myself.ok(); } ); this.fixListFieldItemColors(); @@ -3754,6 +3756,7 @@ ProjectDialogMorph.prototype.setSource = function (source) { this.listField.action = function (item) { var src, xml; + if (item === undefined) {return; } if (myself.nameField) { myself.nameField.setContents(item.name || ''); } @@ -3775,6 +3778,7 @@ ProjectDialogMorph.prototype.setSource = function (source) { }; } else { // 'examples', 'cloud' is initialized elsewhere this.listField.action = function (item) { + if (item === undefined) {return; } if (myself.nameField) { myself.nameField.setContents(item.name || ''); } @@ -3852,7 +3856,9 @@ ProjectDialogMorph.prototype.installCloudProjectList = function (pl) { 'bold', function (proj) {return proj.Public === 'true'; } ] - ] + ], + null, + function () {myself.ok(); } ); this.fixListFieldItemColors(); @@ -3865,6 +3871,7 @@ ProjectDialogMorph.prototype.installCloudProjectList = function (pl) { this.listField.drawRectBorder = InputFieldMorph.prototype.drawRectBorder; this.listField.action = function (item) { + if (item === undefined) {return; } if (myself.nameField) { myself.nameField.setContents(item.ProjectName || ''); } |
