aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/elementary/test_progressbar.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-02-10 14:38:29 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-02-10 16:43:23 +0900
commitdc8da37878d143ff41986cf2aeb486d0d8f0284d (patch)
tree77e7ad47ee6b51d992c9fcde21c1d7a003b496f4 /src/bin/elementary/test_progressbar.c
parentelm: Fix double shutdowns of ecore_x and ecore_wl2 (diff)
downloadefl-dc8da37878d143ff41986cf2aeb486d0d8f0284d.tar.gz
elm - make progress test code a little more solid and nice to read
use sizeof the buffer rather than constant in snprint and 0.5 rather than .50 which almost looks like a typo... :) also use correct escape for % (%%%% so it becoems %% which is correct for a fmt string yto produce %)
Diffstat (limited to 'src/bin/elementary/test_progressbar.c')
-rw-r--r--src/bin/elementary/test_progressbar.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/elementary/test_progressbar.c b/src/bin/elementary/test_progressbar.c
index 3599c72f21..371c902bf0 100644
--- a/src/bin/elementary/test_progressbar.c
+++ b/src/bin/elementary/test_progressbar.c
@@ -164,7 +164,7 @@ test_progressbar(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
elm_box_pack_end(bx, hbx);
evas_object_show(hbx);
- snprintf(form, 20, "%d percent (%d %%)", 50, 50);
+ snprintf(form, sizeof(form), "%d percent (%d%%%%)", 50, 50);
pb = elm_progressbar_add(win);
elm_progressbar_horizontal_set(pb, EINA_FALSE);
@@ -172,7 +172,7 @@ test_progressbar(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(hbx, pb);
elm_progressbar_unit_format_set(pb, form);
- elm_progressbar_value_set(pb, .50);
+ elm_progressbar_value_set(pb, 0.5);
elm_object_text_set(pb, "percent");
evas_object_show(pb);
pd->pb4 = pb;