aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-07-15 16:12:12 -0500
committerTed Gould <ted@gould.cx>2010-07-15 16:12:12 -0500
commit533863c215051dd84213daa03f7aa214f64d11cd (patch)
treea8cfe43aa0c0b7d70a596a1180fc48edb87b4c6c /src
parent8fb0d0bf48f4cdc374683ed207df16c02a0fa756 (diff)
downloadayatana-indicator-datetime-533863c215051dd84213daa03f7aa214f64d11cd.tar.gz
ayatana-indicator-datetime-533863c215051dd84213daa03f7aa214f64d11cd.tar.bz2
ayatana-indicator-datetime-533863c215051dd84213daa03f7aa214f64d11cd.zip
Moving all these properties into the private structure.
Diffstat (limited to 'src')
-rw-r--r--src/indicator-datetime.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c
index de0edb7..52785bb 100644
--- a/src/indicator-datetime.c
+++ b/src/indicator-datetime.c
@@ -64,7 +64,13 @@ struct _IndicatorDatetimePrivate {
GtkLabel * label;
guint timer;
- gchar * time_format;
+ gchar * time_string;
+
+ gint time_mode;
+ gboolean show_seconds;
+ gboolean show_date;
+ gboolean show_day;
+ gchar * custom_string;
guint idle_measure;
gint max_width;
@@ -200,7 +206,13 @@ indicator_datetime_init (IndicatorDatetime *self)
self->priv->idle_measure = 0;
self->priv->max_width = 0;
- self->priv->time_format = g_strdup(DEFAULT_TIME_FORMAT);
+ self->priv->time_string = g_strdup(DEFAULT_TIME_FORMAT);
+
+ self->priv->time_mode = SETTINGS_TIME_LOCALE;
+ self->priv->show_seconds = FALSE;
+ self->priv->show_date = FALSE;
+ self->priv->show_day = FALSE;
+ self->priv->custom_string = g_strdup(DEFAULT_TIME_FORMAT);
self->priv->sm = NULL;
self->priv->menu = NULL;
@@ -285,9 +297,14 @@ indicator_datetime_finalize (GObject *object)
{
IndicatorDatetime * self = INDICATOR_DATETIME(object);
- if (self->priv->time_format != NULL) {
- g_free(self->priv->time_format);
- self->priv->time_format = NULL;
+ if (self->priv->time_string != NULL) {
+ g_free(self->priv->time_string);
+ self->priv->time_string = NULL;
+ }
+
+ if (self->priv->custom_string != NULL) {
+ g_free(self->priv->custom_string);
+ self->priv->custom_string = NULL;
}
G_OBJECT_CLASS (indicator_datetime_parent_class)->finalize (object);