summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-08-25 10:40:47 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-08-25 13:21:25 +0100
commitc565403bdac8950a1e01fff2cbe67d80052f2918 (patch)
tree840cc4dc9bacf84219d04603d86ea0953af6d540
parentea1d4ecfdb32127fc2a3cddc5d30c130909566da (diff)
elm scroller - fix mapping of block enums - was broken
-rw-r--r--src/lib/elementary/efl_ui_textbox.c6
-rw-r--r--src/lib/elementary/elm_interface_scrollable.h2
-rw-r--r--src/lib/elementary/elm_scroller.c20
3 files changed, 15 insertions, 13 deletions
diff --git a/src/lib/elementary/efl_ui_textbox.c b/src/lib/elementary/efl_ui_textbox.c
index 22c731f94b..46451cdcd1 100644
--- a/src/lib/elementary/efl_ui_textbox.c
+++ b/src/lib/elementary/efl_ui_textbox.c
@@ -540,7 +540,7 @@ _dnd_drop_cb(void *data EINA_UNUSED, const Efl_Event *ev)
540 { 540 {
541 Eina_Future *future; 541 Eina_Future *future;
542 542
543 future = efl_ui_dnd_drop_data_get(ev->object, evas_device_seat_id_get(evas_default_device_get(evas_object_evas_get(ev->object), EFL_INPUT_DEVICE_TYPE_SEAT)), eina_array_iterator_new(types)); 543 future = efl_ui_dnd_drop_data_get(ev->object, evas_device_seat_id_get(evas_default_device_get(evas_object_evas_get(ev->object), EVAS_DEVICE_CLASS_SEAT)), eina_array_iterator_new(types));
544 efl_future_then(ev->object, future, _selection_data_cb); 544 efl_future_then(ev->object, future, _selection_data_cb);
545 } 545 }
546 546
@@ -860,7 +860,7 @@ _selection_store(Efl_Ui_Cnp_Buffer buffer,
860 860
861 content = eina_content_new((Eina_Slice)EINA_SLICE_STR_FULL(sel), "application/x-elementary-markup"); 861 content = eina_content_new((Eina_Slice)EINA_SLICE_STR_FULL(sel), "application/x-elementary-markup");
862 862
863 efl_ui_selection_set(obj, buffer, content, evas_device_seat_id_get(evas_default_device_get(evas_object_evas_get(obj), EFL_INPUT_DEVICE_TYPE_SEAT))); 863 efl_ui_selection_set(obj, buffer, content, evas_device_seat_id_get(evas_default_device_get(evas_object_evas_get(obj), EVAS_DEVICE_CLASS_SEAT)));
864 864
865 free(sel); 865 free(sel);
866} 866}
@@ -1981,7 +1981,7 @@ _efl_ui_textbox_selection_paste_type(Eo *obj, Efl_Ui_Textbox_Data *sd, Efl_Ui_Cn
1981 Eina_Future *future; 1981 Eina_Future *future;
1982 Eina_Array *types = _figure_out_types(obj, sd); 1982 Eina_Array *types = _figure_out_types(obj, sd);
1983 1983
1984 future = efl_ui_selection_get(obj, type, evas_device_seat_id_get(evas_default_device_get(evas_object_evas_get(obj), EFL_INPUT_DEVICE_TYPE_SEAT)), eina_array_iterator_new(types)); 1984 future = efl_ui_selection_get(obj, type, evas_device_seat_id_get(evas_default_device_get(evas_object_evas_get(obj), EVAS_DEVICE_CLASS_SEAT)), eina_array_iterator_new(types));
1985 1985
1986 efl_future_then(obj, future, _selection_data_cb); 1986 efl_future_then(obj, future, _selection_data_cb);
1987 1987
diff --git a/src/lib/elementary/elm_interface_scrollable.h b/src/lib/elementary/elm_interface_scrollable.h
index 93a5f66dcd..29079e3bac 100644
--- a/src/lib/elementary/elm_interface_scrollable.h
+++ b/src/lib/elementary/elm_interface_scrollable.h
@@ -74,7 +74,7 @@ struct _Elm_Scrollable_Smart_Interface_Data
74 74
75 Elm_Scroller_Policy hbar_flags, vbar_flags; 75 Elm_Scroller_Policy hbar_flags, vbar_flags;
76 Elm_Scroller_Single_Direction one_direction_at_a_time; 76 Elm_Scroller_Single_Direction one_direction_at_a_time;
77 Elm_Scroller_Movement_Block block; 77 Efl_Ui_Layout_Orientation block;
78 78
79 struct 79 struct
80 { 80 {
diff --git a/src/lib/elementary/elm_scroller.c b/src/lib/elementary/elm_scroller.c
index e21b5cba43..95643ce772 100644
--- a/src/lib/elementary/elm_scroller.c
+++ b/src/lib/elementary/elm_scroller.c
@@ -1214,10 +1214,10 @@ elm_scroller_movement_block_set(Evas_Object *obj,
1214 Efl_Ui_Layout_Orientation mode = EFL_UI_LAYOUT_ORIENTATION_DEFAULT; 1214 Efl_Ui_Layout_Orientation mode = EFL_UI_LAYOUT_ORIENTATION_DEFAULT;
1215 1215
1216 // legacy -> eo 1216 // legacy -> eo
1217 if (block == ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL) 1217 if (block & ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL)
1218 mode = EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL; 1218 mode |= EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL;
1219 else if (block == ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL) 1219 if (block & ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL)
1220 mode = EFL_UI_LAYOUT_ORIENTATION_VERTICAL; 1220 mode |= EFL_UI_LAYOUT_ORIENTATION_VERTICAL;
1221 1221
1222 elm_interface_scrollable_movement_block_set(obj, mode); 1222 elm_interface_scrollable_movement_block_set(obj, mode);
1223} 1223}
@@ -1226,18 +1226,20 @@ EAPI Elm_Scroller_Movement_Block
1226elm_scroller_movement_block_get(const Evas_Object *obj) 1226elm_scroller_movement_block_get(const Evas_Object *obj)
1227{ 1227{
1228 Efl_Ui_Layout_Orientation mode; 1228 Efl_Ui_Layout_Orientation mode;
1229 Elm_Scroller_Movement_Block mode2 = 0;
1229 1230
1230 ELM_SCROLLABLE_CHECK(obj, ELM_SCROLLER_MOVEMENT_NO_BLOCK); 1231 ELM_SCROLLABLE_CHECK(obj, ELM_SCROLLER_MOVEMENT_NO_BLOCK);
1231 1232
1232 mode = elm_interface_scrollable_movement_block_get(obj); 1233 mode = elm_interface_scrollable_movement_block_get(obj);
1233 1234
1234 // eo -> legacy 1235 // eo -> legacy
1235 if (mode == EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL) 1236 if (mode & EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL)
1236 return ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL; 1237 mode2 |= ELM_SCROLLER_MOVEMENT_BLOCK_HORIZONTAL;
1237 else if (mode == EFL_UI_LAYOUT_ORIENTATION_VERTICAL) 1238 else if (mode & EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
1238 return ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL; 1239 mode2 |= ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL;
1239 1240
1240 return ELM_SCROLLER_MOVEMENT_NO_BLOCK; 1241 if (mode2 == 0) return ELM_SCROLLER_MOVEMENT_NO_BLOCK;
1242 return mode2;
1241} 1243}
1242 1244
1243EAPI void 1245EAPI void