Changeset 14250 for gli


Ignore:
Timestamp:
2007-07-16T10:18:09+12:00 (17 years ago)
Author:
xiao
Message:

modify to enable the menubar items file and edit if there is no collection left open from the last session since they were disabled by default to avoid possible exception which happens if the user tries to click on the item before the openning collection progress bar pops up.

File:
1 edited

Legend:

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

    r14228 r14250  
    454454        g_man.setVisible(true);
    455455      }
    456   if (open_collection_file_path != null) {
    457       //the menu bar stuff (file, edit) have to be disabled while a collection opened
    458       //from last session being opened in a different thread
    459       setMenuBarEnabled(false);
    460   }     
    461456      // Get a list of the core Greenstone classifiers and plugins
    462457      Classifiers.loadClassifiersList(null);
     
    471466        }
    472467      }
     468 
     469  if (open_collection_file_path == null) {
     470     
     471      //the menu bar items, file and edit, are disabled from the moment of their creation. if there is no left-over collection from the last session, enable them; otherwise it is untill the collection finishes loading, will they be enabled in collectionManager.java
     472      setMenuBarEnabled(true);
     473  } else {
     474 
    473475      // If there was a collection left open last time, reopen it
    474476      c_man.openCollectionFromLastTime();
    475 
     477  }
    476478    }
    477479    public static void setMenuBarEnabled(boolean enabled) {
Note: See TracChangeset for help on using the changeset viewer.