[gnome-online-accounts] utils: Use human readable values while reporting duplicate accounts



commit b8748f93908787f55879229ef2307e38a74341bc
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Apr 18 23:57:09 2012 +0200

    utils: Use human readable values while reporting duplicate accounts

 src/goabackend/goautils.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/goabackend/goautils.c b/src/goabackend/goautils.c
index 80610c7..25d3946 100644
--- a/src/goabackend/goautils.c
+++ b/src/goabackend/goautils.c
@@ -60,11 +60,17 @@ goa_utils_check_duplicate (GoaClient              *client,
       identity_from_object = goa_account_get_identity (account);
       if (g_strcmp0 (identity_from_object, identity) == 0)
         {
+          const gchar *presentation_identity;
+          const gchar *provider_name;
+
+          presentation_identity = goa_account_get_presentation_identity (account);
+          provider_name = goa_account_get_provider_name (account);
           g_set_error (error,
                        GOA_ERROR,
                        GOA_ERROR_ACCOUNT_EXISTS,
-                       _("There is already an account for the identity %s"),
-                       identity);
+                       _("There is already a %s account for %s"),
+                       provider_name,
+                       presentation_identity);
           goto out;
         }
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]