aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-utils.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2010-08-19 01:06:27 +0800
committerCosimo Cecchi <cosimoc@gnome.org>2010-08-19 01:19:00 +0800
commit5b7271c8f3c349637516c6b5bdb442aa9a480925 (patch)
treea97fa5f40d8d48b589a8b5c23db30391e1c6de1d /libempathy/empathy-utils.c
parent61e8bd3c9fec6cef2aa65cdaef98a383f346dcf1 (diff)
downloadgsoc2013-empathy-5b7271c8f3c349637516c6b5bdb442aa9a480925.tar
gsoc2013-empathy-5b7271c8f3c349637516c6b5bdb442aa9a480925.tar.gz
gsoc2013-empathy-5b7271c8f3c349637516c6b5bdb442aa9a480925.tar.bz2
gsoc2013-empathy-5b7271c8f3c349637516c6b5bdb442aa9a480925.tar.lz
gsoc2013-empathy-5b7271c8f3c349637516c6b5bdb442aa9a480925.tar.xz
gsoc2013-empathy-5b7271c8f3c349637516c6b5bdb442aa9a480925.tar.zst
gsoc2013-empathy-5b7271c8f3c349637516c6b5bdb442aa9a480925.zip
Add an usre_requested param to _account_get_error()
Diffstat (limited to 'libempathy/empathy-utils.c')
-rw-r--r--libempathy/empathy-utils.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index 4ab367b42..579870f80 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -396,13 +396,24 @@ empathy_dbus_error_name_get_default_message (const gchar *error)
}
const gchar *
-empathy_account_get_error_message (TpAccount *account)
+empathy_account_get_error_message (TpAccount *account,
+ gboolean *user_requested)
{
const gchar *dbus_error;
const gchar *message;
+ const GHashTable *details = NULL;
TpConnectionStatusReason reason;
- dbus_error = tp_account_get_detailed_error (account, NULL);
+ dbus_error = tp_account_get_detailed_error (account, &details);
+
+ if (user_requested != NULL)
+ {
+ if (tp_asv_get_boolean (details, "user-requested", NULL))
+ *user_requested = TRUE;
+ else
+ *user_requested = FALSE;
+ }
+
message = empathy_dbus_error_name_get_default_message (dbus_error);
if (message != NULL)
return message;