aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-17 00:31:00 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-23 23:06:36 +0800
commit03b6a5b020c9c2f7cc3a2bf5240368ced685f1bc (patch)
treeb813320eb4b952ee6e4779ba97e4d1c1628ed9a0
parent5443218a889c1866d8fbe29f5d74e76eb038e37e (diff)
downloadgsoc2013-empathy-03b6a5b020c9c2f7cc3a2bf5240368ced685f1bc.tar
gsoc2013-empathy-03b6a5b020c9c2f7cc3a2bf5240368ced685f1bc.tar.gz
gsoc2013-empathy-03b6a5b020c9c2f7cc3a2bf5240368ced685f1bc.tar.bz2
gsoc2013-empathy-03b6a5b020c9c2f7cc3a2bf5240368ced685f1bc.tar.lz
gsoc2013-empathy-03b6a5b020c9c2f7cc3a2bf5240368ced685f1bc.tar.xz
gsoc2013-empathy-03b6a5b020c9c2f7cc3a2bf5240368ced685f1bc.tar.zst
gsoc2013-empathy-03b6a5b020c9c2f7cc3a2bf5240368ced685f1bc.zip
account-widget-sip: add UI to configure the transport param
-rw-r--r--libempathy-gtk/empathy-account-widget-sip.c24
-rw-r--r--libempathy-gtk/empathy-account-widget-sip.ui16
2 files changed, 39 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-account-widget-sip.c b/libempathy-gtk/empathy-account-widget-sip.c
index 7db11c0c5..f9060de27 100644
--- a/libempathy-gtk/empathy-account-widget-sip.c
+++ b/libempathy-gtk/empathy-account-widget-sip.c
@@ -42,6 +42,7 @@ typedef struct {
GtkWidget *entry_stun_server;
GtkWidget *spinbutton_stun_part;
GtkWidget *checkbutton_discover_stun;
+ GtkWidget *combobox_transport;
} EmpathyAccountWidgetSip;
static void
@@ -71,6 +72,7 @@ empathy_account_widget_sip_build (EmpathyAccountWidget *self,
EmpathyAccountWidgetSip *settings;
GtkWidget *vbox_settings;
gboolean is_simple;
+ GtkWidget *table_advanced;
g_object_get (self, "simple", &is_simple, NULL);
@@ -94,6 +96,7 @@ empathy_account_widget_sip_build (EmpathyAccountWidget *self,
self->ui_details->gui = empathy_builder_get_file (filename,
"table_common_settings", table_common_settings,
+ "table_advanced_sip_settings", &table_advanced,
"vbox_sip_settings", &vbox_settings,
"entry_stun-server", &settings->entry_stun_server,
"spinbutton_stun-port", &settings->spinbutton_stun_part,
@@ -124,6 +127,27 @@ empathy_account_widget_sip_build (EmpathyAccountWidget *self,
self->ui_details->add_forget = TRUE;
self->ui_details->default_focus = g_strdup ("entry_userid");
+
+ /* Create the 'transport' combobox as Glade doesn't allow us to create a
+ * GtkComboBox using gtk_combo_box_new_text () */
+ settings->combobox_transport = gtk_combo_box_new_text ();
+
+ gtk_combo_box_append_text (GTK_COMBO_BOX (settings->combobox_transport),
+ "auto");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (settings->combobox_transport),
+ "udp");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (settings->combobox_transport),
+ "tcp");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (settings->combobox_transport),
+ "tls");
+
+ account_widget_setup_widget (self, settings->combobox_transport,
+ "transport");
+
+ gtk_table_attach_defaults (GTK_TABLE (table_advanced),
+ settings->combobox_transport, 1, 2, 6, 7);
+
+ gtk_widget_show (settings->combobox_transport);
}
self->ui_details->widget = vbox_settings;
diff --git a/libempathy-gtk/empathy-account-widget-sip.ui b/libempathy-gtk/empathy-account-widget-sip.ui
index 7ca9de52b..68580b584 100644
--- a/libempathy-gtk/empathy-account-widget-sip.ui
+++ b/libempathy-gtk/empathy-account-widget-sip.ui
@@ -134,7 +134,7 @@
<child>
<object class="GtkTable" id="table_advanced_sip_settings">
<property name="visible">True</property>
- <property name="n_rows">6</property>
+ <property name="n_rows">7</property>
<property name="n_columns">2</property>
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
@@ -287,6 +287,20 @@ username.</property>
<property name="bottom_attach">6</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="label_transport">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Transport:</property>
+ </object>
+ <packing>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
</object>