Ignore:
Timestamp:
2004-10-18T11:50:18+13:00 (20 years ago)
Author:
mdewsnip
Message:

Changed the collectionChanged() functions to refresh(), and added an extra parameter for more control over refreshing.

File:
1 edited

Legend:

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

    r8313 r8353  
    108108    static final public String LOCK_FILE = "gli.lck";
    109109
     110    static public final int COLLECTION_OPENED  = 10;
     111    static public final int COLLECTION_CLOSED  = 11;
     112    static public final int COLLECTION_REBUILT = 12;
     113
    110114    /** Used to indicate the source of the message is the file collection methods. */
    111115    static final public int COLLECT   = 3;
     
    239243    if (Gatherer.g_man != null) {
    240244        Gatherer.g_man.updateUI();
    241         Gatherer.g_man.collectionChanged(false);
     245        Gatherer.g_man.refresh(COLLECTION_CLOSED, false);
    242246    }
    243247    // All of the consequences of a close should have been processed by now, so others should now see the collection as non-ready.
     
    494498        Gatherer.g_man.refreshWorkspaceTree(WorkspaceTree.LIBRARY_CONTENTS_CHANGED);
    495499
    496         Gatherer.g_man.collectionChanged(ready());
     500        Gatherer.g_man.refresh(COLLECTION_OPENED, ready());
    497501    }
    498502    }
     
    983987        // We're done. Let everyone know.
    984988        if (Gatherer.g_man != null) {
    985         Gatherer.g_man.collectionChanged(ready());
     989        Gatherer.g_man.refresh(COLLECTION_OPENED, ready());
    986990        }
    987991        result = true;
     
    11581162
    11591163        // Fire a collection changed first to update the preview etc buttons
    1160         Gatherer.g_man.collectionChanged(ready());
     1164        Gatherer.g_man.refresh(COLLECTION_REBUILT, ready());
    11611165
    11621166        // Now display a message dialog saying its all built
     
    11691173        else {
    11701174        JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CollectionManager.Preview_Ready_Failed"), Dictionary.get("CollectionManager.Preview_Ready_Title"), JOptionPane.ERROR_MESSAGE);
    1171         Gatherer.g_man.collectionChanged(ready());
     1175        Gatherer.g_man.refresh(COLLECTION_REBUILT, ready());
    11721176        }
    11731177    }
     
    11781182        } else {
    11791183        JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CollectionManager.Preview_Ready_Failed"), Dictionary.get("CollectionManager.Preview_Ready_Title"), JOptionPane.ERROR_MESSAGE);
    1180         Gatherer.g_man.collectionChanged(ready());
     1184        Gatherer.g_man.refresh(COLLECTION_REBUILT, ready());
    11811185        }
    11821186       
Note: See TracChangeset for help on using the changeset viewer.