forked from enlightenment/enlightenment
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
This commit is contained in:
parent
2ab2fe18ea
commit
27e8ce95b4
|
@ -253,6 +253,8 @@ packagekit_popup_update(E_PackageKit_Instance *inst, Eina_Bool rebuild_list)
|
||||||
if (ctxt->transaction)
|
if (ctxt->transaction)
|
||||||
{
|
{
|
||||||
elm_genlist_clear(inst->popup_genlist);
|
elm_genlist_clear(inst->popup_genlist);
|
||||||
|
elm_progressbar_value_set(inst->popup_progressbar,
|
||||||
|
ctxt->transaction_progress);
|
||||||
evas_object_show(inst->popup_progressbar);
|
evas_object_show(inst->popup_progressbar);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -316,6 +318,7 @@ packagekit_progress_percentage_update(E_PackageKit_Module_Context *ctxt,
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
double val = (double)percent / 100.0;
|
double val = (double)percent / 100.0;
|
||||||
|
|
||||||
|
ctxt->transaction_progress = val;
|
||||||
EINA_LIST_FOREACH(ctxt->instances, l, inst)
|
EINA_LIST_FOREACH(ctxt->instances, l, inst)
|
||||||
if (inst->popup_progressbar)
|
if (inst->popup_progressbar)
|
||||||
elm_progressbar_value_set(inst->popup_progressbar, val);
|
elm_progressbar_value_set(inst->popup_progressbar, val);
|
||||||
|
|
|
@ -66,6 +66,7 @@ typedef struct _E_PackageKit_Module_Context
|
||||||
Eldbus_Connection *conn;
|
Eldbus_Connection *conn;
|
||||||
Eldbus_Proxy *packagekit;
|
Eldbus_Proxy *packagekit;
|
||||||
Eldbus_Proxy *transaction;
|
Eldbus_Proxy *transaction;
|
||||||
|
double transaction_progress;
|
||||||
|
|
||||||
E_Config_DD *conf_edd;
|
E_Config_DD *conf_edd;
|
||||||
PackageKit_Config *config;
|
PackageKit_Config *config;
|
||||||
|
|
Loading…
Reference in New Issue