From 218bd7d334aff1338d63eac7c5fd4c9d9f3d2f1c Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 11 Sep 2012 13:57:32 +0200 Subject: Calendar's Work Week view could left empty after start When Evolution started in the Calendar view with Work Week view selected it left the view empty, because the Work Week view was not set focused. This change was not made, because GnomeCalendar has set Work Week view as a default view, thus gnome_calendar_set_view() just returned for "no change made" on the view type. Checking also 'in_focus' property of the view makes sure the initialization will be done as expected. --- calendar/gui/gnome-cal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'calendar/gui') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 29f1f9a7d3..4a37108fb0 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1842,7 +1842,8 @@ gnome_calendar_set_view (GnomeCalendar *gcal, g_return_if_fail (GNOME_IS_CALENDAR (gcal)); - if (gcal->priv->current_view_type == view_type) + if (gcal->priv->current_view_type == view_type && + E_CALENDAR_VIEW (gcal->priv->views[view_type])->in_focus) return; gcal->priv->current_view_type = view_type; -- cgit