[jitsi-dev] Re: [jitsi~svn:10363] Corrects persistence of information displayed by SIP presence panel: when


#1

Thanks Chenzo,

I suppose we'd have to think of a more generic way to do this so that it
automatically works for all providers and all fields without requiring
any manual intervention.

One solution that comes to mind is looking up all fields starting from
the parent and resetting anything that can be.

Another, simpler solution would be to just make sure we dispose
dialogues when we are done with them and then recreate them again ...
this would leave quite some garbage behind but account manipulation is
not something that's supposed to occur that often so I think we could
live with it.

Emil

by SIP presence panel: when

From: vincent_lucas@java.net

Project: jitsi
Repository: svn
Revision: 10363
Author: vincent_lucas
Link:

Log Message:

···

-------- Original Message --------
Subject: [jitsi~svn:10363] Corrects persistence of information displayed
Date: Mon, 28 Jan 2013 15:50:04 +0000
Reply-To: commits@jitsi.java.net
To: commits@jitsi.java.net
Date: 2013-01-28 15:50:03 UTC
------------
Corrects persistence of information displayed by SIP presence panel:
when looking at several account preferences the last account presence
details were shown.

Revisions:
----------
10363

Modified Paths:
---------------
trunk/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationForm.java
trunk/src/net/java/sip/communicator/plugin/sipaccregwizz/PresencePanel.java

Diffs:
------
Index:
trunk/src/net/java/sip/communicator/plugin/sipaccregwizz/PresencePanel.java

---
trunk/src/net/java/sip/communicator/plugin/sipaccregwizz/PresencePanel.java
(revision 10362)
+++
trunk/src/net/java/sip/communicator/plugin/sipaccregwizz/PresencePanel.java
(revision 10363)
@@ -506,4 +506,18 @@
                 clistOptionUseSipCredentialsBox.isSelected());
         }
     }
+
+ /**
+ * Reinits labels and combobox to default values.
+ */
+ public void reinit()
+ {
+ setClistOptionEnableEnabled(false);
+ setClistOptionUseSipCredentials(false);
+ setClistOptionUseSipCredentialsEnabled(false);
+ setClistOptionServerUri(null);
+ setClistOptionUser(null);
+ setClistOptionPassword(null);
+ contactlistOptionsCombo.setSelectedItem(contactlistOptions[0]);
+ }
}
Index:
trunk/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationForm.java

---
trunk/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationForm.java
(revision 10362)
+++
trunk/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationForm.java
(revision 10363)
@@ -445,6 +445,7 @@

         securityPanel.loadAccount(accountID);

+ presencePanel.reinit();
         presencePanel.setPresenceEnabled(enablePresence);
         presencePanel.setForcePeerToPeerMode(forceP2P);
         presencePanel.setPollPeriod(pollingPeriod);