Changeset 4371


Ignore:
Timestamp:
2003-05-27T17:08:59+12:00 (21 years ago)
Author:
jmt12
Message:

Modified so that an open collection isn't closed if a user selects File->Open then decides to cancel - John

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

Legend:

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

    r4368 r4371  
    162162    }
    163163    /** Used to determine whether the currently active collection has been built.
    164       * @return A boolean indicating the built status of the collection.
    165       */
     164     * @return A boolean indicating the built status of the collection.
     165     */
    166166    public boolean built() {
    167167    if(collection != null) {
     
    171171    }
    172172    /** Called to close the current collection and remove its lock file.
    173       * @see org.greenstone.gatherer.Gatherer
    174       * @see org.greenstone.gatherer.collection.Collection
    175       * @see org.greenstone.gatherer.util.Utility
    176       */
     173     * @see org.greenstone.gatherer.Gatherer
     174     * @see org.greenstone.gatherer.collection.Collection
     175     * @see org.greenstone.gatherer.util.Utility
     176     */
    177177    public void closeCollection() {
    178178    // Remove the lock on this file, then remove the collection.
  • trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java

    r4367 r4371  
    204204        }
    205205        if(cont) {
    206         try {
    207             while(Gatherer.c_man.ready()) {
    208             wait(10);
    209             }
    210         }
    211         catch(Exception error) {
    212         }
    213         if(!showLoadCollectionBox()) {
    214             collectionChanged(false);
    215         }
     206        //if(!
     207        showLoadCollectionBox();
     208        //) {
     209        //collectionChanged(false);
     210        //}
    216211        }
    217212    }
     
    618613    // User can cancel action.
    619614    if(filename != null) {
     615        // If there is already a collection open, close it.
     616        if(Gatherer.c_man.ready()) {
     617        Gatherer.c_man.closeCollection();
     618        // Wait until it is closed.
     619        try {
     620            while(Gatherer.c_man.ready()) {
     621            wait(10);
     622            }
     623        }
     624        catch(Exception error) {
     625        }
     626        }
    620627        result = Gatherer.c_man.loadCollection(filename);
    621628    }
     
    706713    //switch(result) {
    707714    //case SaveCollectionBox.SAVE_YES:
    708     Gatherer.c_man.saveCollection(close_after, exit_after);
     715    Gatherer.c_man.saveCollection(false, exit_after);
    709716    //content_pane.paintImmediately(bounds);
    710717    return true; 
Note: See TracChangeset for help on using the changeset viewer.