aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-09-11 19:57:32 +0800
committerMilan Crha <mcrha@redhat.com>2012-09-11 20:02:32 +0800
commit218bd7d334aff1338d63eac7c5fd4c9d9f3d2f1c (patch)
tree7bd1ff0dd4c7167ca4691e2821531bc54118d440
parentf836b409df8873b773907f8d3c1a1537008e5f9a (diff)
downloadgsoc2013-evolution-218bd7d334aff1338d63eac7c5fd4c9d9f3d2f1c.tar
gsoc2013-evolution-218bd7d334aff1338d63eac7c5fd4c9d9f3d2f1c.tar.gz
gsoc2013-evolution-218bd7d334aff1338d63eac7c5fd4c9d9f3d2f1c.tar.bz2
gsoc2013-evolution-218bd7d334aff1338d63eac7c5fd4c9d9f3d2f1c.tar.lz
gsoc2013-evolution-218bd7d334aff1338d63eac7c5fd4c9d9f3d2f1c.tar.xz
gsoc2013-evolution-218bd7d334aff1338d63eac7c5fd4c9d9f3d2f1c.tar.zst
gsoc2013-evolution-218bd7d334aff1338d63eac7c5fd4c9d9f3d2f1c.zip
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.
-rw-r--r--calendar/gui/gnome-cal.c3
1 files changed, 2 insertions, 1 deletions
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;