Revision 3279

View differences:

libsylph/folder.c
1700 1700
				qsearch_cond_type = 7;
1701 1701
			else if (!strcmp(attr->value, "in-addressbook"))
1702 1702
				qsearch_cond_type = 8;
1703
			else if (!strcmp(attr->value, "last30"))
1704
				qsearch_cond_type = 9;
1703 1705
		} else if (!strcmp(attr->name, "account_id")) {
1704 1706
			account = account_find_from_id(atoi(attr->value));
1705 1707
			if (!account) g_warning("account_id: %s not found\n",
......
1878 1880
					"mark", "unread", "mime", "to"};
1879 1881
	static gchar *qsearch_cond_str[] = {"all", "unread", "mark", "clabel",
1880 1882
					    "mime", "w1day", "last5", "last7",
1881
					    "in-addressbook"};
1883
					    "in-addressbook", "last30"};
1882 1884

  
1883 1885
	g_return_if_fail(node != NULL);
1884 1886
	g_return_if_fail(fp != NULL);
......
1937 1939
				fprintf(fp, " sort_type=\"descending\"");
1938 1940
		}
1939 1941
		if (item->qsearch_cond_type > 0 &&
1940
		    item->qsearch_cond_type < 9) {
1942
		    item->qsearch_cond_type < 10) {
1941 1943
			fprintf(fp, " qsearch_cond=\"%s\"",
1942 1944
				qsearch_cond_str[item->qsearch_cond_type]);
1943 1945
		}
src/quick_search.c
48 48
	{QS_W1DAY,	-1},
49 49
	{QS_LAST5,	-1},
50 50
	{QS_LAST7,	-1},
51
	{QS_IN_ADDRESSBOOK,	-1}
51
	{QS_IN_ADDRESSBOOK,	-1},
52
	{QS_LAST30,	-1}
52 53
};
53 54

  
54 55
static GdkColor dim_color = {0, COLOR_DIM, COLOR_DIM, COLOR_DIM};
......
113 114
	COND_MENUITEM_ADD(_("Within 1 day"), QS_W1DAY);
114 115
	COND_MENUITEM_ADD(_("Last 5 days"), QS_LAST5);
115 116
	COND_MENUITEM_ADD(_("Last 7 days"), QS_LAST7);
117
	COND_MENUITEM_ADD(_("Last 30 days"), QS_LAST30);
116 118
	MENUITEM_ADD(menu, menuitem, NULL, 0);
117 119
	COND_MENUITEM_ADD(_("In addressbook"), QS_IN_ADDRESSBOOK);
118 120
	gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu), menu);
......
257 259
		status_rule = filter_rule_new("Status filter rule", FLT_OR,
258 260
					      cond_list, NULL);
259 261
		break;
262
	case QS_LAST30:
263
		cond = filter_cond_new(FLT_COND_AGE_GREATER, 0, FLT_NOT_MATCH,
264
				       NULL, "30");
265
		cond_list = g_slist_append(cond_list, cond);
266
		status_rule = filter_rule_new("Status filter rule", FLT_OR,
267
					      cond_list, NULL);
268
		break;
260 269
	case QS_IN_ADDRESSBOOK:
261 270
		cond = filter_cond_new(FLT_COND_HEADER, FLT_IN_ADDRESSBOOK, 0,
262 271
				       "From", NULL);
src/quick_search.h
36 36
	QS_W1DAY,
37 37
	QS_LAST5,
38 38
	QS_LAST7,
39
	QS_IN_ADDRESSBOOK
39
	QS_IN_ADDRESSBOOK,
40
	QS_LAST30
40 41
} QSearchCondType;
41 42

  
42 43
struct _QuickSearch
ChangeLog
1
2013-09-11
2

  
3
	* src/quick_search.[ch]
4
	  libsylph/folder.c: added 'Last 30 days' to the quick search menu.
5

  
1 6
2013-09-10
2 7

  
3 8
	* src/imageview.[ch]

Also available in: Unified diff