File copy/cut/paste implemented
[pithos-web-client] / src / gr / grnet / pithos / web / client / FileContextMenu.java
index 7c562f8..d54f5bf 100644 (file)
@@ -137,7 +137,7 @@ public class FileContextMenu extends PopupPanel {
                images = newImages;
         MenuBar contextMenu = new MenuBar(true);
 
-               pasteItem = new MenuItem("<span>" + AbstractImagePrototype.create(images.paste()).getHTML() + "&nbsp;Paste</span>", true, new PasteCommand(this));
+               pasteItem = new MenuItem("<span>" + AbstractImagePrototype.create(images.paste()).getHTML() + "&nbsp;Paste</span>", true, new PasteCommand(GSS.get(), this, selectedFolder));
         contextMenu.addItem(pasteItem);
 
         MenuItem upload = new MenuItem("<span>" + AbstractImagePrototype.create(images.fileUpdate()).getHTML() + "&nbsp;Upload</span>", true, new UploadFileCommand(this, selectedFolder));
@@ -153,10 +153,10 @@ public class FileContextMenu extends PopupPanel {
                        MenuItem delete = new MenuItem("<span>" + AbstractImagePrototype.create(images.delete()).getHTML() + "&nbsp;Delete</span>", true, new DeleteCommand(this, null, images));
                        contextMenu.addItem(delete);
                } else {
-                       cutItem = new MenuItem("<span id='fileContextMenu.cut'>" + AbstractImagePrototype.create(newImages.cut()).getHTML() + "&nbsp;Cut</span>", true, new CutCommand(this));
+                       cutItem = new MenuItem("<span id='fileContextMenu.cut'>" + AbstractImagePrototype.create(newImages.cut()).getHTML() + "&nbsp;Cut</span>", true, new CutCommand(GSS.get(), this, selectedFiles));
             contextMenu.addItem(cutItem);
 
-                       copyItem = new MenuItem("<span>" + AbstractImagePrototype.create(newImages.copy()).getHTML() + "&nbsp;Copy</span>", true, new CopyCommand(this));
+                       copyItem = new MenuItem("<span>" + AbstractImagePrototype.create(newImages.copy()).getHTML() + "&nbsp;Copy</span>", true, new CopyCommand(GSS.get(), this, selectedFiles));
             contextMenu.addItem(copyItem);
 
                        trashItem = new MenuItem("<span>" + AbstractImagePrototype.create(newImages.emptyTrash()).getHTML() + "&nbsp;Move to Trash</span>", true, new ToTrashCommand(this));