From 95047d3e50a2a8d0515f7f4b41b7afb602021882 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger <asterix@lagaule.org> Date: Tue, 6 Oct 2009 11:23:31 +0200 Subject: [PATCH] add an enable checkbutton in accounts window for normal accounts too. Fixes #4489 --- configure.ac | 2 +- data/glade/accounts_window.glade | 1277 +++++++++++++++--------------- src/common/config.py | 3 +- src/common/defs.py | 2 +- src/common/optparser.py | 12 + src/config.py | 216 +++-- src/gajim.py | 6 +- 7 files changed, 795 insertions(+), 723 deletions(-) diff --git a/configure.ac b/configure.ac index cc04ee34bc..9e06da228c 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_INIT([Gajim - A Jabber Instant Messager], - [0.12.5.2-dev],[http://trac.gajim.org/],[gajim]) + [0.12.5.3-dev],[http://trac.gajim.org/],[gajim]) AC_PREREQ([2.59]) AC_CONFIG_HEADER(config.h) diff --git a/data/glade/accounts_window.glade b/data/glade/accounts_window.glade index 55daa9acca..bb5f3cb9af 100644 --- a/data/glade/accounts_window.glade +++ b/data/glade/accounts_window.glade @@ -1,14 +1,14 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> +<!--Generated with glade3 3.4.5 on Tue Oct 6 11:00:58 2009 --> <glade-interface> - <!-- interface-requires gtk+ 2.12 --> - <!-- interface-naming-policy toplevel-contextual --> <widget class="GtkWindow" id="accounts_window"> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="border_width">12</property> <property name="title" translatable="yes">Accounts</property> <property name="default_width">800</property> - <signal name="destroy" handler="on_accounts_window_destroy"/> <signal name="key_press_event" handler="on_accounts_window_key_press_event"/> + <signal name="destroy" handler="on_accounts_window_destroy"/> <child> <widget class="GtkVBox" id="vbox1"> <property name="visible">True</property> @@ -30,9 +30,9 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="hscrollbar_policy">automatic</property> - <property name="vscrollbar_policy">automatic</property> - <property name="shadow_type">in</property> + <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="shadow_type">GTK_SHADOW_IN</property> <child> <widget class="GtkTreeView" id="accounts_treeview"> <property name="visible">True</property> @@ -43,18 +43,16 @@ </widget> </child> </widget> - <packing> - <property name="position">0</property> - </packing> </child> <child> <widget class="GtkButton" id="add_button"> - <property name="label" translatable="yes">gtk-add</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="label" translatable="yes">gtk-add</property> <property name="use_stock">True</property> + <property name="response_id">0</property> <signal name="clicked" handler="on_add_button_clicked"/> </widget> <packing> @@ -64,12 +62,13 @@ </child> <child> <widget class="GtkButton" id="remove_button"> - <property name="label" translatable="yes">gtk-remove</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="label" translatable="yes">gtk-remove</property> <property name="use_stock">True</property> + <property name="response_id">0</property> <signal name="clicked" handler="on_remove_button_clicked"/> </widget> <packing> @@ -83,6 +82,7 @@ <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="response_id">0</property> <signal name="clicked" handler="on_rename_button_clicked"/> <child> <widget class="GtkHBox" id="hbox8"> @@ -96,7 +96,6 @@ </widget> <packing> <property name="fill">False</property> - <property name="position">0</property> </packing> </child> <child> @@ -166,566 +165,535 @@ </packing> </child> <child> - <widget class="GtkNotebook" id="normal_notebook1"> + <widget class="GtkVBox" id="vbox3"> <property name="visible">True</property> - <property name="can_focus">True</property> <child> - <widget class="GtkTable" id="table1"> + <widget class="GtkCheckButton" id="enable_checkbutton1"> <property name="visible">True</property> - <property name="border_width">6</property> - <property name="n_rows">5</property> - <property name="n_columns">3</property> - <property name="column_spacing">6</property> - <property name="row_spacing">6</property> - <child> - <widget class="GtkLabel" id="jid_label1"> - <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">jid_entry1</property> - </widget> - <packing> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label3"> - <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_entry1</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> - <child> - <widget class="GtkEntry" id="password_entry1"> - <property name="visible">True</property> - <property name="sensitive">False</property> - <property name="can_focus">True</property> - <property name="visibility">False</property> - <property name="activates_default">True</property> - <signal name="changed" handler="on_password_entry1_changed"/> - </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="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkCheckButton" id="save_password_checkbutton1"> - <property name="label" translatable="yes">Save pass_word</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="tooltip" translatable="yes">If checked, Gajim will remember the password for this account</property> - <property name="use_underline">True</property> - <property name="focus_on_click">False</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_save_password_checkbutton1_toggled"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <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> - <child> - <widget class="GtkLabel" id="label4"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Resour_ce:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">resource_entry1</property> - </widget> - <packing> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label5"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Priori_ty:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">priority_spinbutton1</property> - </widget> - <packing> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkCheckButton" id="adjust_priority_with_status_checkbutton1"> - <property name="label" translatable="yes">A_djust to status</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="tooltip" translatable="yes">Priority will change automatically according to your status.</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_adjust_priority_with_status_checkbutton1_toggled"/> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkSpinButton" id="priority_spinbutton1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="tooltip" translatable="yes">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</property> - <property name="adjustment">5 0 127 1 5 0</property> - <property name="climb_rate">1</property> - <property name="numeric">True</property> - <signal name="value_changed" handler="on_priority_spinbutton1_value_changed"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> + <property name="can_focus">True</property> + <property name="label" translatable="yes">_Enable</property> + <property name="use_underline">True</property> + <property name="response_id">0</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_enable_checkbutton1_toggled"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + <child> + <widget class="GtkNotebook" id="normal_notebook1"> + <property name="visible">True</property> + <property name="can_focus">True</property> <child> - <widget class="GtkExpander" id="expander1"> + <widget class="GtkTable" id="table1"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="border_width">6</property> + <property name="n_rows">5</property> + <property name="n_columns">3</property> + <property name="column_spacing">6</property> + <property name="row_spacing">6</property> + <child> + <widget class="GtkCheckButton" id="anonymous_checkbutton1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Anonymous authentication</property> + <property name="response_id">0</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_anonymous_checkbutton1_toggled"/> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkEntry" id="resource_entry1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="tooltip" translatable="yes">Resource is sent to the Jabber server in order to separate 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 events. (see below)</property> + <property name="text" translatable="yes">Gajim</property> + <signal name="focus_out_event" handler="on_resource_entry1_focus_out_event"/> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">3</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> <child> - <widget class="GtkHBox" id="hbox1"> + <widget class="GtkEntry" id="jid_entry1"> <property name="visible">True</property> - <property name="spacing">11</property> - <property name="homogeneous">True</property> + <property name="can_focus">True</property> + <property name="activates_default">True</property> + <signal name="focus_out_event" handler="on_jid_entry1_focus_out_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="GtkExpander" id="expander1"> + <property name="visible">True</property> + <property name="can_focus">True</property> <child> - <widget class="GtkButton" id="synchronise_contacts_button1"> - <property name="label" translatable="yes">Synchronise contacts</property> + <widget class="GtkHBox" id="hbox1"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="tooltip" translatable="yes">Click to request authorization to all contacts of another account</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_synchronise_contacts_button1_clicked"/> + <property name="spacing">11</property> + <property name="homogeneous">True</property> + <child> + <widget class="GtkButton" id="synchronise_contacts_button1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="tooltip" translatable="yes">Click to request authorization to all contacts of another account</property> + <property name="label" translatable="yes">Synchronise contacts</property> + <property name="use_underline">True</property> + <property name="response_id">0</property> + <signal name="clicked" handler="on_synchronise_contacts_button1_clicked"/> + </widget> + <packing> + <property name="expand">False</property> + </packing> + </child> + <child> + <widget class="GtkButton" id="change_password_button1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="tooltip" translatable="yes">Click to change account's password</property> + <property name="label" translatable="yes">Chan_ge Password</property> + <property name="use_underline">True</property> + <property name="response_id">0</property> + <signal name="clicked" handler="on_change_password_button1_clicked"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="position">1</property> + </packing> + </child> </widget> - <packing> - <property name="expand">False</property> - <property name="position">0</property> - </packing> </child> <child> - <widget class="GtkButton" id="change_password_button1"> - <property name="label" translatable="yes">Chan_ge Password</property> + <widget class="GtkLabel" id="label6"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="tooltip" translatable="yes">Click to change account's password</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_change_password_button1_clicked"/> + <property name="label" translatable="yes">Administration operations</property> </widget> <packing> - <property name="expand">False</property> - <property name="position">1</property> + <property name="type">label_item</property> </packing> </child> </widget> + <packing> + <property name="right_attach">3</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options">GTK_FILL</property> + </packing> </child> <child> - <widget class="GtkLabel" id="label6"> + <widget class="GtkSpinButton" id="priority_spinbutton1"> <property name="visible">True</property> - <property name="label" translatable="yes">Administration operations</property> + <property name="can_focus">True</property> + <property name="tooltip" translatable="yes">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</property> + <property name="adjustment">5 0 127 1 5 0</property> + <property name="climb_rate">1</property> + <property name="numeric">True</property> + <signal name="value_changed" handler="on_priority_spinbutton1_value_changed"/> </widget> <packing> - <property name="type">label_item</property> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkCheckButton" id="adjust_priority_with_status_checkbutton1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="tooltip" translatable="yes">Priority will change automatically according to your status.</property> + <property name="label" translatable="yes">A_djust to status</property> + <property name="use_underline">True</property> + <property name="response_id">0</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_adjust_priority_with_status_checkbutton1_toggled"/> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Priori_ty:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">priority_spinbutton1</property> + </widget> + <packing> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Resour_ce:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">resource_entry1</property> + </widget> + <packing> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkCheckButton" id="save_password_checkbutton1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="tooltip" translatable="yes">If checked, Gajim will remember the password for this account</property> + <property name="label" translatable="yes">Save pass_word</property> + <property name="use_underline">True</property> + <property name="focus_on_click">False</property> + <property name="response_id">0</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_save_password_checkbutton1_toggled"/> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <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> + <child> + <widget class="GtkEntry" id="password_entry1"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="visibility">False</property> + <property name="activates_default">True</property> + <signal name="changed" handler="on_password_entry1_changed"/> + </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="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label3"> + <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_entry1</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> + <child> + <widget class="GtkLabel" id="jid_label1"> + <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">jid_entry1</property> + </widget> + <packing> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> </packing> </child> </widget> - <packing> - <property name="right_attach">3</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options">GTK_FILL</property> - </packing> - </child> - <child> - <widget class="GtkEntry" id="jid_entry1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="activates_default">True</property> - <signal name="focus_out_event" handler="on_jid_entry1_focus_out_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="GtkEntry" id="resource_entry1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="tooltip" translatable="yes">Resource is sent to the Jabber server in order to separate 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 events. (see below)</property> - <property name="text" translatable="yes">Gajim</property> - <signal name="focus_out_event" handler="on_resource_entry1_focus_out_event"/> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkCheckButton" id="anonymous_checkbutton1"> - <property name="label" translatable="yes">Anonymous authentication</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_anonymous_checkbutton1_toggled"/> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> </child> - </widget> - </child> - <child> - <widget class="GtkLabel" id="label7"> - <property name="visible">True</property> - <property name="label" translatable="yes">Account</property> - </widget> - <packing> - <property name="tab_fill">False</property> - <property name="type">tab</property> - </packing> - </child> - <child> - <widget class="GtkVBox" id="vbox3"> - <property name="visible">True</property> - <property name="border_width">6</property> - <property name="spacing">6</property> <child> - <widget class="GtkCheckButton" id="autoconnect_checkbutton1"> - <property name="label" translatable="yes">C_onnect on Gajim startup</property> + <widget class="GtkLabel" id="label7"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="tooltip" translatable="yes">If checked, Gajim, when launched, will automatically connect to jabber using this account</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_autoconnect_checkbutton_toggled"/> + <property name="label" translatable="yes">Account</property> </widget> <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> + <property name="type">tab</property> + <property name="tab_fill">False</property> </packing> </child> <child> - <widget class="GtkCheckButton" id="autoreconnect_checkbutton1"> - <property name="label" translatable="yes">Auto-reconnect when connection is lost</property> + <widget class="GtkVBox" id="vbox6"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_autoreconnect_checkbutton_toggled"/> + <property name="border_width">6</property> + <property name="spacing">6</property> + <child> + <widget class="GtkCheckButton" id="autoconnect_checkbutton1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="tooltip" translatable="yes">If checked, Gajim, when launched, will automatically connect to jabber using this account</property> + <property name="label" translatable="yes">C_onnect on Gajim startup</property> + <property name="use_underline">True</property> + <property name="response_id">0</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_autoconnect_checkbutton_toggled"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + <child> + <widget class="GtkCheckButton" id="autoreconnect_checkbutton1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Auto-reconnect when connection is lost</property> + <property name="use_underline">True</property> + <property name="response_id">0</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_autoreconnect_checkbutton_toggled"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> + </child> + <child> + <widget class="GtkCheckButton" id="log_history_checkbutton1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Save conversation _logs for all contacts</property> + <property name="use_underline">True</property> + <property name="response_id">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_log_history_checkbutton_toggled"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">2</property> + </packing> + </child> + <child> + <widget class="GtkCheckButton" id="sync_with_global_status_checkbutton1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="tooltip" translatable="yes">If checked, any change to the global status (handled by the combobox at the bottom of the roster window) will change the status of this account accordingly</property> + <property name="label" translatable="yes">Synch_ronize account status with global status</property> + <property name="use_underline">True</property> + <property name="response_id">0</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_sync_with_global_status_checkbutton_toggled"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">3</property> + </packing> + </child> + <child> + <widget class="GtkCheckButton" id="use_ft_proxies_checkbutton1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="tooltip" translatable="yes">If checked, Gajim will also broadcast some more IPs except from just your IP, so file transfer has higher chances of working.</property> + <property name="label" translatable="yes">Use file transfer proxies</property> + <property name="use_underline">True</property> + <property name="response_id">0</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_use_ft_proxies_checkbutton1_toggled"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">4</property> + </packing> + </child> </widget> <packing> - <property name="expand">False</property> - <property name="fill">False</property> <property name="position">1</property> </packing> </child> <child> - <widget class="GtkCheckButton" id="log_history_checkbutton1"> - <property name="label" translatable="yes">Save conversation _logs for all contacts</property> + <widget class="GtkLabel" id="label8"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="active">True</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_log_history_checkbutton_toggled"/> - </widget> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">2</property> - </packing> - </child> - <child> - <widget class="GtkCheckButton" id="sync_with_global_status_checkbutton1"> - <property name="label" translatable="yes">Synch_ronize account status with global status</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="tooltip" translatable="yes">If checked, any change to the global status (handled by the combobox at the bottom of the roster window) will change the status of this account accordingly</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_sync_with_global_status_checkbutton_toggled"/> - </widget> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">3</property> - </packing> - </child> - <child> - <widget class="GtkCheckButton" id="use_ft_proxies_checkbutton1"> - <property name="label" translatable="yes">Use file transfer proxies</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="tooltip" translatable="yes">If checked, Gajim will also broadcast some more IPs except from just your IP, so file transfer has higher chances of working.</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_use_ft_proxies_checkbutton1_toggled"/> + <property name="label" translatable="yes">General</property> + <property name="use_markup">True</property> </widget> <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">4</property> + <property name="type">tab</property> + <property name="position">1</property> + <property name="tab_fill">False</property> </packing> </child> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label8"> - <property name="visible">True</property> - <property name="label" translatable="yes">General</property> - <property name="use_markup">True</property> - </widget> - <packing> - <property name="position">1</property> - <property name="tab_fill">False</property> - <property name="type">tab</property> - </packing> - </child> - <child> - <widget class="GtkVBox" id="vbox6"> - <property name="visible">True</property> - <property name="border_width">6</property> - <property name="spacing">12</property> <child> - <widget class="GtkFrame" id="frame3"> + <widget class="GtkVBox" id="vbox7"> <property name="visible">True</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="border_width">6</property> + <property name="spacing">12</property> <child> - <widget class="GtkAlignment" id="alignment4"> + <widget class="GtkFrame" id="frame3"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="left_padding">12</property> + <property name="label_xalign">0</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> <child> - <widget class="GtkVBox" id="vbox11"> + <widget class="GtkAlignment" id="alignment4"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="border_width">6</property> - <property name="spacing">6</property> + <property name="left_padding">12</property> <child> - <widget class="GtkCheckButton" id="use_env_http_proxy_checkbutton1"> - <property name="label" translatable="yes">_use HTTP__PROXY environment variable</property> + <widget class="GtkVBox" id="vbox11"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_use_env_http_proxy_checkbutton1_toggled"/> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <widget class="GtkHBox" id="proxy_hbox1"> - <property name="visible">True</property> + <property name="border_width">6</property> <property name="spacing">6</property> <child> - <widget class="GtkComboBox" id="proxies_combobox1"> + <widget class="GtkCheckButton" id="use_env_http_proxy_checkbutton1"> <property name="visible">True</property> - <property name="items" translatable="yes" comments="None means no proxy profile selected">None</property> - <signal name="changed" handler="on_proxies_combobox1_changed"/> + <property name="can_focus">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="label" translatable="yes">_use HTTP__PROXY environment variable</property> + <property name="use_underline">True</property> + <property name="response_id">0</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_use_env_http_proxy_checkbutton1_toggled"/> </widget> <packing> - <property name="position">0</property> + <property name="expand">False</property> </packing> </child> <child> - <widget class="GtkButton" id="manage_proxies_button1"> - <property name="label" translatable="yes">_Manage...</property> + <widget class="GtkHBox" id="proxy_hbox1"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_manage_proxies_button1_clicked"/> + <property name="spacing">6</property> + <child> + <widget class="GtkComboBox" id="proxies_combobox1"> + <property name="visible">True</property> + <property name="items" translatable="yes" comments="None means no proxy profile selected">None</property> + <signal name="changed" handler="on_proxies_combobox1_changed"/> + </widget> + </child> + <child> + <widget class="GtkButton" id="manage_proxies_button1"> + <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_button1_clicked"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> + </child> </widget> <packing> <property name="expand">False</property> - <property name="fill">False</property> <property name="position">1</property> </packing> </child> </widget> - <packing> - <property name="expand">False</property> - <property name="position">1</property> - </packing> </child> </widget> </child> + <child> + <widget class="GtkLabel" id="label9"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="label" translatable="yes"><b>Proxy</b></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> </widget> </child> <child> - <widget class="GtkLabel" id="label9"> - <property name="visible">True</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="label" translatable="yes"><b>Proxy</b></property> - <property name="use_markup">True</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="position">0</property> - </packing> - </child> - <child> - <widget class="GtkFrame" id="misc_frame1"> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> - <child> - <widget class="GtkAlignment" id="alignment1"> + <widget class="GtkFrame" id="misc_frame1"> <property name="visible">True</property> - <property name="left_padding">12</property> + <property name="label_xalign">0</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> <child> - <widget class="GtkVBox" id="vbox7"> + <widget class="GtkAlignment" id="alignment1"> <property name="visible">True</property> - <property name="border_width">6</property> - <property name="spacing">6</property> - <child> - <widget class="GtkCheckButton" id="warn_when_insecure_connection_checkbutton1"> - <property name="label" translatable="yes">_Warn before using an insecure connection</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="tooltip" translatable="yes">Check this so Gajim will ask you before sending your password over an insecure connection.</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_warn_when_insecure_connection_checkbutton1_toggled"/> - </widget> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <widget class="GtkCheckButton" id="send_keepalive_checkbutton1"> - <property name="label" translatable="yes">Send _keep-alive packets</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="tooltip" translatable="yes">If checked, Gajim will send keep-alive packets to prevent connection timeout which results in disconnection</property> - <property name="use_underline">True</property> - <property name="active">True</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_send_keepalive_checkbutton1_toggled"/> - </widget> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> - <child> - <widget class="GtkCheckButton" id="custom_host_port_checkbutton1"> - <property name="label" translatable="yes">Use cust_om hostname/port</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_custom_host_port_checkbutton1_toggled"/> - </widget> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">2</property> - </packing> - </child> + <property name="left_padding">12</property> <child> - <widget class="GtkHBox" id="custom_host_port_hbox1"> + <widget class="GtkVBox" id="vbox7"> <property name="visible">True</property> - <property name="sensitive">False</property> + <property name="border_width">6</property> <property name="spacing">6</property> <child> - <widget class="GtkLabel" id="label10"> + <widget class="GtkCheckButton" id="warn_when_insecure_connection_checkbutton1"> <property name="visible">True</property> - <property name="label" translatable="yes">_Hostname: </property> + <property name="can_focus">True</property> + <property name="tooltip" translatable="yes">Check this so Gajim will ask you before sending your password over an insecure connection.</property> + <property name="label" translatable="yes">_Warn before using an insecure connection</property> <property name="use_underline">True</property> + <property name="response_id">0</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_warn_when_insecure_connection_checkbutton1_toggled"/> </widget> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">0</property> </packing> </child> <child> - <widget class="GtkEntry" id="custom_host_entry1"> + <widget class="GtkCheckButton" id="send_keepalive_checkbutton1"> <property name="visible">True</property> <property name="can_focus">True</property> - <signal name="changed" handler="on_custom_host_entry1_changed"/> + <property name="tooltip" translatable="yes">If checked, Gajim will send keep-alive packets to prevent connection timeout which results in disconnection</property> + <property name="label" translatable="yes">Send _keep-alive packets</property> + <property name="use_underline">True</property> + <property name="response_id">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_send_keepalive_checkbutton1_toggled"/> </widget> <packing> + <property name="expand">False</property> + <property name="fill">False</property> <property name="position">1</property> </packing> </child> <child> - <widget class="GtkLabel" id="label18"> + <widget class="GtkCheckButton" id="custom_host_port_checkbutton1"> <property name="visible">True</property> - <property name="label" translatable="yes">_Port: </property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Use cust_om 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_checkbutton1_toggled"/> </widget> <packing> <property name="expand">False</property> @@ -734,217 +702,257 @@ </packing> </child> <child> - <widget class="GtkEntry" id="custom_port_entry1"> + <widget class="GtkHBox" id="custom_host_port_hbox1"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="width_chars">6</property> - <property name="text">5222</property> - <signal name="focus_out_event" handler="on_custom_port_entry_focus_out_event"/> + <property name="sensitive">False</property> + <property name="spacing">6</property> + <child> + <widget class="GtkLabel" id="label10"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Hostname: </property> + <property name="use_underline">True</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + <child> + <widget class="GtkEntry" id="custom_host_entry1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <signal name="changed" handler="on_custom_host_entry1_changed"/> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label18"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Port: </property> + <property name="use_underline">True</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">2</property> + </packing> + </child> + <child> + <widget class="GtkEntry" id="custom_port_entry1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="width_chars">6</property> + <property name="text">5222</property> + <signal name="focus_out_event" handler="on_custom_port_entry_focus_out_event"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="position">3</property> + </packing> + </child> </widget> <packing> - <property name="expand">False</property> <property name="position">3</property> </packing> </child> </widget> - <packing> - <property name="position">3</property> - </packing> </child> </widget> </child> - </widget> - </child> - <child> - <widget class="GtkLabel" id="label19"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Miscellaneous</b></property> - <property name="use_markup">True</property> + <child> + <widget class="GtkLabel" id="label19"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Miscellaneous</b></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> </widget> <packing> - <property name="type">label_item</property> + <property name="expand">False</property> + <property name="position">1</property> </packing> </child> </widget> <packing> - <property name="expand">False</property> - <property name="position">1</property> + <property name="position">2</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="label20"> + <property name="visible">True</property> + <property name="label" translatable="yes">Connection</property> + </widget> + <packing> + <property name="type">tab</property> + <property name="position">2</property> + <property name="tab_fill">False</property> </packing> </child> - </widget> - <packing> - <property name="position">2</property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label20"> - <property name="visible">True</property> - <property name="label" translatable="yes">Connection</property> - </widget> - <packing> - <property name="position">2</property> - <property name="tab_fill">False</property> - <property name="type">tab</property> - </packing> - </child> - <child> - <widget class="GtkVBox" id="vbox8"> - <property name="visible">True</property> - <property name="border_width">5</property> - <property name="spacing">6</property> <child> - <widget class="GtkFrame" id="frame1"> + <widget class="GtkVBox" id="vbox8"> <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="border_width">5</property> + <property name="spacing">6</property> <child> - <widget class="GtkAlignment" id="alignment2"> + <widget class="GtkFrame" id="frame1"> <property name="visible">True</property> - <property name="left_padding">12</property> + <property name="label_xalign">0</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> <child> - <widget class="GtkVBox" id="vbox9"> + <widget class="GtkAlignment" id="alignment2"> <property name="visible">True</property> - <property name="border_width">6</property> - <property name="spacing">6</property> + <property name="left_padding">12</property> <child> - <widget class="GtkHBox" id="hbox3"> + <widget class="GtkVBox" id="vbox9"> <property name="visible">True</property> + <property name="border_width">6</property> <property name="spacing">6</property> <child> - <widget class="GtkLabel" id="gpg_key_label1"> + <widget class="GtkHBox" id="hbox3"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">No key selected</property> - <property name="selectable">True</property> + <property name="spacing">6</property> + <child> + <widget class="GtkLabel" id="gpg_key_label1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">No key selected</property> + <property name="selectable">True</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="gpg_name_label1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="selectable">True</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + <child> + <widget class="GtkButton" id="gpg_choose_button1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Choose _Key...</property> + <property name="use_underline">True</property> + <property name="response_id">0</property> + <signal name="clicked" handler="on_gpg_choose_button_clicked"/> + </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">2</property> + </packing> + </child> </widget> <packing> <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="gpg_name_label1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="selectable">True</property> - </widget> - <packing> - <property name="position">1</property> </packing> </child> <child> - <widget class="GtkButton" id="gpg_choose_button1"> - <property name="label" translatable="yes">Choose _Key...</property> + <widget class="GtkCheckButton" id="use_gpg_agent_checkbutton1"> <property name="visible">True</property> + <property name="sensitive">False</property> <property name="can_focus">True</property> - <property name="receives_default">False</property> + <property name="tooltip" translatable="yes">If checked, Gajim will get the password from a GPG agent like seahorse</property> + <property name="label" translatable="yes">Use G_PG Agent</property> <property name="use_underline">True</property> - <signal name="clicked" handler="on_gpg_choose_button_clicked"/> + <property name="response_id">0</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_use_gpg_agent_checkbutton_toggled"/> </widget> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">2</property> + <property name="position">1</property> </packing> </child> </widget> - <packing> - <property name="expand">False</property> - <property name="position">0</property> - </packing> </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="label21"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>OpenPGP</b></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="expand">False</property> + </packing> + </child> + <child> + <widget class="GtkFrame" id="frame2"> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + <child> + <widget class="GtkAlignment" id="alignment3"> + <property name="visible">True</property> + <property name="border_width">6</property> + <property name="left_padding">12</property> <child> - <widget class="GtkCheckButton" id="use_gpg_agent_checkbutton1"> - <property name="label" translatable="yes">Use G_PG Agent</property> + <widget class="GtkButton" id="edit_details_button1"> <property name="visible">True</property> - <property name="sensitive">False</property> <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="tooltip" translatable="yes">If checked, Gajim will get the password from a GPG agent like seahorse</property> + <property name="tooltip" translatable="yes">Information about you, as stored in the server</property> + <property name="label" translatable="yes">_Edit Personal Information...</property> <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_use_gpg_agent_checkbutton_toggled"/> + <property name="response_id">0</property> + <signal name="clicked" handler="on_edit_details_button1_clicked"/> </widget> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> </child> </widget> </child> - </widget> - </child> - <child> - <widget class="GtkLabel" id="label21"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>OpenPGP</b></property> - <property name="use_markup">True</property> + <child> + <widget class="GtkLabel" id="label22"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Personal Information</b></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> </widget> <packing> - <property name="type">label_item</property> + <property name="expand">False</property> + <property name="position">1</property> </packing> </child> </widget> <packing> - <property name="expand">False</property> - <property name="position">0</property> + <property name="position">3</property> </packing> </child> <child> - <widget class="GtkFrame" id="frame2"> + <widget class="GtkLabel" id="label23"> <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> - <child> - <widget class="GtkAlignment" id="alignment3"> - <property name="visible">True</property> - <property name="border_width">6</property> - <property name="left_padding">12</property> - <child> - <widget class="GtkButton" id="edit_details_button1"> - <property name="label" translatable="yes">_Edit Personal Information...</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="tooltip" translatable="yes">Information about you, as stored in the server</property> - <property name="use_underline">True</property> - <signal name="clicked" handler="on_edit_details_button1_clicked"/> - </widget> - </child> - </widget> - </child> - <child> - <widget class="GtkLabel" id="label22"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Personal Information</b></property> - <property name="use_markup">True</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> + <property name="label" translatable="yes">Personal Information</property> </widget> <packing> - <property name="expand">False</property> - <property name="position">1</property> + <property name="type">tab</property> + <property name="position">3</property> + <property name="tab_fill">False</property> </packing> </child> </widget> <packing> - <property name="position">3</property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="label23"> - <property name="visible">True</property> - <property name="label" translatable="yes">Personal Information</property> - </widget> - <packing> - <property name="position">3</property> - <property name="tab_fill">False</property> - <property name="type">tab</property> + <property name="position">1</property> </packing> </child> </widget> @@ -962,20 +970,20 @@ <widget class="GtkVBox" id="vbox4"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="spacing">1</property> <child> <widget class="GtkCheckButton" id="enable_zeroconf_checkbutton2"> - <property name="label" translatable="yes">_Enable</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="receives_default">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="label" translatable="yes">_Enable</property> <property name="use_underline">True</property> + <property name="response_id">0</property> <property name="draw_indicator">True</property> <signal name="toggled" handler="on_enable_zeroconf_checkbutton2_toggled"/> </widget> <packing> <property name="expand">False</property> - <property name="position">0</property> </packing> </child> <child> @@ -989,28 +997,27 @@ <property name="spacing">6</property> <child> <widget class="GtkCheckButton" id="autoconnect_checkbutton2"> - <property name="label" translatable="yes">Co_nnect on Gajim startup</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="receives_default">False</property> <property name="tooltip" translatable="yes">If checked, Gajim, when launched, will automatically connect to jabber using this account</property> + <property name="label" translatable="yes">Co_nnect on Gajim startup</property> <property name="use_underline">True</property> + <property name="response_id">0</property> <property name="draw_indicator">True</property> <signal name="toggled" handler="on_autoconnect_checkbutton_toggled"/> </widget> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">0</property> </packing> </child> <child> <widget class="GtkCheckButton" id="log_history_checkbutton2"> - <property name="label" translatable="yes">Save conversation _logs for all contacts</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="receives_default">False</property> + <property name="label" translatable="yes">Save conversation _logs for all contacts</property> <property name="use_underline">True</property> + <property name="response_id">0</property> <property name="draw_indicator">True</property> <signal name="toggled" handler="on_log_history_checkbutton_toggled"/> </widget> @@ -1022,12 +1029,12 @@ </child> <child> <widget class="GtkCheckButton" id="sync_with_global_status_checkbutton2"> - <property name="label" translatable="yes">Synchroni_ze account status with global status</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="receives_default">False</property> <property name="tooltip" translatable="yes">If checked, any change to the global status (handled by the combobox at the bottom of the roster window) will change the status of this account accordingly</property> + <property name="label" translatable="yes">Synchroni_ze account status with global status</property> <property name="use_underline">True</property> + <property name="response_id">0</property> <property name="draw_indicator">True</property> <signal name="toggled" handler="on_sync_with_global_status_checkbutton_toggled"/> </widget> @@ -1042,20 +1049,19 @@ <property name="visible">True</property> <child> <widget class="GtkCheckButton" id="custom_port_checkbutton2"> - <property name="label" translatable="yes">Use cust_om port:</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="receives_default">False</property> <property name="tooltip" translatable="yes">If the default port that is used for incoming messages is unfitting for your setup you can select another one here. You might consider to change possible firewall settings.</property> + <property name="label" translatable="yes">Use cust_om 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_port_checkbutton2_toggled"/> </widget> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">0</property> </packing> </child> <child> @@ -1087,8 +1093,8 @@ You might consider to change possible firewall settings.</property> <property name="use_markup">True</property> </widget> <packing> - <property name="tab_fill">False</property> <property name="type">tab</property> + <property name="tab_fill">False</property> </packing> </child> <child> @@ -1113,7 +1119,6 @@ You might consider to change possible firewall settings.</property> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">0</property> </packing> </child> <child> @@ -1128,7 +1133,6 @@ You might consider to change possible firewall settings.</property> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">0</property> </packing> </child> <child> @@ -1141,11 +1145,11 @@ You might consider to change possible firewall settings.</property> </child> <child> <widget class="GtkButton" id="gpg_choose_button2"> - <property name="label" translatable="yes">Choose _Key...</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="receives_default">False</property> + <property name="label" translatable="yes">Choose _Key...</property> <property name="use_underline">True</property> + <property name="response_id">0</property> <signal name="clicked" handler="on_gpg_choose_button_clicked"/> </widget> <packing> @@ -1161,12 +1165,12 @@ You might consider to change possible firewall settings.</property> </child> <child> <widget class="GtkCheckButton" id="use_gpg_agent_checkbutton2"> - <property name="label" translatable="yes">Use G_PG Agent</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="receives_default">False</property> <property name="tooltip" translatable="yes">If checked, Gajim will get the password from a GPG agent like seahorse</property> + <property name="label" translatable="yes">Use G_PG Agent</property> <property name="use_underline">True</property> + <property name="response_id">0</property> <property name="draw_indicator">True</property> <signal name="toggled" handler="on_use_gpg_agent_checkbutton_toggled"/> </widget> @@ -1312,9 +1316,9 @@ You might consider to change possible firewall settings.</property> <property name="label" translatable="yes">Personal Information</property> </widget> <packing> + <property name="type">tab</property> <property name="position">1</property> <property name="tab_fill">False</property> - <property name="type">tab</property> </packing> </child> </widget> @@ -1340,18 +1344,15 @@ You might consider to change possible firewall settings.</property> </packing> </child> </widget> - <packing> - <property name="position">0</property> - </packing> </child> <child> <widget class="GtkCheckButton" id="merge_checkbutton"> - <property name="label" translatable="yes">Mer_ge accounts</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="receives_default">False</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="label" translatable="yes">Mer_ge accounts</property> <property name="use_underline">True</property> + <property name="response_id">0</property> <property name="draw_indicator">True</property> </widget> <packing> @@ -1364,21 +1365,21 @@ You might consider to change possible firewall settings.</property> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="spacing">6</property> - <property name="layout_style">end</property> + <property name="layout_style">GTK_BUTTONBOX_END</property> <child> <widget class="GtkButton" id="close_button"> - <property name="label" translatable="yes">gtk-close</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="label" translatable="yes">gtk-close</property> <property name="use_stock">True</property> + <property name="response_id">0</property> <signal name="clicked" handler="on_close_button_clicked"/> </widget> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">0</property> </packing> </child> </widget> diff --git a/src/common/config.py b/src/common/config.py index f2277f93e9..5b1f887a4b 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -100,7 +100,6 @@ class Config: 'mergeaccounts': [ opt_bool, False, '', True ], 'sort_by_show_in_roster': [ opt_bool, True, '', True ], 'sort_by_show_in_muc': [ opt_bool, False, '', True ], - 'enable_zeroconf': [opt_bool, False, _('Enable link-local/zeroconf messaging')], 'use_speller': [ opt_bool, False, ], 'ignore_incoming_xhtml': [ opt_bool, False, ], 'speller_language': [ opt_str, '', _('Language used by speller')], @@ -287,7 +286,7 @@ class Config: 'restore_last_status': [ opt_bool, False, _('If enabled, restore the last status that was used.') ], 'autoreconnect': [ opt_bool, True ], 'autoauth': [ opt_bool, False, _('If True, Contacts requesting authorization will be automatically accepted.')], - 'active': [ opt_bool, True], + 'active': [ opt_bool, True, _('If False, this account will be disabled and will not appear in roster window.'), True], 'proxy': [ opt_str, '', '', True ], 'keyid': [ opt_str, '', '', True ], 'gpg_sign_presence': [ opt_bool, True, _('If disabled, don\'t sign presences with GPG key, even if GPG is configured.') ], diff --git a/src/common/defs.py b/src/common/defs.py index 83ef075a35..3f73a6c9f0 100644 --- a/src/common/defs.py +++ b/src/common/defs.py @@ -27,7 +27,7 @@ docdir = '../' datadir = '../' localedir = '../po' -version = '0.12.5.2-dev' +version = '0.12.5.3-dev' import sys, os.path for base in ('.', 'common'): diff --git a/src/common/optparser.py b/src/common/optparser.py index 5cedeeaca7..f161ca0539 100644 --- a/src/common/optparser.py +++ b/src/common/optparser.py @@ -204,6 +204,8 @@ class OptionsParser: self.update_config_to_01251() if old < [0, 12, 5, 2] and new >= [0, 12, 5, 2]: self.update_config_to_01252() + if old < [0, 12, 5, 3] and new >= [0, 12, 5, 3]: + self.update_config_to_01253() gajim.logger.init_vars() gajim.config.set('version', new_version) @@ -736,4 +738,14 @@ class OptionsParser: gajim.config.set_per('accounts', account, 'autoauth', val) gajim.config.set('version', '0.12.5.2') + def update_config_to_01253(self): + if 'enable_zeroconf' in self.old_values: + val = self.old_values['enable_zeroconf'] + for account in gajim.config.get_per('accounts'): + if gajim.config.get_per('accounts', account, 'is_zeroconf'): + gajim.config.set_per('accounts', account, 'active', val) + else: + gajim.config.set_per('accounts', account, 'active', True) + gajim.config.set('version', '0.12.5.3') + # vim: se ts=3: diff --git a/src/config.py b/src/config.py index 7aea772a7c..d5be186559 100644 --- a/src/config.py +++ b/src/config.py @@ -1387,6 +1387,8 @@ class AccountsWindow: model.set(iter_, 0, account) def resend(self, account): + if not account in gajim.connections: + return show = gajim.SHOW_LIST[gajim.connections[account].connected] status = gajim.connections[account].status gajim.connections[account].change_status(show, status) @@ -1420,10 +1422,12 @@ class AccountsWindow: def on_no(account): if self.resend_presence: self.resend(account) - self.dialog = dialogs.YesNoDialog(_('Relogin now?'), - _('If you want all the changes to apply instantly, ' - 'you must relogin.'), on_response_yes=(on_yes, - self.current_account), on_response_no=(on_no, self.current_account)) + if self.current_account in gajim.connections: + self.dialog = dialogs.YesNoDialog(_('Relogin now?'), + _('If you want all the changes to apply instantly, ' + 'you must relogin.'), on_response_yes=(on_yes, + self.current_account), on_response_no=(on_no, + self.current_account)) elif self.resend_presence: self.resend(self.current_account) @@ -1507,12 +1511,13 @@ class AccountsWindow: self.notebook.set_current_page(1) def init_zeroconf_account(self): - enable = gajim.config.get('enable_zeroconf') and gajim.HAVE_ZEROCONF - self.xml.get_widget('enable_zeroconf_checkbutton2').set_active(enable) + active = gajim.config.get_per('accounts', gajim.ZEROCONF_ACC_NAME, + 'active') + self.xml.get_widget('enable_zeroconf_checkbutton2').set_active(active) if not gajim.HAVE_ZEROCONF: self.xml.get_widget('enable_zeroconf_checkbutton2').set_sensitive( False) - self.xml.get_widget('zeroconf_notebook').set_sensitive(enable) + self.xml.get_widget('zeroconf_notebook').set_sensitive(active) # General tab st = gajim.config.get_per('accounts', gajim.ZEROCONF_ACC_NAME, 'autoconnect') @@ -1573,7 +1578,7 @@ class AccountsWindow: use_gpg_agent_checkbutton = self.xml.get_widget( 'use_gpg_agent_checkbutton' + widget_name_add) - if not keyid or not gajim.connections[account].gpg: + if not keyid: use_gpg_agent_checkbutton.set_sensitive(False) gpg_key_label.set_text(_('No key selected')) gpg_name_label.set_text('') @@ -1587,6 +1592,9 @@ class AccountsWindow: def draw_normal_jid(self): account = self.current_account self.ignore_events = True + active = gajim.config.get_per('accounts', account, 'active') + self.xml.get_widget('enable_checkbutton1').set_active(active) + self.xml.get_widget('normal_notebook1').set_sensitive(active) if gajim.config.get_per('accounts', account, 'anonymous_auth'): self.xml.get_widget('anonymous_checkbutton1').set_active(True) self.xml.get_widget('jid_label1').set_text(_('Server:')) @@ -1667,7 +1675,7 @@ class AccountsWindow: # Personal tab gpg_key_label = self.xml.get_widget('gpg_key_label1') - if gajim.connections[account].gpg: + if gajim.HAVE_GPG: self.xml.get_widget('gpg_choose_button1').set_sensitive(True) self.init_account_gpg() else: @@ -1744,9 +1752,8 @@ class AccountsWindow: def on_rename_button_clicked(self, widget): if not self.current_account: return - enable = gajim.config.get('enable_zeroconf') - if (self.current_account != gajim.ZEROCONF_ACC_NAME or enable) and \ - gajim.connections[self.current_account].connected != 0: + active = gajim.config.get_per('accounts', self.current_account, 'active') + if active and gajim.connections[self.current_account].connected != 0: dialogs.ErrorDialog( _('You are currently connected to the server'), _('To change the account name, you must be disconnected.')) @@ -1771,7 +1778,7 @@ class AccountsWindow: dialogs.ErrorDialog(_('Invalid account name'), _('Account name cannot contain spaces.')) return - if self.current_account != gajim.ZEROCONF_ACC_NAME or enable: + if active: # update variables gajim.interface.instances[new_name] = gajim.interface.instances[ old_name] @@ -2179,15 +2186,101 @@ class AccountsWindow: def on_merge_checkbutton_toggled(self, widget): self.on_checkbutton_toggled(widget, 'mergeaccounts') - if len(gajim.connections) >= 2: # Do not merge accounts if only one exists + if len(gajim.connections) >= 2: # Do not merge accounts if only one active gajim.interface.roster.regroup = gajim.config.get('mergeaccounts') else: gajim.interface.roster.regroup = False gajim.interface.roster.setup_and_draw_roster() + def _disable_account(self, account): + gajim.interface.roster.close_all(account) + if account == gajim.ZEROCONF_ACC_NAME: + gajim.connections[account].disable_account() + del gajim.connections[account] + gajim.interface.save_config() + del gajim.interface.instances[account] + del gajim.interface.minimized_controls[account] + del gajim.nicks[account] + del gajim.block_signed_in_notifications[account] + del gajim.groups[account] + gajim.contacts.remove_account(account) + del gajim.gc_connected[account] + del gajim.automatic_rooms[account] + del gajim.to_be_removed[account] + del gajim.newly_added[account] + del gajim.sleeper_state[account] + del gajim.encrypted_chats[account] + del gajim.last_message_time[account] + del gajim.status_before_autoaway[account] + del gajim.transport_avatar[account] + del gajim.gajim_optional_features[account] + del gajim.caps_hash[account] + if len(gajim.connections) >= 2: + # Do not merge accounts if only one exists + gajim.interface.roster.regroup = gajim.config.get('mergeaccounts') + else: + gajim.interface.roster.regroup = False + gajim.interface.roster.setup_and_draw_roster() + gajim.interface.roster.set_actions_menu_needs_rebuild() + + def _enable_account(self, account): + if account == gajim.ZEROCONF_ACC_NAME: + gajim.connections[account] = connection_zeroconf.ConnectionZeroconf( + account) + if gajim.connections[account].gpg: + self.xml.get_widget('gpg_choose_button2').set_sensitive(True) + else: + gajim.connections[account] = common.connection.Connection(account) + if gajim.connections[account].gpg: + self.xml.get_widget('gpg_choose_button1').set_sensitive(True) + self.init_account_gpg() + # update variables + gajim.interface.instances[account] = {'infos': {}, + 'disco': {}, 'gc_config': {}, 'search': {}, 'online_dialog': {}} + gajim.interface.minimized_controls[account] = {} + gajim.connections[account].connected = 0 + gajim.groups[account] = {} + gajim.contacts.add_account(account) + gajim.gc_connected[account] = {} + gajim.automatic_rooms[account] = {} + gajim.newly_added[account] = [] + gajim.to_be_removed[account] = [] + if account == gajim.ZEROCONF_ACC_NAME: + gajim.nicks[account] = gajim.ZEROCONF_ACC_NAME + else: + gajim.nicks[account] = gajim.config.get_per('accounts', account, + 'name') + gajim.block_signed_in_notifications[account] = True + gajim.sleeper_state[account] = 'off' + gajim.encrypted_chats[account] = [] + gajim.last_message_time[account] = {} + gajim.status_before_autoaway[account] = '' + gajim.transport_avatar[account] = {} + gajim.gajim_optional_features[account] = [] + gajim.caps_hash[account] = '' + # refresh roster + if len(gajim.connections) >= 2: + # Do not merge accounts if only one exists + gajim.interface.roster.regroup = gajim.config.get('mergeaccounts') + else: + gajim.interface.roster.regroup = False + gajim.interface.roster.setup_and_draw_roster() + gajim.interface.roster.set_actions_menu_needs_rebuild() + gajim.interface.save_config() + def on_enable_zeroconf_checkbutton2_toggled(self, widget): # don't do anything if there is an account with the local name but is a # normal account + if self.ignore_events: + return + if gajim.account_is_connected(self.current_account): + self.ignore_events = True + self.xml.get_widget('enable_zeroconf_checkbutton2').set_active(True) + self.ignore_events = False + dialogs.ErrorDialog( + _('You are currently connected to the server'), + _('To disable the account, you must be disconnected.')) + return if gajim.ZEROCONF_ACC_NAME in gajim.connections and not \ gajim.connections[gajim.ZEROCONF_ACC_NAME].is_zeroconf: gajim.connections[gajim.ZEROCONF_ACC_NAME].dispatch('ERROR', @@ -2196,77 +2289,42 @@ class AccountsWindow: '.'))) return - if gajim.config.get('enable_zeroconf') and not widget.get_active(): + if gajim.config.get_per('accounts', gajim.ZEROCONF_ACC_NAME, 'active') \ + and not widget.get_active(): self.xml.get_widget('zeroconf_notebook').set_sensitive(False) # disable - gajim.interface.roster.close_all(gajim.ZEROCONF_ACC_NAME) - gajim.connections[gajim.ZEROCONF_ACC_NAME].disable_account() - del gajim.connections[gajim.ZEROCONF_ACC_NAME] - gajim.interface.save_config() - del gajim.interface.instances[gajim.ZEROCONF_ACC_NAME] - del gajim.interface.minimized_controls[gajim.ZEROCONF_ACC_NAME] - del gajim.nicks[gajim.ZEROCONF_ACC_NAME] - del gajim.block_signed_in_notifications[gajim.ZEROCONF_ACC_NAME] - del gajim.groups[gajim.ZEROCONF_ACC_NAME] - gajim.contacts.remove_account(gajim.ZEROCONF_ACC_NAME) - del gajim.gc_connected[gajim.ZEROCONF_ACC_NAME] - del gajim.automatic_rooms[gajim.ZEROCONF_ACC_NAME] - del gajim.to_be_removed[gajim.ZEROCONF_ACC_NAME] - del gajim.newly_added[gajim.ZEROCONF_ACC_NAME] - del gajim.sleeper_state[gajim.ZEROCONF_ACC_NAME] - del gajim.encrypted_chats[gajim.ZEROCONF_ACC_NAME] - del gajim.last_message_time[gajim.ZEROCONF_ACC_NAME] - del gajim.status_before_autoaway[gajim.ZEROCONF_ACC_NAME] - del gajim.transport_avatar[gajim.ZEROCONF_ACC_NAME] - del gajim.gajim_optional_features[gajim.ZEROCONF_ACC_NAME] - del gajim.caps_hash[gajim.ZEROCONF_ACC_NAME] - if len(gajim.connections) >= 2: - # Do not merge accounts if only one exists - gajim.interface.roster.regroup = gajim.config.get('mergeaccounts') - else: - gajim.interface.roster.regroup = False - gajim.interface.roster.setup_and_draw_roster() - gajim.interface.roster.set_actions_menu_needs_rebuild() + self._disable_account(gajim.ZEROCONF_ACC_NAME) - elif not gajim.config.get('enable_zeroconf') and widget.get_active(): + elif not gajim.config.get_per('accounts', gajim.ZEROCONF_ACC_NAME, + 'active') and widget.get_active(): self.xml.get_widget('zeroconf_notebook').set_sensitive(True) # enable (will create new account if not present) - gajim.connections[gajim.ZEROCONF_ACC_NAME] = connection_zeroconf.\ - ConnectionZeroconf(gajim.ZEROCONF_ACC_NAME) - if gajim.connections[gajim.ZEROCONF_ACC_NAME].gpg: - self.xml.get_widget('gpg_choose_button2').set_sensitive(True) - self.init_account_gpg() - # update variables - gajim.interface.instances[gajim.ZEROCONF_ACC_NAME] = {'infos': {}, - 'disco': {}, 'gc_config': {}, 'search': {}, 'online_dialog': {}} - gajim.interface.minimized_controls[gajim.ZEROCONF_ACC_NAME] = {} - gajim.connections[gajim.ZEROCONF_ACC_NAME].connected = 0 - gajim.groups[gajim.ZEROCONF_ACC_NAME] = {} - gajim.contacts.add_account(gajim.ZEROCONF_ACC_NAME) - gajim.gc_connected[gajim.ZEROCONF_ACC_NAME] = {} - gajim.automatic_rooms[gajim.ZEROCONF_ACC_NAME] = {} - gajim.newly_added[gajim.ZEROCONF_ACC_NAME] = [] - gajim.to_be_removed[gajim.ZEROCONF_ACC_NAME] = [] - gajim.nicks[gajim.ZEROCONF_ACC_NAME] = gajim.ZEROCONF_ACC_NAME - gajim.block_signed_in_notifications[gajim.ZEROCONF_ACC_NAME] = True - gajim.sleeper_state[gajim.ZEROCONF_ACC_NAME] = 'off' - gajim.encrypted_chats[gajim.ZEROCONF_ACC_NAME] = [] - gajim.last_message_time[gajim.ZEROCONF_ACC_NAME] = {} - gajim.status_before_autoaway[gajim.ZEROCONF_ACC_NAME] = '' - gajim.transport_avatar[gajim.ZEROCONF_ACC_NAME] = {} - gajim.gajim_optional_features[gajim.ZEROCONF_ACC_NAME] = [] - gajim.caps_hash[gajim.ZEROCONF_ACC_NAME] = '' - # refresh roster - if len(gajim.connections) >= 2: - # Do not merge accounts if only one exists - gajim.interface.roster.regroup = gajim.config.get('mergeaccounts') - else: - gajim.interface.roster.regroup = False - gajim.interface.roster.setup_and_draw_roster() - gajim.interface.roster.set_actions_menu_needs_rebuild() - gajim.interface.save_config() + self._enable_account(gajim.ZEROCONF_ACC_NAME) + + self.on_checkbutton_toggled(widget, 'active', + account=gajim.ZEROCONF_ACC_NAME) - self.on_checkbutton_toggled(widget, 'enable_zeroconf') + def on_enable_checkbutton1_toggled(self, widget): + if self.ignore_events: + return + if gajim.account_is_connected(self.current_account): + self.ignore_events = True + self.xml.get_widget('enable_checkbutton1').set_active(True) + self.ignore_events = False + dialogs.ErrorDialog( + _('You are currently connected to the server'), + _('To disable the account, you must be disconnected.')) + return + # add/remove account in roster and all variables + if widget.get_active(): + # enable + self._enable_account(self.current_account) + else: + # disable + self._disable_account(self.current_account) + self.on_checkbutton_toggled(widget, 'active', + account=self.current_account, change_sensitivity_widgets=[ + self.xml.get_widget('normal_notebook1')]) def on_custom_port_checkbutton2_toggled(self, widget): self.xml.get_widget('custom_port_entry2').set_sensitive( diff --git a/src/gajim.py b/src/gajim.py index 82b95ad460..3c4bb4ebbc 100644 --- a/src/gajim.py +++ b/src/gajim.py @@ -3486,11 +3486,13 @@ class Interface: gajim.proxy65_manager = proxy65_manager.Proxy65Manager(gajim.idlequeue) gajim.default_session_type = ChatControlSession self.register_handlers() - if gajim.config.get('enable_zeroconf') and gajim.HAVE_ZEROCONF: + if gajim.config.get_per('accounts', gajim.ZEROCONF_ACC_NAME, 'active') \ + and gajim.HAVE_ZEROCONF: gajim.connections[gajim.ZEROCONF_ACC_NAME] = \ connection_zeroconf.ConnectionZeroconf(gajim.ZEROCONF_ACC_NAME) for account in gajim.config.get_per('accounts'): - if not gajim.config.get_per('accounts', account, 'is_zeroconf'): + if not gajim.config.get_per('accounts', account, 'is_zeroconf') and \ + gajim.config.get_per('accounts', account, 'active'): gajim.connections[account] = common.connection.Connection(account) # gtk hooks -- GitLab