diff options
author | JP Rosevear <jpr@ximian.com> | 2002-10-16 00:47:38 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2002-10-16 00:47:38 +0800 |
commit | 00f836ea75d6cbcf116aa5223f6123409f395a1d (patch) | |
tree | 6ba82d8cff56e7139c145361eaa1879386759cf2 /calendar | |
parent | 4665c04ce8be49ff3c67749ef0c15afe1a3bc28e (diff) | |
download | gsoc2013-evolution-00f836ea75d6cbcf116aa5223f6123409f395a1d.tar.gz gsoc2013-evolution-00f836ea75d6cbcf116aa5223f6123409f395a1d.tar.zst gsoc2013-evolution-00f836ea75d6cbcf116aa5223f6123409f395a1d.zip |
try to preserve the work week view setting if it makes sense (set_view):
2002-10-11 JP Rosevear <jpr@ximian.com>
* gui/gnome-cal.c
(gnome_calendar_on_date_navigator_selection_changed): try to
preserve the work week view setting if it makes sense
(set_view): don't update the info again based on our view change
call
svn path=/trunk/; revision=18369
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 8 | ||||
-rw-r--r-- | calendar/gui/gnome-cal.c | 17 |
2 files changed, 22 insertions, 3 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index edaaa58c14..b2d7b87ca5 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,11 @@ +2002-10-11 JP Rosevear <jpr@ximian.com> + + * gui/gnome-cal.c + (gnome_calendar_on_date_navigator_selection_changed): try to + preserve the work week view setting if it makes sense + (set_view): don't update the info again based on our view change + call + 2002-10-08 Rodrigo Moya <rodrigo@ximian.com> Fixes #11434 diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 5885185e73..18dacc89ef 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1219,7 +1219,11 @@ set_view (GnomeCalendar *gcal, GnomeCalendarViewType view_type, gboolean round_selection; GtkWidget *focus_widget; const char *view_id; - + static gboolean updating = FALSE; + + if (updating) + return; + priv = gcal->priv; round_selection = FALSE; @@ -1269,8 +1273,10 @@ set_view (GnomeCalendar *gcal, GnomeCalendarViewType view_type, calendar_config_set_default_view (view_type); + updating = TRUE; gtk_notebook_set_page (GTK_NOTEBOOK (priv->notebook), (int) view_type); gal_view_instance_set_current_view_id (priv->view_instance, view_id); + updating = FALSE; if (grab_focus) gtk_widget_grab_focus (focus_widget); @@ -2602,9 +2608,14 @@ gnome_calendar_on_date_navigator_selection_changed (ECalendarItem *calitem, tt.day = end_day; icaltime_adjust (&tt, 1, 0, 0, 0); priv->selection_end_time = icaltime_as_timet_with_zone (tt, priv->zone); - + e_day_view_set_days_shown (E_DAY_VIEW (priv->day_view), new_days_shown); - gnome_calendar_set_view (gcal, GNOME_CAL_DAY_VIEW, TRUE, FALSE); + + if (new_days_shown == 5 && priv->current_view_type == GNOME_CAL_WORK_WEEK_VIEW) + gnome_calendar_set_view (gcal, GNOME_CAL_WORK_WEEK_VIEW, TRUE, FALSE); + else + gnome_calendar_set_view (gcal, GNOME_CAL_DAY_VIEW, TRUE, FALSE); + } focus_current_view (gcal); |