edje: Remove bool return from scale_set

It was always returning true. There is little point in returning
a bool here, an invalid scale value (eg. <= 0) wouuld lead to a
state where scale_get() != scale_set() and that's about it.
This commit is contained in:
Jean-Philippe Andre 2017-06-09 16:51:43 +09:00
parent 06b14827b7
commit 2dc29cfbfd
4 changed files with 5 additions and 8 deletions

View File

@ -120,7 +120,8 @@ EAPI const char *edje_object_language_get(const Edje_Object *obj)
EAPI Eina_Bool edje_object_scale_set(Edje_Object *obj, double scale)
{
return efl_ui_scale_set(obj, scale);
efl_ui_scale_set(obj, scale);
return EINA_TRUE;
}
EAPI double edje_object_scale_get(const Edje_Object *obj)

View File

@ -363,7 +363,7 @@ edje_password_show_last_timeout_set(double password_show_last_timeout)
_edje_password_show_last_timeout = password_show_last_timeout;
}
EOLIAN Eina_Bool
EOLIAN void
_edje_object_efl_ui_base_scale_set(Eo *obj EINA_UNUSED, Edje *ed, double scale)
{
Edje *ged;
@ -371,7 +371,7 @@ _edje_object_efl_ui_base_scale_set(Eo *obj EINA_UNUSED, Edje *ed, double scale)
Eina_List *l;
unsigned short i;
if (EQ(ed->scale, FROM_DOUBLE(scale))) return EINA_TRUE;
if (EQ(ed->scale, FROM_DOUBLE(scale))) return;
ed->scale = FROM_DOUBLE(scale);
EINA_LIST_FOREACH(ed->groups, l, ged)
edje_object_scale_set(ged->obj, scale);
@ -387,8 +387,6 @@ _edje_object_efl_ui_base_scale_set(Eo *obj EINA_UNUSED, Edje *ed, double scale)
}
}
_edje_recalc(ed);
return EINA_TRUE;
}
EOLIAN double

View File

@ -48,7 +48,6 @@ interface Efl.Ui.Base
]]
set {
[[Sets the scaling factor of an object.]]
return: bool; [[$true on success, $false otherwise]]
}
get {
[[Gets an object's scaling factor.]]

View File

@ -3664,7 +3664,7 @@ _elm_widget_scroll_freeze_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
return sd->scroll_freeze;
}
EOLIAN static Eina_Bool
EOLIAN static void
_elm_widget_efl_ui_base_scale_set(Eo *obj, Elm_Widget_Smart_Data *sd, double scale)
{
if (scale < 0.0) scale = 0.0;
@ -3673,7 +3673,6 @@ _elm_widget_efl_ui_base_scale_set(Eo *obj, Elm_Widget_Smart_Data *sd, double sca
sd->scale = scale;
elm_widget_theme(obj);
}
return EINA_TRUE;
}
EOLIAN static double