aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-08-26 17:15:11 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-08-29 17:42:15 +0800
commit04f88a3959838b95972664ce99cf24f94be06457 (patch)
tree5ba481428038c56c84f94b4c0571bd9d2c4c5c71
parent6dfd7204baa89c6eb3903753f45b7d416a93b112 (diff)
downloadgsoc2013-empathy-04f88a3959838b95972664ce99cf24f94be06457.tar
gsoc2013-empathy-04f88a3959838b95972664ce99cf24f94be06457.tar.gz
gsoc2013-empathy-04f88a3959838b95972664ce99cf24f94be06457.tar.bz2
gsoc2013-empathy-04f88a3959838b95972664ce99cf24f94be06457.tar.lz
gsoc2013-empathy-04f88a3959838b95972664ce99cf24f94be06457.tar.xz
gsoc2013-empathy-04f88a3959838b95972664ce99cf24f94be06457.tar.zst
gsoc2013-empathy-04f88a3959838b95972664ce99cf24f94be06457.zip
export empathy_account_has_uri_scheme_tel()
https://bugzilla.gnome.org/show_bug.cgi?id=650112
-rw-r--r--libempathy/empathy-account-settings.c26
-rw-r--r--libempathy/empathy-utils.c19
-rw-r--r--libempathy/empathy-utils.h2
3 files changed, 25 insertions, 22 deletions
diff --git a/libempathy/empathy-account-settings.c b/libempathy/empathy-account-settings.c
index 91ba61023..04fa789d5 100644
--- a/libempathy/empathy-account-settings.c
+++ b/libempathy/empathy-account-settings.c
@@ -529,25 +529,6 @@ empathy_account_settings_try_migrating_password (EmpathyAccountSettings *self)
priv->password_original = g_strdup (password);
}
-static gboolean
-account_has_uri_scheme_tel (TpAccount *account)
-{
- const gchar * const * uri_schemes;
- guint i;
-
- uri_schemes = tp_account_get_uri_schemes (account);
- if (uri_schemes == NULL)
- return FALSE;
-
- for (i = 0; uri_schemes[i] != NULL; i++)
- {
- if (!tp_strdiff (uri_schemes[i], "tel"))
- return TRUE;
- }
-
- return FALSE;
-}
-
static void
empathy_account_settings_check_readyness (EmpathyAccountSettings *self)
{
@@ -586,7 +567,7 @@ empathy_account_settings_check_readyness (EmpathyAccountSettings *self)
priv->icon_name =
g_strdup (tp_account_get_icon_name (priv->account));
- priv->uri_scheme_tel = account_has_uri_scheme_tel (priv->account);
+ priv->uri_scheme_tel = empathy_account_has_uri_scheme_tel (priv->account);
}
tp_protocol = tp_connection_manager_get_protocol (priv->manager,
@@ -947,7 +928,7 @@ empathy_account_settings_discard_changes (EmpathyAccountSettings *settings)
priv->password = g_strdup (priv->password_original);
if (priv->account != NULL)
- priv->uri_scheme_tel = account_has_uri_scheme_tel (priv->account);
+ priv->uri_scheme_tel = empathy_account_has_uri_scheme_tel (priv->account);
else
priv->uri_scheme_tel = FALSE;
}
@@ -1456,7 +1437,8 @@ update_account_uri_schemes (EmpathyAccountSettings *self)
{
EmpathyAccountSettingsPriv *priv = GET_PRIV (self);
- if (priv->uri_scheme_tel == account_has_uri_scheme_tel (priv->account))
+ if (priv->uri_scheme_tel == empathy_account_has_uri_scheme_tel (
+ priv->account))
return;
tp_account_set_uri_scheme_association_async (priv->account, "tel",
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index 9a0d16707..f0ecc0ddf 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -955,3 +955,22 @@ empathy_format_currency (gint amount,
return money;
}
+
+gboolean
+empathy_account_has_uri_scheme_tel (TpAccount *account)
+{
+ const gchar * const * uri_schemes;
+ guint i;
+
+ uri_schemes = tp_account_get_uri_schemes (account);
+ if (uri_schemes == NULL)
+ return FALSE;
+
+ for (i = 0; uri_schemes[i] != NULL; i++)
+ {
+ if (!tp_strdiff (uri_schemes[i], "tel"))
+ return TRUE;
+ }
+
+ return FALSE;
+}
diff --git a/libempathy/empathy-utils.h b/libempathy/empathy-utils.h
index 90933eded..fb25d7a99 100644
--- a/libempathy/empathy-utils.h
+++ b/libempathy/empathy-utils.h
@@ -106,6 +106,8 @@ gchar *empathy_format_currency (gint amount,
guint scale,
const gchar *currency);
+gboolean empathy_account_has_uri_scheme_tel (TpAccount *account);
+
/* Copied from wocky/wocky-utils.h */
#define empathy_implement_finish_void(source, tag) \