efl_ui_spin_button: use the newly emitted event from range_interactive
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Wed, 31 Jul 2019 15:49:44 +0000 (17:49 +0200)
committerWooHyun Jung <wh0705.jung@samsung.com>
Mon, 5 Aug 2019 02:50:59 +0000 (11:50 +0900)
this event is not also in range_interactive, so better use this.

ref T8097

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9459

src/bin/elementary/test_ui_spin_button.c
src/lib/elementary/efl_ui_spin_button.c
src/lib/elementary/efl_ui_spin_button.eo
src/tests/elementary/efl_ui_test_spin_button.c

index 511c1d4..2bfb7b2 100644 (file)
@@ -43,7 +43,7 @@ test_ui_spin_button(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
            efl_ui_range_step_set(efl_added, 2),
            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_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),
            efl_pack(bx, efl_added));
 
index 1c64acf..553c363 100644 (file)
@@ -116,7 +116,7 @@ _label_write(Evas_Object *obj)
 static Eina_Value
 _delay_change_timer_cb(Eo *o, void *data EINA_UNUSED, const Eina_Value v)
 {
-   efl_event_callback_call(o, EFL_UI_SPIN_BUTTON_EVENT_DELAY_CHANGED, NULL);
+   efl_event_callback_call(o, EFL_UI_RANGE_EVENT_STEADY, NULL);
 
    return v;
 }
index bf68be8..2affb77 100644 (file)
@@ -73,7 +73,4 @@ class @beta Efl.Ui.Spin_Button extends Efl.Ui.Spin implements Efl.Ui.Focus.Compo
       Efl.Access.Value.increment { get; }
       Efl.Access.Widget.Action.elm_actions { get; }
    }
-   events {
-      delay,changed: void; [[Called when spin delay is changed.]]
-   }
 }
index e3a5ed6..d44f817 100644 (file)
@@ -89,7 +89,7 @@ EFL_START_TEST (spin_value_inc)
    efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_CHANGED, _set_flag, &changed);
    efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MIN_REACHED, _set_flag, &min_reached);
    efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MAX_REACHED, _set_flag, &max_reached);
-   efl_event_callback_add(spin, EFL_UI_SPIN_BUTTON_EVENT_DELAY_CHANGED, _set_flag_quit, &delay_changed);
+   efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_STEADY, _set_flag_quit, &delay_changed);
 
    click_spin_part(spin, "efl.inc_button");
 
@@ -114,7 +114,7 @@ EFL_START_TEST (spin_value_inc_max)
    efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_CHANGED, _set_flag, &changed);
    efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MIN_REACHED, _set_flag, &min_reached);
    efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MAX_REACHED, _set_flag, &max_reached);
-   efl_event_callback_add(spin, EFL_UI_SPIN_BUTTON_EVENT_DELAY_CHANGED, _set_flag_quit, &delay_changed);
+   efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_STEADY, _set_flag_quit, &delay_changed);
 
    click_spin_part(spin, "efl.inc_button");
 
@@ -139,7 +139,7 @@ EFL_START_TEST (spin_value_dec_min)
    efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_CHANGED, _set_flag, &changed);
    efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MIN_REACHED, _set_flag, &min_reached);
    efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_MAX_REACHED, _set_flag, &max_reached);
-   efl_event_callback_add(spin, EFL_UI_SPIN_BUTTON_EVENT_DELAY_CHANGED, _set_flag_quit, &delay_changed);
+   efl_event_callback_add(spin, EFL_UI_RANGE_EVENT_STEADY, _set_flag_quit, &delay_changed);
 
    click_spin_part(spin, "efl.dec_button");