Ignore:
Timestamp:
2003-12-02T17:15:47+13:00 (20 years ago)
Author:
jmt12
Message:

Moved the special folder 'shortcuts' from collection based to shared for the installation of gli. This caused some added fun when it turned out one of the workspace tree refreshes was blocking the AWTEvent thread, despite me putting tests in place to stop that from happening. It had never reared its ugly head before, as there were never any shortcut collections being mapped when a collection had been closed, or when GLI was exiting before.

File:
1 edited

Legend:

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

    r6061 r6086  
    139139     */
    140140    public void addDirectoryMapping(String name, File file) {
    141     if(ready()) {
    142         // Update the information stored in the collection
    143         collection.addDirectoryMapping(name, file);
    144         // Now update the tree
    145         Gatherer.g_man.collection_pane.refreshWorkspaceTree(WorkspaceTree.MAPPED_DIRECTORIES_CHANGED);
    146     }
     141    // Update the information stored in the Gatherer config
     142    Gatherer.config.addDirectoryMapping(name, file);
     143    // Now update the tree
     144    Gatherer.g_man.collection_pane.refreshWorkspaceTree(WorkspaceTree.MAPPED_DIRECTORIES_CHANGED);
    147145    }
    148146    /** This method calls the builcol.pl scripts via a GShell so as to not lock up the processor.
     
    667665    static public FileNode[] getCollectionSpecificMappings()
    668666    {
    669     if (!ready()) {
    670         return null;
    671     }
    672 
    673667    // Return any predefined special directories
    674     HashMap mappings = collection.getDirectoryMappings();
     668    HashMap mappings = Gatherer.config.getDirectoryMappings();
    675669    FileNode[] mapping_nodes = new FileNode[mappings.size()];
    676670    Iterator mappings_iterator = mappings.keySet().iterator();
     
    680674        mapping_nodes[i] = new FileNode(mapping_file, mapping_name);
    681675    }
    682 
    683676    return mapping_nodes;
    684677    }
     
    11361129     */
    11371130    public File removeDirectoryMapping(FileNode target) {
    1138     File file = null;
    1139     if(ready()) {
    1140         // Remove from collection, remembering file
    1141         file = collection.removeDirectoryMapping(target.toString());
    1142         // Update tree.
    1143         Gatherer.g_man.collection_pane.refreshWorkspaceTree(WorkspaceTree.MAPPED_DIRECTORIES_CHANGED);
    1144     }
     1131    // Remove from config, remembering file
     1132    File file = Gatherer.config.removeDirectoryMapping(target.toString());
     1133    // Update tree.
     1134    Gatherer.g_man.collection_pane.refreshWorkspaceTree(WorkspaceTree.MAPPED_DIRECTORIES_CHANGED);
    11451135    return file;
    11461136    }
Note: See TracChangeset for help on using the changeset viewer.