comparison frontends/src/primitivus/profile_manager.py @ 641:49587e170f53

core: added the security_limit to setParam - params with a security greater than security_limit can not be modified - special value: security_limit < 0 disable the check (all params can be modified)
author souliane <souliane@mailoo.org>
date Sat, 07 Sep 2013 02:03:17 +0200
parents 84a6e83157c2
children 1def5b7edf9f
comparison
equal deleted inserted replaced
640:8211b462af6b 641:49587e170f53
139 """Check if we have new jid/pass, save them if it is the case, and plug profile""" 139 """Check if we have new jid/pass, save them if it is the case, and plug profile"""
140 new_jid = self.login_wid.get_edit_text() 140 new_jid = self.login_wid.get_edit_text()
141 new_pass = self.pass_wid.get_edit_text() 141 new_pass = self.pass_wid.get_edit_text()
142 142
143 if old_jid != new_jid: 143 if old_jid != new_jid:
144 self.host.bridge.setParam("JabberID", new_jid, "Connection", profile) 144 self.host.bridge.setParam("JabberID", new_jid, "Connection", profile_key=profile)
145 self.host.bridge.setParam("Server", JID(new_jid).domain, "Connection", profile) 145 self.host.bridge.setParam("Server", JID(new_jid).domain, "Connection", profile_key=profile)
146 if old_pass != new_pass: 146 if old_pass != new_pass:
147 self.host.bridge.setParam("Password", new_pass, "Connection", profile) 147 self.host.bridge.setParam("Password", new_pass, "Connection", profile_key=profile)
148 self.host.plug_profile(profile) 148 self.host.plug_profile(profile)
149 149
150 def getParamError(self, ignore): 150 def getParamError(self, ignore):
151 popup = Alert("Error", _("Can't get profile parameter"), ok_cb=self.host.removePopUp) 151 popup = Alert("Error", _("Can't get profile parameter"), ok_cb=self.host.removePopUp)
152 self.host.showPopUp(popup) 152 self.host.showPopUp(popup)