added comment, since boolean params' names are misleading in the "update item" case
authorfstamatelopoulos <devnull@localhost>
Wed, 4 Mar 2009 09:10:28 +0000 (09:10 +0000)
committerfstamatelopoulos <devnull@localhost>
Wed, 4 Mar 2009 09:10:28 +0000 (09:10 +0000)
gss/src/gr/ebs/gss/client/FileMenu.java

index f09269c..2720df1 100644 (file)
@@ -186,7 +186,8 @@ public class FileMenu extends PopupPanel implements ClickListener {
                contextMenu.addItem("<span>" + images.folderNew().getHTML() + "&nbsp;New Folder</span>", true, new NewFolderCommand(this, images));\r
                contextMenu.addItem("<span>" + images.fileNew().getHTML() + "&nbsp;New File</span>", true, new UploadFileCommand(this));\r
                contextMenu     .addItem("<span>" + images.fileUpdate().getHTML() + "&nbsp;Update</span>", true, new UpdateFileCommand(this))\r
-                                       .setVisible(!propertiesNotVisible && downloadVisible);\r
+                                       .setVisible(!propertiesNotVisible && downloadVisible);  // hide the "update" item when (a) no file is selected,\r
+                                                                                                                                                       // and (b) when we are not allowed to edit the file\r
                contextMenu     .addItem("<span>" + images.viewText().getHTML() + "&nbsp;Properties</span>", true, new PropertiesCommand(this, images))\r
                                        .setVisible(!propertiesNotVisible);\r
                contextMenu.addItem("<span>" + images.emptyTrash().getHTML() + "&nbsp;Empty Trash</span>", true, new EmptyTrashCommand(this));\r