- Timestamp:
- 2008-08-25T13:28:51+12:00 (16 years ago)
- Location:
- gli/trunk/src/org/greenstone/gatherer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/Gatherer.java
r16884 r16990 749 749 } 750 750 url = null; 751 } 752 catch(ConnectionException connectException) { 753 754 DebugStream.println(connectException.getMessage()); 751 755 } 752 756 catch (Exception exception) { -
gli/trunk/src/org/greenstone/gatherer/gui/Preferences.java
r16884 r16990 650 650 public void actionPerformed(ActionEvent event) 651 651 { 652 // Several options requiring restarting the GLI to apply: 653 // interface font, interface language, changed gliserver url or library url 654 boolean restart_required = false; 655 String restart_message = ""; 656 657 652 658 // Connection preferences 653 659 String program_str = program_field.getText(); … … 657 663 Configuration.setPreviewCommand(program_str); 658 664 665 666 String old_library_url = Configuration.library_url.toString(); 659 667 String library_url_string = library_path_field.getText(); 668 if(!old_library_url.equals(library_url_string)) { 669 670 // If the server is remote and the library path's been changed, then GLI client needs restart 671 // If the server is local, GLI is going to work with the collection of GSDLPath anyway, 672 // even if the library path for previewing has changed 673 if (Gatherer.isGsdlRemote) { 674 restart_required = true; 675 restart_message = Dictionary.get("Preferences.General.Manual_Restart_Required"); 676 } 677 if(Gatherer.c_man.getCollection() != null) { 678 // if the gliserver url has changed while a collection is open, 679 // close the open collection of the old library URL 680 Gatherer.c_man.saveCollection(); 681 Gatherer.c_man.closeCollection(); 682 Configuration.setString("general.open_collection"+Configuration.gliPropertyNameSuffix(), true, ""); 683 } 684 } 660 685 if (library_url_string.equals("")) { 661 686 Configuration.library_url = null; … … 674 699 675 700 if (Gatherer.isGsdlRemote && !Gatherer.GS3) { 701 String old_gliserver_url = Configuration.gliserver_url.toString(); 676 702 String gliserver_url_string = gliserver_url_field.getText(); 703 if(!old_gliserver_url.equals(gliserver_url_string)) { 704 restart_required = true; 705 restart_message = Dictionary.get("Preferences.General.Manual_Restart_Required"); 706 707 if(Gatherer.c_man.getCollection() != null) { 708 // if the gliserver url has changed while a collection is open, 709 // close the open collection of the old gliserver URL 710 Gatherer.c_man.saveCollection(); 711 Gatherer.c_man.closeCollection(); 712 Configuration.setString("general.open_collection"+Configuration.gliPropertyNameSuffix(), true, ""); 713 } 714 } 677 715 if (gliserver_url_string.equals("")) { 678 716 Configuration.gliserver_url = null; … … 688 726 Configuration.setString("general.gliserver_url", true, gliserver_url_string); 689 727 } 728 690 729 691 730 boolean site_changed = false; … … 698 737 Configuration.setSiteAndServlet(new_site, (String)servlet_combobox.getSelectedItem()); 699 738 } 700 739 701 740 Configuration.set("general.use_proxy", true, use_proxy_checkbox.isSelected()); 702 741 Configuration.setString("general.proxy_host", true, proxy_host_field.getText()); … … 709 748 Configuration.set("general.view_extracted_metadata", Configuration.COLLECTION_SPECIFIC, view_extracted_metadata_checkbox.isSelected()); 710 749 711 // Two options requiring restarting the GLI to apply: interface font, and interface language712 boolean restart_required = false;713 750 714 751 // GLI interface font … … 717 754 Configuration.setString("general.font", true, font_field.getText()); 718 755 restart_required = true; 756 restart_message = Dictionary.get("Preferences.General.Restart_Required"); 719 757 } 720 758 … … 724 762 Configuration.setLocale("general.locale", Configuration.GENERAL_SETTING, ((DictionaryEntry) language_combobox.getSelectedItem()).getLocale()); 725 763 restart_required = true; 764 restart_message = Dictionary.get("Preferences.General.Restart_Required"); 726 765 } 727 766 728 767 // Inform the user that a restart is required, if necessary 729 768 if (restart_required) { 730 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("Preferences.General.Restart_Required"), Dictionary.get("General.Warning"), JOptionPane.WARNING_MESSAGE);769 JOptionPane.showMessageDialog(Gatherer.g_man, restart_message, Dictionary.get("General.Warning"), JOptionPane.WARNING_MESSAGE); 731 770 } 732 771 … … 766 805 if (Gatherer.GS3 && site_changed && Gatherer.c_man.getCollection() != null && !Gatherer.isGsdlRemote) { 767 806 // shut down the collection 768 System.err.println("shutting down t ehcollection");807 System.err.println("shutting down the collection"); 769 808 Gatherer.g_man.saveThenCloseCurrentCollection(); 770 809 }
Note:
See TracChangeset
for help on using the changeset viewer.