fix change resource,add account

This commit is contained in:
Denis Fomin 2013-01-07 15:25:48 +04:00
parent 5265d7fce9
commit d4979a0435
1 changed files with 3 additions and 6 deletions

View File

@ -2236,8 +2236,7 @@ class AccountsWindow:
def on_resource_entry1_focus_out_event(self, widget, event): def on_resource_entry1_focus_out_event(self, widget, event):
if self.ignore_events: if self.ignore_events:
return return
resource = self.xml.get_object('resource_entry1').get_text().decode( resource = self.xml.get_object('resource_entry1').get_text()
'utf-8')
try: try:
resource = helpers.parse_resource(resource) resource = helpers.parse_resource(resource)
except helpers.InvalidFormat as s: except helpers.InvalidFormat as s:
@ -3623,8 +3622,7 @@ class AccountCreationWizardWindow:
# We are adding an existing account # We are adding an existing account
anonymous = self.xml.get_object('anonymous_checkbutton1').\ anonymous = self.xml.get_object('anonymous_checkbutton1').\
get_active() get_active()
username = self.xml.get_object('username_entry').get_text().decode( username = self.xml.get_object('username_entry').get_text().strip()
'utf-8').strip()
if not username and not anonymous: if not username and not anonymous:
pritext = _('Invalid username') pritext = _('Invalid username')
sectext = _( sectext = _(
@ -3635,8 +3633,7 @@ class AccountCreationWizardWindow:
get_text().strip() get_text().strip()
savepass = self.xml.get_object('save_password_checkbutton').\ savepass = self.xml.get_object('save_password_checkbutton').\
get_active() get_active()
password = self.xml.get_object('password_entry').get_text().decode( password = self.xml.get_object('password_entry').get_text()
'utf-8')
if anonymous: if anonymous:
jid = '' jid = ''