diff options
Diffstat (limited to 'src/status-items.c')
-rw-r--r-- | src/status-items.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/status-items.c b/src/status-items.c index e210c01..4f83c23 100644 --- a/src/status-items.c +++ b/src/status-items.c @@ -55,7 +55,7 @@ GList * status_providers = NULL; /* Build the inital status items and start kicking off the async code for handling all the statuses */ GList * -status_items_build (void) +status_items_build (StatusUpdateFunc status_update_func) { int i; for (i = STATUS_PROVIDER_STATUS_ONLINE; i < STATUS_PROVIDER_STATUS_DISCONNECTED; i++) { @@ -78,6 +78,20 @@ status_items_build (void) return menuitems; } +/* Clean up our globals and stop with all this allocation + of memory */ +void +status_items_cleanup (void) +{ + while (status_providers != NULL) { + StatusProvider * sprovider = STATUS_PROVIDER(status_providers->data); + g_object_unref(sprovider); + status_providers = g_list_remove(status_providers, sprovider); + } + + return; +} + /* Get the icon that should be shown on the panel */ const gchar * status_current_panel_icon (gboolean alert) |