Add text for batteries
This commit is contained in:
parent
09022fa5a3
commit
a324cba8cf
9
src/ui.c
9
src/ui.c
|
@ -137,10 +137,13 @@ _misc_view_update(Ui *ui, results_t *results)
|
||||||
frame = elm_frame_add(box);
|
frame = elm_frame_add(box);
|
||||||
evas_object_size_hint_align_set(frame, EVAS_HINT_FILL, 0);
|
evas_object_size_hint_align_set(frame, EVAS_HINT_FILL, 0);
|
||||||
evas_object_size_hint_weight_set(frame, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(frame, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
|
||||||
|
char buf[256];
|
||||||
|
snprintf(buf, sizeof(buf), "Battery %d ", i);
|
||||||
if (results->power.have_ac)
|
if (results->power.have_ac)
|
||||||
elm_object_text_set(frame, "Battery (plugged in)");
|
strcat(buf, "(plugged in)");
|
||||||
else
|
|
||||||
elm_object_text_set(frame, "Battery");
|
elm_object_text_set(frame, buf);
|
||||||
|
|
||||||
evas_object_show(frame);
|
evas_object_show(frame);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue