aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-account-widget-sip.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-08-24 19:53:05 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-08-24 22:27:42 +0800
commit96d638486a06118b91086f00d3a6b9d89eb8d445 (patch)
tree18c7c5dc4d40d74922d24f4d3d0f6147da1ac4a0 /libempathy-gtk/empathy-account-widget-sip.c
parent1363e49db79f64f85b7cdd4fe273896a9228c619 (diff)
downloadgsoc2013-empathy-96d638486a06118b91086f00d3a6b9d89eb8d445.tar
gsoc2013-empathy-96d638486a06118b91086f00d3a6b9d89eb8d445.tar.gz
gsoc2013-empathy-96d638486a06118b91086f00d3a6b9d89eb8d445.tar.bz2
gsoc2013-empathy-96d638486a06118b91086f00d3a6b9d89eb8d445.tar.lz
gsoc2013-empathy-96d638486a06118b91086f00d3a6b9d89eb8d445.tar.xz
gsoc2013-empathy-96d638486a06118b91086f00d3a6b9d89eb8d445.tar.zst
gsoc2013-empathy-96d638486a06118b91086f00d3a6b9d89eb8d445.zip
account-widget-sip: add option to mark account as being able to call phones
https://bugzilla.gnome.org/show_bug.cgi?id=657220
Diffstat (limited to 'libempathy-gtk/empathy-account-widget-sip.c')
-rw-r--r--libempathy-gtk/empathy-account-widget-sip.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-account-widget-sip.c b/libempathy-gtk/empathy-account-widget-sip.c
index 21eeec0c0..405981b9e 100644
--- a/libempathy-gtk/empathy-account-widget-sip.c
+++ b/libempathy-gtk/empathy-account-widget-sip.c
@@ -93,6 +93,21 @@ keep_alive_mechanism_combobox_change_cb (GtkWidget *widget,
g_free (mechanism);
}
+static void
+checkbutton_tel_toggled (
+ GtkWidget *checkbox,
+ EmpathyAccountWidgetSip *sip_settings)
+{
+ EmpathyAccountSettings *settings;
+
+ settings = empathy_account_widget_get_settings (sip_settings->self);
+
+ empathy_account_settings_set_uri_scheme_tel (settings,
+ gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox)));
+
+ empathy_account_widget_changed (sip_settings->self);
+}
+
void
empathy_account_widget_sip_build (EmpathyAccountWidget *self,
const char *filename,
@@ -123,6 +138,7 @@ empathy_account_widget_sip_build (EmpathyAccountWidget *self,
GtkListStore *store;
GtkTreeIter iter;
GtkCellRenderer *renderer;
+ GtkToggleButton *checkbutton_tel;
settings = g_slice_new0 (EmpathyAccountWidgetSip);
settings->self = self;
@@ -138,9 +154,14 @@ empathy_account_widget_sip_build (EmpathyAccountWidget *self,
"checkbutton_discover-stun", &settings->checkbutton_discover_stun,
"spinbutton_keepalive-interval",
&settings->spinbutton_keepalive_interval,
+ "checkbutton_tel", &checkbutton_tel,
NULL);
settings->vbox_settings = vbox_settings;
+ gtk_toggle_button_set_active (checkbutton_tel,
+ empathy_account_settings_has_uri_scheme_tel (
+ empathy_account_widget_get_settings (self)));
+
empathy_account_widget_handle_params (self,
"entry_userid", "account",
"entry_password", "password",
@@ -164,6 +185,7 @@ empathy_account_widget_sip_build (EmpathyAccountWidget *self,
"vbox_sip_settings", "destroy", account_widget_sip_destroy_cb,
"checkbutton_discover-stun", "toggled",
account_widget_sip_discover_stun_toggled_cb,
+ "checkbutton_tel", "toggled", checkbutton_tel_toggled,
NULL);
self->ui_details->default_focus = g_strdup ("entry_userid");