aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gncal-day-panel.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@nuclecu.unam.mx>1999-02-05 01:36:04 +0800
committerArturo Espinosa <unammx@src.gnome.org>1999-02-05 01:36:04 +0800
commitcaf215883e225dcc3a4f0d244dab0a61dfdf6ae8 (patch)
treed74ca114fb73885c5662feb5d9bdbff03c7cbe0e /calendar/gncal-day-panel.c
parent23e6445f8ba8f0173ac2c0f5e65985f0ffa9e2c2 (diff)
downloadgsoc2013-evolution-caf215883e225dcc3a4f0d244dab0a61dfdf6ae8.tar
gsoc2013-evolution-caf215883e225dcc3a4f0d244dab0a61dfdf6ae8.tar.gz
gsoc2013-evolution-caf215883e225dcc3a4f0d244dab0a61dfdf6ae8.tar.bz2
gsoc2013-evolution-caf215883e225dcc3a4f0d244dab0a61dfdf6ae8.tar.lz
gsoc2013-evolution-caf215883e225dcc3a4f0d244dab0a61dfdf6ae8.tar.xz
gsoc2013-evolution-caf215883e225dcc3a4f0d244dab0a61dfdf6ae8.tar.zst
gsoc2013-evolution-caf215883e225dcc3a4f0d244dab0a61dfdf6ae8.zip
Make the calendar start weeks on Monday if appropriate.
1999-02-03 Federico Mena Quintero <federico@nuclecu.unam.mx> * gncal-week-view.c (gncal_week_view_new): Make the calendar start weeks on Monday if appropriate. (gncal_week_view_time_format_changed): New function to notify the week view that the time format has changed. * gncal-day-panel.c (gncal_day_panel_new): Make the calendar start weeks on Monday if appropriate. (gncal_day_panel_time_format_changed): New function to notify the day panel that the time format has changed. * gnome-cal.c (gnome_calendar_time_format_changed): Tell the day and week views that the time format has changed. svn path=/trunk/; revision=643
Diffstat (limited to 'calendar/gncal-day-panel.c')
-rw-r--r--calendar/gncal-day-panel.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/calendar/gncal-day-panel.c b/calendar/gncal-day-panel.c
index 0c69026278..b847cf8168 100644
--- a/calendar/gncal-day-panel.c
+++ b/calendar/gncal-day-panel.c
@@ -150,7 +150,10 @@ gncal_day_panel_new (GnomeCalendar *calendar, time_t start_of_day)
w = gtk_calendar_new ();
dpanel->gtk_calendar = GTK_CALENDAR (w);
gtk_calendar_display_options (dpanel->gtk_calendar,
- GTK_CALENDAR_SHOW_HEADING | GTK_CALENDAR_SHOW_DAY_NAMES);
+ (GTK_CALENDAR_SHOW_HEADING
+ | GTK_CALENDAR_SHOW_DAY_NAMES
+ | (week_starts_on_monday
+ ? GTK_CALENDAR_WEEK_START_MONDAY : 0)));
gtk_calendar_select_month (dpanel->gtk_calendar, tm->tm_mon, tm->tm_year + 1900);
gtk_calendar_select_day (dpanel->gtk_calendar, tm->tm_mday);
dpanel->day_selected_id = gtk_signal_connect (GTK_OBJECT (dpanel->gtk_calendar),
@@ -245,3 +248,17 @@ gncal_day_panel_set (GncalDayPanel *dpanel, time_t start_of_day)
update (dpanel, FALSE, NULL, 0);
}
+
+void
+gncal_day_panel_time_format_changed (GncalDayPanel *dpanel)
+{
+ g_return_if_fail (dpanel != NULL);
+ g_return_if_fail (GNCAL_IS_DAY_PANEL (dpanel));
+
+ gtk_calendar_display_options (dpanel->gtk_calendar,
+ (week_starts_on_monday
+ ? (dpanel->gtk_calendar->display_flags
+ | GTK_CALENDAR_WEEK_START_MONDAY)
+ : (dpanel->gtk_calendar->display_flags
+ & ~GTK_CALENDAR_WEEK_START_MONDAY)));
+}