[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Fri Apr 23 05:19:10 UTC 2010


gordonp
Fri Apr 23 01:19:10 EDT 2010
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui
In directory dev.open-bio.org:/tmp/cvs-serv24649/src/main/ca/ucalgary/seahawk/gui

Modified Files:
	MobySaveDialog.java 
Log Message:
Removed redundant popup of single tab export if canceled
moby-live/Java/src/main/ca/ucalgary/seahawk/gui MobySaveDialog.java,1.9,1.10
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobySaveDialog.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobySaveDialog.java	2010/04/18 00:33:05	1.9
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobySaveDialog.java	2010/04/23 05:19:10	1.10
@@ -92,11 +92,11 @@
 		    fileChooser.setName(FILE_CHOOSER_SAVE_TITLE);
 		    fileChooser.setFileHidingEnabled(false);
 		    fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
+		    fileChooser.addChoosableFileFilter(new DescriptiveFileFilter(HTML_EXT, HTML_DESC));
 		    if(document.hasXMLSource()){
-			fileChooser.addChoosableFileFilter(new DescriptiveFileFilter(T2FLOW_EXT, T2FLOW_DESC));
 			fileChooser.addChoosableFileFilter(new DescriptiveFileFilter(XML_EXT, XML_DESC));
+			fileChooser.addChoosableFileFilter(new DescriptiveFileFilter(T2FLOW_EXT, T2FLOW_DESC));
 		    }
-		    fileChooser.addChoosableFileFilter(new DescriptiveFileFilter(HTML_EXT, HTML_DESC));
 		    fileChooser.setAcceptAllFileFilterUsed(false);
 		    if(lastDirOpened != null){
 			fileChooser.setCurrentDirectory(lastDirOpened);
@@ -277,7 +277,8 @@
 
 	    // Waits until workflowConfirmed or workflowCanceled is called by the preview dialog
 	    dialog.available.acquire();
-	    return dialog.exportConfirmed;
+	    // Check choice, because if the user cancelled the dialog, don't show it again regardless
+	    return choice == 1 ? true : dialog.exportConfirmed;
 	} catch (Exception ex) {
 	    ex.printStackTrace();
 	    JOptionPane.showMessageDialog(null, "Cannot save the Seahawk tab history as a Taverna workflow: "+ex, 




More information about the MOBY-guts mailing list