From 8f4d15f5270bb9bf5bd0b82f926aec53fc56f134 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger <asterix@lagaule.org> Date: Thu, 5 Mar 2009 20:14:08 +0000 Subject: [PATCH] remove no more used code. Fixes #4853 --- .../account_creation_wizard_window.glade | 223 +++++++++--------- src/config.py | 18 -- 2 files changed, 110 insertions(+), 131 deletions(-) diff --git a/data/glade/account_creation_wizard_window.glade b/data/glade/account_creation_wizard_window.glade index 8ec190ed6..087bc69d4 100644 --- a/data/glade/account_creation_wizard_window.glade +++ b/data/glade/account_creation_wizard_window.glade @@ -14,7 +14,6 @@ <child> <widget class="GtkNotebook" id="notebook"> <property name="visible">True</property> - <property name="show_tabs">False</property> <property name="show_border">False</property> <child> <widget class="GtkVBox" id="vbox78"> @@ -134,58 +133,29 @@ to the Jabber network.</property> <property name="column_spacing">12</property> <property name="row_spacing">6</property> <child> - <widget class="GtkComboBoxEntry" id="server_comboboxentry"> - <property name="visible">True</property> - <signal name="changed" handler="on_server_comboboxentry_changed"/> - <child internal-child="entry"> - <widget class="GtkEntry" id="comboboxentry-entry1"> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options">GTK_FILL</property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label1"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">@</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="x_options"></property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label262"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_Jabber ID:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">username_entry</property> - </widget> - <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkEntry" id="password_entry"> + <widget class="GtkEntry" id="username_entry"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="visibility">False</property> - <property name="activates_default">True</property> + <signal name="key_press_event" handler="on_username_entry_key_press_event"/> </widget> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label263"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Password:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">password_entry</property> + </widget> + <packing> <property name="top_attach">1</property> <property name="bottom_attach">2</property> + <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> @@ -212,31 +182,58 @@ to the Jabber network.</property> </packing> </child> <child> - <widget class="GtkLabel" id="label263"> + <widget class="GtkEntry" id="password_entry"> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">_Password:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">password_entry</property> + <property name="can_focus">True</property> + <property name="visibility">False</property> + <property name="activates_default">True</property> </widget> <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label262"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Jabber ID:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">username_entry</property> + </widget> + <packing> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkEntry" id="username_entry"> + <widget class="GtkLabel" id="label1"> <property name="visible">True</property> - <property name="can_focus">True</property> - <signal name="changed" handler="on_username_entry_changed"/> - <signal name="key_press_event" handler="on_username_entry_key_press_event"/> + <property name="xalign">0</property> + <property name="label" translatable="yes">@</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="y_options"></property> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="x_options"></property> + </packing> + </child> + <child> + <widget class="GtkComboBoxEntry" id="server_comboboxentry"> + <property name="visible">True</property> + <child internal-child="entry"> + <widget class="GtkEntry" id="comboboxentry-entry1"> + </widget> + </child> + </widget> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options">GTK_FILL</property> </packing> </child> </widget> @@ -324,6 +321,62 @@ to the Jabber network.</property> <property name="n_columns">3</property> <property name="column_spacing">5</property> <property name="row_spacing">5</property> + <child> + <widget class="GtkLabel" id="label381"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Prox_y:</property> + <property name="use_underline">True</property> + </widget> + <packing> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkComboBox" id="proxies_combobox"> + <property name="visible">True</property> + <property name="items">None</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="y_options">GTK_FILL</property> + </packing> + </child> + <child> + <widget class="GtkButton" id="manage_proxies_button"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Manage...</property> + <property name="use_underline">True</property> + <property name="response_id">0</property> + <signal name="clicked" handler="on_manage_proxies_button_clicked"/> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="x_options"></property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkCheckButton" id="custom_host_port_checkbutton"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Use custom hostname/port</property> + <property name="use_underline">True</property> + <property name="response_id">0</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_custom_host_port_checkbutton_toggled"/> + </widget> + <packing> + <property name="right_attach">3</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="y_options"></property> + </packing> + </child> <child> <widget class="GtkHBox" id="custom_host_hbox"> <property name="visible">True</property> @@ -386,62 +439,6 @@ to the Jabber network.</property> <property name="y_options">GTK_FILL</property> </packing> </child> - <child> - <widget class="GtkCheckButton" id="custom_host_port_checkbutton"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Use custom hostname/port</property> - <property name="use_underline">True</property> - <property name="response_id">0</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_custom_host_port_checkbutton_toggled"/> - </widget> - <packing> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkButton" id="manage_proxies_button"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Manage...</property> - <property name="use_underline">True</property> - <property name="response_id">0</property> - <signal name="clicked" handler="on_manage_proxies_button_clicked"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkComboBox" id="proxies_combobox"> - <property name="visible">True</property> - <property name="items">None</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="y_options">GTK_FILL</property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label381"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Prox_y:</property> - <property name="use_underline">True</property> - </widget> - <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> </widget> </child> <child> diff --git a/src/config.py b/src/config.py index f8eb7323f..113340d73 100644 --- a/src/config.py +++ b/src/config.py @@ -3369,12 +3369,6 @@ class AccountCreationWizardWindow: if go_online: gajim.interface.roster.send_status(self.account, 'online', '') - def on_username_entry_changed(self, widget): - self.update_jid(widget) - - def on_server_comboboxentry_changed(self, widget): - self.update_jid(widget) - def on_username_entry_key_press_event(self, widget, event): # Check for pressed @ and jump to combobox if found if event.keyval == gtk.keysyms.at: @@ -3393,18 +3387,6 @@ class AccountCreationWizardWindow: username_entry.set_position(-1) return True - def update_jid(self,widget): - username_entry = self.xml.get_widget('username_entry') - name = username_entry.get_text().decode('utf-8') - combobox = self.xml.get_widget('server_comboboxentry') - server = combobox.get_active_text() - jid_label = self.xml.get_widget('jid_label') - if len(name) == 0 or len(server) == 0: - jid_label.set_label('') - else: - string = '<b>%s@%s</b>' % (name, server) - jid_label.set_label(string) - def get_config(self, login, server, savepass, password): config = {} config['name'] = login