diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2009-12-08 06:54:05 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2009-12-08 06:54:05 +0000 |
commit | f2b626d730194d20ad500ee4957830ddef550d4a (patch) | |
tree | 590002e14e04aa6e911ba954eedcd47a812cf2bb /src | |
parent | 008b58d1e888f478801805202aef128d5a020071 (diff) |
added 'Last 7 days' to the quick search.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2372 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r-- | src/quick_search.c | 13 | ||||
-rw-r--r-- | src/quick_search.h | 5 |
2 files changed, 14 insertions, 4 deletions
diff --git a/src/quick_search.c b/src/quick_search.c index 484d0d29..a25c3cb7 100644 --- a/src/quick_search.c +++ b/src/quick_search.c @@ -1,6 +1,6 @@ /* * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2008 Hiroyuki Yamamoto + * Copyright (C) 1999-2009 Hiroyuki Yamamoto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -45,7 +45,8 @@ static const struct { {QS_CLABEL, FLT_COND_COLOR_LABEL}, {QS_MIME, FLT_COND_MIME}, {QS_W1DAY, -1}, - {QS_LAST5, -1} + {QS_LAST5, -1}, + {QS_LAST7, -1} }; static void menu_activated (GtkWidget *menuitem, @@ -100,6 +101,7 @@ QuickSearch *quick_search_create(SummaryView *summaryview) MENUITEM_ADD(menu, menuitem, NULL, 0); COND_MENUITEM_ADD(_("Within 1 day"), QS_W1DAY); COND_MENUITEM_ADD(_("Last 5 days"), QS_LAST5); + COND_MENUITEM_ADD(_("Last 7 days"), QS_LAST7); gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu), menu); #undef COND_MENUITEM_ADD @@ -206,6 +208,13 @@ GSList *quick_search_filter(QuickSearch *qsearch, QSearchCondType type, status_rule = filter_rule_new("Status filter rule", FLT_OR, cond_list, NULL); break; + case QS_LAST7: + cond = filter_cond_new(FLT_COND_AGE_GREATER, 0, FLT_NOT_MATCH, + NULL, "7"); + cond_list = g_slist_append(cond_list, cond); + status_rule = filter_rule_new("Status filter rule", FLT_OR, + cond_list, NULL); + break; case QS_ALL: default: break; diff --git a/src/quick_search.h b/src/quick_search.h index 50f4de32..a7db491c 100644 --- a/src/quick_search.h +++ b/src/quick_search.h @@ -1,6 +1,6 @@ /* * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2007 Hiroyuki Yamamoto + * Copyright (C) 1999-2009 Hiroyuki Yamamoto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,7 +34,8 @@ typedef enum QS_CLABEL, QS_MIME, QS_W1DAY, - QS_LAST5 + QS_LAST5, + QS_LAST7 } QSearchCondType; struct _QuickSearch |