aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gnome-cal.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-09-29 16:27:46 +0800
committerMilan Crha <mcrha@redhat.com>2010-09-29 16:27:46 +0800
commit42ab34061a48ccfc0763df1314cf5f60adb7acd3 (patch)
tree8364d364a40ddf365f49ef247a86df39c2b792bc /calendar/gui/gnome-cal.c
parent29fcf7f35fb41d5fbf0c5faff42e3e5634329a1f (diff)
downloadgsoc2013-evolution-42ab34061a48ccfc0763df1314cf5f60adb7acd3.tar
gsoc2013-evolution-42ab34061a48ccfc0763df1314cf5f60adb7acd3.tar.gz
gsoc2013-evolution-42ab34061a48ccfc0763df1314cf5f60adb7acd3.tar.bz2
gsoc2013-evolution-42ab34061a48ccfc0763df1314cf5f60adb7acd3.tar.lz
gsoc2013-evolution-42ab34061a48ccfc0763df1314cf5f60adb7acd3.tar.xz
gsoc2013-evolution-42ab34061a48ccfc0763df1314cf5f60adb7acd3.tar.zst
gsoc2013-evolution-42ab34061a48ccfc0763df1314cf5f60adb7acd3.zip
Bug #629150 - Empty calendar view
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r--calendar/gui/gnome-cal.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 985c47857b..75eac32f0b 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -1826,12 +1826,20 @@ gnome_calendar_set_view (GnomeCalendar *gcal,
GnomeCalendarViewType view_type)
{
ECalendarView *calendar_view;
+ gint ii;
g_return_if_fail (GNOME_IS_CALENDAR (gcal));
gcal->priv->current_view_type = view_type;
gnome_calendar_set_range_selected (gcal, FALSE);
+ E_CALENDAR_VIEW (gcal->priv->views[view_type])->in_focus = TRUE;
+ for (ii = 0; ii < GNOME_CAL_LAST_VIEW; ii++) {
+ if (ii == view_type)
+ continue;
+ E_CALENDAR_VIEW (gcal->priv->views[ii])->in_focus = FALSE;
+ }
+
calendar_view = gnome_calendar_get_calendar_view (gcal, view_type);
gtk_widget_grab_focus (GTK_WIDGET (calendar_view));
@@ -1846,7 +1854,6 @@ gnome_calendar_display_view (GnomeCalendar *gcal,
gboolean preserve_day;
gboolean range_selected;
time_t start_time;
- gint ii;
view = gnome_calendar_get_calendar_view (gcal, view_type);
@@ -1898,14 +1905,6 @@ gnome_calendar_display_view (GnomeCalendar *gcal,
gnome_calendar_set_view (gcal, view_type);
gnome_calendar_set_range_selected (gcal, range_selected);
- /* XXX Move this to set_view()? */
- E_CALENDAR_VIEW (gcal->priv->views[view_type])->in_focus = TRUE;
- for (ii = 0; ii < GNOME_CAL_LAST_VIEW; ii++) {
- if (ii == view_type)
- continue;
- E_CALENDAR_VIEW (gcal->priv->views[ii])->in_focus = FALSE;
- }
-
/* For the week & month views we want the selection in the date
navigator to be rounded to the nearest week when the arrow buttons
are pressed to move to the previous/next month. */