JAL-629 Add a timeout to modal dialogs for command line warning
[jalview.git] / src / jalview / bin / Jalview.java
index 18e73ed..ba418fe 100755 (executable)
@@ -2038,8 +2038,8 @@ public class Jalview
               j.getArgParser().getMixedExamples());
       String quit = MessageManager.getString("action.quit");
 
-      Desktop.instance.nonBlockingDialog(title, warning, quit,
-              JvOptionPane.WARNING_MESSAGE, false, true);
+      Desktop.instance.nonBlockingDialog(title, warning, null, quit,
+              JvOptionPane.WARNING_MESSAGE, false, false, true, 30000);
 
       Jalview.exit(
               "Exiting due to mixed old and new command line arguments.",
@@ -2063,8 +2063,8 @@ public class Jalview
       {
         String cont = MessageManager.getString("label.continue");
 
-        Desktop.instance.nonBlockingDialog(32, 2, title, warning, url, cont,
-                JvOptionPane.WARNING_MESSAGE, false, true, true);
+        Desktop.instance.nonBlockingDialog(title, warning, url, cont,
+                JvOptionPane.WARNING_MESSAGE, false, true, true, 2000);
       }
     }
     if (j.getCommands() != null && j.getCommands().getErrors().size() > 0)
@@ -2084,7 +2084,7 @@ public class Jalview
                 Math.max(message.length(), Math.min(60, shortest)),
                 Math.min(errors.size(), 20), title, message,
                 j.getCommands().errorsToString(), ok,
-                JvOptionPane.WARNING_MESSAGE, true, false, true);
+                JvOptionPane.WARNING_MESSAGE, true, false, true, -1);
       }
     }
   }