summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2021-03-14 14:34:14 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2021-03-14 14:34:14 +0100
commit5215421570119b721d7b38f4adf4e6049b5dfeaa (patch)
tree7058a3bffb1de6105dfe6562f43fb59737971eae /src
parentec52433f3aef648aefdcf5199ac3424c25b07a9e (diff)
efl_ui_collection: disable desktop_entry behaviour when in api call
otherwise only the last item would have been selected.
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/efl_ui_collection.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/elementary/efl_ui_collection.c b/src/lib/elementary/efl_ui_collection.c
index bd3123a70f..2161181687 100644
--- a/src/lib/elementary/efl_ui_collection.c
+++ b/src/lib/elementary/efl_ui_collection.c
@@ -147,6 +147,7 @@ typedef struct {
147 Efl_Gfx_Entity *sizer; 147 Efl_Gfx_Entity *sizer;
148 unsigned int start_id, end_id; 148 unsigned int start_id, end_id;
149 Eina_Bool allow_manual_deselection : 1; 149 Eina_Bool allow_manual_deselection : 1;
150 Eina_Bool api_selection_change : 1;
150} Efl_Ui_Collection_Data; 151} Efl_Ui_Collection_Data;
151 152
152static Eina_Bool register_item(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Ui_Item *item); 153static Eina_Bool register_item(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Ui_Item *item);
@@ -579,7 +580,7 @@ _selection_changed(void *data, const Efl_Event *ev)
579 { 580 {
580 _single_selection_behaviour(obj, pd, ev->object); 581 _single_selection_behaviour(obj, pd, ev->object);
581 } 582 }
582 else if (pd->mode == EFL_UI_SELECT_MODE_MULTI && _elm_config->desktop_entry) 583 else if (pd->mode == EFL_UI_SELECT_MODE_MULTI && _elm_config->desktop_entry && !pd->api_selection_change)
583 { 584 {
584 const Evas_Modifier *mod = evas_key_modifier_get(evas_object_evas_get(ev->object)); 585 const Evas_Modifier *mod = evas_key_modifier_get(evas_object_evas_get(ev->object));
585 if (!(efl_input_clickable_interaction_get(ev->object) 586 if (!(efl_input_clickable_interaction_get(ev->object)
@@ -1111,13 +1112,17 @@ _selectable_range_apply(Eina_List *start, Eina_Bool flag)
1111EOLIAN static void 1112EOLIAN static void
1112_efl_ui_collection_efl_ui_multi_selectable_all_select(Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd) 1113_efl_ui_collection_efl_ui_multi_selectable_all_select(Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd)
1113{ 1114{
1115 pd->api_selection_change = EINA_TRUE;
1114 _selectable_range_apply(pd->items, EINA_TRUE); 1116 _selectable_range_apply(pd->items, EINA_TRUE);
1117 pd->api_selection_change = EINA_FALSE;
1115} 1118}
1116 1119
1117EOLIAN static void 1120EOLIAN static void
1118_efl_ui_collection_efl_ui_multi_selectable_all_unselect(Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd) 1121_efl_ui_collection_efl_ui_multi_selectable_all_unselect(Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd)
1119{ 1122{
1123 pd->api_selection_change = EINA_TRUE;
1120 _selectable_range_apply(pd->items, EINA_FALSE); 1124 _selectable_range_apply(pd->items, EINA_FALSE);
1125 pd->api_selection_change = EINA_FALSE;
1121} 1126}
1122 1127
1123static void 1128static void