aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authorMichael Terry <mike@mterry.name>2011-02-23 14:07:19 -0500
committerMichael Terry <mike@mterry.name>2011-02-23 14:07:19 -0500
commitb3a34d487c8c3724752b522fd352c96ba0bcf1a4 (patch)
tree634b06e05dc44af9de3646e7f2f4dfe352d59561 /src/utils.c
parentb4a4c9682ca2413175386ad36d06fc4e1032badc (diff)
downloadayatana-indicator-datetime-b3a34d487c8c3724752b522fd352c96ba0bcf1a4.tar.gz
ayatana-indicator-datetime-b3a34d487c8c3724752b522fd352c96ba0bcf1a4.tar.bz2
ayatana-indicator-datetime-b3a34d487c8c3724752b522fd352c96ba0bcf1a4.zip
add week-start controls and settings
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c
index f73ed14..89c499b 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -50,6 +50,17 @@ is_locale_12h (void)
return TRUE;
}
+/* Check the system locale setting to see if the week starts on Sunday or Monday */
+gboolean
+is_locale_week_start_sunday (void)
+{
+ const char * week_1stday = nl_langinfo (_NL_TIME_WEEK_1STDAY);
+
+ /* This appears to be a special value that libc uses for Sunday, it's not
+ really a string */
+ return (GPOINTER_TO_INT (week_1stday) == 19971130);
+}
+
void
split_settings_location (const gchar * location, gchar ** zone, gchar ** name)
{