multi-profile/subscription misc fixes
This commit is contained in:
parent
534612084c
commit
6cfa6a1413
1 changed files with 21 additions and 23 deletions
|
|
@ -133,12 +133,12 @@ class ProfileManager(wx.Panel):
|
|||
wx.MessageDialog(self, _("A profile name can't start with a @"), _("Bad profile name"), wx.ICON_ERROR).ShowModal()
|
||||
return
|
||||
profile = self.host.bridge.getProfileName(name)
|
||||
if not profile:
|
||||
debug(_("The profile is new, we create it"))
|
||||
assert(profile)
|
||||
old_jid = self.host.bridge.getParamA("JabberID", "Connection", profile_key=profile)
|
||||
old_pass = self.host.bridge.getParamA("Password", "Connection", profile_key=profile)
|
||||
new_jid = self.login_jid.GetValue()
|
||||
new_pass = self.login_pass.GetValue()
|
||||
print "old: %s, new: %s, old_pass: %s, new_pass: %s" % (old_jid, new_jid, old_pass, new_pass)
|
||||
if old_jid != new_jid:
|
||||
debug(_('Saving new JID and server'))
|
||||
self.host.bridge.setParam("JabberID", new_jid, "Connection", profile)
|
||||
|
|
@ -146,5 +146,5 @@ class ProfileManager(wx.Panel):
|
|||
if old_pass != new_pass:
|
||||
debug(_('Saving new password'))
|
||||
self.host.bridge.setParam("Password", new_pass, "Connection", profile)
|
||||
self.host.plug_profile(name)
|
||||
self.host.plug_profile(profile)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue