- Timestamp:
- 2008-08-18T16:35:36+12:00 (16 years ago)
- Location:
- gli/trunk/src/org/greenstone/gatherer
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/Configuration.java
r16330 r16884 180 180 181 181 // Read the Greenstone library URL from the config file 182 String library_url_string = getString("general.library_url" , true);182 String library_url_string = getString("general.library_url"+gliPropertyNameSuffix(), true); 183 183 if (!library_url_string.equals("")) { 184 184 try { … … 208 208 209 209 } 210 211 /** @return the suffix for the the config file's library_url/open_collection propertyname. 212 * For Fedora and remote GS2 cases, there is no suffix. 213 * However, when dealing with a local Greenstone server, this returns suffix _gs2 or _gs3 214 * so it can be appended to the default library_url/open_collection propertynames. 215 * Having 2 separate library URL properties and open_collection properties for the two 216 * local versions of Greenstone allows GLI to save the library_url and last opened 217 * collection for both GS2 and GS3 in case anyone runs them alternatively. (This is useful 218 * when developing and testing across GS versions.) */ 219 static public String gliPropertyNameSuffix() { 220 if(Gatherer.isGsdlRemote || fedora_info.isActive()) { 221 return ""; // no special suffix 222 } else if(Gatherer.GS3) { // local GS3 223 return "_gs3"; 224 } else { // local GS2 225 return "_gs2"; 226 } 227 } 228 210 229 211 230 // Called when (gsdl3_path != null) || (Gatherer.GS3 && Gatherer.isGsdlRemote) … … 268 287 // Argument found 269 288 if (old_argument_element_name.equals(new_argument_element_name)) { 270 if (!new_argument_element_name.equals("general.open_collection" )) {289 if (!new_argument_element_name.equals("general.open_collection"+Configuration.gliPropertyNameSuffix())) { 271 290 String old_argument_element_value = XMLTools.getElementTextValue(old_argument_element); 272 291 if (!old_argument_element_value.equals(new_argument_element_value)) { -
gli/trunk/src/org/greenstone/gatherer/Gatherer.java
r16397 r16884 82 82 */ 83 83 84 static final public String PROGRAM_VERSION = " svn-trunk";84 static final public String PROGRAM_VERSION = "trunk"; 85 85 86 86 static private Dimension size = new Dimension(800, 540); … … 444 444 open_collection_file_path = open_collection; 445 445 if (open_collection_file_path == null) { 446 open_collection_file_path = Configuration.getString("general.open_collection", true); 446 open_collection_file_path = Configuration.getString( 447 "general.open_collection"+Configuration.gliPropertyNameSuffix(), true); 447 448 } 448 449 if (no_load || open_collection_file_path.equals("")) { … … 801 802 static private void missingEXEC() { 802 803 WarningDialog dialog; 804 String configPropertyName = "general.library_url"+Configuration.gliPropertyNameSuffix(); 805 803 806 if (GS3) { 804 dialog = new WarningDialog("warning.MissingEXEC", Dictionary.get("MissingEXEC_GS3.Title"), Dictionary.get("MissingEXEC_GS3.Message"), "general.library_url", false); 805 }else { 806 dialog = new WarningDialog("warning.MissingEXEC", Dictionary.get("MissingEXEC.Title"), Dictionary.get("MissingEXEC.Message"), "general.library_url", false); 807 } 807 dialog = new WarningDialog("warning.MissingEXEC", Dictionary.get("MissingEXEC_GS3.Title"), Dictionary.get("MissingEXEC_GS3.Message"), configPropertyName, false); 808 } else { // local case 809 dialog = new WarningDialog("warning.MissingEXEC", Dictionary.get("MissingEXEC.Title"), Dictionary.get("MissingEXEC.Message"), configPropertyName, false); 810 } 811 808 812 dialog.setValueField(new URLField.Text(Configuration.getColor("coloring.editable_foreground", false), Configuration.getColor("coloring.editable_background", false))); 809 813 dialog.display(); … … 811 815 dialog = null; 812 816 813 String library_url_string = Configuration.getString( "general.library_url", true);817 String library_url_string = Configuration.getString(configPropertyName, true); 814 818 if (!library_url_string.equals("")) { 815 819 try { … … 912 916 dialog.setValueField(new URLField.DropDown(Configuration.getColor("coloring.editable_foreground", false), 913 917 Configuration.getColor("coloring.editable_background", false), 914 defaultURLs, "general.gliserver_url", "general.open_collection", 915 "gliserver.pl")); 918 defaultURLs, "general.gliserver_url", 919 "general.open_collection"+Configuration.gliPropertyNameSuffix(), 920 "gliserver.pl")); 916 921 917 922 if (Gatherer.default_gliserver_url!=null){ -
gli/trunk/src/org/greenstone/gatherer/gui/GUIManager.java
r16336 r16884 464 464 // If we have a collection open remember it for next time, then save it and close it 465 465 if (Gatherer.c_man.ready()) { 466 Configuration.setString("general.open_collection", true, CollectionManager.getLoadedCollectionColFilePath()); 466 Configuration.setString("general.open_collection"+Configuration.gliPropertyNameSuffix(), 467 true, CollectionManager.getLoadedCollectionColFilePath()); 467 468 saveThenCloseCurrentCollection(); 468 469 } 469 470 else { 470 Configuration.setString("general.open_collection" , true, null);471 Configuration.setString("general.open_collection"+Configuration.gliPropertyNameSuffix(), true, null); 471 472 } 472 473 -
gli/trunk/src/org/greenstone/gatherer/gui/Preferences.java
r14371 r16884 669 669 } 670 670 } 671 Configuration.setString("general.library_url", true, library_url_string); 671 672 Configuration.setString("general.library_url"+Configuration.gliPropertyNameSuffix(), 673 true, library_url_string); 672 674 673 675 if (Gatherer.isGsdlRemote && !Gatherer.GS3) {
Note:
See TracChangeset
for help on using the changeset viewer.