Ignore:
Timestamp:
2008-08-18T16:35:36+12:00 (16 years ago)
Author:
ak19
Message:

When GS is local, it will use library_url_gs3 or library_url_gs2 and similarly open_collection_gs3 or open_collection_gs2 properties from the config file. (It still uses the default library_url and open_collection when GS is remote or if GLI is used with Fedora.) Method Configuration.gliPropertyNameSuffix() is added to return either the empty string or _gs2 or _gs3 in order to work out the property name in the situation. This change helps when running local GS2 and GS3 alternatively with GLI, as it preserves the library url and last opened collection for each separately.

File:
1 edited

Legend:

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

    r16397 r16884  
    8282        */
    8383
    84     static final public String PROGRAM_VERSION = "svn-trunk";
     84    static final public String PROGRAM_VERSION = "trunk";
    8585
    8686    static private Dimension size = new Dimension(800, 540);
     
    444444        open_collection_file_path = open_collection;
    445445        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);
    447448        }
    448449        if (no_load || open_collection_file_path.equals("")) {
     
    801802    static private void missingEXEC() {
    802803    WarningDialog dialog;
     804    String configPropertyName = "general.library_url"+Configuration.gliPropertyNameSuffix();
     805
    803806    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
    808812    dialog.setValueField(new URLField.Text(Configuration.getColor("coloring.editable_foreground", false), Configuration.getColor("coloring.editable_background", false)));
    809813    dialog.display();
     
    811815    dialog = null;
    812816
    813     String library_url_string = Configuration.getString("general.library_url", true);
     817    String library_url_string = Configuration.getString(configPropertyName, true);
    814818    if (!library_url_string.equals("")) {
    815819        try {
     
    912916    dialog.setValueField(new URLField.DropDown(Configuration.getColor("coloring.editable_foreground", false),
    913917                           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"));
    916921
    917922    if (Gatherer.default_gliserver_url!=null){
Note: See TracChangeset for help on using the changeset viewer.