- Timestamp:
- 2007-08-06T11:24:46+12:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/gui/Preferences.java
r13195 r14309 35 35 import javax.swing.event.*; 36 36 import javax.swing.plaf.*; 37 import org.greenstone.gatherer.remote.RemoteGreenstoneServer; 37 38 import org.greenstone.gatherer.Configuration; 39 import org.greenstone.gatherer.GAuthenticator; 38 40 import org.greenstone.gatherer.DebugStream; 39 41 import org.greenstone.gatherer.Dictionary; … … 201 203 JPanel gliserver_url_pane = null; 202 204 JLabel gliserver_url_label = null; 203 if (Gatherer.isGsdlRemote ) {205 if (Gatherer.isGsdlRemote && !Gatherer.GS3) { 204 206 gliserver_url_pane = new JPanel(); 205 207 gliserver_url_pane.setPreferredSize(ROW_SIZE); … … 322 324 library_path_pane.add(library_path_field, BorderLayout.CENTER); 323 325 324 if (Gatherer.isGsdlRemote ) {326 if (Gatherer.isGsdlRemote && !Gatherer.GS3) { 325 327 gliserver_url_pane.setLayout(new BorderLayout()); 326 328 gliserver_url_pane.add(gliserver_url_label, BorderLayout.WEST); … … 350 352 connection_pane.add(program_pane); 351 353 connection_pane.add(library_path_pane); 352 if (Gatherer.isGsdlRemote ) {354 if (Gatherer.isGsdlRemote && !Gatherer.GS3) { 353 355 connection_pane.add(gliserver_url_pane); 354 356 } … … 669 671 Configuration.setString("general.library_url", true, library_url_string); 670 672 671 if (Gatherer.isGsdlRemote ) {673 if (Gatherer.isGsdlRemote && !Gatherer.GS3) { 672 674 String gliserver_url_string = gliserver_url_field.getText(); 673 675 if (gliserver_url_string.equals("")) { … … 760 762 } 761 763 762 if (Gatherer.GS3 && site_changed && Gatherer.c_man.getCollection() != null ) {764 if (Gatherer.GS3 && site_changed && Gatherer.c_man.getCollection() != null && !Gatherer.isGsdlRemote) { 763 765 // shut down the collection 764 766 System.err.println("shutting down teh collection"); … … 783 785 // Always save configuration changes immediately (in case the GLI crashes) 784 786 Configuration.save(); 785 787 if (Gatherer.isGsdlRemote && Gatherer.GS3 && site_changed ){ 788 RemoteGreenstoneServer.downloadCollectionConfigurations(); 789 } 786 790 // Refresh the GLI to account for the configuration changes 787 791 Gatherer.refresh(Gatherer.PREFERENCES_CHANGED); … … 894 898 current_site_selection = site; 895 899 System.err.println("changed the current selection"); 900 896 901 ArrayList servlet_options = Gatherer.servlet_config.getServletsForSite(current_site_selection); 897 902 if (servlet_options == null) { … … 906 911 servlet_combobox.setToolTipText(Dictionary.get("Preferences.Connection.Servlet_Tooltip")); 907 912 servlet_combobox.setEnabled(true); 913 } 914 if (Gatherer.isGsdlRemote){ 915 // Close the current collection, remove the lock on this file, ask to login to the new site, then download collection configurations of the site. 916 if (Gatherer.c_man.getCollection()!=null){ 917 Gatherer.g_man.closeCurrentCollection(); 918 } 919 File lock_file = new File(Gatherer.c_man.getLoadedCollectionDirectoryPath() + "gli.lck"); 920 RemoteGreenstoneServer.deleteCollectionFile(Gatherer.c_man.getLoadedCollectionName(),lock_file); 921 Configuration.site_name=site; 922 RemoteGreenstoneServer.set_remote_greenstone_server_authentication_to_null(); 923 RemoteGreenstoneServer.downloadCollectionConfigurations(); 908 924 } 909 925 }
Note:
See TracChangeset
for help on using the changeset viewer.