[evolution] Calendar's Work Week view could left empty after start



commit 218bd7d334aff1338d63eac7c5fd4c9d9f3d2f1c
Author: Milan Crha <mcrha redhat com>
Date:   Tue Sep 11 13:57:32 2012 +0200

    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 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 29f1f9a..4a37108 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]