aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-01-05 15:44:33 -0600
committerTed Gould <ted@gould.cx>2010-01-05 15:44:33 -0600
commit51208eb3ccbaa0388a340b74191e3d0890fd166c (patch)
treee36991ed593c1d1e7be648cff358e1efe500c30c /src
parenta324b57d5d79f7a081fc4d8ad0fa2f9d36e72beb (diff)
downloadayatana-indicator-datetime-51208eb3ccbaa0388a340b74191e3d0890fd166c.tar.gz
ayatana-indicator-datetime-51208eb3ccbaa0388a340b74191e3d0890fd166c.tar.bz2
ayatana-indicator-datetime-51208eb3ccbaa0388a340b74191e3d0890fd166c.zip
Initalizing and disposing of the label and timer
Diffstat (limited to 'src')
-rw-r--r--src/indicator-datetime.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c
index 1dbd6ce..3e16e07 100644
--- a/src/indicator-datetime.c
+++ b/src/indicator-datetime.c
@@ -76,12 +76,26 @@ indicator_datetime_init (IndicatorDatetime *self)
{
self->priv = INDICATOR_DATETIME_GET_PRIVATE(self);
+ self->priv->label = NULL;
+ self->priv->timer = 0;
+
return;
}
static void
indicator_datetime_dispose (GObject *object)
{
+ IndicatorDatetime * self = INDICATOR_DATETIME(object);
+
+ if (self->priv->label != NULL) {
+ g_object_unref(self->priv->label);
+ self->priv->label = NULL;
+ }
+
+ if (self->priv->timer != 0) {
+ g_source_remove(self->priv->timer);
+ self->priv->timer = 0;
+ }
G_OBJECT_CLASS (indicator_datetime_parent_class)->dispose (object);
return;