Index: /main/trunk/gli/src/org/greenstone/gatherer/Gatherer.java
===================================================================
--- /main/trunk/gli/src/org/greenstone/gatherer/Gatherer.java	(revision 22830)
+++ /main/trunk/gli/src/org/greenstone/gatherer/Gatherer.java	(revision 22831)
@@ -821,55 +821,83 @@
 
 
-    public static void collectDirectoryHasChanged(String oldCollectPath, String newCollectPath) { 
-	if(oldCollectPath.equals(newCollectPath)) {
-	    return; // nothing to be done
-	}
-
-	// first save any open collection in the old location, then close it
-	if(Gatherer.c_man.getCollection() != null) {
-	    Gatherer.g_man.saveThenCloseCurrentCollection(); // close the current collection first
-	}
-	
-	// change to new collect path
-	Configuration.setString("general.open_collection"+Configuration.gliPropertyNameSuffix(), 
-				true, newCollectPath);
-	Gatherer.setCollectDirectoryPath(newCollectPath);
-	
-
-	// refresh the Documents in Greenstone Collections
-	//WorkspaceTreeModel.refreshGreenstoneCollectionsNode();
-	Gatherer.g_man.refreshWorkspaceTreeGreenstoneCollections();
-	
-	// The web server needs to be told where a new (non-standard) collecthome home is.
-	// The web server reads collecthome from cgi-bin/gsdlsite.cfg, where the property
-	// collecthome can be specified if a non-standard collecthome is to be used. If no 
-	// such property is specified in the file, then it assumes the standard GS collecthome.
-	// This method does nothing for a remote Greenstone.	
-	if(Gatherer.isGsdlRemote) {
-	    return;
-	}	
-
-	String gsdlsitecfg = "";
-	if(Gatherer.GS3) { // web/WEB-INF/cgi/gsdl3site.cfg
-	    gsdlsitecfg = Configuration.gsdl3_path + File.separator + "WEB-INF" 
-			+ File.separator + "cgi" + File.separator + "gsdl3site.cfg";
-	} else { // cgi-bin/gsdlsite.cfg
-	    gsdlsitecfg = Configuration.gsdl_path + File.separator 
-			+ "cgi-bin" + File.separator + "gsdlsite.cfg";
-	}
-
-	// non-destructive update of gsdl(3)site.cfg (comments preserved)
-	String collectDir = Gatherer.getCollectDirectoryPath();
-	//collectDir = "\"" + collectDir.substring(0, collectDir.length()-1) + "\""; // remove file separator at end	
-	collectDir = collectDir.substring(0, collectDir.length()-1); // remove file separator at end	
-	Utility.updatePropertyConfigFile(gsdlsitecfg, "collecthome", collectDir);
-
-	if(!Gatherer.GS3 && Gatherer.isLocalLibrary) {
-	    // for Images in the collection to work, the apache web server 
-	    // configuration's COLLECTHOME should be updated on collectdir change. 
-	    // Does nothing for server.exe at the moment
-
-	    LocalLibraryServer.reconfigure();
-	}
+    public static void collectDirectoryHasChanged(
+		String oldCollectPath, String newCollectPath, final Component container) 
+	{ 
+		// Will use a busy cursor if the process of changing the collect directory takes more 
+		// than half a second/500ms. See http://www.catalysoft.com/articles/busyCursor.html
+		Cursor originalCursor = container.getCursor();
+		java.util.TimerTask timerTask = new java.util.TimerTask() {
+			public void run() {
+				// set the cursor on the container:
+				container.setCursor(new Cursor(Cursor.WAIT_CURSOR));
+			}
+		};
+		java.util.Timer timer = new java.util.Timer(); 
+		
+		try {
+			timer.schedule(timerTask, 500);
+		
+			if(oldCollectPath.equals(newCollectPath)) {
+			    return; // nothing to be done
+			}
+
+			// first save any open collection in the old location, then close it
+			if(Gatherer.c_man.getCollection() != null) {
+			    Gatherer.g_man.saveThenCloseCurrentCollection(); // close the current collection first
+			}
+			
+			// change to new collect path
+			Configuration.setString("general.open_collection"+Configuration.gliPropertyNameSuffix(), 
+						true, newCollectPath);
+			Gatherer.setCollectDirectoryPath(newCollectPath);
+			
+
+			// refresh the Documents in Greenstone Collections
+			//WorkspaceTreeModel.refreshGreenstoneCollectionsNode();
+			Gatherer.g_man.refreshWorkspaceTreeGreenstoneCollections();
+			
+			// The web server needs to be told where a new (non-standard) collecthome home is.
+			// The web server reads collecthome from cgi-bin/gsdlsite.cfg, where the property
+			// collecthome can be specified if a non-standard collecthome is to be used. If no 
+			// such property is specified in the file, then it assumes the standard GS collecthome.
+			// This method does nothing for a remote Greenstone.	
+			if(Gatherer.isGsdlRemote) {
+			    return;
+			}	
+
+			String gsdlsitecfg = "";
+			if(Gatherer.GS3) { // web/WEB-INF/cgi/gsdl3site.cfg
+			    gsdlsitecfg = Configuration.gsdl3_path + File.separator + "WEB-INF" 
+					+ File.separator + "cgi" + File.separator + "gsdl3site.cfg";
+			} else { // cgi-bin/gsdlsite.cfg
+			    gsdlsitecfg = Configuration.gsdl_path + File.separator 
+					+ "cgi-bin" + File.separator + "gsdlsite.cfg";
+			}
+
+			// non-destructive update of gsdl(3)site.cfg (comments preserved)
+			String collectDir = Gatherer.getCollectDirectoryPath();
+			//collectDir = "\"" + collectDir.substring(0, collectDir.length()-1) + "\""; // remove file separator at end	
+			collectDir = collectDir.substring(0, collectDir.length()-1); // remove file separator at end	
+			Utility.updatePropertyConfigFile(gsdlsitecfg, "collecthome", collectDir);
+
+			if(!Gatherer.GS3 && Gatherer.isLocalLibrary) {
+			    // for Images in the collection to work, the apache web server 
+			    // configuration's COLLECTHOME should be updated on collectdir change. 
+			    // Does nothing for server.exe at the moment
+
+			    LocalLibraryServer.reconfigure();
+			}
+		} finally { // Note try-finally section without catch:
+			// "Java's finally clause is guaranteed to be executed even when
+			// an exception is thrown and not caught in the current scope."
+			// See http://www.catalysoft.com/articles/busyCursor.html
+			// the following code fragment is guaranteed to restore the original
+			// cursor now the custom actionPerformed() processing is complete, regardless
+			// of whether the processing method terminates normally or throws an exception
+			// and regardedless of where in the call stack the exception is caught.			
+			
+			timer.cancel();
+			container.setCursor(originalCursor);
+		}
     }
 
Index: /main/trunk/gli/src/org/greenstone/gatherer/gui/NewCollectionDetailsPrompt.java
===================================================================
--- /main/trunk/gli/src/org/greenstone/gatherer/gui/NewCollectionDetailsPrompt.java	(revision 22830)
+++ /main/trunk/gli/src/org/greenstone/gatherer/gui/NewCollectionDetailsPrompt.java	(revision 22831)
@@ -541,13 +541,5 @@
 		    }
 		}
-	    }
-
-	    // going through with collection creation
-	    if(collectDirChanged) {		
-		Gatherer.collectDirectoryHasChanged(Gatherer.getCollectDirectoryPath(), newCollectPath); 
-		// will tell the server that the collect directory has changed and that
-		// the workspace needs to be refreshed (Documents in Greenstone Collections)
-	    }
-
+	    }		
 	    description_final = description.getText();
 
@@ -557,6 +549,14 @@
 	    
 	    cancelled = false;
+		
+		self.dispose();
 	    
-	    self.dispose();
+	    // going through with collection creation
+	    if(collectDirChanged) {		
+		Gatherer.collectDirectoryHasChanged(Gatherer.getCollectDirectoryPath(), 
+				newCollectPath, Gatherer.g_man.getContentPane()); 
+		// will tell the server that the collect directory has changed and that
+		// the workspace needs to be refreshed (Documents in Greenstone Collections)
+	    }
 	}
     }
Index: /main/trunk/gli/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java
===================================================================
--- /main/trunk/gli/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java	(revision 22830)
+++ /main/trunk/gli/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java	(revision 22831)
@@ -424,7 +424,8 @@
 	    }
 
-	    Gatherer.collectDirectoryHasChanged(Gatherer.getCollectDirectoryPath(), newCollectPath); 
+	    Gatherer.collectDirectoryHasChanged(Gatherer.getCollectDirectoryPath(), 
+				newCollectPath, Gatherer.g_man.getContentPane()); 
 	        // will tell the server that the collect directory has changed and that
-		// the workspace needs to be refreshed (Documents in Greenstone Collections)
+			// the workspace needs to be refreshed (Documents in Greenstone Collections)
 	}
     }
Index: /main/trunk/gli/src/org/greenstone/gatherer/gui/Preferences.java
===================================================================
--- /main/trunk/gli/src/org/greenstone/gatherer/gui/Preferences.java	(revision 22830)
+++ /main/trunk/gli/src/org/greenstone/gatherer/gui/Preferences.java	(revision 22831)
@@ -863,15 +863,5 @@
 		Configuration.setSiteAndServlet(new_site, (String)servlet_combobox.getSelectedItem());
 	    }
-
-	    // collect directory change
-	    String newCollectPath = collect_dir_field.getText();
-	    if(!newCollectPath.endsWith(File.separator)) {
-		newCollectPath += File.separator;
-	    }
-	    Gatherer.collectDirectoryHasChanged(Gatherer.getCollectDirectoryPath(), newCollectPath);
-		// will tell the server that the collect directory has changed and that
-		// the workspace needs to be refreshed (Documents in Greenstone Collections)
-
-	   
+	    
 	    Configuration.set("general.use_proxy", true, use_proxy_checkbox.isSelected());
 	    Configuration.setString("general.proxy_host", true, proxy_host_field.getText());
@@ -984,4 +974,17 @@
 	    }
 
+		// collect directory change
+	    String newCollectPath = collect_dir_field.getText();
+	    if(!newCollectPath.endsWith(File.separator)) {
+		newCollectPath += File.separator;
+	    }
+		// wait cursor will display while changing the collect directory, need to work out what component to
+		// display it on: main GLI frame or Preferences window, depending on if OK or Apply was pressed
+		Container container = close ? Gatherer.g_man.getContentPane() : Preferences.this.getContentPane();
+	    Gatherer.collectDirectoryHasChanged(Gatherer.getCollectDirectoryPath(), 
+				newCollectPath, container);
+			// will tell the server that the collect directory has changed and that
+			// the workspace needs to be refreshed (Documents in Greenstone Collections)	   
+		
 	    if (restart_required) {
 	      if (keep_collection_open) {
