Changeset 7657


Ignore:
Timestamp:
2004-06-29T14:44:25+12:00 (20 years ago)
Author:
kjdon
Message:

added in a check for WGet in run - only does this if the mirror pane is turned on. also added missingWGET and oldWGET - these functions display a warning dialog

File:
1 edited

Legend:

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

    r7602 r7657  
    179179        handler = null;
    180180    */
    181 
    182181    if (gsdl3_path != null && !gsdl3_path.equals("")) {
    183182        this.GS3 = true;
     
    262261        }
    263262
     263        // also check for wget
     264        boolean mirror_workflow = config.get(StaticStrings.WORKFLOW_MIRROR, false);
     265        if (mirror_workflow) {
     266        // we only bother to check if mirroring is turned on
     267        String wget_version =  config.getWGetVersion();
     268        if (wget_version.equals(StaticStrings.NO_WGET_STR)) {
     269            missingWGET();
     270        } else if (wget_version.equals(StaticStrings.WGET_OLD_STR)) {
     271            oldWGET();
     272        }
     273        // else ok
     274        }
    264275        // Size and place the frame on the screen
    265276        Rectangle bounds = config.getBounds("general.bounds", true);
     
    716727    if (feedback_enabled) {
    717728        // if feedback is enabled, set up the recorder dialog
    718         Locale currLocale = Locale.getDefault(); // use teh default locale for now - this will be changed by the Gatherer run method
     729        Locale currLocale = Locale.getDefault(); // use the default locale for now - this will be changed by the Gatherer run method
    719730        ActionRecorderDialog dlg = new ActionRecorderDialog (currLocale);
    720731        gatherer.feedback_enabled = true;
     
    764775    dialog = null;
    765776    }
    766 
     777   
     778    /** Prints a warning message about a missing a valid WGet path. not fatal, but mirroring won't work */
     779    static public void missingWGET() {
     780    WarningDialog dialog = new WarningDialog("warning.MissingWGET", false);
     781    dialog.display();
     782    dialog.dispose();
     783    dialog = null;
     784    }
     785    /** Prints a warning message about having an old version of WGet. not fatal, but mirroring may not work properly */
     786    static public void oldWGET() {
     787    WarningDialog dialog = new WarningDialog("warning.OldWGET", false);
     788    dialog.display();
     789    dialog.dispose();
     790    dialog = null;
     791    }
    767792    /** Print a message to the debug stream. */
    768793    static synchronized public void print(String message) {
Note: See TracChangeset for help on using the changeset viewer.