[empathy] export empathy_account_has_uri_scheme_tel()
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] export empathy_account_has_uri_scheme_tel()
- Date: Mon, 29 Aug 2011 09:47:57 +0000 (UTC)
commit 04f88a3959838b95972664ce99cf24f94be06457
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Fri Aug 26 11:15:11 2011 +0200
export empathy_account_has_uri_scheme_tel()
https://bugzilla.gnome.org/show_bug.cgi?id=650112
libempathy/empathy-account-settings.c | 26 ++++----------------------
libempathy/empathy-utils.c | 19 +++++++++++++++++++
libempathy/empathy-utils.h | 2 ++
3 files changed, 25 insertions(+), 22 deletions(-)
---
diff --git a/libempathy/empathy-account-settings.c b/libempathy/empathy-account-settings.c
index 91ba610..04fa789 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 9a0d167..f0ecc0d 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 90933ed..fb25d7a 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) \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]