Commit Graph

12 Commits

Author SHA1 Message Date
Stephen Houston b4112b9735 efl/ui_format: Use STRING type for format strings that contain %%
Summary: This fixes progressbar format strings that contain the pattern %%, thus making it a string and not a format.

Test Plan: elementary_test progressbar shows %% on the first vertical progressbar before this patch.  afterwords it shows % correctly.

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6790
2018-08-08 14:57:32 -04:00
Carsten Haitzler be770d37fb efl ui fmt - make strbuf simpler and dont use printf to avoid warnings
if someone turns on a lot of warning flags this is a warning (fals as
the string is checked already for having a static format - no fmt
flags, thus printf is valid).
2018-05-03 14:22:23 +09:00
Daniel Kolesa fcae7cab27 eolian gen: enable constness generation on property getter impls
This changes a lot of things all across the EFL. Previously,
methods tagged @const had both their external prototype and
internal impl generated with const on object, while property
getters only had const on the external API. This is now changed
and it all has const everywhere.

Ref T6859.
2018-04-17 20:31:55 +02:00
Carsten Haitzler e96532f65c efl ui format - fix format checking to be correct
the format string checking was just ... wrong. it didnt' handle %%. it
didn't handle constant strings with no format in them... now it does.

fixes T6697

@fix
2018-02-10 16:44:38 +09:00
Jean-Philippe Andre 832e12e8c4 format: Fixup the string format implementation
Use eina value convert and to_string. Do not fail.
This removes unreachable code by making it active (to_string).

Fixes T6204
2017-12-12 11:38:35 +09:00
Amitesh Singh e8ae4178d8 Efl.Ui.Format: do format check once only. 2017-11-28 17:05:31 +09:00
Amitesh Singh e97d00d598 Efl.Ui.Format: do proper checking for string template.
Add support to take action based on string format specifier.

If string template is '%d' and value type is double, do safe
conversion to int from double.
2017-11-28 12:16:48 +09:00
Amitesh Singh 952593eef2 Efl.Ui.Format: remove the dupicalte code
struct tm check is already done at the beginning of the function.
2017-11-27 16:55:04 +09:00
Amitesh Singh 475ae7ef1b Efl.Ui.Format: add string format checking for user input 2017-11-24 14:58:15 +09:00
Amitesh Singh 302cc259ff Efl.Ui.Format: Add support for "struct tm" in string format. 2017-11-14 10:54:41 +09:00
Amitesh Singh d6c9b37925 Efl.Ui.Slider: implement Slider.part & Ui.format functions
indicator_format_set/get & indicator_format_function_set are
now legacy APIs.
indicator format can be set by using generic Ui.Format function
e.g.
efl_ui_format_string_set(efl_part(sliderObj, "indicator"), "1.0%f");
2017-11-07 17:13:44 +09:00
Amitesh Singh 5298cb59d2 Efl.Ui.Format: implement generic format_string function
This generic format_string would be used in slider,progressbar
and other widgets.This default function handles INT
and DOUBLE eina value types for now.

Ref T6204
2017-10-26 21:11:36 +09:00