From aa3230814c1576c5218b4017ebf5ebb9d8a574e0 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 2 Oct 2006 22:56:26 +0000 Subject: [PATCH] hide protocol_jid_combobox if only one move auto_authorize checkbutton outside of table Fixes #2461 --- data/glade/add_new_contact_window.glade | 43 ++++++++++++------------- src/dialogs.py | 9 ++++-- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/data/glade/add_new_contact_window.glade b/data/glade/add_new_contact_window.glade index cf41eca13..dd220be82 100644 --- a/data/glade/add_new_contact_window.glade +++ b/data/glade/add_new_contact_window.glade @@ -180,7 +180,7 @@ 6 True - 4 + 3 2 False 6 @@ -331,28 +331,6 @@ fill - - - - True - True - A_llow this contact to view my status - True - GTK_RELIEF_NORMAL - True - True - False - True - - - 1 - 2 - 3 - 4 - fill - - - 0 @@ -361,6 +339,25 @@ + + + True + True + A_llow this contact to view my status + True + GTK_RELIEF_NORMAL + True + True + False + True + + + 0 + False + False + + + 6 diff --git a/src/dialogs.py b/src/dialogs.py index 589c7e275..60cd23435 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -486,7 +486,8 @@ _('Please fill in the data of the contact you want to add in account %s') %accou liststore.append([type_, type_]) self.protocol_combobox.set_model(liststore) self.protocol_combobox.set_active(0) - self.protocol_jid_combobox.set_sensitive(False) + self.protocol_jid_combobox.set_no_show_all(True) + self.protocol_jid_combobox.hide() self.subscription_table.set_no_show_all(True) self.message_scrolledwindow.set_no_show_all(True) self.register_hbox.set_no_show_all(True) @@ -643,9 +644,11 @@ _('Please fill in the data of the contact you want to add in account %s') %accou for jid_ in self.agents[type_]: model.append([jid_]) self.protocol_jid_combobox.set_active(0) - self.protocol_jid_combobox.set_sensitive(True) + if len(self.agents[type_]) > 1: + self.protocol_jid_combobox.set_no_show_all(False) + self.protocol_jid_combobox.show_all() else: - self.protocol_jid_combobox.set_sensitive(False) + self.protocol_jid_combobox.hide() if type_ in self.uid_labels: self.uid_label.set_text(self.uid_labels[type_]) else: