Ignore:
Timestamp:
2003-08-18T14:00:55+12:00 (21 years ago)
Author:
jmt12
Message:

Fix 203B008

File:
1 edited

Legend:

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

    r4678 r5157  
    4343import org.greenstone.gatherer.Gatherer;
    4444import org.greenstone.gatherer.collection.Collection;
     45import org.greenstone.gatherer.collection.CollectionManager;
    4546import org.greenstone.gatherer.gui.ModalDialog;
    4647import org.greenstone.gatherer.gui.SimpleMenuBar;
    4748import org.greenstone.gatherer.util.ArrayTools;
    4849import org.greenstone.gatherer.util.GSDLSiteConfig;
     50import org.greenstone.gatherer.util.StaticStrings;
    4951import org.greenstone.gatherer.util.Utility;
    5052/** This class provides the functionality to delete current collections from the GSDLHOME/collect/ directory. The user chooses the collection from a list, where each entry also displays details about itself, confirms the delete of a collection by checking a checkbox then presses the ok button to actually delete the collection.
     
    117119    /** Destructor. */
    118120    public void destroy() {
     121    list_model.clear();
     122    list_model = null;
    119123    close_button = null;
    120124    confirmation = null;
    121125    details = null;
    122126    details_label = null;
    123     list_model.clear();
    124     list_model = null;
    125127    list = null;
    126128    ok_button = null;
     
    216218        ArrayTools.sort(collections);
    217219        for(int i = 0; collections != null && i < collections.length; i++) {
    218         File config_file = Utility.findConfigFile(collections[i]);
    219         if (config_file != null) {
    220             CollectionConfiguration config = new CollectionConfiguration(config_file);
    221             if (config != null) {
    222             CollectionEntry col = new CollectionEntry(collections[i].getName(), config);
    223             list_model.addElement(col);
    224             }   
     220        if(!collections[i].getName().equals(StaticStrings.MODEL_COLLECTION_NAME)) {
     221            File config_file = Utility.findConfigFile(collections[i]);
     222            if (config_file != null) {
     223            CollectionConfiguration config = new CollectionConfiguration(config_file);
     224            if (config != null) {
     225                CollectionEntry col = new CollectionEntry(collections[i].getName(), config);
     226                list_model.addElement(col);
     227            }   
     228            }
    225229        }
    226230        }
     
    235239            */
    236240    public void actionPerformed(ActionEvent event) {
     241        // Ask the collection manager to refresh the 'Greenstone Collections' folder
     242        Gatherer.c_man.refreshGreenstoneCollections();
     243        // Done
    237244        prompt.dispose();
    238245    }
     
    243250    implements ListSelectionListener {
    244251    /** Any implementation of ListSelectionListener must include this method so we can be informed when the list selection changes.
    245      * @param event A <strong>ListSelectionEvent</strong> containing all the relevant information garnered from the event itself.
    246             */
     252     * @param  event a <strong>ListSelectionEvent</strong> containing all the relevant information garnered from the event itself
     253     */
    247254    public void valueChanged(ListSelectionEvent event) {
     255        ok_button.setEnabled(false);
     256        confirmation.setSelected(false);
    248257        if(!list.isSelectionEmpty()) {
    249258        confirmation.setEnabled(true);
Note: See TracChangeset for help on using the changeset viewer.