aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/service.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/service.c b/src/service.c
index 364463a..1aed147 100644
--- a/src/service.c
+++ b/src/service.c
@@ -433,34 +433,12 @@ typedef enum
}
TimeFormatMode;
-/* gets the user's time-format from GSettings */
-static TimeFormatMode
-get_time_format_mode (IndicatorDatetimeService * self)
-{
- char * str;
- TimeFormatMode mode;
-
- str = g_settings_get_string (self->priv->settings, SETTINGS_TIME_FORMAT_S);
-
- if (!g_strcmp0 ("12-hour", str))
- mode = TIME_FORMAT_MODE_12_HOUR;
- else if (!g_strcmp0 ("24-hour", str))
- mode = TIME_FORMAT_MODE_24_HOUR;
- else if (!g_strcmp0 ("custom", str))
- mode = TIME_FORMAT_MODE_CUSTOM;
- else
- mode = TIME_FORMAT_MODE_LOCALE_DEFAULT;
-
- g_free (str);
- return mode;
-}
-
static gchar *
get_header_label_format_string (IndicatorDatetimeService * self)
{
char * fmt;
- const TimeFormatMode mode = get_time_format_mode (self);
GSettings * s = self->priv->settings;
+ const TimeFormatMode mode = g_settings_get_enum (s, SETTINGS_TIME_FORMAT_S);
if (mode == TIME_FORMAT_MODE_CUSTOM)
{