Changeset 10564


Ignore:
Timestamp:
2005-08-25T13:39:56+12:00 (19 years ago)
Author:
mdewsnip
Message:

Added a openCollectionFromLastTime function to CollectionManager to reduce duplicated code.

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
3 edited

Legend:

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

    r10540 r10564  
    186186
    187187    // If there was an open collection last session, reopen it
    188     Gatherer.open_collection_file_path = Configuration.getString("general.open_collection", true);
    189     if (Gatherer.open_collection_file_path != null && !Gatherer.open_collection_file_path.equals("")) {
    190         Gatherer.c_man.loadCollection(Gatherer.open_collection_file_path);
    191     }
     188    Gatherer.c_man.openCollectionFromLastTime();
    192189    }
    193190}
  • trunk/gli/src/org/greenstone/gatherer/GathererProg.java

    r10372 r10564  
    8181
    8282    // If there was an open collection last session, reopen it
    83     if (Gatherer.open_collection_file_path != null) {
    84         Gatherer.c_man.loadCollection(Gatherer.open_collection_file_path);
    85     }
     83    Gatherer.c_man.openCollectionFromLastTime();
    8684    }
    8785}
  • trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java

    r10562 r10564  
    981981    if (collection != null) {
    982982        collection.setMetadataChanged(true);
     983    }
     984    }
     985
     986
     987    public void openCollectionFromLastTime()
     988    {
     989    // If there was an open collection last session, reopen it
     990    if (Gatherer.open_collection_file_path != null) {
     991        // If we're using a remote Greenstone server we must download the collection configurations first
     992        if (Gatherer.isGsdlRemote) {
     993        RemoteGreenstoneServer.downloadCollectionConfigurations();
     994        }
     995
     996        // Load the collection now
     997        loadCollection(Gatherer.open_collection_file_path);
    983998    }
    984999    }
Note: See TracChangeset for help on using the changeset viewer.