aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-07-13 14:00:28 -0500
committerTed Gould <ted@gould.cx>2011-07-13 14:00:28 -0500
commit2a04996a4d63a3594c0a5e8e9dbbc3432daf4a29 (patch)
treeee71629edc557358a95ca2fe716f26b25e47cb25 /src
parent2d5602d093424119539bd7eee8f8bfde845f6115 (diff)
downloadayatana-indicator-messages-2a04996a4d63a3594c0a5e8e9dbbc3432daf4a29.tar.gz
ayatana-indicator-messages-2a04996a4d63a3594c0a5e8e9dbbc3432daf4a29.tar.bz2
ayatana-indicator-messages-2a04996a4d63a3594c0a5e8e9dbbc3432daf4a29.zip
Signal back that the icon should be updated
Diffstat (limited to 'src')
-rw-r--r--src/status-items.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/status-items.c b/src/status-items.c
index 6667072..3442478 100644
--- a/src/status-items.c
+++ b/src/status-items.c
@@ -49,8 +49,9 @@ static gboolean load_status_provider (gpointer dir);
/* Globals */
static StatusProviderStatus current_status = STATUS_PROVIDER_STATUS_DISCONNECTED;
-GList * menuitems = NULL;
-GList * status_providers = NULL;
+static GList * menuitems = NULL;
+static GList * status_providers = NULL;
+static StatusUpdateFunc update_func = NULL;
/* Build the inital status items and start kicking off the async code
for handling all the statuses */
@@ -73,6 +74,8 @@ status_items_build (StatusUpdateFunc status_update_func)
menuitems = g_list_append(menuitems, item);
}
+ update_func = status_update_func;
+
g_idle_add(provider_directory_parse, STATUS_PROVIDER_DIR);
return menuitems;
@@ -124,7 +127,9 @@ update_status (void)
current_status = status;
- /* TODO: Signal updated icon */
+ if (update_func != NULL) {
+ update_func();
+ }
GList * menu;
int i;