aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-05-18 22:27:08 -0500
committerTed Gould <ted@gould.cx>2010-05-18 22:27:08 -0500
commit8d461077788a54834bb7770fb19af119ae41eb32 (patch)
tree7fa35d4e14f90d31d5c8c7550abd424fc73a65e8 /src
parentfe6148723172d93d97fa941184ecc9a256201379 (diff)
downloadayatana-indicator-datetime-8d461077788a54834bb7770fb19af119ae41eb32.tar.gz
ayatana-indicator-datetime-8d461077788a54834bb7770fb19af119ae41eb32.tar.bz2
ayatana-indicator-datetime-8d461077788a54834bb7770fb19af119ae41eb32.zip
Adding a service manager to start the service.
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 434883e..448d736 100644
--- a/src/indicator-datetime.c
+++ b/src/indicator-datetime.c
@@ -10,6 +10,9 @@
/* Indicator Stuff */
#include <libindicator/indicator.h>
#include <libindicator/indicator-object.h>
+#include <libindicator/indicator-service-manager.h>
+
+#include "dbus-shared.h"
#define INDICATOR_DATETIME_TYPE (indicator_datetime_get_type ())
@@ -40,6 +43,8 @@ struct _IndicatorDatetimePrivate {
guint idle_measure;
gint max_width;
+
+ IndicatorServiceManager * sm;
};
#define INDICATOR_DATETIME_GET_PRIVATE(o) \
@@ -91,6 +96,10 @@ indicator_datetime_init (IndicatorDatetime *self)
self->priv->idle_measure = 0;
self->priv->max_width = 0;
+ self->priv->sm = NULL;
+
+ self->priv->sm = indicator_service_manager_new_version(SERVICE_NAME, SERVICE_VERSION);
+
return;
}
@@ -124,6 +133,11 @@ indicator_datetime_dispose (GObject *object)
self->priv->idle_measure = 0;
}
+ if (self->priv->sm != NULL) {
+ g_object_unref(G_OBJECT(self->priv->sm));
+ self->priv->sm = NULL;
+ }
+
G_OBJECT_CLASS (indicator_datetime_parent_class)->dispose (object);
return;
}