diff --git a/plugins/gtkgui/config.py b/plugins/gtkgui/config.py index 12ee43749..124862888 100644 --- a/plugins/gtkgui/config.py +++ b/plugins/gtkgui/config.py @@ -868,6 +868,11 @@ class Account_modification_window: for w in widgets: w.set_sensitive(widget.get_active()) + def on_use_proxy_checkbutton_toggled(self, widget): + proxyhost_entry = self.xml.get_widget('proxyhost_entry') + proxyport_entry = self.xml.get_widget('proxyport_entry') + self.on_checkbutton_toggled(widget, [proxyhost_entry, proxyport_entry]) + def init_account(self, infos): """Initialize window with defaults values""" if infos.has_key('accname'): @@ -886,14 +891,25 @@ class Account_modification_window: self.xml.get_widget('resource_entry').set_text(infos['resource']) if infos.has_key('priority'): self.xml.get_widget('priority_spinbutton').set_value(infos['priority']) + + use_proxy = False if infos.has_key('use_proxy'): + if infos['use_proxy'] != 0: + use_proxy = True self.xml.get_widget('use_proxy_checkbutton').\ set_active(infos['use_proxy']) + + self.xml.get_widget('proxyhost_entry').set_sensitive(use_proxy) + self.xml.get_widget('proxyport_entry').set_sensitive(use_proxy) + if infos.has_key('proxyhost'): self.xml.get_widget('proxyhost_entry').set_text(infos['proxyhost']) + if infos.has_key('proxyport'): self.xml.get_widget('proxyport_entry').set_text(str(\ infos['proxyport'])) + + gpg_key_label = self.xml.get_widget('gpg_key_label') if not self.plugin.config.has_key('usegpg'): gpg_key_label.set_text('GPG is not usable on this computer') @@ -925,7 +941,7 @@ class Account_modification_window: self.xml.get_widget('log_history_checkbutton').set_active(0) def on_save_button_clicked(self, widget): - """When save button is clicked : Save informations in config file""" + """When save button is clicked: Save information in config file""" save_password = 0 if self.xml.get_widget('save_password_checkbutton').get_active(): save_password = 1 @@ -981,8 +997,12 @@ class Account_modification_window: except ValueError: Error_dialog(_('Proxy Port must be a port number')) return + else: + Error_dialog(_('You must enter a proxy port to use proxy')) + return if proxyhost == '': Error_dialog(_('You must enter a proxy host to use proxy')) + return (login, hostname) = jid.split('@') key_name = self.xml.get_widget('gpg_name_label').get_text() @@ -1217,6 +1237,7 @@ class Account_modification_window: self.xml.get_widget('gpg_password_entry').set_sensitive(False) self.xml.get_widget('password_entry').set_sensitive(False) self.xml.get_widget('log_history_checkbutton').set_active(1) + #default is checked self.xml.get_widget('sync_with_global_status_checkbutton').set_active(1) self.xml.signal_autoconnect(self) diff --git a/plugins/gtkgui/gtkgui.glade b/plugins/gtkgui/gtkgui.glade index df4f794ab..5c1ea0e4b 100644 --- a/plugins/gtkgui/gtkgui.glade +++ b/plugins/gtkgui/gtkgui.glade @@ -835,6 +835,7 @@ True + Resource is sent to the jabber server in order to 'seperate' the same JID in two or more parts depending on the number of the clients connected in the same server with the same account. So you might be connected in the same account with resource 'Home' and 'Work' at the same time. The resource which has the highest priority will get the messages. (see below) True True True @@ -884,6 +885,7 @@ True + Priority is used in Jabber to determine who gets the events from the jabber server when two or more clients are connected using the same account; The client with the highest priority gets the events True 1 0 @@ -940,6 +942,7 @@ + 5 True False 5 @@ -1040,6 +1043,7 @@ + 5 True False 0 @@ -1049,7 +1053,7 @@ True 0 0.5 - GTK_SHADOW_NONE + GTK_SHADOW_ETCHED_IN @@ -1158,6 +1162,7 @@ True + If checked Gajim will store the password in ~/.gajim/config with 'read' permission only for only you and of course the superuser True Save passphrase (insecure) True @@ -1236,58 +1241,7 @@ - - True - 0 - 0.5 - GTK_SHADOW_NONE - - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 0 - 12 - 0 - - - - - - - - - - True - <b>SSL</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - True - True - + @@ -1327,10 +1281,11 @@ + 5 True 0 0.5 - GTK_SHADOW_NONE + GTK_SHADOW_ETCHED_IN @@ -1354,27 +1309,6 @@ 5 5 - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 2 - 3 - - - - True @@ -1463,6 +1397,7 @@ False False True + 1 @@ -1473,6 +1408,27 @@ + + + + True + True + True + True + 0 + 3128 + True + * + False + + + 1 + 2 + 2 + 3 + + + @@ -1539,6 +1495,7 @@ + 5 True False 5