Mercurial > libervia-backend
comparison frontends/wix/profile_manager.py @ 72:f271fff3a713
MUC implementation: first draft
/!\ the experimental muc branche of wokkel must be used
- bridge: new roomJoined signal
- wix: contact list widget is now in a separate file, and manage different kinds of presentation
- wix: chat window now manage group chat (first draft, not working yet)
- wix: constants are now in a separate class, so then can be accessible from everywhere
- wix: new menu to join room (do nothing yet, except entering in a test room)
- new plugin for xep 0045 (MUC), use wokkel experimental MUC branch
- plugins: the profile is now given for get_handler, cause it can be used internally by a plugin (e.g.: xep-0045 plugin)
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 21 Mar 2010 10:28:55 +1100 |
parents | 8f2ed279784b |
children | 23caf1051099 |
comparison
equal
deleted
inserted
replaced
71:efe81b61673c | 72:f271fff3a713 |
---|---|
130 wx.MessageDialog(self, _("You must select a profile or create a new one before connecting"), _("No profile selected"), wx.ICON_ERROR).ShowModal() | 130 wx.MessageDialog(self, _("You must select a profile or create a new one before connecting"), _("No profile selected"), wx.ICON_ERROR).ShowModal() |
131 return | 131 return |
132 if name[0]=='@': | 132 if name[0]=='@': |
133 wx.MessageDialog(self, _("A profile name can't start with a @"), _("Bad profile name"), wx.ICON_ERROR).ShowModal() | 133 wx.MessageDialog(self, _("A profile name can't start with a @"), _("Bad profile name"), wx.ICON_ERROR).ShowModal() |
134 return | 134 return |
135 profile = None # gof | |
136 profile = self.host.bridge.getProfileName(name) | 135 profile = self.host.bridge.getProfileName(name) |
137 if not profile: | 136 if not profile: |
138 debug(_("The profile is new, we create it")) | 137 debug(_("The profile is new, we create it")) |
139 old_jid = self.host.bridge.getParamA("JabberID", "Connection", profile_key=profile) | 138 old_jid = self.host.bridge.getParamA("JabberID", "Connection", profile_key=profile) |
140 old_pass = self.host.bridge.getParamA("Password", "Connection", profile_key=profile) | 139 old_pass = self.host.bridge.getParamA("Password", "Connection", profile_key=profile) |
141 new_jid = self.login_jid.GetValue() | 140 new_jid = self.login_jid.GetValue() |
142 new_pass = self.login_pass.GetValue() | 141 new_pass = self.login_pass.GetValue() |
143 if old_jid != new_jid: | 142 if old_jid != new_jid: |
144 debug(_('Saving new JID')) | 143 debug(_('Saving new JID and server')) |
145 self.host.bridge.setParam("JabberID", new_jid, "Connection", profile) | 144 self.host.bridge.setParam("JabberID", new_jid, "Connection", profile) |
145 self.host.bridge.setParam("Server", JID(new_jid).domain, "Connection", profile) | |
146 if old_pass != new_pass: | 146 if old_pass != new_pass: |
147 debug(_('Saving new password')) | 147 debug(_('Saving new password')) |
148 self.host.bridge.setParam("JabberID", new_pass, "Connection", profile) | 148 self.host.bridge.setParam("Password", new_pass, "Connection", profile) |
149 self.host.plug_profile(name) | 149 self.host.plug_profile(name) |
150 | 150 |