[Commits] [SCM] claws branch, master, updated. 3.9.3-18-gb59ac7e

claws at claws-mail.org claws at claws-mail.org
Wed Feb 5 09:28:34 CET 2014


The branch master of project "claws" (Claws Mail) has been updated
       via  b59ac7ec8e8cfacd3566714be6aa2cf3b233546f (commit)
      from  0b253d952793e5297ec28df3b06bdffd9ea67eda (commit)


- Log -----------------------------------------------------------------
commit b59ac7ec8e8cfacd3566714be6aa2cf3b233546f
Author: Paul <paul at claws-mail.org>
Date:   Wed Feb 5 08:28:28 2014 +0000

    add hidden prefs to choose old or new style addr and folder matching

diff --git a/manual/advanced.xml b/manual/advanced.xml
index 53e9270..dfcd319 100644
--- a/manual/advanced.xml
+++ b/manual/advanced.xml
@@ -560,6 +560,15 @@
     </para>
     <variablelist>
       <varlistentry>
+	<term><literal>address_search_wildcard</literal></term>
+	<listitem>
+	  <para>
+	TAB-address completion in the Compose window will match any part of the
+	string (1) or just the start of the string (0).
+	  </para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
 	<term><literal>addressbook_use_editaddress_dialog</literal></term>
 	<listitem>
 	  <para>
@@ -648,6 +657,15 @@
 	</listitem>
       </varlistentry>
       <varlistentry>
+	<term><literal>folder_search_wildcard</literal></term>
+	<listitem>
+	  <para>
+	The type-ahead function in the Select Folder window will match any
+	part of the folder name (1) or just the start of the folder name (0).
+	  </para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
 	<term><literal>folderview_vscrollbar_policy</literal></term>
 	<listitem>
 	  <para>
diff --git a/src/addr_compl.c b/src/addr_compl.c
index 7472fc1..407e626 100644
--- a/src/addr_compl.c
+++ b/src/addr_compl.c
@@ -179,7 +179,8 @@ static gint addr_completion_func(const gchar *needle, const gchar *haystack,
 static void init_all(void)
 {
 	g_completion = g_completion_new(completion_func);
-	g_completion_set_compare(g_completion, addr_completion_func);
+	if (prefs_common.address_search_wildcard)
+		g_completion_set_compare(g_completion, addr_completion_func);
 	cm_return_if_fail(g_completion != NULL);
 }
 
diff --git a/src/foldersel.c b/src/foldersel.c
index a34d513..02a0982 100644
--- a/src/foldersel.c
+++ b/src/foldersel.c
@@ -288,8 +288,9 @@ static void foldersel_create(void)
 	gtk_tree_view_set_enable_tree_lines(GTK_TREE_VIEW(treeview), FALSE);
 	gtk_tree_view_set_search_column(GTK_TREE_VIEW(treeview),
 					FOLDERSEL_FOLDERNAME);
-	gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(treeview),
-			foldersel_search_name_func, NULL, NULL);
+	if (prefs_common.folder_search_wildcard)
+ 		gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(treeview),
+ 				foldersel_search_name_func, NULL, NULL);
 
 	selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));
 	gtk_tree_selection_set_mode(selection, GTK_SELECTION_BROWSE);
diff --git a/src/prefs_common.c b/src/prefs_common.c
index 09680b3..e2c676b 100644
--- a/src/prefs_common.c
+++ b/src/prefs_common.c
@@ -1173,6 +1173,11 @@ static PrefParam param[] = {
 	{"diff_hunk_color", "#a52a2a", &prefs_common.diff_hunk_color, P_COLOR,
 	 NULL, NULL, NULL},
 
+	{"folder_search_wildcard", "TRUE", &prefs_common.folder_search_wildcard, P_BOOL,
+	 NULL, NULL, NULL},
+	{"address_search_wildcard", "TRUE", &prefs_common.address_search_wildcard, P_BOOL,
+	 NULL, NULL, NULL},
+
 	{NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL}
 };
 
diff --git a/src/prefs_common.h b/src/prefs_common.h
index 11b3e55..a0ce721 100644
--- a/src/prefs_common.h
+++ b/src/prefs_common.h
@@ -520,6 +520,9 @@ struct _PrefsCommon
 	gulong diff_added_color;
 	gulong diff_deleted_color;
 	gulong diff_hunk_color;
+	
+	gboolean folder_search_wildcard;
+	gboolean address_search_wildcard;
 };
 
 extern PrefsCommon prefs_common;

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

Summary of changes:
 manual/advanced.xml |   18 ++++++++++++++++++
 src/addr_compl.c    |    3 ++-
 src/foldersel.c     |    5 +++--
 src/prefs_common.c  |    5 +++++
 src/prefs_common.h  |    3 +++
 5 files changed, 31 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list