diff options
author | Ted Gould <ted@gould.cx> | 2010-08-11 21:30:44 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-08-11 21:30:44 -0500 |
commit | 4398a699958b13e6e5739520eb83f9530dd333f7 (patch) | |
tree | f05a3db63b484534afa7832bbcff699b1cc97490 /src | |
parent | ba6904978575157936f0fb3ce9fd4aa78ac740ee (diff) | |
download | ayatana-indicator-application-4398a699958b13e6e5739520eb83f9530dd333f7.tar.gz ayatana-indicator-application-4398a699958b13e6e5739520eb83f9530dd333f7.tar.bz2 ayatana-indicator-application-4398a699958b13e6e5739520eb83f9530dd333f7.zip |
Make it so that an approver that gets free'd gets removed from the applications list of approval.
Diffstat (limited to 'src')
-rw-r--r-- | src/application-service-appstore.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/application-service-appstore.c b/src/application-service-appstore.c index 6ee2c47..5467f31 100644 --- a/src/application-service-appstore.c +++ b/src/application-service-appstore.c @@ -220,7 +220,7 @@ application_service_appstore_dispose (GObject *object) } if (priv->approvers != NULL) { - g_list_foreach(priv->approvers, approver_free, NULL); + g_list_foreach(priv->approvers, approver_free, object); g_list_free(priv->approvers); priv->approvers = NULL; } @@ -955,12 +955,27 @@ _application_service_server_get_applications (ApplicationServiceAppstore * appst return TRUE; } +/* Removes and approver from our list of approvers and + then sees if that changes our status. Most likely this + could make us visible if this approver rejected us. */ +static void +remove_approver (gpointer papp, gpointer pproxy) +{ + Application * app = (Application *)papp; + app->approved_by = g_list_remove(app->approved_by, pproxy); + apply_status(app); + return; +} + /* Frees the data associated with an approver */ static void approver_free (gpointer papprover, gpointer user_data) { Approver * approver = (Approver *)papprover; g_return_if_fail(approver != NULL); + + ApplicationServiceAppstore * appstore = APPLICATION_SERVICE_APPSTORE(user_data); + g_list_foreach(appstore->priv->applications, remove_approver, approver->proxy); if (approver->proxy != NULL) { g_object_unref(approver->proxy); |