Merge branch 'develop' into spike/JAL-4047/JAL-4048_columns_in_sequenceID
[jalview.git] / src / jalview / jbgui / GDesktop.java
index 7b4f477..124c7c7 100755 (executable)
@@ -32,9 +32,9 @@ import javax.swing.JMenuItem;
 
 import jalview.api.AlignmentViewPanel;
 import jalview.bin.Cache;
+import jalview.gui.APQHandlers;
 import jalview.gui.Desktop;
 import jalview.io.FileFormatException;
-import jalview.jbgui.QuitHandler.QResponse;
 import jalview.util.MessageManager;
 import jalview.util.Platform;
 
@@ -142,7 +142,6 @@ public class GDesktop extends JFrame
    */
   private void jbInit() throws Exception
   {
-    boolean apqHandlersSet = false;
     /**
      * APQHandlers sets handlers for About, Preferences and Quit actions
      * peculiar to macOS's application menu. APQHandlers will check to see if a
@@ -150,10 +149,10 @@ public class GDesktop extends JFrame
      */
     try
     {
-      apqHandlersSet = APQHandlers.setAPQHandlers(this);
+      APQHandlers.setAPQHandlers((Desktop) this);
     } catch (Exception e)
     {
-      System.out.println("Cannot set APQHandlers");
+      jalview.bin.Console.outPrintln("Cannot set APQHandlers");
       // e.printStackTrace();
     } catch (Throwable t)
     {
@@ -194,7 +193,7 @@ public class GDesktop extends JFrame
           inputURLMenuItem_actionPerformed(null);
         } catch (FileFormatException e1)
         {
-          System.err.println("Error loading from URL: " + e1.getMessage());
+          jalview.bin.Console.errPrintln("Error loading from URL: " + e1.getMessage());
         }
       }
     });
@@ -215,14 +214,8 @@ public class GDesktop extends JFrame
       @Override
       public void actionPerformed(ActionEvent e)
       {
-        QResponse qresponse = Desktop.instance != null
-                ? Desktop.instance.desktopQuit()
-                : QResponse.QUIT;
-        if (qresponse == QResponse.CANCEL_QUIT)
-        {
-          jalview.bin.Console
-                  .debug("GDesktop: Quit action cancelled by user");
-        }
+        if (Desktop.instance != null)
+          Desktop.instance.desktopQuit();
       }
     });
     aboutMenuItem.setText(MessageManager.getString("label.about"));
@@ -528,7 +521,7 @@ public class GDesktop extends JFrame
    */
   protected void quit()
   {
-    // System.out.println("********** GDesktop.quit()");
+    // jalview.bin.Console.outPrintln("********** GDesktop.quit()");
   }
 
   /**