Changeset 10542


Ignore:
Timestamp:
2005-08-19T14:01:15+12:00 (19 years ago)
Author:
mdewsnip
Message:

(West Yorkshire) Now checks if the collection configurations have been downloaded when File -> Open is chosen, and downloads them if not.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java

    r10517 r10542  
    5858import org.greenstone.gatherer.gui.metaaudit.MetaAuditFrame;
    5959import org.greenstone.gatherer.gui.tree.DragTree;
     60import org.greenstone.gatherer.remote.RemoteGreenstoneServer;
    6061import org.greenstone.gatherer.util.JarTools;
    6162import org.greenstone.gatherer.util.StaticStrings;
     
    648649    private String showOpenCollectionDialog()
    649650    {
     651    // If using a remote Greenstone check if the collection configurations have been downloaded; do so if not
     652    File collect_directory = new File(Gatherer.getCollectDirectoryPath());
     653    if (Gatherer.isGsdlRemote && (!collect_directory.exists() || collect_directory.listFiles().length == 0)) {
     654        RemoteGreenstoneServer.downloadCollectionConfigurations();
     655    }
     656
    650657    // We first try the simple open collection dialog
    651658    SimpleOpenCollectionDialog dialog = new SimpleOpenCollectionDialog();
     
    659666    // Chosen to use the advanced 'browse' dialog
    660667    if (user_choice == SimpleOpenCollectionDialog.BROWSE_OPTION) {
    661         File collect_directory;
    662668        if (Gatherer.GS3) {
    663669        collect_directory = new File(Utility.getSitesDir(Configuration.gsdl3_path));
Note: See TracChangeset for help on using the changeset viewer.