[evolution] Bug #683407 - Preserve week views in calendar when clicking one day



commit 832de6f6d63b60f85e1144cd8afbe836dff4a565
Author: Milan Crha <mcrha redhat com>
Date:   Tue Sep 11 14:53:31 2012 +0200

    Bug #683407 - Preserve week views in calendar when clicking one day

 modules/calendar/e-cal-shell-view-private.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c
index 2b5aa7e..012b9cf 100644
--- a/modules/calendar/e-cal-shell-view-private.c
+++ b/modules/calendar/e-cal-shell-view-private.c
@@ -177,9 +177,12 @@ cal_shell_view_date_navigator_selection_changed_cb (ECalShellView *cal_shell_vie
 				(new_days_shown + 6) / 7);
 			switch_to = GNOME_CAL_MONTH_VIEW;
 		}
-	} else if (new_days_shown == 7 && starts_on_week_start_day)
+	} else if (new_days_shown == 7 && starts_on_week_start_day) {
 		switch_to = GNOME_CAL_WEEK_VIEW;
-	else {
+	} else if (new_days_shown == 1 && (view_type == GNOME_CAL_WORK_WEEK_VIEW || view_type == GNOME_CAL_WEEK_VIEW)) {
+		/* preserve week views when clicking on one day */
+		switch_to = view_type;
+	} else {
 		ECalendarView *calendar_view;
 
 		calendar_view = gnome_calendar_get_calendar_view (



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