From 2a04996a4d63a3594c0a5e8e9dbbc3432daf4a29 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 13 Jul 2011 14:00:28 -0500 Subject: Signal back that the icon should be updated --- src/status-items.c | 11 ++++++++--- 1 file 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; -- cgit v1.2.3