summaryrefslogtreecommitdiff
path: root/gui.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-04-09 13:56:09 +0200
committerjmoenig <jens@moenig.org>2013-04-09 13:56:09 +0200
commitafe62246d605e97cee16e085a84cf800f678bff9 (patch)
treeee8fb934452a184e248bc1b1949d439ae413b865 /gui.js
parent256634239e6ca8e1556ededa6024eb72308f2e8c (diff)
downloadsnap-byow-afe62246d605e97cee16e085a84cf800f678bff9.tar.gz
snap-byow-afe62246d605e97cee16e085a84cf800f678bff9.zip
Bold type shared project names
in the project dialog
Diffstat (limited to 'gui.js')
-rw-r--r--gui.js25
1 files changed, 20 insertions, 5 deletions
diff --git a/gui.js b/gui.js
index 1eab70b..6689eaa 100644
--- a/gui.js
+++ b/gui.js
@@ -3785,7 +3785,13 @@ ProjectDialogMorph.prototype.installCloudProjectList = function (pl) {
this.projectList.length > 0 ?
function (element) {
return element.ProjectName;
- } : null
+ } : null,
+ [ // format: display shared project names bold
+ [
+ 'bold',
+ function (proj) {return proj.Public === 'true'; }
+ ]
+ ]
);
this.fixListFieldItemColors();
@@ -4012,7 +4018,8 @@ ProjectDialogMorph.prototype.deleteProject = function () {
ProjectDialogMorph.prototype.shareProject = function () {
var myself = this,
- proj = this.listField.selected;
+ proj = this.listField.selected,
+ entry = this.listField.active;
if (proj) {
this.ide.confirm(
@@ -4028,7 +4035,10 @@ ProjectDialogMorph.prototype.shareProject = function () {
function () {
SnapCloud.disconnect();
proj.Public = 'true';
- myself.listField.select(proj);
+ entry.label.isBold = true;
+ entry.label.drawNew();
+ entry.label.changed();
+ myself.listField.select(proj, entry);
myself.ide.showMessage('shared.', 2);
},
myself.ide.cloudError(),
@@ -4044,7 +4054,9 @@ ProjectDialogMorph.prototype.shareProject = function () {
ProjectDialogMorph.prototype.unshareProject = function () {
var myself = this,
- proj = this.listField.selected;
+ proj = this.listField.selected,
+ entry = this.listField.active;
+
if (proj) {
this.ide.confirm(
@@ -4060,7 +4072,10 @@ ProjectDialogMorph.prototype.unshareProject = function () {
function () {
SnapCloud.disconnect();
proj.Public = 'false';
- myself.listField.select(proj);
+ entry.label.isBold = false;
+ entry.label.drawNew();
+ entry.label.changed();
+ myself.listField.select(proj, entry);
myself.ide.showMessage('unshared.', 2);
},
myself.ide.cloudError(),