~ubuntu-branches/ubuntu/oneiric/seahorse/oneiric-proposed-201111150713

« back to all changes in this revision

Viewing changes to gkr/seahorse-gkr-item-properties.c

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach
  • Date: 2011-04-14 23:26:01 UTC
  • mto: (3.1.7 sid) (1.2.59 upstream)
  • mto: This revision was merged to the branch mainline in revision 97.
  • Revision ID: james.westby@ubuntu.com-20110414232601-a1f1ibqayicoj8sd
ImportĀ upstreamĀ versionĀ 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
444
444
        GnomeKeyringAttributeList *attrs;
445
445
        GnomeKeyringAttribute *attr;
446
446
        GString *details;
 
447
        gchar *text;
447
448
        guint i;
448
449
 
449
450
        g_return_val_if_fail (G_VALUE_TYPE (to) == G_TYPE_STRING, FALSE);
454
455
                /* Build up the display string */
455
456
                for(i = 0; i < attrs->len; ++i) {
456
457
                        attr = &(gnome_keyring_attribute_list_index (attrs, i));
457
 
                        g_string_append_printf (details, "<b>%s</b>: ", attr->name);
 
458
                        text = g_markup_escape_text (attr->name, -1);
 
459
                        g_string_append_printf (details, "<b>%s</b>: ", text);
 
460
                        g_free (text);
458
461
                        switch (attr->type) {
459
462
                        case GNOME_KEYRING_ATTRIBUTE_TYPE_STRING:
460
 
                                g_string_append_printf (details, "%s\n", attr->value.string);
 
463
                                text = g_markup_escape_text (attr->value.string, -1);
 
464
                                g_string_append_printf (details, "%s\n", text);
 
465
                                g_free (text);
461
466
                                break;
462
467
                        case GNOME_KEYRING_ATTRIBUTE_TYPE_UINT32:
463
468
                                g_string_append_printf (details, "%u\n", attr->value.integer);
468
473
                        }
469
474
                }
470
475
        }
471
 
            
 
476
 
472
477
        g_value_take_string (to, g_string_free (details, FALSE));
473
478
        return TRUE;
474
479
}