From 70d6d4e0335aea2cd56f7becedcf34e590b97146 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Fri, 2 Jan 2015 13:37:47 +0100 Subject: [PATCH] fix account creation --- data/gui/account_creation_wizard_window.ui | 81 ++++++++++++++++------ src/config.py | 25 ++++--- 2 files changed, 72 insertions(+), 34 deletions(-) diff --git a/data/gui/account_creation_wizard_window.ui b/data/gui/account_creation_wizard_window.ui index 1fa4294d0..b69783fda 100644 --- a/data/gui/account_creation_wizard_window.ui +++ b/data/gui/account_creation_wizard_window.ui @@ -1,6 +1,7 @@ + - + True False @@ -22,6 +23,20 @@ + + + + + + + + server_liststore + 0 + + + server_liststore + 0 + False 12 @@ -30,15 +45,15 @@ dialog - + True False + vertical 6 True False - False False @@ -85,6 +100,7 @@ to the Jabber network. False True 0 + True True @@ -208,7 +224,7 @@ to the Jabber network. If checked, Gajim will remember the password for this account True False - 0.5 + 0 True True @@ -283,7 +299,21 @@ to the Jabber network. - + + True + False + True + + + True + server_entrycompletion + + + + + 3 + 4 + @@ -328,7 +358,7 @@ to the Jabber network. - + True False 6 @@ -346,10 +376,28 @@ to the Jabber network. 0 + + + True + False + True + + + True + server_entrycompletion1 + + + + + True + True + 1 + + False - False + True 1 @@ -563,7 +611,7 @@ to the Jabber network. False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-dialog-warning - 5 + 5 False @@ -720,6 +768,7 @@ Please wait... 0.10000000149011612 True True + 100 True @@ -791,7 +840,7 @@ Please wait... - + True False 12 @@ -890,18 +939,4 @@ Please wait... - - - - - - - - server_liststore - 0 - - - server_liststore - 0 - diff --git a/src/config.py b/src/config.py index 494f77754..f903e7db8 100644 --- a/src/config.py +++ b/src/config.py @@ -3532,13 +3532,13 @@ class AccountCreationWizardWindow: self.window = self.xml.get_object('account_creation_wizard_window') self.window.set_transient_for(gajim.interface.roster.window) - # Connect events from comboboxentry.get_child() - server_comboboxentry = self.xml.get_object('server_comboboxentry') - entry = server_comboboxentry.get_child() + # Connect events from comboboxtext_entry + server_comboboxtext = self.xml.get_object('server_comboboxtext') + entry = self.xml.get_object('server_comboboxtext_entry') entry.connect('key_press_event', - self.on_server_comboboxentry_key_press_event, server_comboboxentry) - # Do the same for the other server comboboxentry - server_comboboxentry1 = self.xml.get_object('server_comboboxentry1') + self.on_server_comboboxentry_key_press_event, server_comboboxtext) + + server_comboboxtext1 = self.xml.get_object('server_comboboxtext1') self.update_proxy_list() @@ -3549,6 +3549,9 @@ class AccountCreationWizardWindow: for server in servers: servers_model.append((server,)) + server_comboboxtext.set_model(servers_model) + server_comboboxtext1.set_model(servers_model) + # Generic widgets self.notebook = self.xml.get_object('notebook') self.cancel_button = self.xml.get_object('cancel_button') @@ -3689,7 +3692,7 @@ class AccountCreationWizardWindow: 'You must provide a username to configure this account.') dialogs.ErrorDialog(pritext, sectext) return - server = self.xml.get_object('server_comboboxentry').get_child().\ + server = self.xml.get_object('server_comboboxtext_entry').\ get_text().strip() savepass = self.xml.get_object('save_password_checkbutton').\ get_active() @@ -3722,7 +3725,7 @@ class AccountCreationWizardWindow: self.show_finish_page() elif cur_page == 2: # We are creating a new account - server = self.xml.get_object('server_comboboxentry1').get_child().\ + server = self.xml.get_object('server_comboboxtext_entry1').\ get_text() if not server: @@ -3977,9 +3980,9 @@ class AccountCreationWizardWindow: def on_username_entry_key_press_event(self, widget, event): # Check for pressed @ and jump to combobox if found if event.keyval == Gdk.KEY_at: - combobox = self.xml.get_object('server_comboboxentry') - combobox.grab_focus() - combobox.get_child().set_position(-1) + entry = self.xml.get_object('server_comboboxtext_entry') + entry.grab_focus() + entry.set_position(-1) return True def on_server_comboboxentry_key_press_event(self, widget, event, combobox):