Changeset 6642


Ignore:
Timestamp:
2004-01-28T14:51:16+13:00 (20 years ago)
Author:
jmt12
Message:

Further tweaks, fixes and changes to the mirroring stuff, the highlight of which is the new log files. I've also removed the speech marks from around login and pass. While this means you can't have a login or pass with spaces in it, it does save me a lot of effort. Rather than tell people about the further options, they now click on a button to open the preferences window and show the further options. Also fixed a horrendeously subtle bug when trying to update the FileSystemModel - stupid race conditions

File:
1 edited

Legend:

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

    r6622 r6642  
    5151public class Preferences
    5252    extends ModalDialog {
     53
     54    static final public String CONNECTION_PREFS = "connection";
     55    static final public String GENERAL_PREFS = "general";
     56
     57
     58    static final private Dimension LABEL_SIZE = new Dimension(240, 25);
     59    static final private Dimension ROW_SIZE = new Dimension(640, 25);
     60    static final private Dimension SIZE = new Dimension(640, 345);
     61    static final private String TRUE = "true";
    5362
    5463    private CheckList warning_preferences_check_list;
     
    92101    private Preferences self;
    93102
    94     static final Dimension LABEL_SIZE = new Dimension(240, 25);
    95     static final Dimension ROW_SIZE = new Dimension(640, 25);
    96     static final Dimension SIZE = new Dimension(640, 345);
    97     static final String TRUE = "true";
    98 
    99103    public Preferences() {
     104    this(GENERAL_PREFS);
     105    }
     106
     107    public Preferences(String initial_view) {
    100108    // Initialize
    101109    super(Gatherer.g_man, true);
     
    112120    tab_pane.add("Preferences.Mode", createModePreferences());
    113121    tab_pane.add("Preferences.Workflow", createWorkflowPreferences());
    114     tab_pane.add("Preferences.Connection", createConnectionPreferences());
     122    JPanel connection_preferences = createConnectionPreferences();
     123    tab_pane.add("Preferences.Connection", connection_preferences);
    115124    tab_pane.add("Preferences.Warnings", createWarningPreferences());
    116125    Dictionary.register(tab_pane);
     
    148157    setLocation(((frame_size.width - SIZE.width) / 2), ((frame_size.height - SIZE.height)));
    149158
     159    // Bring the desired pane to the fore
     160    if(initial_view.equals(CONNECTION_PREFS)) {
     161        tab_pane.setSelectedComponent(connection_preferences);
     162    }
     163    else {
     164        tab_pane.setSelectedComponent(general_preferences);
     165    }
     166
     167   
    150168    // Clean up
     169    general_preferences = null;
     170    connection_preferences = null;
    151171    frame_location = null;
    152172    frame_size = null;
     
    156176    tab_pane = null;
    157177    content_pane = null;
     178
    158179    setVisible(true);
    159180    }
Note: See TracChangeset for help on using the changeset viewer.