From da2ccfaa2f761fa168ad69e5cc65eedc9b9f60bc Mon Sep 17 00:00:00 2001 From: Yana Stamcheva Date: Thu, 26 Feb 2009 13:47:58 +0000 Subject: [PATCH] Remove the newAccountDialog on dispose() and not on cancel, thus fixing also the behavior on add. (Part of the commit : one "New account" dialog instance at a time). --- .../impl/gui/main/account/NewAccountDialog.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/net/java/sip/communicator/impl/gui/main/account/NewAccountDialog.java b/src/net/java/sip/communicator/impl/gui/main/account/NewAccountDialog.java index 5a218dce7..a6ff8d36b 100644 --- a/src/net/java/sip/communicator/impl/gui/main/account/NewAccountDialog.java +++ b/src/net/java/sip/communicator/impl/gui/main/account/NewAccountDialog.java @@ -340,8 +340,6 @@ else if (e.getErrorCode() } else if (sourceButton.equals(cancelButton)) { - newAccountDialog = null; - this.dispose(); } } @@ -359,10 +357,20 @@ public static void showNewAccountDialog() } /** - * Reinitialize the newAccountDialog, when the window is closed. + * Remove the newAccountDialog, when the window is closed. */ protected void close(boolean isEscaped) { newAccountDialog = null; } + + /** + * Remove the newAccountDialog on dispose. + */ + public void dispose() + { + newAccountDialog = null; + + super.dispose(); + } }