Changeset 5302
- Timestamp:
- 2003-08-27T15:14:13+12:00 (21 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r5157 r5302 68 68 import org.greenstone.gatherer.gui.Preferences; 69 69 import org.greenstone.gatherer.gui.PreviewPane; 70 import org.greenstone.gatherer.gui.SimpleOpenCollectionDialog; 70 71 import org.greenstone.gatherer.gui.messages.MessagePane; 71 72 import org.greenstone.gatherer.gui.metaaudit.MetaAuditFrame; … … 417 418 418 419 if(Gatherer.config.get("workflow.mirror", true)) { 419 mirror_pane = new MirrorPane(workspace_tree_sync); 420 mirror_pane.display(); 420 mirror_pane = new MirrorPane(); 421 421 tab_pane.addTab(get("Mirroring"), Utility.getImage("mirroring.gif"), mirror_pane); 422 422 tab_pane.setEnabledAt(tab_pane.indexOfComponent(mirror_pane), Gatherer.config.get("workflow.mirror", false)); … … 590 590 public boolean showLoadCollectionBox() { 591 591 boolean result = false; 592 //LoadCollectionBox load_collection_box = new LoadCollectionBox(); 593 File file; 594 if(Gatherer.config.gsdl_path != null) { 595 file = new File(Utility.getCollectionDir(Gatherer.config.gsdl_path)); 596 } 597 else { 598 file = new File(Utility.BASE_DIR); 599 } 600 OpenCollectionDialog chooser = new OpenCollectionDialog(file); 601 String filename = chooser.getFileName(); 592 // We first try the simple open collection dialog 593 SimpleOpenCollectionDialog dialog = new SimpleOpenCollectionDialog(); 594 int user_choice = dialog.display(); 595 String filename = null; 596 // The user may choose to go to the advanced 'browse' dialog 597 if(user_choice == SimpleOpenCollectionDialog.OK_OPTION) { 598 filename = dialog.getFileName(); 599 } 600 else if(user_choice == SimpleOpenCollectionDialog.BROWSE_OPTION) { 601 File file; 602 if(Gatherer.config.gsdl_path != null) { 603 file = new File(Utility.getCollectionDir(Gatherer.config.gsdl_path)); 604 } 605 else { 606 file = new File(Utility.BASE_DIR); 607 } 608 OpenCollectionDialog chooser = new OpenCollectionDialog(file); 609 file = null; 610 filename = chooser.getFileName(); 611 chooser.destroy(); 612 chooser = null; 613 } 614 dialog.destroy(); 615 dialog = null; 602 616 // User can cancel action. 603 617 if(filename != null) { … … 619 633 } 620 634 result = Gatherer.c_man.loadCollection(filename); 635 filename = null; 621 636 } 622 637 return result; -
trunk/gli/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java
r5164 r5302 82 82 } 83 83 84 public void destroy() { 85 } 86 84 87 public String getFileName() { 85 88 // Continually loop until the use chooses an appropriate file or cancels.
Note:
See TracChangeset
for help on using the changeset viewer.