[Commits] [SCM] claws branch, master, updated. 3.9.2-131-g9eca66b

ticho at claws-mail.org ticho at claws-mail.org
Thu Dec 12 18:19:15 CET 2013


The branch master of project "claws" (Claws Mail) has been updated
       via  9eca66b607ddd8388f970db24f883549d0114f45 (commit)
      from  7f03f0360ead1c138b3a0b8be649ad592aeeb46a (commit)


- Log -----------------------------------------------------------------
commit 9eca66b607ddd8388f970db24f883549d0114f45
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Thu Dec 12 18:18:23 2013 +0100

    In compose window, allow address completion to match any part of address, not just beginning.

diff --git a/src/addr_compl.c b/src/addr_compl.c
index d7467aa..ed73557 100644
--- a/src/addr_compl.c
+++ b/src/addr_compl.c
@@ -164,12 +164,22 @@ static gchar *completion_func(gpointer data)
 	return ((completion_entry *)data)->string;
 } 
 
+static gint addr_completion_func(const gchar *needle, const gchar *haystack,
+		gsize n)
+{
+	if (needle == NULL || haystack == NULL)
+		return 1;
+
+	return (strcasestr(haystack, needle) != NULL ? 0 : 1);
+}
+
 /**
  * Initialize all completion index data.
  */
 static void init_all(void)
 {
 	g_completion = g_completion_new(completion_func);
+	g_completion_set_compare(g_completion, addr_completion_func);
 	cm_return_if_fail(g_completion != NULL);
 }
 

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

Summary of changes:
 src/addr_compl.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list