bat popup - match gadget content better
This commit is contained in:
parent
fec75537b6
commit
09e4f2f8b5
|
@ -230,17 +230,19 @@ _battery_popup_usage_content_update_cb(void *data)
|
||||||
|
|
||||||
elm_progressbar_value_set(w->pb_usage, (double) bat->percent / 100.0);
|
elm_progressbar_value_set(w->pb_usage, (double) bat->percent / 100.0);
|
||||||
|
|
||||||
if ((battery_config->have_power) && (!bat->charging))
|
t = bat->time_left;
|
||||||
elm_object_text_set(w->state, _("Charged"));
|
if ((battery_config->have_power) && (battery_config->full < 100))
|
||||||
else if (bat->charging)
|
|
||||||
{
|
{
|
||||||
t = bat->time_full;
|
|
||||||
elm_object_text_set(w->state, _("Charging"));
|
elm_object_text_set(w->state, _("Charging"));
|
||||||
}
|
}
|
||||||
|
else if ((!battery_config->have_power) && (battery_config->full < 100))
|
||||||
|
{
|
||||||
|
elm_object_text_set(w->state, _("Discharging"));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
t = bat->time_left;
|
t = 0;
|
||||||
elm_object_text_set(w->state, _("Discharging"));
|
elm_object_text_set(w->state, _("Charged"));
|
||||||
}
|
}
|
||||||
|
|
||||||
hrs = (t / 3600);
|
hrs = (t / 3600);
|
||||||
|
|
Loading…
Reference in New Issue