[Commits] [SCM] claws branch, master, updated. 3.9.3-116-g9e6eb78

wwp at claws-mail.org wwp at claws-mail.org
Mon Apr 28 17:54:45 CEST 2014


The branch master of project "claws" (Claws Mail) has been updated
       via  9e6eb7883307203f591b1c1f154e8779e6fc092e (commit)
      from  59e554fb4ddcb27d6fe4f2132d26ede355562fa5 (commit)


- Log -----------------------------------------------------------------
commit 9e6eb7883307203f591b1c1f154e8779e6fc092e
Author: wwp <wwp at free.fr>
Date:   Mon Apr 28 17:53:03 2014 +0200

    Fix wrong address book contact in message list's From column and potentially
    at other places. The AB completion engine won't use submatching by default,
    it will only use it when completion is requested by a human operator
    (compose window, few other GUI location). Updated the doc accordingly.

diff --git a/manual/advanced.xml b/manual/advanced.xml
index 1776d14..8a17cdc 100644
--- a/manual/advanced.xml
+++ b/manual/advanced.xml
@@ -563,7 +563,7 @@
 	<term><literal>address_search_wildcard</literal></term>
 	<listitem>
 	  <para>
-	TAB-address completion in the Compose window will match any part of the
+	TAB-address completion in the Compose window and other GUI places will match any part of the
 	string (1) or just the start of the string (0).
 	  </para>
 	</listitem>
diff --git a/src/addr_compl.c b/src/addr_compl.c
index 407e626..104ce66 100644
--- a/src/addr_compl.c
+++ b/src/addr_compl.c
@@ -179,11 +179,20 @@ static gint addr_completion_func(const gchar *needle, const gchar *haystack,
 static void init_all(void)
 {
 	g_completion = g_completion_new(completion_func);
-	if (prefs_common.address_search_wildcard)
-		g_completion_set_compare(g_completion, addr_completion_func);
 	cm_return_if_fail(g_completion != NULL);
 }
 
+/**
+ * set the compare function (default is strncmp)
+ */
+static void set_match_any_part(const gboolean any_part)
+{
+	if (any_part && prefs_common.address_search_wildcard)
+		g_completion_set_compare(g_completion, addr_completion_func);
+	else
+		g_completion_set_compare(g_completion, strncmp);
+}
+
 static void free_all_addresses(void)
 {
 	GList *walk;
@@ -1179,6 +1188,7 @@ static void completion_window_apply_selection(GtkTreeView *list_view,
 void address_completion_start(GtkWidget *mainwindow)
 {
 	start_address_completion(NULL);
+	set_match_any_part(TRUE);
 
 	/* register focus change hook */
 	g_signal_connect(G_OBJECT(mainwindow), "set_focus",

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

Summary of changes:
 manual/advanced.xml |    2 +-
 src/addr_compl.c    |   14 ++++++++++++--
 2 files changed, 13 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list