]> git.0d.be Git - empathy.git/commitdiff
export empathy_account_has_uri_scheme_tel()
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 26 Aug 2011 09:15:11 +0000 (11:15 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 29 Aug 2011 09:42:15 +0000 (11:42 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=650112

libempathy/empathy-account-settings.c
libempathy/empathy-utils.c
libempathy/empathy-utils.h

index 91ba61023184ae62220febad93ee871844ecdbe9..04fa789d57dddd5c85cd864cb9dbbb15abb036ce 100644 (file)
@@ -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",
index 9a0d167072c13faac40067eeee0e6ceb1991d552..f0ecc0ddfc94895eb8466005de1c495dd944d74d 100644 (file)
@@ -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;
+}
index 90933ededc491c3f71b9f5b181eaf320500b7a70..fb25d7a99373f54ed72127088fc1f40d39f8fcef 100644 (file)
@@ -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) \