Ignore:
Timestamp:
2004-01-27T16:35:34+13:00 (20 years ago)
Author:
jmt12
Message:

More modifications to mirroring including testing for a valid version of Wget (and complaining if its missing or it is old) and rearranging buttons on the GProgressBar

File:
1 edited

Legend:

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

    r6567 r6622  
    5656    private JButton apply_button;
    5757    private JButton cancel_button;
     58    private JButton clear_cache_button;
    5859    private JButton ok_button;
    5960    private JCheckBox show_file_size_checkbox;
     
    208209    Dictionary.registerTooltip(proxy_port_field, "Preferences.Connection.Proxy_Port_Tooltip");
    209210
     211    /** @todo - add to dictionary. Bet you're getting sick of these by now! */
     212    clear_cache_button = new GLIButton("Preferences.Connection.Clear_Cache");
     213
    210214    // Connection
    211215    use_proxy_checkbox.addActionListener(new UseProxyListener());
     216    clear_cache_button.addActionListener(new ClearCacheListener());
    212217
    213218    // Layout
     
    235240    connection_pane.add(proxy_host_pane);
    236241    connection_pane.add(proxy_port_pane);
     242    if(Gatherer.config.get(StaticStrings.WORKFLOW_MIRROR, true)) {
     243        connection_pane.add(clear_cache_button);
     244    }
    237245
    238246    return connection_pane;
     
    717725    }
    718726
     727    private class ClearCacheListener
     728    implements ActionListener {
     729    public void actionPerformed(ActionEvent event) {
     730        // Retrieve the cache folder and delete it.
     731        Utility.delete(Utility.getCacheDir());
     732    }
     733    }
     734
    719735    private class DictionaryEntry
    720736    implements Comparable {
Note: See TracChangeset for help on using the changeset viewer.