Changeset 13391


Ignore:
Timestamp:
2006-12-01T11:36:15+13:00 (17 years ago)
Author:
mdewsnip
Message:

(Remote building) Collection configurations are now downloaded when choosing File -> Delete so you can delete collections without having to choose File -> Open first.

File:
1 edited

Legend:

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

    r13293 r13391  
    176176    }
    177177    else if (esrc == menu_bar.file_delete) {
    178         DeleteCollectionPrompt dcp = new DeleteCollectionPrompt();
    179         if (dcp.display()) {
    180         saveThenCloseCurrentCollection();
    181         }
    182         dcp.destroy();
    183         dcp = null;
    184         System.gc();
     178        new DeleteCollectionTask().start();
    185179    }
    186180    else if (esrc == menu_bar.file_cdimage) {
     
    792786
    793787
     788    private class DeleteCollectionTask
     789    extends Thread
     790    {
     791    public void run()
     792    {
     793        // If using a remote Greenstone check if the collection configurations have been downloaded; do so if not
     794        if (Gatherer.isGsdlRemote && !CollectionManager.downloaded_collection_configurations) {
     795        if (RemoteGreenstoneServer.downloadCollectionConfigurations().equals("")) {
     796            // Something went wrong downloading the collection configurations
     797            return;
     798        }
     799
     800        CollectionManager.downloaded_collection_configurations = true;
     801        }
     802
     803        // The rest is handled by the DeleteCollectionPrompt
     804        DeleteCollectionPrompt dc_prompt = new DeleteCollectionPrompt();
     805        if (dc_prompt.display()) {
     806        saveThenCloseCurrentCollection();
     807        }
     808        dc_prompt.destroy();
     809        dc_prompt = null;
     810    }
     811    }
     812
     813
    794814    /** Any implementation of ChangeListener must include this method so we can be informed when the state of one of the registered objects changes. In this case we are listening to view changes within the tabbed pane.
    795815     * @param event A ChangeEvent containing information about the event that fired this call.
Note: See TracChangeset for help on using the changeset viewer.