[gnome-contacts] Fixup urls display
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Fixup urls display
- Date: Mon, 13 Jun 2011 13:31:19 +0000 (UTC)
commit 72ba88e32abfce188857c933dfec1d778b1bb05b
Author: Alexander Larsson <alexl redhat com>
Date: Mon Jun 13 11:25:47 2011 +0200
Fixup urls display
src/contacts-contact-pane.vala | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index 1a02c7f..d740976 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -312,9 +312,15 @@ public class Contacts.ContactPane : EventBox {
layout.add_string_property (_("Alias"), contact.individual, "alias");
- layout.add_label ("Links");
- layout.add_link ("http://www.twitter.com", _("Twitter"));
- layout.add_link ("http://www.facebook.com", _("Facebook"));
+ var urls = contact.individual.urls;
+ if (!urls.is_empty) {
+ layout.add_label ("Links");
+ foreach (var url_details in urls) {
+ var url = url_details.value;
+ // TODO: Detect link type, possibly using types parameter (to be standardized)
+ layout.add_link (url, url);
+ }
+ }
fields_grid.show_all ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]