[gnome-contacts] Update display name in card when it changes
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Update display name in card when it changes
- Date: Mon, 19 Dec 2011 13:52:40 +0000 (UTC)
commit 764ff3f68000314692d0ddd84b41b6fdac728f8f
Author: Alexander Larsson <alexl redhat com>
Date: Mon Dec 19 12:24:15 2011 +0100
Update display name in card when it changes
src/contacts-contact-pane.vala | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index 1434f39..6768be4 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -1509,6 +1509,12 @@ public class Contacts.ContactPane : ScrolledWindow {
l.set_ellipsize (Pango.EllipsizeMode.END);
l.xalign = 0.0f;
+ var old_contact = contact;
+ ulong id = contact.changed.connect ( () => {
+ l.set_markup ("<span font='24'>" + contact.display_name + "</span>");
+ });
+ l.destroy.connect (() => { old_contact.disconnect (id); });
+
var event_box = new EventBox ();
event_box.set_visible_window (false);
@@ -1558,6 +1564,10 @@ public class Contacts.ContactPane : ScrolledWindow {
bool changed = entry.get_text () != contact.display_name;
if (save && changed) {
+ // Things look better if we update immediately, rather than after the setting has
+ // been applied
+ l.set_markup ("<span font='24'>" + entry.get_text () + "</span>");
+
Value v = Value (typeof (string));
v.set_string (entry.get_text ());
set_individual_property.begin (contact,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]