calendar: Improve week start handling

Add a helper function (mostly copied from gtkcalendar.c) for getting
the first week day for the current locale, using nl_langinfo if
available and falling back to the GTK+ gettext fallback otherwise.

Use that function in the calendar, so that the LC_TIME setting is
used if possible.

https://bugzilla.gnome.org/show_bug.cgi?id=649078
This commit is contained in:
Florian Müllner
2011-06-24 02:40:36 +02:00
parent 6c97e2a5ab
commit 7ed3facf8f
4 changed files with 74 additions and 25 deletions

View File

@ -20,6 +20,7 @@ void shell_util_set_hidden_from_pick (ClutterActor *actor,
void shell_util_get_transformed_allocation (ClutterActor *actor,
ClutterActorBox *box);
int shell_util_get_week_start (void);
char *shell_util_format_date (const char *format,
gint64 time_ms);