X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fjbgui%2FGDesktop.java;h=124c7c7457c081401d84552f5a0170928cfb2c8f;hb=refs%2Fheads%2Fspike%2FJAL-4047%2FJAL-4048_columns_in_sequenceID;hp=ca952220a5013b8d67cf24a59b1c310b2b2ec7cf;hpb=627937c70fea0978f2075f198836756e94a81113;p=jalview.git diff --git a/src/jalview/jbgui/GDesktop.java b/src/jalview/jbgui/GDesktop.java index ca95222..124c7c7 100755 --- a/src/jalview/jbgui/GDesktop.java +++ b/src/jalview/jbgui/GDesktop.java @@ -32,6 +32,8 @@ 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.util.MessageManager; import jalview.util.Platform; @@ -140,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 @@ -148,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) { @@ -192,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()); } } }); @@ -213,7 +214,8 @@ public class GDesktop extends JFrame @Override public void actionPerformed(ActionEvent e) { - quit(); + if (Desktop.instance != null) + Desktop.instance.desktopQuit(); } }); aboutMenuItem.setText(MessageManager.getString("label.about")); @@ -519,7 +521,7 @@ public class GDesktop extends JFrame */ protected void quit() { - // System.out.println("********** GDesktop.quit()"); + // jalview.bin.Console.outPrintln("********** GDesktop.quit()"); } /**