quit saves screen size
authoramwaterhouse <Andrew Waterhouse>
Mon, 13 Jun 2005 11:35:41 +0000 (11:35 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 13 Jun 2005 11:35:41 +0000 (11:35 +0000)
src/jalview/gui/Desktop.java

index e239a10..2a1979e 100755 (executable)
@@ -89,14 +89,7 @@ public class Desktop
     {\r
       public void windowClosing(WindowEvent evt)\r
       {\r
-        jalview.bin.Cache.setProperty("SCREEN_X", getBounds().x +\r
-                                      "");\r
-        jalview.bin.Cache.setProperty("SCREEN_Y", getBounds().y +\r
-                                      "");\r
-        jalview.bin.Cache.setProperty("SCREEN_WIDTH",\r
-                                      getWidth() + "");\r
-        jalview.bin.Cache.setProperty("SCREEN_HEIGHT",\r
-                                      getHeight() + "");\r
+        quit();\r
       }\r
     });\r
     setVisible(true);\r
@@ -318,7 +311,7 @@ public class Desktop
   /*\r
    * Exit the program\r
    */\r
-  public void quit_actionPerformed(ActionEvent e)\r
+  public void quit()\r
   {\r
     if (jalview.bin.Jalview.applet != null)\r
     {\r
@@ -326,6 +319,14 @@ public class Desktop
     }\r
     else\r
     {\r
+      jalview.bin.Cache.setProperty("SCREEN_X", getBounds().x +\r
+                                    "");\r
+      jalview.bin.Cache.setProperty("SCREEN_Y", getBounds().y +\r
+                                    "");\r
+      jalview.bin.Cache.setProperty("SCREEN_WIDTH",\r
+                                    getWidth() + "");\r
+      jalview.bin.Cache.setProperty("SCREEN_HEIGHT",\r
+                                      getHeight() + "");\r
       System.exit(0);\r
     }\r
   }\r