aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-11-06 13:38:09 -0600
committerTed Gould <ted@canonical.com>2009-11-06 13:38:09 -0600
commit463ca24ae82ecadaf319a42dc903301afa2c9b2b (patch)
tree019943aa37db6080cc5c46491826e7df2b555bcd
parent1dc8a8af930e8802cb578673da6bde792619b9c8 (diff)
downloadlibayatana-appindicator-463ca24ae82ecadaf319a42dc903301afa2c9b2b.tar.gz
libayatana-appindicator-463ca24ae82ecadaf319a42dc903301afa2c9b2b.tar.bz2
libayatana-appindicator-463ca24ae82ecadaf319a42dc903301afa2c9b2b.zip
Fleshing out get_entries
-rw-r--r--src/indicator-custom.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/indicator-custom.c b/src/indicator-custom.c
index d520948..f9577fb 100644
--- a/src/indicator-custom.c
+++ b/src/indicator-custom.c
@@ -202,11 +202,28 @@ connected (IndicatorServiceManager * sm, gboolean connected, IndicatorCustom * c
return;
}
+/* Goes through the list of applications that we're maintaining and
+ pulls out the IndicatorObjectEntry and returns that in a list
+ for the caller. */
static GList *
get_entries (IndicatorObject * io)
{
+ g_return_val_if_fail(IS_INDICATOR_CUSTOM(io), NULL);
- return NULL;
+ IndicatorCustomPrivate * priv = INDICATOR_CUSTOM_GET_PRIVATE(io);
+ GList * retval = NULL;
+ GList * apppointer = NULL;
+
+ for (apppointer = priv->applications; apppointer != NULL; apppointer = g_list_next(apppointer)) {
+ IndicatorObjectEntry * entry = &(((ApplicationEntry *)apppointer->data)->entry);
+ retval = g_list_prepend(retval, entry);
+ }
+
+ if (retval != NULL) {
+ retval = g_list_reverse(retval);
+ }
+
+ return retval;
}
static void