From: Marcel Hollerbach Date: Wed, 31 Jul 2019 16:06:43 +0000 (+0200) Subject: efl_ui_spin_button: rename circulate to wraparound X-Git-Tag: submit/tizen/20190805.083058~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f12d121ba17433c58fd7addcd88f40568b913737;p=platform%2Fupstream%2Fefl.git efl_ui_spin_button: rename circulate to wraparound ref T8097 Reviewed-by: Xavi Artigas Differential Revision: https://phab.enlightenment.org/D9461 --- diff --git a/src/bin/elementary/test_ui_spin_button.c b/src/bin/elementary/test_ui_spin_button.c index 2bfb7b2..e6b3135 100644 --- a/src/bin/elementary/test_ui_spin_button.c +++ b/src/bin/elementary/test_ui_spin_button.c @@ -41,7 +41,7 @@ test_ui_spin_button(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void * efl_ui_range_limits_set(efl_added, 0, 10), efl_ui_range_value_set(efl_added, 6), efl_ui_range_step_set(efl_added, 2), - efl_ui_spin_button_circulate_set(efl_added, EINA_TRUE), + efl_ui_spin_button_wraparound_set(efl_added, EINA_TRUE), efl_ui_spin_button_editable_set(efl_added, EINA_TRUE), efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_STEADY,_spin_delay_changed_cb, NULL), efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED, _spin_changed_cb, NULL), diff --git a/src/lib/elementary/efl_ui_datepicker.c b/src/lib/elementary/efl_ui_datepicker.c index 1aa472d..0a4a39b 100644 --- a/src/lib/elementary/efl_ui_datepicker.c +++ b/src/lib/elementary/efl_ui_datepicker.c @@ -161,21 +161,21 @@ _fields_init(Eo *obj) //Field create. pd->year = efl_add(EFL_UI_SPIN_BUTTON_CLASS, obj, efl_ui_range_limits_set(efl_added, 1900, 2037), - efl_ui_spin_button_circulate_set(efl_added, EINA_TRUE), + efl_ui_spin_button_wraparound_set(efl_added, EINA_TRUE), efl_ui_spin_button_editable_set(efl_added, EINA_TRUE), efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_VERTICAL), efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED,_field_changed_cb, obj)); pd->month = efl_add(EFL_UI_SPIN_BUTTON_CLASS, obj, efl_ui_range_limits_set(efl_added, 1, 12), - efl_ui_spin_button_circulate_set(efl_added, EINA_TRUE), + efl_ui_spin_button_wraparound_set(efl_added, EINA_TRUE), efl_ui_spin_button_editable_set(efl_added, EINA_TRUE), efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_VERTICAL), efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED,_field_changed_cb, obj)); pd->day = efl_add(EFL_UI_SPIN_BUTTON_CLASS, obj, efl_ui_range_limits_set(efl_added, 1, 31), - efl_ui_spin_button_circulate_set(efl_added, EINA_TRUE), + efl_ui_spin_button_wraparound_set(efl_added, EINA_TRUE), efl_ui_spin_button_editable_set(efl_added, EINA_TRUE), efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_VERTICAL), efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED,_field_changed_cb, obj)); diff --git a/src/lib/elementary/efl_ui_spin_button.c b/src/lib/elementary/efl_ui_spin_button.c index 553c363..cfd13cf 100644 --- a/src/lib/elementary/efl_ui_spin_button.c +++ b/src/lib/elementary/efl_ui_spin_button.c @@ -137,7 +137,7 @@ _value_set(Evas_Object *obj, Efl_Ui_Spin_Data *pd = efl_data_scope_get(obj, EFL_UI_SPIN_CLASS); Eina_Future *f; - if (sd->circulate) + if (sd->wraparound) { if (new_val < pd->val_min) new_val = pd->val_max; @@ -732,15 +732,15 @@ _efl_ui_spin_button_editable_get(const Eo *obj EINA_UNUSED, Efl_Ui_Spin_Button_D } EOLIAN static void -_efl_ui_spin_button_circulate_set(Eo *obj EINA_UNUSED, Efl_Ui_Spin_Button_Data *sd, Eina_Bool circulate) +_efl_ui_spin_button_wraparound_set(Eo *obj EINA_UNUSED, Efl_Ui_Spin_Button_Data *sd, Eina_Bool wraparound) { - sd->circulate = circulate; + sd->wraparound = wraparound; } EOLIAN static Eina_Bool -_efl_ui_spin_button_circulate_get(const Eo *obj EINA_UNUSED, Efl_Ui_Spin_Button_Data *sd) +_efl_ui_spin_button_wraparound_get(const Eo *obj EINA_UNUSED, Efl_Ui_Spin_Button_Data *sd) { - return sd->circulate; + return sd->wraparound; } EOLIAN static const Efl_Access_Action_Data * diff --git a/src/lib/elementary/efl_ui_spin_button.eo b/src/lib/elementary/efl_ui_spin_button.eo index 2affb77..a4ec1c6 100644 --- a/src/lib/elementary/efl_ui_spin_button.eo +++ b/src/lib/elementary/efl_ui_spin_button.eo @@ -8,7 +8,7 @@ class @beta Efl.Ui.Spin_Button extends Efl.Ui.Spin implements Efl.Ui.Focus.Compo over them and inputting new ones. ]] methods { - @property circulate { + @property wraparound { [[Control whether the spin should circulate value when it reaches its minimum or maximum value. Disabled by default. If disabled, when the user tries to increment the diff --git a/src/lib/elementary/efl_ui_spin_button_private.h b/src/lib/elementary/efl_ui_spin_button_private.h index 5c6d0a9..daab1ad 100644 --- a/src/lib/elementary/efl_ui_spin_button_private.h +++ b/src/lib/elementary/efl_ui_spin_button_private.h @@ -12,7 +12,7 @@ struct _Efl_Ui_Spin_Button_Data Eina_Bool entry_visible : 1; Eina_Bool entry_reactivate : 1; Eina_Bool editable : 1; - Eina_Bool circulate : 1; + Eina_Bool wraparound : 1; }; #endif diff --git a/src/lib/elementary/efl_ui_timepicker.c b/src/lib/elementary/efl_ui_timepicker.c index 4e02665..a1ca671 100644 --- a/src/lib/elementary/efl_ui_timepicker.c +++ b/src/lib/elementary/efl_ui_timepicker.c @@ -123,14 +123,14 @@ _fields_init(Eo *obj) //Field create. pd->hour = efl_add(EFL_UI_SPIN_BUTTON_CLASS, obj, efl_ui_range_limits_set(efl_added, 1, 12), - efl_ui_spin_button_circulate_set(efl_added, EINA_TRUE), + efl_ui_spin_button_wraparound_set(efl_added, EINA_TRUE), efl_ui_spin_button_editable_set(efl_added, EINA_TRUE), efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_VERTICAL), efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED,_field_changed_cb, obj)); pd->min = efl_add(EFL_UI_SPIN_BUTTON_CLASS, obj, efl_ui_range_limits_set(efl_added, 0, 59), - efl_ui_spin_button_circulate_set(efl_added, EINA_TRUE), + efl_ui_spin_button_wraparound_set(efl_added, EINA_TRUE), efl_ui_spin_button_editable_set(efl_added, EINA_TRUE), efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_VERTICAL), efl_event_callback_add(efl_added, EFL_UI_RANGE_EVENT_CHANGED,_field_changed_cb, obj));