aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-11-06 13:32:21 -0600
committerTed Gould <ted@canonical.com>2009-11-06 13:32:21 -0600
commit1dc8a8af930e8802cb578673da6bde792619b9c8 (patch)
tree0c3d74bac88b3110243036d1df63d98a902cb87d /src
parent349af660b77122a3a8609b09fe0012abf666e4b8 (diff)
downloadayatana-indicator-application-1dc8a8af930e8802cb578673da6bde792619b9c8.tar.gz
ayatana-indicator-application-1dc8a8af930e8802cb578673da6bde792619b9c8.tar.bz2
ayatana-indicator-application-1dc8a8af930e8802cb578673da6bde792619b9c8.zip
Making for a list of applications that we can build and destroy at will.
Diffstat (limited to 'src')
-rw-r--r--src/indicator-custom.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/indicator-custom.c b/src/indicator-custom.c
index 669bafd..d520948 100644
--- a/src/indicator-custom.c
+++ b/src/indicator-custom.c
@@ -44,12 +44,17 @@ INDICATOR_SET_TYPE(INDICATOR_CUSTOM_TYPE)
#endif
typedef struct _IndicatorCustomPrivate IndicatorCustomPrivate;
-
-struct _IndicatorCustomPrivate
-{
+struct _IndicatorCustomPrivate {
IndicatorServiceManager * sm;
DBusGConnection * bus;
DBusGProxy * service_proxy;
+ GList * applications;
+};
+
+typedef struct _ApplicationEntry ApplicationEntry;
+struct _ApplicationEntry {
+ guint position;
+ IndicatorObjectEntry entry;
};
#define INDICATOR_CUSTOM_GET_PRIVATE(o) \
@@ -96,6 +101,7 @@ indicator_custom_init (IndicatorCustom *self)
priv->sm = indicator_service_manager_new(INDICATOR_CUSTOM_DBUS_ADDR);
g_signal_connect(G_OBJECT(priv->sm), INDICATOR_SERVICE_MANAGER_SIGNAL_CONNECTION_CHANGE, G_CALLBACK(connected), self);
+ priv->applications = NULL;
return;
}
@@ -105,6 +111,12 @@ indicator_custom_dispose (GObject *object)
{
IndicatorCustomPrivate * priv = INDICATOR_CUSTOM_GET_PRIVATE(object);
+ while (priv->applications != NULL) {
+ application_removed(priv->service_proxy,
+ ((ApplicationEntry *)priv->applications->data)->position,
+ INDICATOR_CUSTOM(object));
+ }
+
if (priv->sm != NULL) {
g_object_unref(priv->sm);
priv->sm = NULL;