diff options
author | Ted Gould <ted@gould.cx> | 2010-07-15 23:35:06 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-07-15 23:35:06 -0500 |
commit | d0f7773e9d902204b567a319e1a14ecf2d3d4199 (patch) | |
tree | 862fa648201d6f8a50bfc31e67c0f4c4a3a66e7f /src | |
parent | 189a8a9f03912c6a5da2fa040bca71115be925ee (diff) | |
download | ayatana-indicator-datetime-d0f7773e9d902204b567a319e1a14ecf2d3d4199.tar.gz ayatana-indicator-datetime-d0f7773e9d902204b567a319e1a14ecf2d3d4199.tar.bz2 ayatana-indicator-datetime-d0f7773e9d902204b567a319e1a14ecf2d3d4199.zip |
Getting some guts into get
Diffstat (limited to 'src')
-rw-r--r-- | src/indicator-datetime.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c index 97d559c..5c785f9 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -357,15 +357,56 @@ bind_enum_get (GValue * value, GVariant * variant, gpointer user_data) return TRUE; } +/* Sets a property on the object */ static void set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { + switch(prop_id) { + case PROP_TIME_FORMAT: + break; + case PROP_SHOW_SECONDS: + break; + case PROP_SHOW_DAY: + break; + case PROP_SHOW_DATE: + break; + case PROP_CUSTOM_TIME_FORMAT: + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); + return; + } + return; } +/* Gets a property from the object */ static void get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { + IndicatorDatetime * self = INDICATOR_DATETIME(object); + + switch(prop_id) { + case PROP_TIME_FORMAT: + g_value_set_int(value, self->priv->time_mode); + break; + case PROP_SHOW_SECONDS: + g_value_set_boolean(value, self->priv->show_seconds); + break; + case PROP_SHOW_DAY: + g_value_set_boolean(value, self->priv->show_day); + break; + case PROP_SHOW_DATE: + g_value_set_boolean(value, self->priv->show_date); + break; + case PROP_CUSTOM_TIME_FORMAT: + g_value_set_string(value, self->priv->custom_string); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); + return; + } + return; } |