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) 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) 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; _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_object_efl_ui_base_scale_set(Eo *obj EINA_UNUSED, Edje *ed, double scale)
{ {
Edje *ged; Edje *ged;
@ -371,7 +371,7 @@ _edje_object_efl_ui_base_scale_set(Eo *obj EINA_UNUSED, Edje *ed, double scale)
Eina_List *l; Eina_List *l;
unsigned short i; 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); ed->scale = FROM_DOUBLE(scale);
EINA_LIST_FOREACH(ed->groups, l, ged) EINA_LIST_FOREACH(ed->groups, l, ged)
edje_object_scale_set(ged->obj, scale); 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); _edje_recalc(ed);
return EINA_TRUE;
} }
EOLIAN double EOLIAN double

View File

@ -48,7 +48,6 @@ interface Efl.Ui.Base
]] ]]
set { set {
[[Sets the scaling factor of an object.]] [[Sets the scaling factor of an object.]]
return: bool; [[$true on success, $false otherwise]]
} }
get { get {
[[Gets an object's scaling factor.]] [[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; 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) _elm_widget_efl_ui_base_scale_set(Eo *obj, Elm_Widget_Smart_Data *sd, double scale)
{ {
if (scale < 0.0) scale = 0.0; 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; sd->scale = scale;
elm_widget_theme(obj); elm_widget_theme(obj);
} }
return EINA_TRUE;
} }
EOLIAN static double EOLIAN static double