forked from enlightenment/efl
efl_ui_spin_button: Change property name to avoid name duplicating.
Summary: The name 'loop' is already there in efl canvas. loop -> circulate. Test Plan: elementary_test -> efl_ui_spin_button test. Reviewers: jpeg, Jaehyun_Cho, woohyun Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D5639
This commit is contained in:
parent
bb68d84e78
commit
4b2f1abc9f
|
@ -27,7 +27,7 @@ test_ui_spin_button(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
|
|||
efl_ui_range_min_max_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_loop_set(efl_added, EINA_TRUE),
|
||||
efl_ui_spin_button_circulate_set(efl_added, EINA_TRUE),
|
||||
efl_ui_spin_button_editable_set(efl_added, EINA_TRUE),
|
||||
efl_event_callback_add(efl_added, EFL_UI_SPIN_BUTTON_EVENT_DELAY_CHANGED,_spin_delay_changed_cb, NULL),
|
||||
efl_pack(bx, efl_added));
|
||||
|
|
|
@ -135,7 +135,7 @@ _value_set(Evas_Object *obj,
|
|||
Efl_Ui_Spin_Button_Data *sd = efl_data_scope_get(obj, MY_CLASS);
|
||||
Efl_Ui_Spin_Data *pd = efl_data_scope_get(obj, EFL_UI_SPIN_CLASS);
|
||||
|
||||
if (sd->loop)
|
||||
if (sd->circulate)
|
||||
{
|
||||
if (new_val < pd->val_min)
|
||||
new_val = pd->val_max;
|
||||
|
@ -820,15 +820,15 @@ _efl_ui_spin_button_editable_get(Eo *obj EINA_UNUSED, Efl_Ui_Spin_Button_Data *s
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_spin_button_loop_set(Eo *obj EINA_UNUSED, Efl_Ui_Spin_Button_Data *sd, Eina_Bool loop)
|
||||
_efl_ui_spin_button_circulate_set(Eo *obj EINA_UNUSED, Efl_Ui_Spin_Button_Data *sd, Eina_Bool circulate)
|
||||
{
|
||||
sd->loop = loop;
|
||||
sd->circulate = circulate;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_spin_button_loop_get(Eo *obj EINA_UNUSED, Efl_Ui_Spin_Button_Data *sd)
|
||||
_efl_ui_spin_button_circulate_get(Eo *obj EINA_UNUSED, Efl_Ui_Spin_Button_Data *sd)
|
||||
{
|
||||
return sd->loop;
|
||||
return sd->circulate;
|
||||
}
|
||||
|
||||
EOLIAN static const Efl_Access_Action_Data *
|
||||
|
|
|
@ -10,8 +10,8 @@ class Efl.Ui.Spin_Button (Efl.Ui.Spin, Efl.Ui.Focus.Composition,
|
|||
@since 1.21
|
||||
]]
|
||||
methods {
|
||||
@property loop {
|
||||
[[Control whether the spin should loop when it reaches its minimum or maximum value.
|
||||
@property circulate {
|
||||
[[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
|
||||
value,
|
||||
|
@ -21,7 +21,7 @@ class Efl.Ui.Spin_Button (Efl.Ui.Spin, Efl.Ui.Focus.Composition,
|
|||
but the value less step is less than minimum value. In this case,
|
||||
the new displayed value will be the minimum value.
|
||||
|
||||
When loop is enabled, when the user tries to increment the value,
|
||||
When this is enabled, when the user tries to increment the value,
|
||||
but displayed value plus step value is bigger than maximum value,
|
||||
the new value will be the minimum value. When the the user tries to
|
||||
decrement it, but the value less step is less than minimum value,
|
||||
|
@ -40,7 +40,7 @@ class Efl.Ui.Spin_Button (Efl.Ui.Spin, Efl.Ui.Focus.Composition,
|
|||
get {
|
||||
}
|
||||
values {
|
||||
loop: bool(false); [[$true to enable loop or $false to disable it.]]
|
||||
circulate: bool(false); [[$true to enable circulate or $false to disable it.]]
|
||||
}
|
||||
}
|
||||
@property editable {
|
||||
|
|
|
@ -14,7 +14,7 @@ struct _Efl_Ui_Spin_Button_Data
|
|||
Eina_Bool entry_reactivate : 1;
|
||||
Eina_Bool editable : 1;
|
||||
Eina_Bool inc_val : 1;
|
||||
Eina_Bool loop : 1;
|
||||
Eina_Bool circulate : 1;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue