diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2013-09-11 07:03:42 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2013-09-11 07:03:42 +0000 |
commit | b03a054ef60f339f79c6773471c7baa9bc9c36f7 (patch) | |
tree | 020d2c85c641c5a617aa776f13ce21cb4b62ff02 /src | |
parent | 08eb5bedaee6baa18cd9071f99a7be4ae9bef5a1 (diff) |
added 'Last 30 days' to the quick search menu.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3279 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r-- | src/quick_search.c | 11 | ||||
-rw-r--r-- | src/quick_search.h | 3 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/quick_search.c b/src/quick_search.c index 6d63c142..4c212956 100644 --- a/src/quick_search.c +++ b/src/quick_search.c @@ -48,7 +48,8 @@ static const struct { {QS_W1DAY, -1}, {QS_LAST5, -1}, {QS_LAST7, -1}, - {QS_IN_ADDRESSBOOK, -1} + {QS_IN_ADDRESSBOOK, -1}, + {QS_LAST30, -1} }; static GdkColor dim_color = {0, COLOR_DIM, COLOR_DIM, COLOR_DIM}; @@ -113,6 +114,7 @@ QuickSearch *quick_search_create(SummaryView *summaryview) COND_MENUITEM_ADD(_("Within 1 day"), QS_W1DAY); COND_MENUITEM_ADD(_("Last 5 days"), QS_LAST5); COND_MENUITEM_ADD(_("Last 7 days"), QS_LAST7); + COND_MENUITEM_ADD(_("Last 30 days"), QS_LAST30); MENUITEM_ADD(menu, menuitem, NULL, 0); COND_MENUITEM_ADD(_("In addressbook"), QS_IN_ADDRESSBOOK); gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu), menu); @@ -257,6 +259,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_LAST30: + cond = filter_cond_new(FLT_COND_AGE_GREATER, 0, FLT_NOT_MATCH, + NULL, "30"); + cond_list = g_slist_append(cond_list, cond); + status_rule = filter_rule_new("Status filter rule", FLT_OR, + cond_list, NULL); + break; case QS_IN_ADDRESSBOOK: cond = filter_cond_new(FLT_COND_HEADER, FLT_IN_ADDRESSBOOK, 0, "From", NULL); diff --git a/src/quick_search.h b/src/quick_search.h index b21b3468..4628b481 100644 --- a/src/quick_search.h +++ b/src/quick_search.h @@ -36,7 +36,8 @@ typedef enum QS_W1DAY, QS_LAST5, QS_LAST7, - QS_IN_ADDRESSBOOK + QS_IN_ADDRESSBOOK, + QS_LAST30 } QSearchCondType; struct _QuickSearch |