Changeset 20789

Show
Ignore:
Timestamp:
07.10.2009 15:52:04 (10 years ago)
Author:
ak19
Message:

If the proxy host is not set but Use Proxy Connection is turned on, we don't let the user store the preferences and close the dialog just yet. Shows up a message.

Location:
gli/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • gli/trunk/classes/dictionary.properties

    r19663 r20789  
    923923Preferences.Connection.Proxy_Port:Proxy Port: 
    924924Preferences.Connection.Proxy_Port_Tooltip:The port number of your proxy server 
     925Preferences.Connection.Proxy_Host_Missing:Enter a value for the proxy host or turn off Use Proxy Connection in the Connection tab. 
    925926Preferences.Connection.Servlet:Servlet: 
    926927Preferences.Connection.Servlet_Tooltip:The servlet to use to view your site 
  • gli/trunk/src/org/greenstone/gatherer/gui/Preferences.java

    r19438 r20789  
    906906        Gatherer.refresh(Gatherer.PREFERENCES_CHANGED); 
    907907 
    908         // Hide dialog 
    909         if (close) { 
    910         self.dispose(); 
     908        // If proxy is on but proxy details are incomplete, then can't continue  
     909        if (use_proxy_checkbox.isSelected() && proxy_host_field.getText().equals("")) { 
     910        JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("Preferences.Connection.Proxy_Host_Missing"), 
     911                          Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); 
     912        } else { 
     913        // Hide dialog 
     914        if (close) { 
     915            self.dispose(); 
     916        } 
    911917        } 
    912918