aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--libempathy-gtk/empathy-account-widget-sip.c22
-rw-r--r--libempathy-gtk/empathy-account-widget-sip.ui19
2 files changed, 40 insertions, 1 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");
diff --git a/libempathy-gtk/empathy-account-widget-sip.ui b/libempathy-gtk/empathy-account-widget-sip.ui
index 52bde8ccb..488becaf1 100644
--- a/libempathy-gtk/empathy-account-widget-sip.ui
+++ b/libempathy-gtk/empathy-account-widget-sip.ui
@@ -23,7 +23,7 @@
<object class="GtkTable" id="table_common_settings">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">4</property>
+ <property name="n_rows">5</property>
<property name="n_columns">2</property>
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
@@ -123,6 +123,23 @@
</packing>
</child>
<child>
+ <object class="GtkCheckButton" id="checkbutton_tel">
+ <property name="label" translatable="yes">Use this account to call _landlines and mobile phones</property>
+ <property name="use_underline">True</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ </packing>
+ </child>
+ <child>
<placeholder/>
</child>
<child>