forked from enlightenment/efl
Revert "Efl.Ui.Nstate: do not call "changed" callback"
This reverts commit fd8e9f9c4e
.
This commit is contained in:
parent
c82b30cc3c
commit
23877f2c44
|
@ -75,8 +75,6 @@ _activate(Evas_Object *obj)
|
||||||
_elm_access_say(E_("State: Off"));
|
_elm_access_say(E_("State: Off"));
|
||||||
}
|
}
|
||||||
|
|
||||||
efl_event_callback_legacy_call(obj, EFL_UI_CHECK_EVENT_CHANGED, NULL);
|
|
||||||
|
|
||||||
if (_elm_config->atspi_mode)
|
if (_elm_config->atspi_mode)
|
||||||
efl_access_state_changed_signal_emit(obj,
|
efl_access_state_changed_signal_emit(obj,
|
||||||
EFL_ACCESS_STATE_CHECKED,
|
EFL_ACCESS_STATE_CHECKED,
|
||||||
|
|
|
@ -63,6 +63,18 @@ _next_state_set(Efl_Ui_Nstate_Data *sd)
|
||||||
if (sd->state == sd->nstate) sd->state = 0;
|
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
|
EOLIAN static int
|
||||||
_efl_ui_nstate_count_get(Eo *obj EINA_UNUSED, Efl_Ui_Nstate_Data *pd)
|
_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
|
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;
|
if (!_is_valid_state(pd, state)) return;
|
||||||
|
|
||||||
pd->state = state;
|
pd->state = state;
|
||||||
|
_state_active(obj, pd);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Efl_Ui_Theme_Apply
|
EOLIAN static Efl_Ui_Theme_Apply
|
||||||
|
@ -120,9 +133,10 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
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);
|
_next_state_set(_pd);
|
||||||
|
_state_active(obj, _pd);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
|
|
Loading…
Reference in New Issue