woohyun pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=23877f2c447e4377bca1f40ae5c3e0b50d43dcb2

commit 23877f2c447e4377bca1f40ae5c3e0b50d43dcb2
Author: WooHyun Jung <wh0705.j...@samsung.com>
Date:   Tue Feb 13 18:39:20 2018 +0900

    Revert "Efl.Ui.Nstate: do not call "changed" callback"
    
    This reverts commit fd8e9f9c4e8dbda6c379dc464f562f5b2c681d31.
---
 src/lib/elementary/efl_ui_check.c  |  2 --
 src/lib/elementary/efl_ui_nstate.c | 18 ++++++++++++++++--
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/src/lib/elementary/efl_ui_check.c 
b/src/lib/elementary/efl_ui_check.c
index d119a8e6b9..d36cdb0b1a 100644
--- a/src/lib/elementary/efl_ui_check.c
+++ b/src/lib/elementary/efl_ui_check.c
@@ -75,8 +75,6 @@ _activate(Evas_Object *obj)
              _elm_access_say(E_("State: Off"));
      }
 
-   efl_event_callback_legacy_call(obj, EFL_UI_CHECK_EVENT_CHANGED, NULL);
-
    if (_elm_config->atspi_mode)
        efl_access_state_changed_signal_emit(obj,
                                                                 
EFL_ACCESS_STATE_CHECKED,
diff --git a/src/lib/elementary/efl_ui_nstate.c 
b/src/lib/elementary/efl_ui_nstate.c
index 5896826d09..c83ebfc8e4 100644
--- a/src/lib/elementary/efl_ui_nstate.c
+++ b/src/lib/elementary/efl_ui_nstate.c
@@ -63,6 +63,18 @@ _next_state_set(Efl_Ui_Nstate_Data *sd)
    if (sd->state == sd->nstate) sd->state = 0;
 }
 
+static void
+_state_active(Evas_Object *obj, Efl_Ui_Nstate_Data *sd)
+{
+   char buf[64];
+
+   sprintf(buf, "elm,state,changed,%d", sd->state);
+   elm_layout_signal_emit(obj, buf, "elm");
+   edje_object_message_signal_process(elm_layout_edje_get(obj));
+   elm_layout_sizing_eval(obj);
+   efl_event_callback_legacy_call(obj, EFL_UI_NSTATE_EVENT_CHANGED, NULL);
+}
+
 EOLIAN static int
 _efl_ui_nstate_count_get(Eo *obj EINA_UNUSED, Efl_Ui_Nstate_Data *pd)
 {
@@ -94,11 +106,12 @@ _is_valid_state(Efl_Ui_Nstate_Data *sd, int state)
 }
 
 EOLIAN static void
-_efl_ui_nstate_value_set(Eo *obj EINA_UNUSED, Efl_Ui_Nstate_Data *pd, int 
state)
+_efl_ui_nstate_value_set(Eo *obj, Efl_Ui_Nstate_Data *pd, int state)
 {
    if (!_is_valid_state(pd, state)) return;
 
    pd->state = state;
+   _state_active(obj, pd);
 }
 
 EOLIAN static Efl_Ui_Theme_Apply
@@ -120,9 +133,10 @@ _key_action_activate(Evas_Object *obj, const char *params 
EINA_UNUSED)
 }
 
 EOLIAN static void
-_efl_ui_nstate_activate(Eo *obj EINA_UNUSED, Efl_Ui_Nstate_Data *_pd)
+_efl_ui_nstate_activate(Eo *obj, Efl_Ui_Nstate_Data *_pd)
 {
    _next_state_set(_pd);
+   _state_active(obj, _pd);
 }
 
 EOLIAN static void

-- 


Reply via email to