forked from enlightenment/efl
api: move eo-based radio and check widgets to use selectable signal names
Summary: this is a more standardized name ref T8231 Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8231 Differential Revision: https://phab.enlightenment.org/D10157
This commit is contained in:
parent
d2adb0d308
commit
75c8fd1cc2
|
@ -258,12 +258,12 @@ group { "efl/check"; data.item: "version" "123";
|
|||
programs {
|
||||
EFL_UI_CLICKABLE_PART_BIND(event)
|
||||
program {
|
||||
signal: "efl,state,check,on"; source: "efl";
|
||||
signal: "efl,state,selected"; source: "efl";
|
||||
action: STATE_SET "selected" 0.0;
|
||||
target: "indicator";
|
||||
}
|
||||
program {
|
||||
signal: "efl,state,check,off"; source: "efl";
|
||||
signal: "efl,state,unselected"; source: "efl";
|
||||
action: STATE_SET "default" 0.0;
|
||||
target: "indicator";
|
||||
}
|
||||
|
@ -773,7 +773,7 @@ group { "efl/check:toggle"; data.item: "version" "123";
|
|||
programs {
|
||||
EFL_UI_CLICKABLE_PART_BIND(event)
|
||||
program {
|
||||
signal: "efl,state,check,on"; source: "efl";
|
||||
signal: "efl,state,selected"; source: "efl";
|
||||
script {
|
||||
new Float:drag;
|
||||
if (get_int(is_rtl) == 0) {
|
||||
|
@ -785,7 +785,7 @@ group { "efl/check:toggle"; data.item: "version" "123";
|
|||
}
|
||||
}
|
||||
program {
|
||||
signal: "efl,state,check,off"; source: "efl";
|
||||
signal: "efl,state,unselected"; source: "efl";
|
||||
script {
|
||||
new Float:drag;
|
||||
if (get_int(is_rtl) == 0) {
|
||||
|
@ -809,9 +809,9 @@ group { "efl/check:toggle"; data.item: "version" "123";
|
|||
}
|
||||
if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
|
||||
(get_int(is_rtl) == 0) && (dx > 0.5)) {
|
||||
emit("efl,action,check,off", "efl");
|
||||
emit("efl,action,unselect", "efl");
|
||||
} else {
|
||||
emit("efl,action,check,on", "efl");
|
||||
emit("efl,action,select", "efl");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -842,9 +842,9 @@ group { "efl/check:toggle"; data.item: "version" "123";
|
|||
}
|
||||
if (((get_int(is_rtl) == 1) && (dx <= 0.5)) ||
|
||||
(get_int(is_rtl) == 0) && (dx > 0.5)) {
|
||||
emit("efl,action,check,on", "efl");
|
||||
emit("efl,action,select", "efl");
|
||||
} else {
|
||||
emit("efl,action,check,off", "efl");
|
||||
emit("efl,action,unselect", "efl");
|
||||
}
|
||||
set_int(was_drag, 1);
|
||||
set_int(is_drag, 0);
|
||||
|
|
|
@ -225,12 +225,12 @@ group { "efl/radio";
|
|||
programs {
|
||||
EFL_UI_CLICKABLE_PART_BIND(event)
|
||||
program {
|
||||
signal: "efl,state,radio,on"; source: "efl";
|
||||
signal: "efl,state,selected"; source: "efl";
|
||||
action: STATE_SET "selected" 0.0;
|
||||
target: "indicator";
|
||||
}
|
||||
program {
|
||||
signal: "efl,state,radio,off"; source: "efl";
|
||||
signal: "efl,state,unselected"; source: "efl";
|
||||
action: STATE_SET "default" 0.0;
|
||||
target: "indicator";
|
||||
}
|
||||
|
|
|
@ -79,14 +79,14 @@ _activate(Evas_Object *obj)
|
|||
// so that we can distinguish between state change by user or state change
|
||||
// by calling state_change() api. Keep both the signal for backward compatibility
|
||||
// and remove "elm,state,check,on" signal emission when we can break ABI.
|
||||
// efl_ui_selectable_selected_set below will emit "elm,state,check,*" or "efl,state,check,*"
|
||||
// efl_ui_selectable_selected_set below will emit "elm,state,check,*" or "efl,state,*selected"
|
||||
if (elm_widget_is_legacy(obj))
|
||||
{
|
||||
elm_layout_signal_emit(obj, "elm,activate,check,on", "elm");
|
||||
}
|
||||
else
|
||||
{
|
||||
elm_layout_signal_emit(obj, "efl,activate,check,on", "efl");
|
||||
elm_layout_signal_emit(obj, "efl,state,selected", "efl");
|
||||
}
|
||||
|
||||
if (_elm_config->access_mode != ELM_ACCESS_MODE_OFF)
|
||||
|
@ -98,14 +98,14 @@ _activate(Evas_Object *obj)
|
|||
// so that we can distinguish between state change by user or state change
|
||||
// by calling state_change() api. Keep both the signal for backward compatibility
|
||||
// and remove "elm,state,check,off" signal emission when we can break ABI.
|
||||
// efl_ui_selectable_selected_set below will emit "elm,state,check,*" or "efl,state,check,*"
|
||||
// efl_ui_selectable_selected_set below will emit "elm,state,check,*" or "efl,state,*selected"
|
||||
if (elm_widget_is_legacy(obj))
|
||||
{
|
||||
elm_layout_signal_emit(obj, "elm,activate,check,off", "elm");
|
||||
}
|
||||
else
|
||||
{
|
||||
elm_layout_signal_emit(obj, "efl,activate,check,off", "efl");
|
||||
elm_layout_signal_emit(obj, "efl,state,unselected", "efl");
|
||||
}
|
||||
|
||||
if (_elm_config->access_mode != ELM_ACCESS_MODE_OFF)
|
||||
|
@ -113,7 +113,7 @@ _activate(Evas_Object *obj)
|
|||
}
|
||||
//This commit will update the theme with the correct signals
|
||||
// "elm,state,check,on" or "elm,state,check,off" for legacy
|
||||
// "efl,state,check,on" or "efl,state,check,off" for eo-api
|
||||
// "efl,state,selected" or "efl,state,unselected" for eo-api
|
||||
efl_ui_selectable_selected_set(obj, !efl_ui_selectable_selected_get(obj));
|
||||
if (elm_widget_is_legacy(obj))
|
||||
_check_legacy_event(obj);
|
||||
|
@ -174,9 +174,9 @@ _efl_ui_check_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Check_Data *sd EINA_UNUS
|
|||
else
|
||||
{
|
||||
if (!efl_ui_selectable_selected_get(obj))
|
||||
elm_layout_signal_emit(obj, "efl,state,check,off", "efl");
|
||||
elm_layout_signal_emit(obj, "efl,state,unselected", "efl");
|
||||
else
|
||||
elm_layout_signal_emit(obj, "efl,state,check,on", "efl");
|
||||
elm_layout_signal_emit(obj, "efl,state,selected", "efl");
|
||||
}
|
||||
|
||||
edje_object_message_signal_process(wd->resize_obj);
|
||||
|
@ -310,9 +310,9 @@ _efl_ui_check_efl_ui_selectable_selected_set(Eo *obj, Efl_Ui_Check_Data *pd, Ein
|
|||
else
|
||||
{
|
||||
if (value == 1)
|
||||
elm_layout_signal_emit(obj, "efl,state,check,on", "efl");
|
||||
elm_layout_signal_emit(obj, "efl,state,selected", "efl");
|
||||
else
|
||||
elm_layout_signal_emit(obj, "efl,state,check,off", "efl");
|
||||
elm_layout_signal_emit(obj, "efl,state,unselected", "efl");
|
||||
}
|
||||
|
||||
edje_object_message_signal_process(wd->resize_obj);
|
||||
|
@ -345,9 +345,9 @@ _efl_ui_check_efl_object_constructor(Eo *obj, Efl_Ui_Check_Data *pd EINA_UNUSED)
|
|||
else
|
||||
{
|
||||
efl_layout_signal_callback_add
|
||||
(wd->resize_obj, "efl,action,check,on", "*", obj, _on_check_on, NULL);
|
||||
(wd->resize_obj, "efl,action,select", "*", obj, _on_check_on, NULL);
|
||||
efl_layout_signal_callback_add
|
||||
(wd->resize_obj, "efl,action,check,off", "*", obj, _on_check_off, NULL);
|
||||
(wd->resize_obj, "efl,action,unselect", "*", obj, _on_check_off, NULL);
|
||||
efl_event_callback_add(obj, EFL_INPUT_EVENT_CLICKED, _clicked_cb, obj);
|
||||
}
|
||||
|
||||
|
|
|
@ -170,8 +170,8 @@ _efl_ui_radio_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Radio_Data *sd EINA_UNUS
|
|||
}
|
||||
else
|
||||
{
|
||||
if (efl_ui_selectable_selected_get(obj)) elm_layout_signal_emit(obj, "efl,state,radio,on", "efl");
|
||||
else elm_layout_signal_emit(obj, "efl,state,radio,off", "efl");
|
||||
if (efl_ui_selectable_selected_get(obj)) elm_layout_signal_emit(obj, "efl,state,selected", "efl");
|
||||
else elm_layout_signal_emit(obj, "efl,state,unselected", "efl");
|
||||
}
|
||||
|
||||
edje_object_message_signal_process(wd->resize_obj);
|
||||
|
|
Loading…
Reference in New Issue