aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-cal-shell-view-actions.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/calendar/e-cal-shell-view-actions.c')
-rw-r--r--modules/calendar/e-cal-shell-view-actions.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/modules/calendar/e-cal-shell-view-actions.c b/modules/calendar/e-cal-shell-view-actions.c
index 5eaa9a4eb0..1330ac7003 100644
--- a/modules/calendar/e-cal-shell-view-actions.c
+++ b/modules/calendar/e-cal-shell-view-actions.c
@@ -1689,7 +1689,7 @@ e_cal_shell_view_actions_init (ECalShellView *cal_shell_view)
cal_shell_content = cal_shell_view->priv->cal_shell_content;
searchbar = e_cal_shell_content_get_searchbar (cal_shell_content);
-
+
/* Calendar Actions */
action_group = ACTION_GROUP (CALENDAR);
gtk_action_group_add_actions (
@@ -1710,8 +1710,9 @@ e_cal_shell_view_actions_init (ECalShellView *cal_shell_view)
/* Advanced Search Action */
action = ACTION (CALENDAR_SEARCH_ADVANCED_HIDDEN);
gtk_action_set_visible (action, FALSE);
- e_shell_searchbar_set_search_option (
- searchbar, GTK_RADIO_ACTION (action));
+ if (searchbar)
+ e_shell_searchbar_set_search_option (
+ searchbar, GTK_RADIO_ACTION (action));
/* Lockdown Printing Actions */
action_group = ACTION_GROUP (LOCKDOWN_PRINTING);
@@ -1833,18 +1834,20 @@ e_cal_shell_view_update_search_filter (ECalShellView *cal_shell_view)
cal_shell_content = cal_shell_view->priv->cal_shell_content;
searchbar = e_cal_shell_content_get_searchbar (cal_shell_content);
- combo_box = e_shell_searchbar_get_filter_combo_box (searchbar);
+ if (searchbar) {
+ combo_box = e_shell_searchbar_get_filter_combo_box (searchbar);
- e_shell_view_block_execute_search (shell_view);
+ e_shell_view_block_execute_search (shell_view);
- /* Use any action in the group; doesn't matter which. */
- e_action_combo_box_set_action (combo_box, radio_action);
+ /* Use any action in the group; doesn't matter which. */
+ e_action_combo_box_set_action (combo_box, radio_action);
- ii = CALENDAR_FILTER_UNMATCHED;
- e_action_combo_box_add_separator_after (combo_box, ii);
+ ii = CALENDAR_FILTER_UNMATCHED;
+ e_action_combo_box_add_separator_after (combo_box, ii);
- ii = CALENDAR_FILTER_NEXT_7_DAYS_APPOINTMENTS;
- e_action_combo_box_add_separator_after (combo_box, ii);
+ ii = CALENDAR_FILTER_NEXT_7_DAYS_APPOINTMENTS;
+ e_action_combo_box_add_separator_after (combo_box, ii);
- e_shell_view_unblock_execute_search (shell_view);
+ e_shell_view_unblock_execute_search (shell_view);
+ }
}