summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Houston <stephen@localhost.localdomain>2018-02-12 15:55:11 -0600
committerStephen Houston <stephen@localhost.localdomain>2018-02-12 15:55:11 -0600
commitd905001ddf98405f3586255da5f264006846dd1a (patch)
tree03229940aa19b62afa0a8e350553995982cd3983
parent5598c2e2c36e43a542030db9c34f283754c59294 (diff)
Make popups del on HIDE instead of FOCUS_OUT. Fix progressbar formats.
-rw-r--r--batman/src/batman_config.c4
-rw-r--r--cpuclock/src/cpuclock.c10
-rw-r--r--cpuclock/src/cpuclock_config.c4
-rw-r--r--cpumonitor/src/cpumonitor_config.c4
-rw-r--r--memusage/src/memusage.c21
-rw-r--r--memusage/src/memusage_config.c4
-rw-r--r--netstatus/src/netstatus.c15
-rw-r--r--netstatus/src/netstatus_config.c4
-rw-r--r--thermal/src/thermal.c6
-rw-r--r--thermal/src/thermal_config.c4
10 files changed, 39 insertions, 37 deletions
diff --git a/batman/src/batman_config.c b/batman/src/batman_config.c
index 4f660a8..13bf2b2 100644
--- a/batman/src/batman_config.c
+++ b/batman/src/batman_config.c
@@ -205,7 +205,7 @@ _power_management_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_data
205} 205}
206 206
207static void 207static void
208_popup_focus_out(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_data EINA_UNUSED) 208_popup_del(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_data EINA_UNUSED)
209{ 209{
210 evas_object_del(obj); 210 evas_object_del(obj);
211} 211}
@@ -231,7 +231,7 @@ batman_configure(Instance *inst)
231 elm_win_alpha_set(popup, 1); 231 elm_win_alpha_set(popup, 1);
232 else 232 else
233 elm_win_autodel_set(popup, 1); 233 elm_win_autodel_set(popup, 1);
234 evas_object_event_callback_add(popup, EVAS_CALLBACK_FOCUS_OUT, _popup_focus_out, NULL); 234 evas_object_event_callback_add(popup, EVAS_CALLBACK_HIDE, _popup_del, NULL);
235 235
236 tb = elm_table_add(popup); 236 tb = elm_table_add(popup);
237 evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 237 evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/cpuclock/src/cpuclock.c b/cpuclock/src/cpuclock.c
index e3c4b54..aad6bf9 100644
--- a/cpuclock/src/cpuclock.c
+++ b/cpuclock/src/cpuclock.c
@@ -246,7 +246,7 @@ _cpuclock_popup_create(Instance *inst)
246 elm_win_resize_object_add(popup, table); 246 elm_win_resize_object_add(popup, table);
247 evas_object_show(table); 247 evas_object_show(table);
248 248
249 snprintf(text, sizeof(text), "<big><b>%s</b></big>", _("Frequency")); 249 snprintf(text, sizeof(text), "<big><b>%s</b></big>", _("CPU Frequency"));
250 250
251 label = elm_label_add(table); 251 label = elm_label_add(table);
252 evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 252 evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -255,15 +255,15 @@ _cpuclock_popup_create(Instance *inst)
255 elm_table_pack(table, label, 0, 0, 2, 1); 255 elm_table_pack(table, label, 0, 0, 2, 1);
256 evas_object_show(label); 256 evas_object_show(label);
257 257
258 snprintf(buf, sizeof(buf), "%1.1f %s (%d %%)", f, u, 258 snprintf(buf, sizeof(buf), "%1.1f %s (%d %%%%)", f, u,
259 inst->cfg->cpuclock.percent); 259 inst->cfg->cpuclock.percent);
260 260
261 pbar = elm_progressbar_add(table); 261 pbar = elm_progressbar_add(table);
262 evas_object_size_hint_weight_set(pbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 262 evas_object_size_hint_weight_set(pbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
263 evas_object_size_hint_align_set(pbar, EVAS_HINT_FILL, EVAS_HINT_FILL); 263 evas_object_size_hint_align_set(pbar, EVAS_HINT_FILL, EVAS_HINT_FILL);
264 elm_progressbar_span_size_set(pbar, 200 * elm_config_scale_get()); 264 elm_progressbar_span_size_set(pbar, 200 * elm_config_scale_get());
265 elm_progressbar_value_set(pbar, (float)inst->cfg->cpuclock.percent / 100);
266 elm_progressbar_unit_format_set(pbar, buf); 265 elm_progressbar_unit_format_set(pbar, buf);
266 elm_progressbar_value_set(pbar, (float)inst->cfg->cpuclock.percent / 100);
267 elm_table_pack(table, pbar, 0, 1, 2, 1); 267 elm_table_pack(table, pbar, 0, 1, 2, 1);
268 evas_object_show(pbar); 268 evas_object_show(pbar);
269 inst->cfg->cpuclock.popup_pbar = pbar; 269 inst->cfg->cpuclock.popup_pbar = pbar;
@@ -412,7 +412,7 @@ _cpuclock_face_update_current(Instance *inst)
412 f /= 1000000; 412 f /= 1000000;
413 u = _("GHz"); 413 u = _("GHz");
414 } 414 }
415 snprintf(buf, sizeof(buf), "%1.1f %s (%d %%)", f, u, 415 snprintf(buf, sizeof(buf), "%1.1f %s (%d %%%%)", f, u,
416 inst->cfg->cpuclock.percent); 416 inst->cfg->cpuclock.percent);
417 elm_progressbar_unit_format_set(inst->cfg->cpuclock.popup_pbar, buf); 417 elm_progressbar_unit_format_set(inst->cfg->cpuclock.popup_pbar, buf);
418 elm_progressbar_value_set(inst->cfg->cpuclock.popup_pbar, 418 elm_progressbar_value_set(inst->cfg->cpuclock.popup_pbar,
diff --git a/cpuclock/src/cpuclock_config.c b/cpuclock/src/cpuclock_config.c
index 69d5cb7..c8c831d 100644
--- a/cpuclock/src/cpuclock_config.c
+++ b/cpuclock/src/cpuclock_config.c
@@ -219,7 +219,7 @@ _poll_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
219} 219}
220 220
221static void 221static void
222_popup_focus_out(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_data EINA_UNUSED) 222_popup_del(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_data EINA_UNUSED)
223{ 223{
224 evas_object_del(obj); 224 evas_object_del(obj);
225} 225}
@@ -255,7 +255,7 @@ cpuclock_configure(Instance *inst)
255 elm_win_alpha_set(popup, 1); 255 elm_win_alpha_set(popup, 1);
256 else 256 else
257 elm_win_autodel_set(popup, 1); 257 elm_win_autodel_set(popup, 1);
258 evas_object_event_callback_add(popup, EVAS_CALLBACK_FOCUS_OUT, _popup_focus_out, NULL); 258 evas_object_event_callback_add(popup, EVAS_CALLBACK_HIDE, _popup_del, NULL);
259 259
260 tb = elm_table_add(popup); 260 tb = elm_table_add(popup);
261 evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 261 evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/cpumonitor/src/cpumonitor_config.c b/cpumonitor/src/cpumonitor_config.c
index 633e676..36b49ce 100644
--- a/cpumonitor/src/cpumonitor_config.c
+++ b/cpumonitor/src/cpumonitor_config.c
@@ -46,7 +46,7 @@ _config_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
46} 46}
47 47
48static void 48static void
49_popup_focus_out(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_data EINA_UNUSED) 49_popup_del(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_data EINA_UNUSED)
50{ 50{
51 evas_object_del(obj); 51 evas_object_del(obj);
52} 52}
@@ -61,7 +61,7 @@ cpumonitor_configure(Instance *inst)
61 elm_win_alpha_set(popup, 1); 61 elm_win_alpha_set(popup, 1);
62 else 62 else
63 elm_win_autodel_set(popup, 1); 63 elm_win_autodel_set(popup, 1);
64 evas_object_event_callback_add(popup, EVAS_CALLBACK_FOCUS_OUT, _popup_focus_out, NULL); 64 evas_object_event_callback_add(popup, EVAS_CALLBACK_HIDE, _popup_del, NULL);
65 65
66 mbox = elm_box_add(popup); 66 mbox = elm_box_add(popup);
67 elm_box_horizontal_set(mbox, EINA_FALSE); 67 elm_box_horizontal_set(mbox, EINA_FALSE);
diff --git a/memusage/src/memusage.c b/memusage/src/memusage.c
index 0a796f1..68d8840 100644
--- a/memusage/src/memusage.c
+++ b/memusage/src/memusage.c
@@ -33,33 +33,33 @@ _memusage_popup_update(Instance *inst)
33 val_mb = inst->cfg->memusage.mem_used / 1024; 33 val_mb = inst->cfg->memusage.mem_used / 1024;
34 val_perc = 100 * ((float)inst->cfg->memusage.mem_used / 34 val_perc = 100 * ((float)inst->cfg->memusage.mem_used /
35 (float)inst->cfg->memusage.mem_total); 35 (float)inst->cfg->memusage.mem_total);
36 snprintf(buf, sizeof(buf), "%d MB (%d %%)", val_mb, val_perc); 36 snprintf(buf, sizeof(buf), "%d MB (%d %%%%)", val_mb, val_perc);
37 elm_progressbar_value_set(pbar, (float)val_perc / 100);
38 elm_progressbar_unit_format_set(pbar, buf); 37 elm_progressbar_unit_format_set(pbar, buf);
38 elm_progressbar_value_set(pbar, (float)val_perc / 100);
39 39
40 pbar = evas_object_data_get(inst->cfg->memusage.popup, "mem_buffers_pbar"); 40 pbar = evas_object_data_get(inst->cfg->memusage.popup, "mem_buffers_pbar");
41 val_mb = inst->cfg->memusage.mem_buffers / 1024; 41 val_mb = inst->cfg->memusage.mem_buffers / 1024;
42 val_perc = 100 * ((float)inst->cfg->memusage.mem_buffers / 42 val_perc = 100 * ((float)inst->cfg->memusage.mem_buffers /
43 (float)inst->cfg->memusage.mem_total); 43 (float)inst->cfg->memusage.mem_total);
44 snprintf(buf, sizeof(buf), "%d MB (%d %%)", val_mb, val_perc); 44 snprintf(buf, sizeof(buf), "%d MB (%d %%%%)", val_mb, val_perc);
45 elm_progressbar_value_set(pbar, (float)val_perc / 100);
46 elm_progressbar_unit_format_set(pbar, buf); 45 elm_progressbar_unit_format_set(pbar, buf);
46 elm_progressbar_value_set(pbar, (float)val_perc / 100);
47 47
48 pbar = evas_object_data_get(inst->cfg->memusage.popup, "mem_cached_pbar"); 48 pbar = evas_object_data_get(inst->cfg->memusage.popup, "mem_cached_pbar");
49 val_mb = inst->cfg->memusage.mem_cached / 1024; 49 val_mb = inst->cfg->memusage.mem_cached / 1024;
50 val_perc = 100 * ((float)inst->cfg->memusage.mem_cached / 50 val_perc = 100 * ((float)inst->cfg->memusage.mem_cached /
51 (float)inst->cfg->memusage.mem_total); 51 (float)inst->cfg->memusage.mem_total);
52 snprintf(buf, sizeof(buf), "%d MB (%d %%)", val_mb, val_perc); 52 snprintf(buf, sizeof(buf), "%d MB (%d %%%%)", val_mb, val_perc);
53 elm_progressbar_value_set(pbar, (float)val_perc / 100);
54 elm_progressbar_unit_format_set(pbar, buf); 53 elm_progressbar_unit_format_set(pbar, buf);
54 elm_progressbar_value_set(pbar, (float)val_perc / 100);
55 55
56 pbar = evas_object_data_get(inst->cfg->memusage.popup, "mem_shared_pbar"); 56 pbar = evas_object_data_get(inst->cfg->memusage.popup, "mem_shared_pbar");
57 val_mb = inst->cfg->memusage.mem_shared / 1024; 57 val_mb = inst->cfg->memusage.mem_shared / 1024;
58 val_perc = 100 * ((float)inst->cfg->memusage.mem_shared / 58 val_perc = 100 * ((float)inst->cfg->memusage.mem_shared /
59 (float)inst->cfg->memusage.mem_total); 59 (float)inst->cfg->memusage.mem_total);
60 snprintf(buf, sizeof(buf), "%d MB (%d %%)", val_mb, val_perc); 60 snprintf(buf, sizeof(buf), "%d MB (%d %%%%)", val_mb, val_perc);
61 elm_progressbar_value_set(pbar, (float)val_perc / 100);
62 elm_progressbar_unit_format_set(pbar, buf); 61 elm_progressbar_unit_format_set(pbar, buf);
62 elm_progressbar_value_set(pbar, (float)val_perc / 100);
63 } 63 }
64 64
65 if (inst->cfg->memusage.swp_total) 65 if (inst->cfg->memusage.swp_total)
@@ -68,10 +68,11 @@ _memusage_popup_update(Instance *inst)
68 val_mb = inst->cfg->memusage.swp_used / 1024; 68 val_mb = inst->cfg->memusage.swp_used / 1024;
69 val_perc = 100 * ((float)inst->cfg->memusage.swp_used / 69 val_perc = 100 * ((float)inst->cfg->memusage.swp_used /
70 (float)inst->cfg->memusage.swp_total); 70 (float)inst->cfg->memusage.swp_total);
71 snprintf(buf, sizeof(buf), "%d MB (%d %%)", val_mb, val_perc); 71 snprintf(buf, sizeof(buf), "%d MB (%d %%%%)", val_mb, val_perc);
72 elm_progressbar_value_set(pbar, (float)val_perc / 100);
73 elm_progressbar_unit_format_set(pbar, buf); 72 elm_progressbar_unit_format_set(pbar, buf);
73 elm_progressbar_value_set(pbar, (float)val_perc / 100);
74 } 74 }
75
75} 76}
76 77
77static void 78static void
diff --git a/memusage/src/memusage_config.c b/memusage/src/memusage_config.c
index 242adc1..6f32d98 100644
--- a/memusage/src/memusage_config.c
+++ b/memusage/src/memusage_config.c
@@ -46,7 +46,7 @@ _config_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
46} 46}
47 47
48static void 48static void
49_popup_focus_out(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_data EINA_UNUSED) 49_popup_del(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_data EINA_UNUSED)
50{ 50{
51 evas_object_del(obj); 51 evas_object_del(obj);
52} 52}
@@ -61,7 +61,7 @@ memusage_configure(Instance *inst)
61 elm_win_alpha_set(popup, 1); 61 elm_win_alpha_set(popup, 1);
62 else 62 else
63 elm_win_autodel_set(popup, 1); 63 elm_win_autodel_set(popup, 1);
64 evas_object_event_callback_add(popup, EVAS_CALLBACK_FOCUS_OUT, _popup_focus_out, NULL); 64 evas_object_event_callback_add(popup, EVAS_CALLBACK_HIDE, _popup_del, NULL);
65 65
66 mbox = elm_box_add(popup); 66 mbox = elm_box_add(popup);
67 elm_box_horizontal_set(mbox, EINA_FALSE); 67 elm_box_horizontal_set(mbox, EINA_FALSE);
diff --git a/netstatus/src/netstatus.c b/netstatus/src/netstatus.c
index 638e1ab..c9abc7b 100644
--- a/netstatus/src/netstatus.c
+++ b/netstatus/src/netstatus.c
@@ -41,19 +41,19 @@ _netstatus_face_update(Poller_Config *pc)
41 if (pc->inst->cfg->netstatus.popup) 41 if (pc->inst->cfg->netstatus.popup)
42 { 42 {
43 char buf[4096]; 43 char buf[4096];
44 snprintf(buf, sizeof(buf), "%s (%d %%)", 44 snprintf(buf, sizeof(buf), "%s (%d %%%%)",
45 pc->inst->cfg->netstatus.instring, 45 pc->inst->cfg->netstatus.instring,
46 pc->inst->cfg->netstatus.inpercent); 46 pc->inst->cfg->netstatus.inpercent);
47 elm_progressbar_unit_format_set(pc->inst->cfg->netstatus.popup_inpbar, buf);
47 elm_progressbar_value_set(pc->inst->cfg->netstatus.popup_inpbar, 48 elm_progressbar_value_set(pc->inst->cfg->netstatus.popup_inpbar,
48 (float)pc->inst->cfg->netstatus.inpercent / 100); 49 (float)pc->inst->cfg->netstatus.inpercent / 100);
49 elm_progressbar_unit_format_set(pc->inst->cfg->netstatus.popup_inpbar, buf);
50 memset(buf, 0x00, sizeof(buf)); 50 memset(buf, 0x00, sizeof(buf));
51 snprintf(buf, sizeof(buf), "%s (%d %%)", 51 snprintf(buf, sizeof(buf), "%s (%d %%%%)",
52 pc->inst->cfg->netstatus.outstring, 52 pc->inst->cfg->netstatus.outstring,
53 pc->inst->cfg->netstatus.outpercent); 53 pc->inst->cfg->netstatus.outpercent);
54 elm_progressbar_unit_format_set(pc->inst->cfg->netstatus.popup_outpbar, buf);
54 elm_progressbar_value_set(pc->inst->cfg->netstatus.popup_outpbar, 55 elm_progressbar_value_set(pc->inst->cfg->netstatus.popup_outpbar,
55 (float)pc->inst->cfg->netstatus.outpercent / 100); 56 (float)pc->inst->cfg->netstatus.outpercent / 100);
56 elm_progressbar_unit_format_set(pc->inst->cfg->netstatus.popup_outpbar, buf);
57 } 57 }
58} 58}
59 59
@@ -113,7 +113,7 @@ _netstatus_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
113 elm_table_pack(table, label, 0, 1, 1, 1); 113 elm_table_pack(table, label, 0, 1, 1, 1);
114 evas_object_show(label); 114 evas_object_show(label);
115 115
116 snprintf(buf, sizeof(buf), "%s (%d %%)", 116 snprintf(buf, sizeof(buf), "%s (%d %%%%)",
117 inst->cfg->netstatus.instring, 117 inst->cfg->netstatus.instring,
118 inst->cfg->netstatus.inpercent); 118 inst->cfg->netstatus.inpercent);
119 119
@@ -121,6 +121,7 @@ _netstatus_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
121 evas_object_size_hint_weight_set(pbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 121 evas_object_size_hint_weight_set(pbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
122 evas_object_size_hint_align_set(pbar, EVAS_HINT_FILL, EVAS_HINT_FILL); 122 evas_object_size_hint_align_set(pbar, EVAS_HINT_FILL, EVAS_HINT_FILL);
123 elm_progressbar_span_size_set(pbar, 200 * elm_config_scale_get()); 123 elm_progressbar_span_size_set(pbar, 200 * elm_config_scale_get());
124 elm_progressbar_unit_format_set(pbar, buf);
124 elm_progressbar_value_set(pbar, (float)inst->cfg->netstatus.inpercent / 100); 125 elm_progressbar_value_set(pbar, (float)inst->cfg->netstatus.inpercent / 100);
125 elm_table_pack(table, pbar, 1, 1, 1, 1); 126 elm_table_pack(table, pbar, 1, 1, 1, 1);
126 evas_object_show(pbar); 127 evas_object_show(pbar);
@@ -133,7 +134,7 @@ _netstatus_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
133 evas_object_show(label); 134 evas_object_show(label);
134 135
135 memset(buf, 0x00, sizeof(buf)); 136 memset(buf, 0x00, sizeof(buf));
136 snprintf(buf, sizeof(buf), "%s (%d %%)", 137 snprintf(buf, sizeof(buf), "%s (%d %%%%)",
137 inst->cfg->netstatus.outstring, 138 inst->cfg->netstatus.outstring,
138 inst->cfg->netstatus.outpercent); 139 inst->cfg->netstatus.outpercent);
139 140
@@ -141,8 +142,8 @@ _netstatus_mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
141 evas_object_size_hint_weight_set(pbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 142 evas_object_size_hint_weight_set(pbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
142 evas_object_size_hint_align_set(pbar, EVAS_HINT_FILL, EVAS_HINT_FILL); 143 evas_object_size_hint_align_set(pbar, EVAS_HINT_FILL, EVAS_HINT_FILL);
143 elm_progressbar_span_size_set(pbar, 200 * elm_config_scale_get()); 144 elm_progressbar_span_size_set(pbar, 200 * elm_config_scale_get());
144 elm_progressbar_value_set(pbar, (float)inst->cfg->netstatus.outpercent / 100);
145 elm_progressbar_unit_format_set(pbar, buf); 145 elm_progressbar_unit_format_set(pbar, buf);
146 elm_progressbar_value_set(pbar, (float)inst->cfg->netstatus.outpercent / 100);
146 elm_table_pack(table, pbar, 1, 2, 1, 1); 147 elm_table_pack(table, pbar, 1, 2, 1, 1);
147 evas_object_show(pbar); 148 evas_object_show(pbar);
148 inst->cfg->netstatus.popup_outpbar = pbar; 149 inst->cfg->netstatus.popup_outpbar = pbar;
diff --git a/netstatus/src/netstatus_config.c b/netstatus/src/netstatus_config.c
index 8079672..6e99f20 100644
--- a/netstatus/src/netstatus_config.c
+++ b/netstatus/src/netstatus_config.c
@@ -161,7 +161,7 @@ _check_changed(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_U
161} 161}
162 162
163static void 163static void
164_popup_focus_out(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_data EINA_UNUSED) 164_popup_del(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_data EINA_UNUSED)
165{ 165{
166 evas_object_del(obj); 166 evas_object_del(obj);
167} 167}
@@ -180,7 +180,7 @@ netstatus_configure(Instance *inst)
180 elm_win_alpha_set(popup, 1); 180 elm_win_alpha_set(popup, 1);
181 else 181 else
182 elm_win_autodel_set(popup, 1); 182 elm_win_autodel_set(popup, 1);
183 evas_object_event_callback_add(popup, EVAS_CALLBACK_FOCUS_OUT, _popup_focus_out, NULL); 183 evas_object_event_callback_add(popup, EVAS_CALLBACK_HIDE, _popup_del, NULL);
184 184
185 main_box = elm_box_add(popup); 185 main_box = elm_box_add(popup);
186 elm_box_horizontal_set(main_box, EINA_FALSE); 186 elm_box_horizontal_set(main_box, EINA_FALSE);
diff --git a/thermal/src/thermal.c b/thermal/src/thermal.c
index af01b76..7bfdb0b 100644
--- a/thermal/src/thermal.c
+++ b/thermal/src/thermal.c
@@ -150,11 +150,11 @@ _thermal_popup_create(Instance *inst)
150 evas_object_show(label); 150 evas_object_show(label);
151 151
152 if (inst->cfg->thermal.units == FAHRENHEIT) 152 if (inst->cfg->thermal.units == FAHRENHEIT)
153 snprintf(buf, sizeof(buf), "%d F (%d %%)", 153 snprintf(buf, sizeof(buf), "%d F (%d %%%%)",
154 (int)((inst->cfg->thermal.temp * 9.0 / 5.0) + 32), 154 (int)((inst->cfg->thermal.temp * 9.0 / 5.0) + 32),
155 inst->cfg->thermal.percent); 155 inst->cfg->thermal.percent);
156 else 156 else
157 snprintf(buf, sizeof(buf), "%d C (%d %%)", 157 snprintf(buf, sizeof(buf), "%d C (%d %%%%)",
158 (int)inst->cfg->thermal.temp, 158 (int)inst->cfg->thermal.temp,
159 inst->cfg->thermal.percent); 159 inst->cfg->thermal.percent);
160 160
@@ -162,8 +162,8 @@ _thermal_popup_create(Instance *inst)
162 evas_object_size_hint_weight_set(pbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 162 evas_object_size_hint_weight_set(pbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
163 evas_object_size_hint_align_set(pbar, EVAS_HINT_FILL, EVAS_HINT_FILL);; 163 evas_object_size_hint_align_set(pbar, EVAS_HINT_FILL, EVAS_HINT_FILL);;
164 elm_progressbar_span_size_set(pbar, 200 * elm_config_scale_get()); 164 elm_progressbar_span_size_set(pbar, 200 * elm_config_scale_get());
165 elm_progressbar_value_set(pbar, (float)inst->cfg->thermal.percent / 100);
166 elm_progressbar_unit_format_set(pbar, buf); 165 elm_progressbar_unit_format_set(pbar, buf);
166 elm_progressbar_value_set(pbar, (float)inst->cfg->thermal.percent / 100);
167 elm_table_pack(table, pbar, 0, 1, 2, 1); 167 elm_table_pack(table, pbar, 0, 1, 2, 1);
168 evas_object_show(pbar); 168 evas_object_show(pbar);
169 inst->cfg->thermal.popup_pbar = pbar; 169 inst->cfg->thermal.popup_pbar = pbar;
diff --git a/thermal/src/thermal_config.c b/thermal/src/thermal_config.c
index 75a6355..7fca6a3 100644
--- a/thermal/src/thermal_config.c
+++ b/thermal/src/thermal_config.c
@@ -131,7 +131,7 @@ _poll_changed(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
131} 131}
132 132
133static void 133static void
134_popup_focus_out(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_data EINA_UNUSED) 134_popup_del(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_data EINA_UNUSED)
135{ 135{
136 evas_object_del(obj); 136 evas_object_del(obj);
137} 137}
@@ -149,7 +149,7 @@ thermal_configure(Instance *inst)
149 elm_win_alpha_set(popup, 1); 149 elm_win_alpha_set(popup, 1);
150 else 150 else
151 elm_win_autodel_set(popup, 1); 151 elm_win_autodel_set(popup, 1);
152 evas_object_event_callback_add(popup, EVAS_CALLBACK_FOCUS_OUT, _popup_focus_out, NULL); 152 evas_object_event_callback_add(popup, EVAS_CALLBACK_HIDE, _popup_del, NULL);
153 153
154 tb = elm_table_add(popup); 154 tb = elm_table_add(popup);
155 evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 155 evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);