Don't show the update menu item when a folder is selected.
authorpastith <devnull@localhost>
Wed, 4 Mar 2009 08:55:09 +0000 (08:55 +0000)
committerpastith <devnull@localhost>
Wed, 4 Mar 2009 08:55:09 +0000 (08:55 +0000)
gss/src/gr/ebs/gss/client/FileMenu.java

index afec635..f09269c 100644 (file)
@@ -186,16 +186,14 @@ 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);\r
+                                       .setVisible(!propertiesNotVisible && downloadVisible);\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
                if (downloadVisible) {\r
-\r
                        String[] link = {"", ""};\r
                        createDownloadLink(link);\r
                        contextMenu.addItem("<span>" + link[0] + images.download().getHTML() + "&nbsp;Download File" + link[1] + "</span>", true, downloadCmd);\r
-\r
                }\r
                return contextMenu;\r
        }\r