[empathy: 57/65] Add an usre_requested param to _account_get_error()
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy: 57/65] Add an usre_requested param to _account_get_error()
- Date: Tue, 24 Aug 2010 13:31:15 +0000 (UTC)
commit 5b7271c8f3c349637516c6b5bdb442aa9a480925
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Aug 18 19:06:27 2010 +0200
Add an usre_requested param to _account_get_error()
libempathy/empathy-utils.c | 15 +++++++++++++--
libempathy/empathy-utils.h | 3 ++-
2 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index 4ab367b..579870f 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;
diff --git a/libempathy/empathy-utils.h b/libempathy/empathy-utils.h
index 47b9b84..f588479 100644
--- a/libempathy/empathy-utils.h
+++ b/libempathy/empathy-utils.h
@@ -76,7 +76,8 @@ gboolean empathy_check_available_state (void);
gint empathy_uint_compare (gconstpointer a,
gconstpointer b);
-const gchar * empathy_account_get_error_message (TpAccount *account);
+const gchar * empathy_account_get_error_message (TpAccount *account,
+ gboolean *user_requested);
gchar *empathy_protocol_icon_name (const gchar *protocol);
const gchar *empathy_protocol_name_to_display_name (const gchar *proto_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]