[gnome-online-accounts] Use PresentationIdentity instead of Identity while showing an account



commit 4094d912eba7bb2a3f93475a351910c00005a35b
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Mar 16 14:28:17 2012 +0100

    Use PresentationIdentity instead of Identity while showing an account
    
    For some providers, like Facebook, the Identity property might be a
    number and not a human recognizable string.

 src/goabackend/goaprovider.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/goabackend/goaprovider.c b/src/goabackend/goaprovider.c
index c76ef24..2b298a4 100644
--- a/src/goabackend/goaprovider.c
+++ b/src/goabackend/goaprovider.c
@@ -1141,7 +1141,7 @@ goa_util_add_account_info (GtkTable *table, GoaObject *object)
   const gchar *icon_str;
   const gchar *name;
   gchar *markup;
-  gchar *value;
+  gchar *identity;
   guint num_rows;
 
   gtk_table_get_size (table, &num_rows, NULL);
@@ -1155,9 +1155,10 @@ goa_util_add_account_info (GtkTable *table, GoaObject *object)
   gtk_table_attach (table, image, 0, 1, num_rows, num_rows + 1, GTK_FILL, GTK_FILL, 0, 0);
 
   name = goa_account_get_provider_name (account);
-  value = get_string_from_keyfile (account, "Identity");
-  markup = g_strdup_printf ("<b>%s</b>\n%s", name, (value == NULL || value[0] == '\0') ? "\xe2\x80\x94" : value);
-  g_free (value);
+  identity = goa_account_get_presentation_identity (account);
+  markup = g_strdup_printf ("<b>%s</b>\n%s",
+                            name,
+                            (identity == NULL || identity[0] == '\0') ? "\xe2\x80\x94" : identity);
   label = gtk_label_new (NULL);
   gtk_label_set_markup (GTK_LABEL (label), markup);
   gtk_table_attach (table, label, 1, 2, num_rows, num_rows + 1, GTK_FILL, GTK_FILL, 0, 0);



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