Revision f55cf326 web_client/src/gr/grnet/pithos/web/client/FolderContextMenu.java

b/web_client/src/gr/grnet/pithos/web/client/FolderContextMenu.java
37 37
import gr.grnet.pithos.web.client.commands.CopyCommand;
38 38
import gr.grnet.pithos.web.client.commands.CutCommand;
39 39
import gr.grnet.pithos.web.client.commands.DeleteCommand;
40
import gr.grnet.pithos.web.client.commands.EmptyTrashCommand;
41 40
import gr.grnet.pithos.web.client.commands.NewFolderCommand;
42 41
import gr.grnet.pithos.web.client.commands.PasteCommand;
43 42
import gr.grnet.pithos.web.client.commands.PropertiesCommand;
44
import gr.grnet.pithos.web.client.commands.RefreshCommand;
45
import gr.grnet.pithos.web.client.commands.RestoreTrashCommand;
46 43
import gr.grnet.pithos.web.client.commands.ToTrashCommand;
47
import gr.grnet.pithos.web.client.commands.UploadFileCommand;
48 44
import gr.grnet.pithos.web.client.foldertree.Folder;
49
import gr.grnet.pithos.web.client.foldertree.FolderTreeView;
50
import gr.grnet.pithos.web.client.rest.resource.MyFolderResource;
51
import gr.grnet.pithos.web.client.rest.resource.OtherUserResource;
52
import gr.grnet.pithos.web.client.rest.resource.OthersFolderResource;
53
import gr.grnet.pithos.web.client.rest.resource.OthersResource;
54
import gr.grnet.pithos.web.client.rest.resource.RestResource;
55
import gr.grnet.pithos.web.client.rest.resource.SharedFolderResource;
56
import gr.grnet.pithos.web.client.rest.resource.SharedResource;
57
import gr.grnet.pithos.web.client.rest.resource.TrashFolderResource;
58
import gr.grnet.pithos.web.client.rest.resource.TrashResource;
59 45

  
60 46
import com.google.gwt.resources.client.ClientBundle;
61 47
import com.google.gwt.user.client.ui.AbstractImagePrototype;
......
99 85
        contextMenu.addItem(newFolder);
100 86

  
101 87
        if (!folder.isContainer()) {
102
            MenuItem cut = new MenuItem("<span id = 'folderContextMenu.cut'>" + AbstractImagePrototype.create(newImages.cut()).getHTML() + "&nbsp;Cut</span>", true, new CutCommand(GSS.get(), this, folder));
88
            MenuItem cut = new MenuItem("<span id = 'folderContextMenu.cut'>" + AbstractImagePrototype.create(newImages.cut()).getHTML() + "&nbsp;Cut</span>", true, new CutCommand(Pithos.get(), this, folder));
103 89
            contextMenu.addItem(cut);
104 90
        }
105 91

  
106
        MenuItem copy = new MenuItem("<span id = 'folderContextMenu.copy'>" + AbstractImagePrototype.create(newImages.copy()).getHTML() + "&nbsp;Copy</span>", true, new CopyCommand(GSS.get(), this, folder));
92
        MenuItem copy = new MenuItem("<span id = 'folderContextMenu.copy'>" + AbstractImagePrototype.create(newImages.copy()).getHTML() + "&nbsp;Copy</span>", true, new CopyCommand(Pithos.get(), this, folder));
107 93
        contextMenu.addItem(copy);
108 94

  
109
        if (!GSS.get().getClipboard().isEmpty()) {
110
            pasteItem = new MenuItem("<span id = 'folderContextMenu.paste'>" + AbstractImagePrototype.create(newImages.paste()).getHTML() + "&nbsp;Paste</span>", true, new PasteCommand(GSS.get(), this, folder));
95
        if (!Pithos.get().getClipboard().isEmpty()) {
96
            pasteItem = new MenuItem("<span id = 'folderContextMenu.paste'>" + AbstractImagePrototype.create(newImages.paste()).getHTML() + "&nbsp;Paste</span>", true, new PasteCommand(Pithos.get(), this, folder));
111 97
            contextMenu.addItem(pasteItem);
112 98
        }
113 99

  
114 100
        if (!folder.isContainer()) {
115
            MenuItem moveToTrash = new MenuItem("<span id = 'folderContextMenu.moveToTrash'>" + AbstractImagePrototype.create(newImages.emptyTrash()).getHTML() + "&nbsp;Move to Trash</span>", true, new ToTrashCommand(GSS.get(), this, folder));
101
            MenuItem moveToTrash = new MenuItem("<span id = 'folderContextMenu.moveToTrash'>" + AbstractImagePrototype.create(newImages.emptyTrash()).getHTML() + "&nbsp;Move to Trash</span>", true, new ToTrashCommand(Pithos.get(), this, folder));
116 102
            contextMenu.addItem(moveToTrash);
117 103

  
118 104
            MenuItem delete = new MenuItem("<span id = 'folderContextMenu.delete'>" + AbstractImagePrototype.create(newImages.delete()).getHTML() + "&nbsp;Delete</span>", true, new DeleteCommand(this, folder, newImages));
......
125 111
//        MenuItem sharing = new MenuItem("<span id = 'folderContextMenu.sharing'>" + AbstractImagePrototype.create(newImages.sharing()).getHTML() + "&nbsp;Sharing</span>", true, new PropertiesCommand(this, newImages, 1));
126 112
//        contextMenu.addItem(sharing);
127 113

  
128
        MenuItem properties = new MenuItem("<span id = 'folderContextMenu.properties'>" + AbstractImagePrototype.create(newImages.viewText()).getHTML() + "&nbsp;Properties</span>", true, new PropertiesCommand(GSS.get(), this, folder, newImages, 0));
114
        MenuItem properties = new MenuItem("<span id = 'folderContextMenu.properties'>" + AbstractImagePrototype.create(newImages.viewText()).getHTML() + "&nbsp;Properties</span>", true, new PropertiesCommand(Pithos.get(), this, folder, newImages, 0));
129 115
        contextMenu.addItem(properties);
130 116

  
131 117
		add(contextMenu);

Also available in: Unified diff