- Timestamp:
- 2005-10-14T15:19:36+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/Preferences.java
r10387 r10726 86 86 private JTextArea mode_description_textarea; 87 87 private JTextField font_field; 88 private JTextField gliserver_url_field; 88 89 private JTextField library_path_field; 89 90 private JTextField program_field; … … 197 198 Dictionary.registerTooltip(library_path_field, "Preferences.Connection.Library_Path_Tooltip"); 198 199 } 199 200 201 JPanel gliserver_url_pane = null; 202 JLabel gliserver_url_label = null; 203 if (Gatherer.isGsdlRemote) { 204 gliserver_url_pane = new JPanel(); 205 gliserver_url_pane.setPreferredSize(ROW_SIZE); 206 gliserver_url_label = new JLabel(); 207 gliserver_url_label.setPreferredSize(LABEL_SIZE); 208 String gliserver_url_string = ""; 209 if (Configuration.gliserver_url != null) { 210 gliserver_url_string = Configuration.gliserver_url.toString(); 211 } 212 gliserver_url_field = new JTextField(gliserver_url_string); 213 gliserver_url_field.setCaretPosition(0); 214 Dictionary.registerText(gliserver_url_label, "Preferences.Connection.GLIServer_URL"); 215 Dictionary.registerTooltip(gliserver_url_field, "Preferences.Connection.GLIServer_URL_Tooltip"); 216 } 200 217 201 218 JPanel site_pane = null; … … 291 308 site_combobox.addActionListener(new SiteComboboxListener()); 292 309 } 310 293 311 // Layout 294 312 program_pane.setLayout(new BorderLayout()); … … 300 318 library_path_pane.add(library_path_field, BorderLayout.CENTER); 301 319 320 if (Gatherer.isGsdlRemote) { 321 gliserver_url_pane.setLayout(new BorderLayout()); 322 gliserver_url_pane.add(gliserver_url_label, BorderLayout.WEST); 323 gliserver_url_pane.add(gliserver_url_field, BorderLayout.CENTER); 324 } 325 302 326 if (Gatherer.GS3) { 303 327 site_pane.setLayout(new BorderLayout()); … … 309 333 servlet_pane.add(servlet_combobox, BorderLayout.CENTER); 310 334 } 335 311 336 proxy_host_pane.setLayout(new BorderLayout()); 312 337 proxy_host_pane.add(proxy_host_label, BorderLayout.WEST); … … 321 346 connection_pane.add(program_pane); 322 347 connection_pane.add(library_path_pane); 348 if (Gatherer.isGsdlRemote) { 349 connection_pane.add(gliserver_url_pane); 350 } 323 351 if (Gatherer.GS3) { 324 352 connection_pane.add(site_pane); … … 636 664 Configuration.setString("general.library_url", true, library_url_string); 637 665 666 if (Gatherer.isGsdlRemote) { 667 String gliserver_url_string = gliserver_url_field.getText(); 668 if (gliserver_url_string.equals("")) { 669 Configuration.gliserver_url = null; 670 } 671 else { 672 try { 673 Configuration.gliserver_url = new URL(gliserver_url_string); 674 } 675 catch (MalformedURLException exception) { 676 DebugStream.printStackTrace(exception); 677 } 678 } 679 Configuration.setString("general.gliserver_url", true, gliserver_url_string); 680 } 681 638 682 boolean site_changed = false; 639 683 if (Gatherer.GS3) {
Note:
See TracChangeset
for help on using the changeset viewer.