efl_ui_format: fix to display %% and unknown format element
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Fri, 1 Feb 2019 08:13:39 +0000 (08:13 +0000)
committerWonki Kim <wonki_.kim@samsung.com>
Fri, 8 Mar 2019 11:49:33 +0000 (20:49 +0900)
commit5f84a89c9d174ed6242a65b2e4ed26d2e339be44
tree8c0426831c20fd2556bc6a3934c75ff8c77e6423
parent61dd0643ca155f7ab05ebcf87bdc11c738601675
efl_ui_format: fix to display %% and unknown format element

This fixes 2 things as follows.

1. Displays format string "%%" as "%".
   Like printf does, "%%" is displayed as "%".

2. Displays unknown format element as it is.
   In format string "(50%)", ")" is an unknown format element.
   Although format string has unknown format element, the format string
   is displayed like printf does.

The cause of the issue displaying "0%" which was mentioned on
a96933f964b1757b9d9f8a4cce14d883f35a6665 is as follows.

The default format string of progressbar is set as "%.0f%%".
Therefore, if progressbar's format string is not set, then "%" postfix
is always displayed.

This commit reverts commit a96933f964b1757b9d9f8a4cce14d883f35a6665.
This commit restores commit b4112b9735ce75bce95974a257aa1880fa52a6bf.
This commit restores commit be770d37fb05b8486907796dd16f4635bceb4ce1.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7856
src/lib/efl/interfaces/efl_ui_format.c