summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2016-01-24 15:44:48 +0100
committerDave Andreoli <dave@gurumeditation.it>2016-01-24 15:44:48 +0100
commit15e9f8071da393aee4bd83313a73f0fff3ff7eab (patch)
tree376ab5427eaab37c6c0400ba051bcd437ca6b6d0
parent7072fe56c4ca386e6d68e65a1d6ee454362d76af (diff)
Reveal the same focus bug of previous commit also in genlist.
See previous commit for instructions on how to reproduce in "Genlist Focus" test.
-rw-r--r--src/bin/test_genlist.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/bin/test_genlist.c b/src/bin/test_genlist.c
index 9dcebc19e..2813c4271 100644
--- a/src/bin/test_genlist.c
+++ b/src/bin/test_genlist.c
@@ -4214,9 +4214,11 @@ gl_focus_top_items_text_get(void *data, Evas_Object *obj EINA_UNUSED,
4214 if (!strcmp(data, "do_nothing")) 4214 if (!strcmp(data, "do_nothing"))
4215 return strdup("Genlist Item"); 4215 return strdup("Genlist Item");
4216 else if (!strcmp(data, "popup_sel")) 4216 else if (!strcmp(data, "popup_sel"))
4217 return strdup("Create a popup on Select"); 4217 return strdup("Create a popup on Select (popup parent is gl)");
4218 else if (!strcmp(data, "popup_mouse_down")) 4218 else if (!strcmp(data, "popup_mouse_down"))
4219 return strdup("Create a popup on Mouse Down"); 4219 return strdup("Create a popup on Mouse Down (popup parent is gl)");
4220 else if (!strcmp(data, "popup_activate"))
4221 return strdup("Create a popup on Activate (popup parent is win)");
4220 else if (!strcmp(data, "clear_on_focus")) 4222 else if (!strcmp(data, "clear_on_focus"))
4221 return strdup("Genlist Clear on Focus"); 4223 return strdup("Genlist Clear on Focus");
4222 else 4224 else
@@ -4400,9 +4402,17 @@ _gl_focus_item_unfocus_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
4400} 4402}
4401 4403
4402static void 4404static void
4403_gl_focus_item_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info) 4405_gl_focus_item_cb(void *data, Evas_Object *obj, void *event_info)
4404{ 4406{
4405 printf("%s: %p\n", (char *)data, event_info); 4407 Elm_Object_Item *it = event_info;
4408
4409 printf("%s: %p\n", (char *)data, it);
4410
4411 if (!strcmp((char *)data, "activated") &&
4412 !strcmp((char *)elm_object_item_data_get(it), "popup_activate"))
4413 {
4414 _gl_focus_sel_popup_create(elm_object_top_widget_get(obj));
4415 }
4406} 4416}
4407 4417
4408static void 4418static void
@@ -4896,6 +4906,8 @@ test_genlist_focus(void *data EINA_UNUSED,
4896 _gl_focus_0_item_sel_cb, NULL); 4906 _gl_focus_0_item_sel_cb, NULL);
4897 elm_genlist_item_append(gl, itc, "popup_mouse_down", NULL, ELM_GENLIST_ITEM_NONE, 4907 elm_genlist_item_append(gl, itc, "popup_mouse_down", NULL, ELM_GENLIST_ITEM_NONE,
4898 NULL, NULL); 4908 NULL, NULL);
4909 elm_genlist_item_append(gl, itc, "popup_activate", NULL, ELM_GENLIST_ITEM_NONE,
4910 NULL, NULL);
4899 4911
4900 it = elm_genlist_item_append(gl, itc, "clear_on_focus", NULL, ELM_GENLIST_ITEM_NONE, 4912 it = elm_genlist_item_append(gl, itc, "clear_on_focus", NULL, ELM_GENLIST_ITEM_NONE,
4901 NULL, NULL); 4913 NULL, NULL);