Changeset 19239

Show
Ignore:
Timestamp:
23.04.2009 16:19:36 (10 years ago)
Author:
ak19
Message:

Making replace shortcut option work for the remote case.

Location:
gli/trunk/src/org/greenstone/gatherer
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/collection/CollectionTree.java

    r19231 r19239  
    308308     
    309309        // Replace file 
    310         // !! TO DO: Remote building 
    311310        replace = new JMenuItem(Dictionary.get("CollectionPopupMenu.Replace"), KeyEvent.VK_P); 
    312311        replace.addActionListener(this); 
    313312        add(replace); 
    314         if (Gatherer.isGsdlRemote) { 
    315             replace.setEnabled(false); 
    316         }        
    317313        // Open the file in an external program 
    318314        open_externally = new JMenuItem(Dictionary.get("Menu.Open_Externally"), KeyEvent.VK_O); 
  • gli/trunk/src/org/greenstone/gatherer/file/FileManager.java

    r19230 r19239  
    467467        file_queue.addJob(System.currentTimeMillis(), Gatherer.g_man.gather_pane.workspace_tree, new FileNode[] { source_node }, collection_tree, (FileNode)collection_tree_node.getParent(),  FileJob.COPY_FILE_ONLY); 
    468468        if (Gatherer.isGsdlRemote) { 
    469         Gatherer.remoteGreenstoneServer.uploadFilesIntoCollection( 
    470                          CollectionManager.getLoadedGroupQualifiedCollectionName(true), new File[] { new_file }, target_directory); 
     469        String collection_name = CollectionManager.getLoadedGroupQualifiedCollectionName(true); 
     470        Gatherer.remoteGreenstoneServer.deleteCollectionFile(collection_name, collection_tree_node.getFile()); 
     471        Gatherer.remoteGreenstoneServer.uploadFilesIntoCollection(collection_name, new File[] { new_file }, target_directory); 
    471472        } 
    472473        // do a replace of old file with new file