hide protocol_jid_combobox if only one

move auto_authorize checkbutton outside of table
Fixes #2461
This commit is contained in:
Yann Leboulanger 2006-10-02 22:56:26 +00:00
parent 8eac5a6e28
commit aa3230814c
2 changed files with 26 additions and 26 deletions

View File

@ -180,7 +180,7 @@
<widget class="GtkTable" id="subscription_table">
<property name="border_width">6</property>
<property name="visible">True</property>
<property name="n_rows">4</property>
<property name="n_rows">3</property>
<property name="n_columns">2</property>
<property name="homogeneous">False</property>
<property name="row_spacing">6</property>
@ -331,6 +331,13 @@
<property name="x_options">fill</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="auto_authorize_checkbutton">
@ -344,20 +351,10 @@
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
</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">fill</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="fill">False</property>
</packing>
</child>

View File

@ -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: