Fix nl_langinfo() use

This commit is contained in:
Matthias Clasen 2005-06-18 04:19:29 +00:00
parent 23fabedc9d
commit fb6ce33533
4 changed files with 16 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-06-18 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcalendar.c (gtk_calendar_init): _NL_FIRST_WEEKDAY is
1-based. (#163842, Pierre Ossman)
2005-06-17 Kristian Rietveld <kris@gtk.org>
Fix #160281, testcase from Peter Bloomfield.

View File

@ -1,3 +1,8 @@
2005-06-18 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcalendar.c (gtk_calendar_init): _NL_FIRST_WEEKDAY is
1-based. (#163842, Pierre Ossman)
2005-06-17 Kristian Rietveld <kris@gtk.org>
Fix #160281, testcase from Peter Bloomfield.

View File

@ -1,3 +1,8 @@
2005-06-18 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcalendar.c (gtk_calendar_init): _NL_FIRST_WEEKDAY is
1-based. (#163842, Pierre Ossman)
2005-06-17 Kristian Rietveld <kris@gtk.org>
Fix #160281, testcase from Peter Bloomfield.

View File

@ -652,7 +652,7 @@ gtk_calendar_init (GtkCalendar *calendar)
#ifdef HAVE__NL_TIME_FIRST_WEEKDAY
week_start = nl_langinfo (_NL_TIME_FIRST_WEEKDAY);
priv->week_start = *((unsigned char *) week_start) % 7;
priv->week_start = *((unsigned char *) week_start) % 7 - 1;
#else
/* Translate to calendar:week_start:0 if you want Sunday to be the
* first day of the week to calendar:week_start:1 if you want Monday