diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-09-07 07:06:58 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2013-09-07 07:06:58 -0500 |
commit | fd1d19cbdc2d29d8ada8a304221cabf6cac95e7a (patch) | |
tree | 5aea7196c307a6a13a8cb3bb7d00aadc4677a383 /src | |
parent | 188c34d1c975b35f8ec36442ca971520014c419b (diff) | |
download | ayatana-indicator-datetime-fd1d19cbdc2d29d8ada8a304221cabf6cac95e7a.tar.gz ayatana-indicator-datetime-fd1d19cbdc2d29d8ada8a304221cabf6cac95e7a.tar.bz2 ayatana-indicator-datetime-fd1d19cbdc2d29d8ada8a304221cabf6cac95e7a.zip |
in service.c, remove unnecessary function get_time_format_mode()
Diffstat (limited to 'src')
-rw-r--r-- | src/service.c | 24 |
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) { |