summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-06-09 16:51:43 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-06-12 11:50:30 +0900
commit2dc29cfbfd55bf3004a41ee622e752f772b05eab (patch)
treefbf296216097a234df7caf9319dfbdba8755b360
parent06b14827b7818cf3606d3783c7fb032bd41b1e50 (diff)
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.
-rw-r--r--src/lib/edje/edje_legacy.c3
-rw-r--r--src/lib/edje/edje_util.c6
-rw-r--r--src/lib/efl/interfaces/efl_ui_base.eo1
-rw-r--r--src/lib/elementary/elm_widget.c3
4 files changed, 5 insertions, 8 deletions
diff --git a/src/lib/edje/edje_legacy.c b/src/lib/edje/edje_legacy.c
index 3fcedce..7658608 100644
--- a/src/lib/edje/edje_legacy.c
+++ b/src/lib/edje/edje_legacy.c
@@ -120,7 +120,8 @@ EAPI const char *edje_object_language_get(const Edje_Object *obj)
120 120
121EAPI Eina_Bool edje_object_scale_set(Edje_Object *obj, double scale) 121EAPI Eina_Bool edje_object_scale_set(Edje_Object *obj, double scale)
122{ 122{
123 return efl_ui_scale_set(obj, scale); 123 efl_ui_scale_set(obj, scale);
124 return EINA_TRUE;
124} 125}
125 126
126EAPI double edje_object_scale_get(const Edje_Object *obj) 127EAPI double edje_object_scale_get(const Edje_Object *obj)
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index db1d0d0..e76077e 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -363,7 +363,7 @@ edje_password_show_last_timeout_set(double password_show_last_timeout)
363 _edje_password_show_last_timeout = password_show_last_timeout; 363 _edje_password_show_last_timeout = password_show_last_timeout;
364} 364}
365 365
366EOLIAN Eina_Bool 366EOLIAN void
367_edje_object_efl_ui_base_scale_set(Eo *obj EINA_UNUSED, Edje *ed, double scale) 367_edje_object_efl_ui_base_scale_set(Eo *obj EINA_UNUSED, Edje *ed, double scale)
368{ 368{
369 Edje *ged; 369 Edje *ged;
@@ -371,7 +371,7 @@ _edje_object_efl_ui_base_scale_set(Eo *obj EINA_UNUSED, Edje *ed, double scale)
371 Eina_List *l; 371 Eina_List *l;
372 unsigned short i; 372 unsigned short i;
373 373
374 if (EQ(ed->scale, FROM_DOUBLE(scale))) return EINA_TRUE; 374 if (EQ(ed->scale, FROM_DOUBLE(scale))) return;
375 ed->scale = FROM_DOUBLE(scale); 375 ed->scale = FROM_DOUBLE(scale);
376 EINA_LIST_FOREACH(ed->groups, l, ged) 376 EINA_LIST_FOREACH(ed->groups, l, ged)
377 edje_object_scale_set(ged->obj, scale); 377 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)
387 } 387 }
388 } 388 }
389 _edje_recalc(ed); 389 _edje_recalc(ed);
390
391 return EINA_TRUE;
392} 390}
393 391
394EOLIAN double 392EOLIAN double
diff --git a/src/lib/efl/interfaces/efl_ui_base.eo b/src/lib/efl/interfaces/efl_ui_base.eo
index 8e49edb..b4bd11d 100644
--- a/src/lib/efl/interfaces/efl_ui_base.eo
+++ b/src/lib/efl/interfaces/efl_ui_base.eo
@@ -48,7 +48,6 @@ interface Efl.Ui.Base
48 ]] 48 ]]
49 set { 49 set {
50 [[Sets the scaling factor of an object.]] 50 [[Sets the scaling factor of an object.]]
51 return: bool; [[$true on success, $false otherwise]]
52 } 51 }
53 get { 52 get {
54 [[Gets an object's scaling factor.]] 53 [[Gets an object's scaling factor.]]
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index 5c50d51..c3abb76 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -3664,7 +3664,7 @@ _elm_widget_scroll_freeze_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
3664 return sd->scroll_freeze; 3664 return sd->scroll_freeze;
3665} 3665}
3666 3666
3667EOLIAN static Eina_Bool 3667EOLIAN static void
3668_elm_widget_efl_ui_base_scale_set(Eo *obj, Elm_Widget_Smart_Data *sd, double scale) 3668_elm_widget_efl_ui_base_scale_set(Eo *obj, Elm_Widget_Smart_Data *sd, double scale)
3669{ 3669{
3670 if (scale < 0.0) scale = 0.0; 3670 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
3673 sd->scale = scale; 3673 sd->scale = scale;
3674 elm_widget_theme(obj); 3674 elm_widget_theme(obj);
3675 } 3675 }
3676 return EINA_TRUE;
3677} 3676}
3678 3677
3679EOLIAN static double 3678EOLIAN static double