summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2015-07-26 13:57:54 +0200
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2015-07-26 13:57:54 +0200
commitda814f9b06c7adb593034f90a890f6ff0f6212ec (patch)
tree2d6c21b3c79fc250ac74612cf33681f24545b4fc
parent6f34e82f699c7021b2eb31c4125248b87525faf8 (diff)
elm_items_display: remove unnessecery call
-rw-r--r--src/lib/items/elm_items_display.c9
-rw-r--r--src/lib/items/elm_items_display.eo4
-rw-r--r--src/lib/items/elm_items_list.c15
-rw-r--r--src/lib/items/elm_items_list.eo1
4 files changed, 10 insertions, 19 deletions
diff --git a/src/lib/items/elm_items_display.c b/src/lib/items/elm_items_display.c
index 4fb3d70..7b1b949 100644
--- a/src/lib/items/elm_items_display.c
+++ b/src/lib/items/elm_items_display.c
@@ -225,7 +225,14 @@ _elm_items_display_elm_widget_event(Eo *obj, Elm_Items_Display_Data *pd, Evas_Ob
225 else if (!strcmp(ev->key, "Return")) 225 else if (!strcmp(ev->key, "Return"))
226 { 226 {
227 //select 227 //select
228 eo_do(obj, elm_items_display_select()); 228 Eina_List *selection;
229 Elm_Items_Item *sel;
230
231 //doubleclick every selection XXX good idea ?
232 EINA_LIST_FOREACH(pd->selected, selection, sel)
233 {
234 eo_do(sel, eo_event_callback_call(ELM_ITEMS_ITEM_EVENT_CLICKED_DOUBLE, NULL));
235 }
229 return EINA_TRUE; 236 return EINA_TRUE;
230 } 237 }
231 else if (!strcmp(ev->key, "Home")) 238 else if (!strcmp(ev->key, "Home"))
diff --git a/src/lib/items/elm_items_display.eo b/src/lib/items/elm_items_display.eo
index ce88c07..a0d0ff2 100644
--- a/src/lib/items/elm_items_display.eo
+++ b/src/lib/items/elm_items_display.eo
@@ -30,9 +30,6 @@ abstract Elm.Items.Display (Elm.Scroller) {
30 direction : Elm.Items.Move_Dir; 30 direction : Elm.Items.Move_Dir;
31 } 31 }
32 } 32 }
33 select {
34
35 }
36 item_search_xywh { 33 item_search_xywh {
37 params { 34 params {
38 x : int; 35 x : int;
@@ -60,7 +57,6 @@ abstract Elm.Items.Display (Elm.Scroller) {
60 } 57 }
61 implements { 58 implements {
62 @virtual .sel_move; 59 @virtual .sel_move;
63 @virtual .select;
64 Elm.Widget.event; 60 Elm.Widget.event;
65 Eo.Base.constructor; 61 Eo.Base.constructor;
66 Eo.Base.destructor; 62 Eo.Base.destructor;
diff --git a/src/lib/items/elm_items_list.c b/src/lib/items/elm_items_list.c
index e4a684e..2a24c77 100644
--- a/src/lib/items/elm_items_list.c
+++ b/src/lib/items/elm_items_list.c
@@ -108,19 +108,6 @@ _elm_items_list_pan_evas_object_smart_add(Eo *obj, Elm_Items_List_Pan_Data *pd)
108//================================== 108//==================================
109 109
110EOLIAN static void 110EOLIAN static void
111_elm_items_list_elm_items_display_select(Eo *obj, Elm_Items_List_Data *pd EINA_UNUSED)
112{
113 Eina_List *selection;
114
115 eo_do(obj, selection = elm_items_display_selected_get());
116
117 if (eina_list_count(selection) != 1)
118 return;
119 //emulate double click on this item XXX find a proper way
120 eo_do(eina_list_data_get(selection), eo_event_callback_call(ELM_ITEMS_ITEM_EVENT_CLICKED_DOUBLE, NULL));
121}
122
123EOLIAN static void
124_elm_items_list_elm_items_display_sel_move(Eo *obj, Elm_Items_List_Data *pd, Elm_Items_Move_Dir direction) 111_elm_items_list_elm_items_display_sel_move(Eo *obj, Elm_Items_List_Data *pd, Elm_Items_Move_Dir direction)
125{ 112{
126 113
@@ -228,10 +215,12 @@ _add(void *data, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUS
228 eo_do(good, eo_event_callback_add(ELM_ITEMS_ITEM_EVENT_SELECTED, _selected, data); 215 eo_do(good, eo_event_callback_add(ELM_ITEMS_ITEM_EVENT_SELECTED, _selected, data);
229 eo_event_callback_add(ELM_ITEMS_ITEM_EVENT_UNSELECTED, _unselected, data); 216 eo_event_callback_add(ELM_ITEMS_ITEM_EVENT_UNSELECTED, _unselected, data);
230 ); 217 );
218
231 //set hints 219 //set hints
232 evas_object_size_hint_min_set(good, 1, HACKY_HEIGHT); 220 evas_object_size_hint_min_set(good, 1, HACKY_HEIGHT);
233 evas_object_size_hint_align_set(good, EVAS_HINT_FILL, 1.0); 221 evas_object_size_hint_align_set(good, EVAS_HINT_FILL, 1.0);
234 evas_object_size_hint_weight_set(good, EVAS_HINT_EXPAND, 0.0); 222 evas_object_size_hint_weight_set(good, EVAS_HINT_EXPAND, 0.0);
223
235 //show the item 224 //show the item
236 evas_object_show(good); 225 evas_object_show(good);
237 226
diff --git a/src/lib/items/elm_items_list.eo b/src/lib/items/elm_items_list.eo
index 6800bb4..d4e00c2 100644
--- a/src/lib/items/elm_items_list.eo
+++ b/src/lib/items/elm_items_list.eo
@@ -1,7 +1,6 @@
1class Elm.Items.List(Elm.Items.Display) { 1class Elm.Items.List(Elm.Items.Display) {
2 implements { 2 implements {
3 Elm.Items.Display.sel_move; 3 Elm.Items.Display.sel_move;
4 Elm.Items.Display.select;
5 Evas.Object_Smart.add; 4 Evas.Object_Smart.add;
6 Eo.Base.constructor; 5 Eo.Base.constructor;
7 } 6 }