aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-09-17 10:56:42 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-09-17 13:46:05 +0200
commitff0aabd345c02369996c4656e579cf1872332202 (patch)
tree6884529061e0e4e53c6ba952f4bf8ff3e9452fa9
parenteolian: enable unimplemented function errors for stable API (diff)
downloadefl-ff0aabd345c02369996c4656e579cf1872332202.tar.gz
efl_ui_multi_selectable: remove SINGLE_ALWAYS
this should get a better solution later on. There is also no real usage for that. ref https://phab.enlightenment.org/T7922 Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com> Differential Revision: https://phab.enlightenment.org/D9985
-rw-r--r--src/bin/elementary/test_ui_collection.c4
-rw-r--r--src/examples/elementary/efl_ui_list_example_1.c4
-rw-r--r--src/lib/elementary/efl_ui_collection.c4
-rw-r--r--src/lib/elementary/efl_ui_item.c4
-rw-r--r--src/lib/elementary/efl_ui_multi_selectable.eo2
-rw-r--r--src/tests/elementary/spec/efl_test_multi_selectable.c33
6 files changed, 4 insertions, 47 deletions
diff --git a/src/bin/elementary/test_ui_collection.c b/src/bin/elementary/test_ui_collection.c
index 2dd2bc2c6e..1cc275f2c1 100644
--- a/src/bin/elementary/test_ui_collection.c
+++ b/src/bin/elementary/test_ui_collection.c
@@ -306,10 +306,6 @@ void create_item_container_ui(const Efl_Class *collection_class, const Efl_Class
efl_text_set(o, "Singleselect");
efl_pack_end(bx, o);
o = efl_add(EFL_UI_RADIO_CLASS, bx,
- efl_ui_radio_state_value_set(efl_added, EFL_UI_SELECT_MODE_SINGLE_ALWAYS));
- efl_text_set(o, "Singleselect Always");
- efl_pack_end(bx, o);
- o = efl_add(EFL_UI_RADIO_CLASS, bx,
efl_ui_radio_state_value_set(efl_added, EFL_UI_SELECT_MODE_MULTI));
efl_text_set(o, "Multiselect");
efl_pack_end(bx, o);
diff --git a/src/examples/elementary/efl_ui_list_example_1.c b/src/examples/elementary/efl_ui_list_example_1.c
index 5a30a8c1c2..16664142a6 100644
--- a/src/examples/elementary/efl_ui_list_example_1.c
+++ b/src/examples/elementary/efl_ui_list_example_1.c
@@ -240,10 +240,6 @@ elm_main(int argc EINA_UNUSED, char **argv)
efl_ui_radio_state_value_set(radio, EFL_UI_SELECT_MODE_SINGLE);
efl_pack_end(bbox, radio);
radio = efl_add(EFL_UI_RADIO_CLASS, wbox);
- efl_text_set(radio, "SINGLE_ALWAYS");
- efl_ui_radio_state_value_set(radio, EFL_UI_SELECT_MODE_SINGLE_ALWAYS);
- efl_pack_end(bbox, radio);
- radio = efl_add(EFL_UI_RADIO_CLASS, wbox);
efl_text_set(radio, "MULTI");
efl_ui_radio_state_value_set(radio, EFL_UI_SELECT_MODE_MULTI);
efl_pack_end(bbox, radio);
diff --git a/src/lib/elementary/efl_ui_collection.c b/src/lib/elementary/efl_ui_collection.c
index 2a666f2090..1763b65195 100644
--- a/src/lib/elementary/efl_ui_collection.c
+++ b/src/lib/elementary/efl_ui_collection.c
@@ -486,7 +486,7 @@ EOLIAN static void
_efl_ui_collection_efl_ui_multi_selectable_select_mode_set(Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd, Efl_Ui_Select_Mode mode)
{
pd->mode = mode;
- if ((mode == EFL_UI_SELECT_MODE_SINGLE_ALWAYS || mode == EFL_UI_SELECT_MODE_SINGLE) &&
+ if ((mode == EFL_UI_SELECT_MODE_SINGLE) &&
eina_list_count(pd->selected) > 0)
{
Efl_Ui_Item *last = eina_list_last_data_get(pd->selected);
@@ -569,7 +569,7 @@ _selection_changed(void *data, const Efl_Event *ev)
if (selection)
{
- if (pd->mode == EFL_UI_SELECT_MODE_SINGLE_ALWAYS || pd->mode == EFL_UI_SELECT_MODE_SINGLE)
+ if (pd->mode == EFL_UI_SELECT_MODE_SINGLE)
{
_single_selection_behaviour(obj, pd, ev->object);
}
diff --git a/src/lib/elementary/efl_ui_item.c b/src/lib/elementary/efl_ui_item.c
index bd6de1a28a..1b0c4f1a46 100644
--- a/src/lib/elementary/efl_ui_item.c
+++ b/src/lib/elementary/efl_ui_item.c
@@ -45,7 +45,7 @@ _item_select(Eo *obj, Efl_Ui_Item_Data *pd)
if (pd->container)
{
m = _fetch_state(pd->container);
- if (m == EFL_UI_SELECT_MODE_NONE || (pd->selected && m != EFL_UI_SELECT_MODE_SINGLE_ALWAYS))
+ if (m == EFL_UI_SELECT_MODE_NONE)
return;
}
else
@@ -95,7 +95,7 @@ _item_unpressed(void *data, const Efl_Event *ev EINA_UNUSED)
efl_layout_signal_emit(obj, "efl,state,unpressed", "efl");
m = _fetch_state(pd->container);
- if ((m != EFL_UI_SELECT_MODE_SINGLE_ALWAYS) && (pd->selected))
+ if (pd->selected)
efl_ui_selectable_selected_set(obj, EINA_FALSE);
else if (m != EFL_UI_SELECT_MODE_NONE)
efl_ui_selectable_selected_set(obj, EINA_TRUE);
diff --git a/src/lib/elementary/efl_ui_multi_selectable.eo b/src/lib/elementary/efl_ui_multi_selectable.eo
index a13070842a..9b581357a1 100644
--- a/src/lib/elementary/efl_ui_multi_selectable.eo
+++ b/src/lib/elementary/efl_ui_multi_selectable.eo
@@ -2,8 +2,6 @@ enum @beta Efl.Ui.Select_Mode {
[[Type of multi selectable object.]]
single, [[Only single child is selected. If a child is selected,
previous selected child will be unselected.]]
- single_always, [[Same as single select except, this will be selected
- in every select call even if child is already been selected.]]
multi, [[Allow multiple selection of children.]]
none [[No child can be selected at all.]]
}
diff --git a/src/tests/elementary/spec/efl_test_multi_selectable.c b/src/tests/elementary/spec/efl_test_multi_selectable.c
index 6f3132721b..770c10e5bb 100644
--- a/src/tests/elementary/spec/efl_test_multi_selectable.c
+++ b/src/tests/elementary/spec/efl_test_multi_selectable.c
@@ -135,38 +135,6 @@ EFL_START_TEST(test_single_select)
}
EFL_END_TEST
-EFL_START_TEST(test_single_select_always)
-{
- int c = 0;
- Eina_Array *arr_selected;
-
- efl_ui_select_mode_set(widget, EFL_UI_SELECT_MODE_SINGLE_ALWAYS);
- efl_event_callback_add(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, (void*) event_callback_single_call_int_data, &c);
- efl_event_callback_add(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, event_callback_that_quits_the_main_loop_when_called, NULL);
-
- efl_ui_selectable_selected_set(efl_pack_content_get(widget, 0), EINA_TRUE);
- if (c == 0) efl_loop_begin(efl_main_loop_get());
- ck_assert_int_eq(c, 1);
- c = 0;
- efl_ui_selectable_selected_set(efl_pack_content_get(widget, 2), EINA_TRUE);
- if (c == 0) efl_loop_begin(efl_main_loop_get());
- ck_assert_int_eq(c, 1);
- c = 0;
- efl_ui_selectable_selected_set(efl_pack_content_get(widget, 2), EINA_TRUE);
- if (c == 0) efl_loop_begin(efl_main_loop_get());
- ck_assert_int_eq(c, 1);
- c = 0;
- ck_assert_int_eq(efl_ui_selectable_selected_get(efl_pack_content_get(widget, 0)), EINA_FALSE);
- ck_assert_int_eq(efl_ui_selectable_selected_get(efl_pack_content_get(widget, 2)), EINA_TRUE);
- ck_assert_ptr_eq(efl_ui_single_selectable_last_selected_get(widget), efl_pack_content_get(widget, 2));
- _iterator_to_array(&arr_selected, efl_ui_selected_items_get(widget));
- ck_assert_int_eq(eina_array_count(arr_selected), 1);
- ck_assert_ptr_eq(eina_array_data_get(arr_selected, 0), efl_pack_content_get(widget, 2));
- efl_event_callback_del(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, (void*) event_callback_single_call_int_data, &c);
- efl_event_callback_del(widget, EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, event_callback_that_quits_the_main_loop_when_called, NULL);
-}
-EFL_END_TEST
-
EFL_START_TEST(test_none_select)
{
Efl_Ui_Item *selected = NULL;
@@ -290,7 +258,6 @@ efl_ui_multi_selectable_behavior_test(TCase *tc)
tcase_add_test(tc, test_multi_select_removal);
tcase_add_test(tc, test_single_select);
tcase_add_test(tc, test_none_select);
- tcase_add_test(tc, test_single_select_always);
tcase_add_test(tc, select_all_api);
tcase_add_test(tc, unselect_all_api);
tcase_add_test(tc, unselect_range);