diff options
author | Ted Gould <ted@gould.cx> | 2011-03-11 16:19:02 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-03-11 16:19:02 -0600 |
commit | a11d8f16f4939353926b3cbf35217746fb488803 (patch) | |
tree | 9159aa8b8a6ef70e937ebc1512a2fc580ccdc729 | |
parent | d3c5e2540937720b15b542092cfccf924c7487aa (diff) | |
download | ayatana-indicator-application-a11d8f16f4939353926b3cbf35217746fb488803.tar.gz ayatana-indicator-application-a11d8f16f4939353926b3cbf35217746fb488803.tar.bz2 ayatana-indicator-application-a11d8f16f4939353926b3cbf35217746fb488803.zip |
Removing applications before adding new ones.
-rw-r--r-- | src/indicator-application.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/indicator-application.c b/src/indicator-application.c index eabbf54..f59ffd7 100644 --- a/src/indicator-application.c +++ b/src/indicator-application.c @@ -833,12 +833,20 @@ get_applications (GObject * obj, GAsyncResult * res, gpointer user_data) } } + /* If we got an error, print it and exit out */ if (error != NULL) { g_warning("Unable to get application list: %s", error->message); g_error_free(error); return; } + /* Remove all applications that we previously had + as we're going to repopulate the list. */ + while (priv->applications != NULL) { + application_removed(self, 0); + } + + /* Get our new applications that we got in the request */ g_variant_get(result, "(a(sisossss))", &iter); while ((child = g_variant_iter_next_value (iter))) { get_applications_helper(self, child); |