summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2015-12-25 03:34:26 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2015-12-25 03:34:28 +0900
commit59790012f7c716593181b30a2799a8b965694bd1 (patch)
treecca7bf49c68b61c7e127453bdc83d534c027a714
parentbc39c70543ee4a8af45cda8f8f08fbcb673ef640 (diff)
genlist: Remove genlist clear scenario from the basic genlist test.
It was a bad idea to add this test to the basic genlist test. Moving the focus with arrow keys faced unexpected genlist clear to testers. We have "genlist del" test so it's ok to remove this.
-rw-r--r--src/bin/test_genlist.c36
1 files changed, 7 insertions, 29 deletions
diff --git a/src/bin/test_genlist.c b/src/bin/test_genlist.c
index ab09b3cd9..36cd529a9 100644
--- a/src/bin/test_genlist.c
+++ b/src/bin/test_genlist.c
@@ -130,10 +130,7 @@ gl_text_get1(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNU
130 char buf[256]; 130 char buf[256];
131 int num = (int)(uintptr_t)data; 131 int num = (int)(uintptr_t)data;
132 132
133 if (num == 5) 133 snprintf(buf, sizeof(buf), "Item # %i", num);
134 snprintf(buf, sizeof(buf), "Item # %i (Genlist Clear on Select)", num);
135 else
136 snprintf(buf, sizeof(buf), "Item # %i", num);
137 134
138 return strdup(buf); 135 return strdup(buf);
139} 136}
@@ -220,13 +217,6 @@ gl_sel(void *data, Evas_Object *obj, void *event_info)
220} 217}
221 218
222static void 219static void
223gl_sel_clear_cb(void *data EINA_UNUSED, Evas_Object *obj,
224 void *event_info EINA_UNUSED)
225{
226 elm_genlist_clear(obj);
227}
228
229static void
230_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 220_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
231{ 221{
232 Evas_Object *gl = data; 222 Evas_Object *gl = data;
@@ -426,24 +416,12 @@ test_genlist(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
426 if (getenv("ELM_TEST_AUTOBOUNCE")) max = 200; 416 if (getenv("ELM_TEST_AUTOBOUNCE")) max = 200;
427 for (i = 0; i < max; i++) 417 for (i = 0; i < max; i++)
428 { 418 {
429 if (i == 5) 419 gli = elm_genlist_item_append(gl, api->itc1,
430 { 420 (void *)(uintptr_t)i/* item data */,
431 gli = elm_genlist_item_append(gl, api->itc1, 421 NULL/* parent */,
432 (void *)(uintptr_t)i/* item data */, 422 ELM_GENLIST_ITEM_NONE,
433 NULL/* parent */, 423 gl_sel/* func */,
434 ELM_GENLIST_ITEM_NONE, 424 (void *)(uintptr_t)(i * 10)/* func data */);
435 gl_sel_clear_cb/* func */,
436 (void *)(uintptr_t)(i * 10)/* func data */);
437 }
438 else
439 {
440 gli = elm_genlist_item_append(gl, api->itc1,
441 (void *)(uintptr_t)i/* item data */,
442 NULL/* parent */,
443 ELM_GENLIST_ITEM_NONE,
444 gl_sel/* func */,
445 (void *)(uintptr_t)(i * 10)/* func data */);
446 }
447 425
448 if (i == 50) 426 if (i == 50)
449 evas_object_smart_callback_add(bt_50, "clicked", _bt50_cb, gli); 427 evas_object_smart_callback_add(bt_50, "clicked", _bt50_cb, gli);