[Commits] quicksearch.c 1.1.2.111 1.1.2.112 quicksearch.h 1.1.2.24 1.1.2.25
colin at claws-mail.org
colin at claws-mail.org
Fri Sep 21 12:19:45 CEST 2012
Update of /home/claws-mail/claws/src/gtk
In directory srv:/tmp/cvs-serv4864/src/gtk
Modified Files:
Tag: gtk2
quicksearch.c quicksearch.h
Log Message:
2012-09-21 [colin] 3.8.1cvs68
* src/Makefile.am
* src/advsearch.c ** ADDED **
* src/advsearch.h ** ADDED **
* src/folder.c
* src/folder.h
* src/folderview.c
* src/imap.c
* src/main.c
* src/matcher.c
* src/matcher.h
* src/matchertypes.h ** ADDED **
* src/mh.c
* src/mimeview.c
* src/news.c
* src/proctypes.h
* src/summary_search.c
* src/summaryview.c
* src/summaryview.h
* src/gtk/quicksearch.c
* src/gtk/quicksearch.h
Separated GUI and logic for search
Use same logic for quicksearch and folder search
Patch by Sean Buckheister <s_buckhe at cs.uni-kl.de>
Index: quicksearch.c
===================================================================
RCS file: /home/claws-mail/claws/src/gtk/quicksearch.c,v
retrieving revision 1.1.2.111
retrieving revision 1.1.2.112
diff -u -d -r1.1.2.111 -r1.1.2.112
--- quicksearch.c 25 Jul 2012 18:38:30 -0000 1.1.2.111
+++ quicksearch.c 21 Sep 2012 10:19:43 -0000 1.1.2.112
@@ -46,12 +46,13 @@
#include "prefs_matcher.h"
#include "claws.h"
#include "statusbar.h"
+#include "advsearch.h"
+#include "alertpanel.h"
struct _QuickSearchRequest
{
- QuickSearchType type;
+ AdvancedSearchType type;
gchar *matchstring;
[...1026 lines suppressed...]
- searchType = QUICK_SEARCH_SUBJECT;
- break;
- case 'F':
- searchType = QUICK_SEARCH_FROM;
- break;
- case 'T':
- searchType = QUICK_SEARCH_TO;
- break;
- case 'E':
- searchType = QUICK_SEARCH_EXTENDED;
- break;
- case 'M':
- searchType = QUICK_SEARCH_MIXED;
- break;
- case 'G':
- searchType = QUICK_SEARCH_TAG;
- break;
- }
- return searchType;
-}
Index: quicksearch.h
===================================================================
RCS file: /home/claws-mail/claws/src/gtk/quicksearch.h,v
retrieving revision 1.1.2.24
retrieving revision 1.1.2.25
diff -u -d -r1.1.2.24 -r1.1.2.25
--- quicksearch.h 27 May 2012 17:31:06 -0000 1.1.2.24
+++ quicksearch.h 21 Sep 2012 10:19:43 -0000 1.1.2.25
@@ -21,49 +21,33 @@
#ifndef QUICKSEARCH_H
#define QUICKSEARCH_H 1
-typedef enum
-{
- QUICK_SEARCH_SUBJECT,
- QUICK_SEARCH_FROM,
- QUICK_SEARCH_TO,
- QUICK_SEARCH_EXTENDED,
- QUICK_SEARCH_MIXED,
- QUICK_SEARCH_TAG
-} QuickSearchType;
-
+#include "advsearch.h"
typedef struct _QuickSearch QuickSearch;
typedef void (*QuickSearchExecuteCallback) (QuickSearch *quicksearch, gpointer data);
#include "procmsg.h"
-void search_msgs_in_folders(GSList **messages, QuickSearch* quicksearch,
- FolderItem* folderItem);
-QuickSearchType quicksearch_type(const gchar *type);
-
QuickSearch *quicksearch_new();
-QuickSearch *quicksearch_new_nogui();
GtkWidget *quicksearch_get_widget(QuickSearch *quicksearch);
void quicksearch_show(QuickSearch *quicksearch);
void quicksearch_hide(QuickSearch *quicksearch);
-void quicksearch_set(QuickSearch *quicksearch, QuickSearchType type, const gchar *matchstring);
+void quicksearch_set(QuickSearch *quicksearch, AdvancedSearchType type, const gchar *matchstring);
void quicksearch_set_recursive(QuickSearch *quicksearch, gboolean recursive);
-gboolean quicksearch_is_active(QuickSearch *quicksearch);
+gboolean quicksearch_has_sat_predicate(QuickSearch *quicksearch);
void quicksearch_set_execute_callback(QuickSearch *quicksearch,
QuickSearchExecuteCallback callback,
gpointer data);
-gboolean quicksearch_match(QuickSearch *quicksearch, MsgInfo *msginfo);
+void quicksearch_set_on_progress_cb(QuickSearch* search,
+ gboolean (*cb)(gpointer data, guint at, guint matched, guint total), gpointer data);
+
+gboolean quicksearch_run_on_folder(QuickSearch* quicksearch, FolderItem *folderItem, MsgInfoList **result);
+
gboolean quicksearch_is_running(QuickSearch *quicksearch);
gboolean quicksearch_has_focus(QuickSearch *quicksearch);
void quicksearch_pass_key(QuickSearch *quicksearch, guint val, GdkModifierType mod);
-void quicksearch_reset_cur_folder_item(QuickSearch *quicksearch);
-void quicksearch_search_subfolders(QuickSearch *quicksearch,
- FolderView *folderview,
- FolderItem *folder_item);
-gboolean quicksearch_is_in_subfolder(QuickSearch *quicksearch, FolderItem *cur);
gboolean quicksearch_is_fast(QuickSearch *quicksearch);
gboolean quicksearch_is_in_typing(QuickSearch *quicksearch);
void quicksearch_relayout(QuickSearch *quicksearch);
void quicksearch_set_search_strings(QuickSearch *quicksearch);
-void quicksearch_folder_item_invalidate(QuickSearch *quicksearch, FolderItem *item);
#endif /* QUICKSEARCH_H */
More information about the Commits
mailing list