Index: gli/trunk/src/org/greenstone/gatherer/gui/ExportAsPrompt.java
===================================================================
--- gli/trunk/src/org/greenstone/gatherer/gui/ExportAsPrompt.java	(revision 17139)
+++ gli/trunk/src/org/greenstone/gatherer/gui/ExportAsPrompt.java	(revision 17145)
@@ -83,7 +83,7 @@
 
     private ArrayList all_collections = null;
-    private ArrayList selected_collections = null;
-    /** The list of collections to include in exported cd-rom/dvd image */
-    private CheckList list = null;
+    private BasicCollectionConfiguration selected_collection = null;
+  /** The list of collections to export */
+    private JList list = null;
     /** The currently selected collection for deletion. */
     private BasicCollectionConfiguration collection = null;
@@ -161,8 +161,7 @@
 	plugoutMap.put("GreenstoneMETS","doctxt.xml,docmets.xml");     
 	plugoutMap.put("FedoraMETS","doctxt.xml,docmets.xml");     
-	plugoutMap.put("GA","doc.xml");
 
 	// this is the order we want them to appear in the list
-	String [] saveas_formats = {"GA", "GreenstoneMETS", "FedoraMETS", "MARCXML", "DSpace"};
+	String [] saveas_formats = {"GreenstoneMETS", "FedoraMETS", "MARCXML", "DSpace"};
         cancel_button = new GLIButton(Dictionary.get("General.Close"), Dictionary.get("General.Close_Tooltip"));
 	
@@ -232,5 +231,6 @@
 
 	all_collections = new ArrayList();
-	list = new CheckList(true);
+	//list = new CheckList(true);
+	list = new JList(getCollectionListModel());
 	list_label = new JLabel(Dictionary.get("DeleteCollectionPrompt.Collection_List"));
 	
@@ -244,8 +244,5 @@
 	folder_button.addActionListener(new FolderButtonListener());
    
-	
-	scanForCollections();
-	list.setListData(all_collections);
-
+       
 	prompt = this;
 	setSize(SIZE);
@@ -286,8 +283,5 @@
 	ok_button = null;
 	prompt = null;
-	if (selected_collections!=null) {
-	    selected_collections.clear();
-	    selected_collections = null;
-	}
+	selected_collection = null;
 	title_field = null;
 	title_label = null;
@@ -411,6 +405,6 @@
 	DebugStream.println("ExportAsPrompt.exportAsCollections()");
 
-	int num_collections = selected_collections.size();
-	if (num_collections == 0) return;
+	if (selected_collection == null) return;
+
 	cd_title = title_field.getText();
 
@@ -488,7 +482,6 @@
 	}
        
-	for (int i = 0; i < num_collections; i++) {
-	    command_parts_list.add(((BasicCollectionConfiguration) selected_collections.get(i)).getShortName());
-	}
+	 command_parts_list.add( selected_collection.getShortName());
+	 
 
 	DebugStream.print("export command = ");
@@ -523,15 +516,7 @@
     public void resultPrompt(boolean success, String extra) {
 	args = new String[2];
-	StringBuffer coll_names = new StringBuffer();
-	for (int i=0; i<selected_collections.size();i++) {
-	    if (i>0) {
-		coll_names.append(", ");
-	    }
-	    BasicCollectionConfiguration complete_collection = (BasicCollectionConfiguration)selected_collections.get(i);
-	    coll_names.append(complete_collection.getName() + StaticStrings.SPACE_CHARACTER + StaticStrings.OPEN_PARENTHESIS_CHARACTER + complete_collection.getShortName() + StaticStrings.CLOSE_PARENTHESIS_CHARACTER);
-	    complete_collection = null;
-	}
-	
-	args[0] = coll_names.toString();
+	
+	// coll name
+	args[0] = selected_collection.getName() + StaticStrings.SPACE_CHARACTER + StaticStrings.OPEN_PARENTHESIS_CHARACTER + selected_collection.getShortName() + StaticStrings.CLOSE_PARENTHESIS_CHARACTER;
 	
 	String export_type = (String) saveas_combobox.getSelectedItem();       
@@ -558,21 +543,13 @@
 
 	if (success) {
-	    String successMessage
-		= (selected_collections.size()==1) 
-		? "ExportAsPrompt.Successful_ExportOne"
-		: "ExportAsPrompt.Successful_ExportMany";
-
-	    title = Dictionary.get("ExportAsPrompt.Successful_Title");
-	    label = Dictionary.get(successMessage, args);
-	    details = Dictionary.get("ExportAsPrompt.Successful_Details", args);
+	  String successMessage = "ExportAsPrompt.Successful_ExportOne";
+	  title = Dictionary.get("ExportAsPrompt.Successful_Title");
+	  label = Dictionary.get(successMessage, args);
+	  details = Dictionary.get("ExportAsPrompt.Successful_Details", args);
 	} else {
-	    String failedMessage
-		= (selected_collections.size()==1) 
-		? "ExportAsPrompt.Failed_ExportOne"
-		: "ExportAsPrompt.Failed_ExportMany";
-
-	    title = Dictionary.get("ExportAsPrompt.Failed_Title");
-	    label = Dictionary.get(failedMessage, args);
-	    details = Dictionary.get("ExportAsPrompt.Failed_Details", args);
+	  String failedMessage = "ExportAsPrompt.Failed_ExportOne";
+	  title = Dictionary.get("ExportAsPrompt.Failed_Title");
+	  label = Dictionary.get(failedMessage, args);
+	  details = Dictionary.get("ExportAsPrompt.Failed_Details", args);
 	}
 	SimpleResultDialog result_dialog = new SimpleResultDialog(this, title, label, details);
@@ -588,5 +565,6 @@
      * @see org.greenstone.gatherer.util.Utility
      */
-    private void scanForCollections() {
+  private ListModel getCollectionListModel() {
+    DefaultListModel model = new DefaultListModel();
 	// Start at the collect dir.
 	File collect_directory = new File(Gatherer.getCollectDirectoryPath());
@@ -602,5 +580,5 @@
 		    if (config_file.exists()) {
 			BasicCollectionConfiguration config = new BasicCollectionConfiguration(config_file);
-			all_collections.add(config);		        
+			model.addElement(config);		        
 			config = null;
 		    }
@@ -608,6 +586,7 @@
 	    }
 	}
+	return model;
 	// Otherwise the collect directory doesn't actually exist, so there ain't much we can do.
-    }
+  }
 
 
@@ -667,23 +646,23 @@
 	{
 	    // Can only export when something is ticked
-	    ok_button.setEnabled(!list.isNothingTicked());
+	    //ok_button.setEnabled(!list.isNothingTicked());
 
 	    if (list.isSelectionEmpty()) {
-		// This only happens when the dialog is first entered
 		details_textarea.setText(Dictionary.get("DeleteCollectionPrompt.No_Collection"));
-		return;
-	    }
-
-	    collection = (BasicCollectionConfiguration) ((CheckListEntry) list.getSelectedValue()).getObject();
-	    args = new String[3];
-	    args[0] = collection.getCreator();
-	    args[1] = collection.getMaintainer();
-	    args[2] = collection.getDescription();
-	    details_textarea.setText(Dictionary.get("DeleteCollectionPrompt.Details", args));
-	    details_textarea.setCaretPosition(0);
-	}
-    }
-
-
+		ok_button.setEnabled(false);
+	    }
+	    else {
+	      BasicCollectionConfiguration collection = (BasicCollectionConfiguration) list.getSelectedValue();
+	      args = new String[3];
+	      args[0] = collection.getCreator();
+	      args[1] = collection.getMaintainer();
+	      args[2] = collection.getDescription();
+	      details_textarea.setText(Dictionary.get("DeleteCollectionPrompt.Details", args));
+	      details_textarea.setCaretPosition(0);
+	      ok_button.setEnabled(true);
+	    }
+	}
+
+    }
     /** The OK button listener implementation. */
     private class OKButtonListener 
@@ -702,5 +681,5 @@
 	    ///ystem.err.println("OK Clicked");
 	    // Make sure there are some colls specified
-	    selected_collections = list.getTicked();
+	    selected_collection = (BasicCollectionConfiguration)list.getSelectedValue();
 	    error_message = new StringBuffer();
 	    
