[gnome-software] lib: Ensure the percentage progress is reset when done for install/remove/update
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] lib: Ensure the percentage progress is reset when done for install/remove/update
- Date: Tue, 10 Oct 2017 11:55:21 +0000 (UTC)
commit 2ce86ade79370e714134cfe20a075bdfcf83449d
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 944d4bf..312ec66 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]