From 49787d04feef8ff699326e54d5991a36d8ef74bb Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 11 Apr 2012 16:58:05 +0200 Subject: Bug #584143 - Global Search Function withing Calendar --- modules/calendar/e-cal-shell-view-actions.c | 42 +++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'modules/calendar/e-cal-shell-view-actions.c') diff --git a/modules/calendar/e-cal-shell-view-actions.c b/modules/calendar/e-cal-shell-view-actions.c index 956766571a..d73feef25e 100644 --- a/modules/calendar/e-cal-shell-view-actions.c +++ b/modules/calendar/e-cal-shell-view-actions.c @@ -420,6 +420,27 @@ action_calendar_rename_cb (GtkAction *action, e_source_selector_edit_primary_selection (selector); } +static void +action_calendar_search_next_cb (GtkAction *action, + ECalShellView *cal_shell_view) +{ + e_cal_shell_view_search_events (cal_shell_view, TRUE); +} + +static void +action_calendar_search_prev_cb (GtkAction *action, + ECalShellView *cal_shell_view) +{ + e_cal_shell_view_search_events (cal_shell_view, FALSE); +} + +static void +action_calendar_search_stop_cb (GtkAction *action, + ECalShellView *cal_shell_view) +{ + e_cal_shell_view_search_stop (cal_shell_view); +} + static void action_calendar_select_one_cb (GtkAction *action, ECalShellView *cal_shell_view) @@ -1407,6 +1428,27 @@ static GtkActionEntry calendar_entries[] = { N_("Rename the selected calendar"), G_CALLBACK (action_calendar_rename_cb) }, + { "calendar-search-next", + GTK_STOCK_GO_FORWARD, + N_("Find _next"), + "n", + N_("Find next occurrence of the current search string"), + G_CALLBACK (action_calendar_search_next_cb) }, + + { "calendar-search-prev", + GTK_STOCK_GO_BACK, + N_("Find _previous"), + "p", + N_("Find previous occurrence of the current search string"), + G_CALLBACK (action_calendar_search_prev_cb) }, + + { "calendar-search-stop", + GTK_STOCK_STOP, + N_("Stop _running search"), + NULL, + N_("Stop currently running search"), + G_CALLBACK (action_calendar_search_stop_cb) }, + { "calendar-select-one", "stock_check-filled", N_("Show _Only This Calendar"), -- cgit v1.2.3