aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/plugin/googletalkaccregwizz
diff options
context:
space:
mode:
authorDamian Minkov <damencho@jitsi.org>2011-02-17 15:38:18 +0000
committerDamian Minkov <damencho@jitsi.org>2011-02-17 15:38:18 +0000
commitf3845d02cb66580b3a4851c07421bded74dcd3ef (patch)
tree15241ff7d9caa61a49418995601fe9babe7637f4 /src/net/java/sip/communicator/plugin/googletalkaccregwizz
parent99dea31ea21b252a1a225deee4f959291e41254a (diff)
downloadjitsi-f3845d02cb66580b3a4851c07421bded74dcd3ef.zip
jitsi-f3845d02cb66580b3a4851c07421bded74dcd3ef.tar.gz
jitsi-f3845d02cb66580b3a4851c07421bded74dcd3ef.tar.bz2
When creating new account (simple or advance form) make sure we don't reuse old AccountRegistration instances.
Diffstat (limited to 'src/net/java/sip/communicator/plugin/googletalkaccregwizz')
-rw-r--r--src/net/java/sip/communicator/plugin/googletalkaccregwizz/GoogleTalkAccountRegistrationWizard.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/plugin/googletalkaccregwizz/GoogleTalkAccountRegistrationWizard.java b/src/net/java/sip/communicator/plugin/googletalkaccregwizz/GoogleTalkAccountRegistrationWizard.java
index 0129b1b..ce8ba2a 100644
--- a/src/net/java/sip/communicator/plugin/googletalkaccregwizz/GoogleTalkAccountRegistrationWizard.java
+++ b/src/net/java/sip/communicator/plugin/googletalkaccregwizz/GoogleTalkAccountRegistrationWizard.java
@@ -108,6 +108,13 @@ public class GoogleTalkAccountRegistrationWizard
public Iterator<WizardPage> getPages()
{
java.util.List<WizardPage> pages = new ArrayList<WizardPage>();
+
+ // create new registration, our container needs the pages
+ // this means this is a new wizard and we must reset all data
+ // it will be invoked and when the wizard cleans and unregister
+ // our pages, but this fix don't hurt in this situation.
+ this.registration = new GoogleTalkAccountRegistration();
+
firstWizardPage = new FirstWizardPage(this);
pages.add(firstWizardPage);
@@ -431,6 +438,11 @@ public class GoogleTalkAccountRegistrationWizard
public Object getSimpleForm()
{
+ // when creating first wizard page, create and new
+ // AccountRegistration to avoid reusing old instances and
+ // data left from old registrations
+ registration = new GoogleTalkAccountRegistration();
+
firstWizardPage = new FirstWizardPage(this);
return firstWizardPage.getSimpleForm();
}