aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-09-29 20:43:28 +0800
committerMilan Crha <mcrha@redhat.com>2011-09-29 20:43:28 +0800
commitf8e6c60b2facac19916b72323ce78dbfa137d00c (patch)
tree91ef943cb766652c66a58cd37e090e12ada94edd /modules
parent14f152070d536316d3ae627e4455318e056189d6 (diff)
downloadgsoc2013-evolution-f8e6c60b2facac19916b72323ce78dbfa137d00c.tar
gsoc2013-evolution-f8e6c60b2facac19916b72323ce78dbfa137d00c.tar.gz
gsoc2013-evolution-f8e6c60b2facac19916b72323ce78dbfa137d00c.tar.bz2
gsoc2013-evolution-f8e6c60b2facac19916b72323ce78dbfa137d00c.tar.lz
gsoc2013-evolution-f8e6c60b2facac19916b72323ce78dbfa137d00c.tar.xz
gsoc2013-evolution-f8e6c60b2facac19916b72323ce78dbfa137d00c.tar.zst
gsoc2013-evolution-f8e6c60b2facac19916b72323ce78dbfa137d00c.zip
Bug #632619 - Recurring events can clutter month view
Diffstat (limited to 'modules')
-rw-r--r--modules/calendar/e-cal-shell-view-actions.c9
-rw-r--r--modules/calendar/e-cal-shell-view-actions.h2
-rw-r--r--modules/calendar/e-cal-shell-view-private.h9
-rw-r--r--modules/calendar/e-cal-shell-view.c6
4 files changed, 21 insertions, 5 deletions
diff --git a/modules/calendar/e-cal-shell-view-actions.c b/modules/calendar/e-cal-shell-view-actions.c
index 21472453ef..aa5738e27e 100644
--- a/modules/calendar/e-cal-shell-view-actions.c
+++ b/modules/calendar/e-cal-shell-view-actions.c
@@ -1705,6 +1705,13 @@ static GtkRadioActionEntry calendar_filter_entries[] = {
NULL, /* XXX Add a tooltip! */
CALENDAR_FILTER_NEXT_7_DAYS_APPOINTMENTS },
+ { "calendar-filter-occurs-less-than-5-times",
+ NULL,
+ N_("Occurs Less Than 5 Times"),
+ NULL,
+ NULL, /* XXX Add a tooltip! */
+ CALENDAR_FILTER_OCCURS_LESS_THAN_5_TIMES },
+
{ "calendar-filter-unmatched",
NULL,
N_("Unmatched"),
@@ -1972,7 +1979,7 @@ e_cal_shell_view_update_search_filter (ECalShellView *cal_shell_view)
ii = CALENDAR_FILTER_UNMATCHED;
e_action_combo_box_add_separator_after (combo_box, ii);
- ii = CALENDAR_FILTER_NEXT_7_DAYS_APPOINTMENTS;
+ ii = CALENDAR_FILTER_OCCURS_LESS_THAN_5_TIMES;
e_action_combo_box_add_separator_after (combo_box, ii);
e_shell_view_unblock_execute_search (shell_view);
diff --git a/modules/calendar/e-cal-shell-view-actions.h b/modules/calendar/e-cal-shell-view-actions.h
index b79bc6baaf..fcc77ea011 100644
--- a/modules/calendar/e-cal-shell-view-actions.h
+++ b/modules/calendar/e-cal-shell-view-actions.h
@@ -133,6 +133,8 @@
E_SHELL_WINDOW_ACTION ((window), "calendar-filter-any-category")
#define E_SHELL_WINDOW_ACTION_CALENDAR_FILTER_NEXT_7_DAYS_APPOINTMENTS(window) \
E_SHELL_WINDOW_ACTION ((window), "calendar-filter-next-7-days-appointments")
+#define E_SHELL_WINDOW_ACTION_CALENDAR_FILTER_OCCURS_LESS_THAN_5_TIMES(window) \
+ E_SHELL_WINDOW_ACTION ((window), "calendar-filter-occurs-less-than-5-times")
#define E_SHELL_WINDOW_ACTION_CALENDAR_FILTER_UNMATCHED(window) \
E_SHELL_WINDOW_ACTION ((window), "calendar-filter-unmatched")
#define E_SHELL_WINDOW_ACTION_CALENDAR_SEARCH_ADVANCED_HIDDEN(window) \
diff --git a/modules/calendar/e-cal-shell-view-private.h b/modules/calendar/e-cal-shell-view-private.h
index 7c78130fc3..6653632662 100644
--- a/modules/calendar/e-cal-shell-view-private.h
+++ b/modules/calendar/e-cal-shell-view-private.h
@@ -85,10 +85,11 @@ G_BEGIN_DECLS
/* Filter items are displayed in ascending order.
* Non-negative values are reserved for categories. */
enum {
- CALENDAR_FILTER_ANY_CATEGORY = -4,
- CALENDAR_FILTER_UNMATCHED = -3,
- CALENDAR_FILTER_ACTIVE_APPOINTMENTS = -2,
- CALENDAR_FILTER_NEXT_7_DAYS_APPOINTMENTS = -1
+ CALENDAR_FILTER_ANY_CATEGORY = -5,
+ CALENDAR_FILTER_UNMATCHED = -4,
+ CALENDAR_FILTER_ACTIVE_APPOINTMENTS = -3,
+ CALENDAR_FILTER_NEXT_7_DAYS_APPOINTMENTS = -2,
+ CALENDAR_FILTER_OCCURS_LESS_THAN_5_TIMES = -1
};
/* Search items are displayed in ascending order. */
diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c
index 0a9b7701f8..f644402080 100644
--- a/modules/calendar/e-cal-shell-view.c
+++ b/modules/calendar/e-cal-shell-view.c
@@ -194,6 +194,12 @@ cal_shell_view_execute_search (EShellView *shell_view)
range_search = TRUE;
break;
+ case CALENDAR_FILTER_OCCURS_LESS_THAN_5_TIMES:
+ temp = g_strdup_printf ("(and %s (< (occurrences-count?) 5))", query);
+ g_free (query);
+ query = temp;
+ break;
+
default:
{
GList *categories;