bu5hm4n pushed a commit to branch master.

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

commit ebf39e9fd7ba054f49031f7f4162ced8c63b1d22
Author: Marcel Hollerbach <[email protected]>
Date:   Tue Jul 2 21:05:07 2019 +0200

    efl_ui_check/radio: restore legacy behaviour
    
    from now on, the "changed" signal is only emitted on radio/check buttons 
when
    the user interacted with this object. NOT due to the API change.
    However, in the eo-api the event is emitted all the time, due to user
    interaction, AND due to API interaction.
    
    ref T8042
---
 src/lib/elementary/efl_ui_check.c | 6 +++---
 src/lib/elementary/efl_ui_radio.c | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/lib/elementary/efl_ui_check.c 
b/src/lib/elementary/efl_ui_check.c
index 7b8e4026b6..9f575621ff 100644
--- a/src/lib/elementary/efl_ui_check.c
+++ b/src/lib/elementary/efl_ui_check.c
@@ -96,6 +96,8 @@ _activate(Evas_Object *obj)
    // "elm,state,check,on" or "elm,state,check,off" for legacy
    // "efl,state,check,on" or "efl,state,check,off" for eo-api
    efl_ui_check_selected_set(obj, !efl_ui_check_selected_get(obj));
+   if (elm_widget_is_legacy(obj))
+     evas_object_smart_callback_call(obj, "changed", NULL);
 
    if (_elm_config->atspi_mode)
      efl_access_state_changed_signal_emit(obj,
@@ -291,9 +293,7 @@ _efl_ui_check_selected_set(Eo *obj, Efl_Ui_Check_Data *pd, 
Eina_Bool value)
 
    pd->selected = value;
 
-   if (elm_widget_is_legacy(obj))
-     evas_object_smart_callback_call(obj, "changed", NULL);
-   else
+   if (!elm_widget_is_legacy(obj))
      efl_event_callback_call(obj, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, 
&pd->selected);
 }
 
diff --git a/src/lib/elementary/efl_ui_radio.c 
b/src/lib/elementary/efl_ui_radio.c
index c38c9fadc7..edbc14844f 100644
--- a/src/lib/elementary/efl_ui_radio.c
+++ b/src/lib/elementary/efl_ui_radio.c
@@ -139,6 +139,7 @@ _activate(Evas_Object *obj)
              if (_elm_config->access_mode)
                _elm_access_say(E_("State: On"));
          }
+        evas_object_smart_callback_call(obj, "changed", NULL);
      }
    else
      {

-- 


Reply via email to