From 27e8ce95b4da30ab49cbd2da4094b49f07a532c4 Mon Sep 17 00:00:00 2001 From: Dave Andreoli Date: Sun, 27 Aug 2017 20:45:12 +0200 Subject: [PATCH] PKit gadget: more accurate progress bar when opening a popup with an in-progress transaction the progressbar need to be created with the last received Progress value. Otherwise it will stay at zero until the next Progress change --- src/modules/packagekit/e_mod_packagekit.c | 3 +++ src/modules/packagekit/e_mod_packagekit.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/modules/packagekit/e_mod_packagekit.c b/src/modules/packagekit/e_mod_packagekit.c index 52f790f1b..48411b5fa 100644 --- a/src/modules/packagekit/e_mod_packagekit.c +++ b/src/modules/packagekit/e_mod_packagekit.c @@ -253,6 +253,8 @@ packagekit_popup_update(E_PackageKit_Instance *inst, Eina_Bool rebuild_list) if (ctxt->transaction) { elm_genlist_clear(inst->popup_genlist); + elm_progressbar_value_set(inst->popup_progressbar, + ctxt->transaction_progress); evas_object_show(inst->popup_progressbar); } else @@ -316,6 +318,7 @@ packagekit_progress_percentage_update(E_PackageKit_Module_Context *ctxt, Eina_List *l; double val = (double)percent / 100.0; + ctxt->transaction_progress = val; EINA_LIST_FOREACH(ctxt->instances, l, inst) if (inst->popup_progressbar) elm_progressbar_value_set(inst->popup_progressbar, val); diff --git a/src/modules/packagekit/e_mod_packagekit.h b/src/modules/packagekit/e_mod_packagekit.h index 47c772ab6..de737df5e 100644 --- a/src/modules/packagekit/e_mod_packagekit.h +++ b/src/modules/packagekit/e_mod_packagekit.h @@ -66,6 +66,7 @@ typedef struct _E_PackageKit_Module_Context Eldbus_Connection *conn; Eldbus_Proxy *packagekit; Eldbus_Proxy *transaction; + double transaction_progress; E_Config_DD *conf_edd; PackageKit_Config *config;