Changeset 9341
- Timestamp:
- 2005-03-09T14:16:49+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r9166 r9341 731 731 public void loadCollection(String collection_file_path) 732 732 { 733 // Display a modal progress popup to indicate that the collection is being loaded 733 734 ModalProgressPopup load_collection_progress_popup = new ModalProgressPopup(Dictionary.get("CollectionManager.Loading_Collection"), Dictionary.get("CollectionManager.Loading_Collection_Please_Wait")); 734 LoadCollectionTask load_collection_task = new LoadCollectionTask(collection_file_path, load_collection_progress_popup); 735 load_collection_task.start(); 736 load_collection_progress_popup.display(); // Blocks, so must go *after* starting the task! 735 load_collection_progress_popup.display(); 736 737 // Load the collection on a separate thread so the progress bar updates correctly 738 (new LoadCollectionTask(collection_file_path, load_collection_progress_popup)).start(); 737 739 } 738 740 … … 753 755 { 754 756 loadCollectionInternal(collection_file_path); 755 load_collection_progress_popup. setVisible(false);757 load_collection_progress_popup.close(); 756 758 } 757 759 } … … 777 779 } 778 780 779 // Check that the re is the collection configuration fileavailable781 // Check that the collection configuration file is available 780 782 File collection_file = new File(location); 781 // Ensure that the directory exists. 783 784 // Ensure that the directory exists 782 785 File collection_directory = collection_file.getParentFile(); 783 if ( !collection_directory.exists()) {784 // we cant open this785 collection_directory = null;786 if (collection_directory == null || !collection_directory.exists()) { 787 // We can't open this 788 System.err.println("CollectionManager.loadCollection: No collection directory."); 786 789 return; 787 790 } 791 788 792 File collection_config_file = new File(collection_directory, Utility.CONFIG_FILE); 789 793 if (!collection_config_file.exists()) { 790 DebugStream.println("CollectionManager.loadCollection: No config file");794 System.err.println("CollectionManager.loadCollection: No config file."); 791 795 collection_directory = null; 792 796 collection_config_file = null;
Note:
See TracChangeset
for help on using the changeset viewer.