Changeset 7314
- Timestamp:
- 2004-05-13T15:40:26+12:00 (20 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/Gatherer.java
r6885 r7314 50 50 import org.greenstone.gatherer.cdm.CommandTokenizer; 51 51 import org.greenstone.gatherer.collection.CollectionManager; 52 import org.greenstone.gatherer.feedback.ActionRecorderDialog; 52 53 import org.greenstone.gatherer.file.FileManager; 53 54 import org.greenstone.gatherer.file.FileAssociationManager; … … 124 125 /** The name of the necessary environment variable to check for in the programs environment. */ 125 126 static public String KEY = "GSDLPATH"; 127 128 // feedback stuff 129 /** is the feedback feature enabled? */ 130 static public boolean feedback_enabled = true; 131 /** the action recorder dialog */ 132 static public ActionRecorderDialog feedback_dialog = null; 126 133 /** Extra environment information which must be set before shell processes will run properly. Should always be null if the startup script/program has done its job properly. */ 127 134 static public String extra_env[] = null; … … 205 212 loadConfig(gsdl_path, exec_path, perl_path, mirroring_enabled, wget_version_str, wget_path); 206 213 207 // MDSTesting 208 //new MDSTest("dublin.mds"); // Old style 209 //new MDSTest("dublin2.mds"); // Multilingually Optimizated 210 //System.exit(0); 211 214 // the feedback dialog has been loaded with a default locale, 215 // now set the user specified one 216 if (feedback_enabled && feedback_dialog != null) { 217 feedback_dialog.setLocale(config.getLocale("general.locale", true)); 218 } 219 212 220 // Read Dictionary 213 221 dictionary = new Dictionary(config.getLocale("general.locale", true), config.getFont("general.font", true)); 222 214 223 215 224 if (gsdl_path == null) { … … 305 314 306 315 // After the window has been made visible, check that it is in the correct place 316 // sometimes java places a window not in the correct place, 317 // but with an offset. If so, we work out what the offset is ] 318 // and change the desired location to take that into account 307 319 Point location = g_man.getLocation(); 308 320 int x_offset = bounds.x - location.x; … … 310 322 // If not, offset the window to move it into the correct location 311 323 if (x_offset > 0 || y_offset > 0) { 324 ///ystem.err.println("changing the location to "+(bounds.x + x_offset)+" "+ (bounds.y + y_offset)); 312 325 g_man.setLocation(bounds.x + x_offset, bounds.y + y_offset); 313 326 } … … 492 505 System.setProperty("java.util.prefs.syncInterval","2000000"); // One message every 600 hours! 493 506 507 494 508 // Override the exception handler with a new one which we can easily quiet the exceptions from. 495 509 // System.setProperty("sun.awt.exception.handler", "GLIExceptionHandler"); … … 502 516 exception.printStackTrace(); 503 517 } 504 518 505 519 Gatherer gatherer = new Gatherer(); 506 507 520 boolean debug = false; 521 boolean feedback_enabled = false; 508 522 boolean mirroring_enabled = false; 509 523 boolean no_load = false; … … 569 583 debug = true; 570 584 } 585 // Run GLI with feedback enabled. 586 else if(argument_name.equals(StaticStrings.FEEDBACK_ARGUMENT)) { 587 feedback_enabled = true; 588 } 571 589 // Forces no loading on previous collection. 572 590 else if(argument_name.equals(StaticStrings.NO_LOAD_ARGUMENT)) { … … 661 679 // Arguments all parsed. 662 680 681 if (feedback_enabled) { 682 // if feedback is enabled, set up the recorder dialog 683 Locale currLocale = Locale.getDefault(); // use teh default locale for now - this will be changed by the Gatherer run method 684 ActionRecorderDialog dlg = new ActionRecorderDialog (currLocale); 685 gatherer.feedback_enabled = true; 686 gatherer.feedback_dialog = dlg; 687 } 688 663 689 // Splash screen. 664 690 Splash splash = new Splash(); -
trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r7224 r7314 446 446 // Create the menu-bar and stick it up the top. 447 447 menu_bar = new MenuBar(new MenuListenerImpl()); 448 content_pane.add(menu_bar, BorderLayout.NORTH); 448 449 //feedback changes 450 //content_pane.add(menu_bar, BorderLayout.NORTH); 451 this.setJMenuBar(menu_bar); 452 // end feedback changes 453 449 454 // Create the tabbed pane and plop it in the center where it will 450 455 // expand to consume all available space like any good gas would. … … 452 457 tab_pane.addChangeListener(this); 453 458 tab_pane.setFont(Gatherer.config.getFont("general.font", false)); 454 455 // // May have to play with the order in which tabs are added.456 // if(Gatherer.config.get("workflow.browse", true)) {457 // browser_pane = new BrowsingPane();458 // tab_pane.addTab("GUI.Hunt", Utility.getImage("browsing.gif"), browser_pane);459 // tab_pane.setEnabledAt(tab_pane.indexOfComponent(browser_pane), Gatherer.config.get("workflow.browse", false));460 // }461 459 462 460 if(Gatherer.config.get(StaticStrings.WORKFLOW_MIRROR, true)) { -
trunk/gli/src/org/greenstone/gatherer/gui/ModalDialog.java
r6770 r7314 38 38 /** An extension of the JDialog that overrides the JVM's typical modal behaviour. This typical behaviour is that when a modal dialog is opened, all other windows cease to respond to user events until the modal dialog is disposed. However this prevents us opening the help documents property whenever a modal dialog is open. Thus we override the modal behaviour so that only the owner frame or dialog is blocked. 39 39 * Note that because we always call the super constructor with modal set to false, this should be made visible with setVisible(true) rather than show() which will return straight away. */ 40 // feedback note: veronika had changed all the super constructor calls to 41 // use modal instead of false - not sure if this is needed so I have not 42 // put that in. --kjdon 40 43 public class ModalDialog 41 44 extends JDialog { -
trunk/gli/src/org/greenstone/gatherer/gui/Splash.java
r5589 r7314 64 64 public void destroy() { 65 65 dispose(); 66 rootPane = null; 66 // feedback change - don't set the rootPane to null 67 //rootPane = null; 67 68 } 68 69 } -
trunk/gli/src/org/greenstone/gatherer/util/StaticStrings.java
r7288 r7314 106 106 static final public String EXTRACTED_NAMESPACE = "ex."; 107 107 static final public String FALSE_STR = "false"; 108 static final public String FEEDBACK_ARGUMENT = "-feedback"; 108 109 static final public String FILE_ATTRIBUTE = "file"; 109 110 static final public String FILENAME_STR = "Filename";
Note:
See TracChangeset
for help on using the changeset viewer.