[git] GPA - branch, master, updated. gpa-0.10.0-2-g9ac1811

by Werner Koch cvs at cvs.gnupg.org
Thu Oct 18 11:17:07 CEST 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Assistant".

The branch, master has been updated
       via  9ac18119fb3c82197169718f1c7d5786119398ce (commit)
      from  b68e47f3853659eb4dfe1722d38b4965f29bd0d7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9ac18119fb3c82197169718f1c7d5786119398ce
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Oct 18 11:17:04 2018 +0200

    Allow searchin in the key listing also for mail addresses.
    
    * src/keylist.c (search_keylist_function): Hack to search for a mail
    address.
    --
    
    Due to a missing case insensitive strstr in glib the implemented search
    is left-anchored.  However, it is useful to search for mail addresses
    and thus the search function now does a second left-anchored compare
    after an open left angle.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/src/keylist.c b/src/keylist.c
index 2c8e7e8..71e86d2 100644
--- a/src/keylist.c
+++ b/src/keylist.c
@@ -574,14 +574,19 @@ search_keylist_function (GtkTreeModel *model, gint column,
   gboolean result = TRUE;
   gchar *user_id;
   gint search_len;
+  const char *s;
 
   gtk_tree_model_get (model, iter,
                       GPA_KEYLIST_COLUMN_USERID, &user_id, -1);
 
   search_len = strlen (key_to_search_for);
 
+  /* Note that we also search for a mail address.  */
   if (!g_ascii_strncasecmp (user_id, key_to_search_for, search_len))
     result=FALSE;
+  else if ((s = strchr (user_id, '<')) && s[1]
+           && !g_ascii_strncasecmp (s+1, key_to_search_for, search_len))
+    result=FALSE;
 
   g_free (user_id);
 

-----------------------------------------------------------------------

Summary of changes:
 src/keylist.c | 5 +++++
 1 file changed, 5 insertions(+)


hooks/post-receive
-- 
The GNU Privacy Assistant
http://git.gnupg.org




More information about the Gnupg-commits mailing list