[gnome-software/gnome-3-26] lib: Ensure the percentage progress is reset when done for install/remove/update
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-26] lib: Ensure the percentage progress is reset when done for install/remove/update
- Date: Thu, 9 Nov 2017 14:52:56 +0000 (UTC)
commit 0181baaa58109e35a61dd4d6f168e1c875ed1009
Author: Richard Hughes <richard hughsie com>
Date: Tue Oct 10 12:37:02 2017 +0100
lib: Ensure the percentage progress is reset when done for install/remove/update
lib/gs-plugin-loader.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 8feb9cb..7b98d2a 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -205,6 +205,17 @@ gs_plugin_loader_helper_new (GsPluginLoader *plugin_loader, GsPluginJob *plugin_
static void
gs_plugin_loader_helper_free (GsPluginLoaderHelper *helper)
{
+ /* reset progress */
+ switch (gs_plugin_job_get_action (helper->plugin_job)) {
+ case GS_PLUGIN_ACTION_INSTALL:
+ case GS_PLUGIN_ACTION_REMOVE:
+ case GS_PLUGIN_ACTION_UPDATE:
+ gs_app_set_progress (gs_plugin_job_get_app (helper->plugin_job), 0);
+ break;
+ default:
+ break;
+ }
+
if (helper->cancellable_id > 0) {
g_cancellable_disconnect (helper->cancellable_caller,
helper->cancellable_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]