aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-datetime.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-07-15 15:18:49 -0500
committerTed Gould <ted@gould.cx>2010-07-15 15:18:49 -0500
commitc3563f869fcf33736919e95acc159c08b3f9faa1 (patch)
treef949a8e391bb481c21871cbc4622e66467eebdff /src/indicator-datetime.c
parent3575d726899cdb7ce8f928fe2f873c925c8cb9e3 (diff)
downloadayatana-indicator-datetime-c3563f869fcf33736919e95acc159c08b3f9faa1.tar.gz
ayatana-indicator-datetime-c3563f869fcf33736919e95acc159c08b3f9faa1.tar.bz2
ayatana-indicator-datetime-c3563f869fcf33736919e95acc159c08b3f9faa1.zip
Getting defines for all the new settings and making things compile again.
Diffstat (limited to 'src/indicator-datetime.c')
-rw-r--r--src/indicator-datetime.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c
index 4779313..f7449c9 100644
--- a/src/indicator-datetime.c
+++ b/src/indicator-datetime.c
@@ -84,10 +84,23 @@ enum {
#define PROP_TIME_FORMAT_S "time-format"
-#define SETTING_INTERFACE "org.ayatana.indicator.datetime"
-#define SETTING_TIME_FORMAT_S "indicator-time-format"
+#define SETTINGS_INTERFACE "org.ayatana.indicator.datetime"
+#define SETTINGS_TIME_FORMAT "time-format"
+#define SETTINGS_SHOW_SECONDS "show-seconds"
+#define SETTINGS_SHOW_DAY "show-day"
+#define SETTINGS_SHOW_DATE "show-date"
+#define SETTINGS_CUSTOM_TIME_FORMAT_S "custom-time-format"
-#define DEFAULT_TIME_FORMAT "%l:%M %p"
+enum {
+ SETTINGS_TIME_LOCALE = 0,
+ SETTINGS_TIME_12_HOUR = 1,
+ SETTINGS_TIME_24_HOUR = 2,
+ SETTINGS_TIME_CUSTOM = 3
+};
+
+#define DEFAULT_TIME_12_FORMAT "%l:%M %p"
+#define DEFAULT_TIME_24_FORMAT "%H:%M"
+#define DEFAULT_TIME_FORMAT DEFAULT_TIME_12_FORMAT
#define INDICATOR_DATETIME_GET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), INDICATOR_DATETIME_TYPE, IndicatorDatetimePrivate))
@@ -159,15 +172,15 @@ indicator_datetime_init (IndicatorDatetime *self)
self->priv->sm = NULL;
self->priv->menu = NULL;
- self->priv->settings = g_settings_new(SETTING_INTERFACE);
+ self->priv->settings = g_settings_new(SETTINGS_INTERFACE);
if (self->priv->settings != NULL) {
g_settings_bind(self->priv->settings,
- SETTING_TIME_FORMAT_S,
+ SETTINGS_CUSTOM_TIME_FORMAT_S,
self,
PROP_TIME_FORMAT_S,
G_SETTINGS_BIND_DEFAULT);
} else {
- g_warning("Unable to get settings for '" SETTING_INTERFACE "'");
+ g_warning("Unable to get settings for '" SETTINGS_INTERFACE "'");
}
self->priv->sm = indicator_service_manager_new_version(SERVICE_NAME, SERVICE_VERSION);