forked from AuroraMiddleware/gtk
Handle return values from nl_langinfo() more correctly.
2007-06-09 Matthias Clasen <mclasen@redhat.com> * gtk/gtkcalendar.c (gtk_calendar_init): Handle return values from nl_langinfo() more correctly. svn path=/trunk/; revision=18085
This commit is contained in:
parent
705d6545e5
commit
387ed45e9e
@ -1,3 +1,8 @@
|
||||
2007-06-09 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkcalendar.c (gtk_calendar_init): Handle return values
|
||||
from nl_langinfo() more correctly.
|
||||
|
||||
2007-06-09 Carlos Garnacho <carlos@imendio.com>
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_parse_engine): initialize rc_priv in the else
|
||||
|
@ -568,7 +568,7 @@ gtk_calendar_init (GtkCalendar *calendar)
|
||||
GtkCalendarPrivate *priv;
|
||||
gchar *year_before;
|
||||
#ifdef HAVE__NL_TIME_FIRST_WEEKDAY
|
||||
gchar *langinfo;
|
||||
union { unsigned int word; char *string; } langinfo;
|
||||
gint week_1stday = 0;
|
||||
gint first_weekday = 1;
|
||||
guint week_origin;
|
||||
@ -688,10 +688,10 @@ gtk_calendar_init (GtkCalendar *calendar)
|
||||
}
|
||||
#else
|
||||
#ifdef HAVE__NL_TIME_FIRST_WEEKDAY
|
||||
langinfo = nl_langinfo (_NL_TIME_FIRST_WEEKDAY);
|
||||
first_weekday = langinfo[0];
|
||||
langinfo = nl_langinfo (_NL_TIME_WEEK_1STDAY);
|
||||
week_origin = GPOINTER_TO_INT (langinfo);
|
||||
langinfo.string = nl_langinfo (_NL_TIME_FIRST_WEEKDAY);
|
||||
first_weekday = langinfo.string[0];
|
||||
langinfo.string = nl_langinfo (_NL_TIME_WEEK_1STDAY);
|
||||
week_origin = langinfo.word;
|
||||
if (week_origin == 19971130) /* Sunday */
|
||||
week_1stday = 0;
|
||||
else if (week_origin == 19971201) /* Monday */
|
||||
|
Loading…
Reference in New Issue
Block a user