aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gnome-cal.c
diff options
context:
space:
mode:
authorDamon Chaplin <damon@helixcode.com>2000-11-29 08:19:44 +0800
committerDamon Chaplin <damon@src.gnome.org>2000-11-29 08:19:44 +0800
commite1635ef07ac4dbbb2511a01ed32ef096399d11fb (patch)
treeb2dd3c3596335e2ad97bfd863fb54242beadf467 /calendar/gui/gnome-cal.c
parent2eabc063bc04b4c2cd74b6829f939b036f937792 (diff)
downloadgsoc2013-evolution-e1635ef07ac4dbbb2511a01ed32ef096399d11fb.tar
gsoc2013-evolution-e1635ef07ac4dbbb2511a01ed32ef096399d11fb.tar.gz
gsoc2013-evolution-e1635ef07ac4dbbb2511a01ed32ef096399d11fb.tar.bz2
gsoc2013-evolution-e1635ef07ac4dbbb2511a01ed32ef096399d11fb.tar.lz
gsoc2013-evolution-e1635ef07ac4dbbb2511a01ed32ef096399d11fb.tar.xz
gsoc2013-evolution-e1635ef07ac4dbbb2511a01ed32ef096399d11fb.tar.zst
gsoc2013-evolution-e1635ef07ac4dbbb2511a01ed32ef096399d11fb.zip
finished 12-hour support and tried to tidy up & comment the drawing code
2000-11-28 Damon Chaplin <damon@helixcode.com> * gui/e-day-view*.[hc]: * gui/e-week-view*.[hc]: finished 12-hour support and tried to tidy up & comment the drawing code in places. Also fixed a couple of bugs I spotted. All the options on the 'Calendar' page should now work. svn path=/trunk/; revision=6706
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r--calendar/gui/gnome-cal.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 802f76341c..b423ffcd41 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -1586,7 +1586,6 @@ gnome_calendar_update_config_settings (GnomeCalendar *gcal,
/* Convert it to 0 (Mon) to 6 (Sun), which is what we use. */
week_start_day = (week_start_day + 6) % 7;
- g_print ("Setting week start day to %i (0=Sun)\n", week_start_day);
e_day_view_set_week_start_day (E_DAY_VIEW (priv->day_view),
week_start_day);
e_day_view_set_week_start_day (E_DAY_VIEW (priv->work_week_view),
@@ -1615,13 +1614,10 @@ gnome_calendar_update_config_settings (GnomeCalendar *gcal,
use_24_hour);
e_day_view_set_24_hour_format (E_DAY_VIEW (priv->work_week_view),
use_24_hour);
- /* FIXME: Add support for these. */
-#if 0
e_week_view_set_24_hour_format (E_WEEK_VIEW (priv->week_view),
use_24_hour);
e_week_view_set_24_hour_format (E_WEEK_VIEW (priv->month_view),
use_24_hour);
-#endif
time_divisions = calendar_config_get_time_divisions ();
e_day_view_set_mins_per_row (E_DAY_VIEW (priv->day_view),
@@ -1959,8 +1955,11 @@ gnome_calendar_on_date_navigator_selection_changed (ECalendarItem *calitem,
new_days_shown = g_date_julian (&new_end_date) - g_date_julian (&new_start_date) + 1;
- /* FIXME: This assumes weeks start on Monday for now. */
- if (g_date_weekday (&new_start_date) - 1 == 0)
+ /* If a complete week is selected we show the Week view.
+ Note that if weekends are compressed and the week start day is set
+ to Sunday we don't actually show complete weeks in the Week view,
+ so this may need tweaking. */
+ if ((g_date_weekday (&new_start_date) + 5) % 7 == calendar_config_get_week_start_day ())
starts_on_week_start_day = TRUE;
/* Switch views as appropriate, and change the number of days or weeks