Commit 387ed45e authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

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
parent 705d6545
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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment