[gnome-contacts] Font color fixed in contact-list.



commit 66c3e4c0a1acd04817977b8e1c10ade12298f48d
Author: Erick Pérez Castellanos <erick red gmail com>
Date:   Sat Mar 30 15:50:28 2013 -0400

    Font color fixed in contact-list.
    
    This is fixed through a hack right now.
    It would be better fix it in EggListBox
    Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=696269

 src/contacts-view.vala |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/src/contacts-view.vala b/src/contacts-view.vala
index d217ec2..23e3732 100644
--- a/src/contacts-view.vala
+++ b/src/contacts-view.vala
@@ -56,8 +56,9 @@ public class Contacts.View : Egg.ListBox {
   int nr_contacts_marked;
 
   string []? filter_values;
-  private TextDisplay text_display;
-  private bool selectors_visible;
+  TextDisplay text_display;
+  bool selectors_visible;
+  Widget last_selected;
 
   public View (Store store, TextDisplay text_display = TextDisplay.PRESENCE) {
     set_selection_mode (SelectionMode.BROWSE);
@@ -270,6 +271,18 @@ public class Contacts.View : Egg.ListBox {
     selection_changed (contact);
     if (contact != null)
       contact.fetch_contact_info ();
+
+    /* Hack for white display-name label */
+    if (last_selected != null) {
+      var last_data = last_selected.get_data<ContactData> ("data");
+      var label_flags = last_data.label.get_state_flags ();
+      label_flags &= ~(StateFlags.SELECTED);
+      last_data.label.set_state_flags (label_flags, true);
+    }
+    if (data != null) {
+      data.label.set_state_flags (StateFlags.SELECTED, false);
+      last_selected = child;
+    }
   }
 
   private bool filter (Widget child) {


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