EOLIAN static void
_elm_spinner_label_format_set(Eo *obj, Elm_Spinner_Data *sd, const char *fmt)
{
- Elm_Spinner_Format_Type type;
+ Elm_Spinner_Format_Type type = SPINNER_FORMAT_INVALID;
- if (!fmt) fmt = "%.0f";
- type = _is_label_format_integer(fmt);
- if (type == SPINNER_FORMAT_INVALID)
+ if (fmt)
{
- ERR("format:\"%s\" is invalid, cannot be set", fmt);
- return;
- }
- else if (type == SPINNER_FORMAT_FLOAT)
- {
- sd->decimal_points = _decimal_points_get(fmt);
+ type = _is_label_format_integer(fmt);
+ if (type == SPINNER_FORMAT_INVALID)
+ {
+ ERR("format:\"%s\" is invalid, cannot be set", fmt);
+ return;
+ }
+ else if (type == SPINNER_FORMAT_FLOAT)
+ {
+ sd->decimal_points = _decimal_points_get(fmt);
+ }
}
eina_stringshare_replace(&sd->label, fmt);