diff --git a/src/net/java/sip/communicator/impl/gui/main/MainFrame.java b/src/net/java/sip/communicator/impl/gui/main/MainFrame.java index 9c4a11004..03a2e3c78 100755 --- a/src/net/java/sip/communicator/impl/gui/main/MainFrame.java +++ b/src/net/java/sip/communicator/impl/gui/main/MainFrame.java @@ -114,8 +114,8 @@ public MainFrame() menu = new MainMenu(this); /* - * Before closing the application window saves the current size and - * position through the ConfigurationService. + * If the application is configured to quit when this frame is closed, + * do so. */ this.addWindowListener(new WindowAdapter() { @@ -123,11 +123,6 @@ public void windowClosed(WindowEvent event) { MainFrame.this.windowClosed(event); } - - public void windowClosing(WindowEvent event) - { - MainFrame.this.windowClosing(event); - } }); addComponentListener(new ComponentAdapter() @@ -1417,11 +1412,16 @@ protected void windowClosed(WindowEvent event) } } - /** - * @param event Currently not used + /* + * Overrides SIPCommFrame#windowClosing(WindowEvent). Reflects the closed + * state of this MainFrame in the configuration in order to make it + * accessible to interested parties, displays the warning that the + * application will not quit. */ protected void windowClosing(WindowEvent event) { + super.windowClosing(event); + if (!GuiActivator.getUIService().getExitOnMainWindowClose()) { SwingUtilities.invokeLater(new Runnable()