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
This commit is contained in:
Marcel Hollerbach 2019-07-02 21:05:07 +02:00 committed by Mike Blumenkrantz
parent 8a0cad6435
commit ebf39e9fd7
2 changed files with 4 additions and 3 deletions

View File

@ -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);
}

View File

@ -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
{