[gnome-shell] ShellContactSystem: Make address search actually work



commit 472b20d933ffc0506080055d5b66d5de749acfbc
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Oct 4 16:19:09 2011 -0400

    ShellContactSystem: Make address search actually work
    
    The code was not dealing properly with what folks returns
    for im and email addresses.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=660925

 src/shell-contact-system.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/shell-contact-system.c b/src/shell-contact-system.c
index d02c1e2..4a2b958 100644
--- a/src/shell-contact-system.c
+++ b/src/shell-contact-system.c
@@ -188,7 +188,8 @@ do_match (ShellContactSystem  *self,
 
       while (gee_iterator_next (addrs_iter))
         {
-          const gchar *addr = gee_iterator_get (addrs_iter);
+          FolksImFieldDetails *field = gee_iterator_get (addrs_iter);
+          const gchar *addr = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*)field);
 
           p = strstr (addr, term);
           if (p == addr)
@@ -201,13 +202,16 @@ do_match (ShellContactSystem  *self,
               have_addr_substring = TRUE;
               matched = TRUE;
             }
+
+          g_object_unref (field);
         }
 
       g_object_unref (addrs_iter);
       addrs_iter = gee_iterable_iterator (GEE_ITERABLE (email_addrs));
       while (gee_iterator_next (addrs_iter))
         {
-          const gchar *addr = gee_iterator_get (addrs_iter);
+          FolksEmailFieldDetails *field = gee_iterator_get (addrs_iter);
+          const gchar *addr = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*)field);
 
           p = strstr (addr, term);
           if (p == addr)
@@ -220,6 +224,8 @@ do_match (ShellContactSystem  *self,
               have_addr_substring = TRUE;
               matched = TRUE;
             }
+
+          g_object_unref (field);
         }
 
       g_object_unref (addrs_iter);



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