diff options
author | Ted Gould <ted@canonical.com> | 2009-11-06 21:53:59 -0600 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-11-06 21:53:59 -0600 |
commit | e25d64ff5a87e06212c03167a7b430bd320442dd (patch) | |
tree | 885029a424206b4afcfe6c95998c560c66fba1ee /src | |
parent | bca77a7a1e38c1d97211394799cf103bc02b0547 (diff) | |
download | ayatana-indicator-application-e25d64ff5a87e06212c03167a7b430bd320442dd.tar.gz ayatana-indicator-application-e25d64ff5a87e06212c03167a7b430bd320442dd.tar.bz2 ayatana-indicator-application-e25d64ff5a87e06212c03167a7b430bd320442dd.zip |
Adding an application list.
Diffstat (limited to 'src')
-rw-r--r-- | src/custom-service-appstore.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/custom-service-appstore.c b/src/custom-service-appstore.c index b25ffa7..65c6b6b 100644 --- a/src/custom-service-appstore.c +++ b/src/custom-service-appstore.c @@ -15,7 +15,14 @@ static gboolean _custom_service_server_get_applications (CustomServiceAppstore * /* Private Stuff */ typedef struct _CustomServiceAppstorePrivate CustomServiceAppstorePrivate; struct _CustomServiceAppstorePrivate { - int demo; + GList * applications; +}; + +typedef struct _Application Application; +struct _Application { + gchar * dbus_name; + gchar * dbus_object; + DBusGProxy * dbus_proxy; }; #define CUSTOM_SERVICE_APPSTORE_GET_PRIVATE(o) \ @@ -73,6 +80,9 @@ custom_service_appstore_class_init (CustomServiceAppstoreClass *klass) static void custom_service_appstore_init (CustomServiceAppstore *self) { + CustomServiceAppstorePrivate * priv = CUSTOM_SERVICE_APPSTORE_GET_PRIVATE(self); + + priv->applications = NULL; GError * error = NULL; DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error); @@ -92,6 +102,13 @@ custom_service_appstore_init (CustomServiceAppstore *self) static void custom_service_appstore_dispose (GObject *object) { + CustomServiceAppstorePrivate * priv = CUSTOM_SERVICE_APPSTORE_GET_PRIVATE(object); + + while (priv->applications != NULL) { + custom_service_appstore_application_remove(CUSTOM_SERVICE_APPSTORE(object), + ((Application *)priv->applications->data)->dbus_name, + ((Application *)priv->applications->data)->dbus_object); + } G_OBJECT_CLASS (custom_service_appstore_parent_class)->dispose (object); return; |