aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-week-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/e-week-view.c')
-rw-r--r--calendar/gui/e-week-view.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 45021ad3f2..6d86eb6c6f 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -1218,6 +1218,12 @@ e_week_view_focus (GtkWidget *widget, GtkDirectionType direction)
last_focus_span_num = week_view->editing_span_num;
}
+ /* if there is not event, just grab week_view */
+ if (week_view->events->len == 0) {
+ gtk_widget_grab_focus (widget);
+ return TRUE;
+ }
+
for (event_loop = 0; event_loop < week_view->events->len;
++event_loop) {
if (!e_week_view_get_next_tab_event (week_view, direction,