Hide protocol combobox when there's no transports
Small patch that hides the protocol combobox in the add contact dialog when there's no other protocol besides Jabber. (no tranports)
Index: src/gtkgui.glade
===================================================================
--- src/gtkgui.glade (revision 3251)
+++ src/gtkgui.glade (working copy)
@@ -1749,7 +1749,7 @@
\</child>
\<child>
- \<widget class="GtkLabel" id="label186">
+ \<widget class="GtkLabel" id="protocol_label">
\<property name="visible">True\</property>
\<property name="label" translatable="yes">Protocol:\</property>
\<property name="use_underline">False\</property>
Index: src/dialogs.py
===================================================================
--- src/dialogs.py (revision 3251)
+++ src/dialogs.py (working copy)
@@ -321,6 +321,11 @@
self.xml.signal_autoconnect(self)
self.window.show_all()
+
+ if not jid_agents:
+ # There are no transports, just hide the protocol combobox
+ self.protocol_combobox.hide()
+ self.xml.get_widget('protocol_label').hide()
def on_add_new_contact_window_key_press_event(self, widget, event):
if event.keyval == gtk.keysyms.Escape: # ESCAPE