Revision 50326f36 web_client/src/gr/grnet/pithos/web/client/EditMenu.java

b/web_client/src/gr/grnet/pithos/web/client/EditMenu.java
174 174
            else if (selectedFolder != null)
175 175
                cutObject = selectedFolder;
176 176

  
177
            MenuItem cutItem = new MenuItem("<span>" + AbstractImagePrototype.create(images.cut()).getHTML() + "&nbsp;" + cutLabel + "</span>", true, new CutCommand(_app, null, cutObject));
178
            addItem(cutItem);
177
            if (selectedFiles.size() != 0 || (selectedFolder != null && !selectedFolder.isContainer())) {
178
                MenuItem cutItem = new MenuItem("<span>" + AbstractImagePrototype.create(images.cut()).getHTML() + "&nbsp;" + cutLabel + "</span>", true, new CutCommand(_app, null, cutObject));
179
                addItem(cutItem);
180
            }
179 181

  
180 182
            MenuItem copyItem = new MenuItem("<span>" + AbstractImagePrototype.create(images.copy()).getHTML() + "&nbsp;"+copyLabel+"</span>", true, new CopyCommand(_app, null, cutObject));
181 183
            addItem(copyItem);
182 184

  
183
            MenuItem moveToTrashItem = new MenuItem("<span>" + AbstractImagePrototype.create(images.emptyTrash()).getHTML() + "&nbsp;Move to Trash</span>", true, new ToTrashCommand(_app, null, cutObject));
184
            addItem(moveToTrashItem);
185
            if (selectedFiles.size() != 0 || (selectedFolder != null && !selectedFolder.isContainer())) {
186
                MenuItem moveToTrashItem = new MenuItem("<span>" + AbstractImagePrototype.create(images.emptyTrash()).getHTML() + "&nbsp;Move to Trash</span>", true, new ToTrashCommand(_app, null, cutObject));
187
                addItem(moveToTrashItem);
185 188

  
186
            MenuItem deleteItem = new MenuItem("<span>" + AbstractImagePrototype.create(images.delete()).getHTML() + "&nbsp;Delete</span>", true, new DeleteCommand(null, cutObject, images));
187
            addItem(deleteItem);
189
                MenuItem deleteItem = new MenuItem("<span>" + AbstractImagePrototype.create(images.delete()).getHTML() + "&nbsp;Delete</span>", true, new DeleteCommand(null, cutObject, images));
190
                addItem(deleteItem);
191
            }
188 192
        }
189 193

  
190 194
        if (selectedFolder != null && !_app.getClipboard().isEmpty()) {

Also available in: Unified diff