aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/service.c9
-rw-r--r--src/settings-shared.h9
-rw-r--r--src/utils.c15
3 files changed, 13 insertions, 20 deletions
diff --git a/src/service.c b/src/service.c
index 1aed147..0d8192a 100644
--- a/src/service.c
+++ b/src/service.c
@@ -424,15 +424,6 @@ skew_timer_func (gpointer gself)
****
***/
-typedef enum
-{
- TIME_FORMAT_MODE_LOCALE_DEFAULT,
- TIME_FORMAT_MODE_12_HOUR,
- TIME_FORMAT_MODE_24_HOUR,
- TIME_FORMAT_MODE_CUSTOM
-}
-TimeFormatMode;
-
static gchar *
get_header_label_format_string (IndicatorDatetimeService * self)
{
diff --git a/src/settings-shared.h b/src/settings-shared.h
index 27ce34c..afcccb6 100644
--- a/src/settings-shared.h
+++ b/src/settings-shared.h
@@ -22,6 +22,15 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef __DATETIME_SETTINGS_SHARED_H__
#define __DATETIME_SETTINGS_SHARED_H__
+typedef enum
+{
+ TIME_FORMAT_MODE_LOCALE_DEFAULT,
+ TIME_FORMAT_MODE_12_HOUR,
+ TIME_FORMAT_MODE_24_HOUR,
+ TIME_FORMAT_MODE_CUSTOM
+}
+TimeFormatMode;
+
#define SETTINGS_INTERFACE "com.canonical.indicator.datetime"
#define SETTINGS_SHOW_CLOCK_S "show-clock"
#define SETTINGS_TIME_FORMAT_S "time-format"
diff --git a/src/utils.c b/src/utils.c
index b99de94..5b1f58f 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -348,14 +348,6 @@ get_full_date_format_string (gboolean show_day, gboolean show_date)
*
*/
-enum
-{
- SETTINGS_TIME_LOCALE = 0,
- SETTINGS_TIME_12_HOUR = 1,
- SETTINGS_TIME_24_HOUR = 2,
- SETTINGS_TIME_CUSTOM = 3
-};
-
const gchar *
get_full_time_format_string (void)
{
@@ -370,15 +362,16 @@ get_full_time_format_string (void)
switch (g_settings_get_enum (settings, SETTINGS_TIME_FORMAT_S))
{
- case SETTINGS_TIME_LOCALE:
+ case TIME_FORMAT_MODE_LOCALE_DEFAULT:
twelvehour = is_locale_12h();
break;
- case SETTINGS_TIME_24_HOUR:
+ case TIME_FORMAT_MODE_24_HOUR:
twelvehour = FALSE;
break;
- default:
+ case TIME_FORMAT_MODE_12_HOUR:
+ case TIME_FORMAT_MODE_CUSTOM:
twelvehour = TRUE;
break;
}