Index: gli/trunk/src/org/greenstone/gatherer/gui/WarningDialog.java
===================================================================
--- gli/trunk/src/org/greenstone/gatherer/gui/WarningDialog.java	(revision 16333)
+++ gli/trunk/src/org/greenstone/gatherer/gui/WarningDialog.java	(revision 16335)
@@ -48,13 +48,24 @@
     private JButton ok_button;
     private JCheckBox show_check;
-    private JTextField value_field;
+    private JComponent value_field;
     private JPanel value_panel;
     private String affected_property;
     private String full_property;
-
-
-    public WarningDialog(String warning_name, String warning_title, String warning_message, String affected_property, boolean can_cancel)
+    /** Whether or not to display the checkbox that will turn off this dialog in future */
+    private final boolean showcheckbox;
+
+
+    public WarningDialog(String warning_name, String warning_title, String warning_message, String affected_property, boolean can_cancel) 
+    {
+	this(warning_name, warning_title, warning_message, affected_property, can_cancel, true); // true for show checkbox
+    }
+
+
+    public WarningDialog(String warning_name, String warning_title, String warning_message, String affected_property, boolean can_cancel,
+			 boolean showcheckbox)
     {
 	super(Gatherer.g_man, "Warning", true);
+
+	this.showcheckbox = showcheckbox; 
 
 	// Determine the name of this prompt.
@@ -88,5 +99,4 @@
 	value_field = new JTextField();
 	JPanel bottom_pane = new JPanel();
-	show_check = new JCheckBox(Dictionary.get("WarningDialog.Dont_Show_Again"));
 	JPanel control_pane = new JPanel();
 	ok_button = new GLIButton(Dictionary.get("General.OK"), Dictionary.get("General.OK_Tooltip"));
@@ -129,6 +139,9 @@
 	bottom_pane.setBorder(BorderFactory.createEmptyBorder(5,0,0,0));
 	bottom_pane.setLayout(new BorderLayout());
-	bottom_pane.add(show_check, BorderLayout.CENTER);
 	bottom_pane.add(control_pane, BorderLayout.EAST);
+	if(showcheckbox) {
+	    show_check = new JCheckBox(Dictionary.get("WarningDialog.Dont_Show_Again"));
+	    bottom_pane.add(show_check, BorderLayout.CENTER);
+	}
 
 	content_pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
@@ -150,24 +163,20 @@
 
     public void actionPerformed(ActionEvent event) {
-	boolean bad_value = false;
+	boolean valid_value = true;
 	if(event.getSource() == ok_button) {
 	    if(affected_property != null && Configuration.self != null) {
-		String value = value_field.getText();
-		if(value.length() > 0) {
-		   if(value_field instanceof URLField) {
-		      bad_value = !((URLField)value_field).validateURL();
-		   }
-		   if(!bad_value) {
-		      // Store the value of the property
-		      Configuration.setString(affected_property, true, value_field.getText());
-		   }
+		valid_value = URLField.validateURL(value_field);
+		if(valid_value) {
+		    // Store the value of the property
+		    URLField.store(value_field, affected_property); //Configuration.setString(affected_property, true, value);
 		}
 	    }
-	    if(!bad_value) {
+	    if(valid_value) {
 		result = JOptionPane.OK_OPTION;
 	    }
-	}
-	if(!bad_value) {
-	    if (Configuration.self != null) {
+	} 
+
+	if(valid_value) {
+	    if (Configuration.self != null && showcheckbox) {
 		// Store the state of the show message checkbox.
 		Configuration.set(full_property, true, !show_check.isSelected());
@@ -182,5 +191,7 @@
 
     /** Gives notification of key events on the buttons */
-    public void keyPressed(KeyEvent e) {
+    public void keyPressed(KeyEvent e) {}
+
+    public void keyReleased(KeyEvent e) {
 	if (e.getKeyCode() == KeyEvent.VK_ENTER) {
 	    // Enter: Click the button in focus
@@ -192,7 +203,5 @@
     }
 
-    public void keyReleased(KeyEvent e) { }
-
-    public void keyTyped(KeyEvent e) { }
+    public void keyTyped(KeyEvent e) {}
 
 
@@ -216,4 +225,8 @@
      */
     public void setMessageOnly(boolean message_only) {
+	if(!showcheckbox) {
+	    return;
+	}
+
 	// If this is a message then change the checkbox
 	if(message_only) {
@@ -229,5 +242,5 @@
      * @param  control the JTextField subclass you want to use for the control
      */
-    public void setValueField(JTextField control) {
+    public void setValueField(JComponent control) {
 	// Remove the current control
 	value_panel.remove(value_field);
@@ -253,5 +266,5 @@
 
     public void setValueField(String field_value){
-	this.value_field.setText(field_value);
+	URLField.setText(this.value_field, field_value);
     }
 
