diff options
author | Daniel Juyung Seo <seojuyung2@gmail.com> | 2015-12-25 03:31:14 +0900 |
---|---|---|
committer | Daniel Juyung Seo <seojuyung2@gmail.com> | 2015-12-25 03:31:17 +0900 |
commit | bc39c70543ee4a8af45cda8f8f08fbcb673ef640 (patch) | |
tree | f32ac994e75995fb6fa9e175f424653c8460cb1b | |
parent | f7726c72290cd7341132939c5b6f8c0468f60e87 (diff) | |
download | elementary-bc39c70543ee4a8af45cda8f8f08fbcb673ef640.tar.gz |
genlist: Make more realistic scenario.
With this, we can test with arrow keys and find more bugs.
-rw-r--r-- | src/bin/test_genlist.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/bin/test_genlist.c b/src/bin/test_genlist.c index 9ed37254e..ab09b3cd9 100644 --- a/src/bin/test_genlist.c +++ b/src/bin/test_genlist.c @@ -4121,20 +4121,23 @@ _gl_del_text_get(void *data, Evas_Object *obj EINA_UNUSED, { char buf[256] = { 0 }; int num = (int)(uintptr_t)data; - int num_category = num % 4; + int num_category = num % 10; - if (num_category == 0) + if (num_category == 3) snprintf(buf, sizeof(buf), "Item #%.02i - 1. Item Del", num); - else if (num_category == 1) + else if (num_category == 5) snprintf(buf, sizeof(buf), "Item #%.02i - 2. Genlist Clear and Item Append", num); - else if (num_category == 2) + else if (num_category == 7) snprintf(buf, sizeof(buf), "Item #%.02i - 3. Genlist Del", num); - else if (num_category == 3) + else if (num_category == 9) snprintf(buf, sizeof(buf), "Item #%.02i - 4. Genlist Clear on double-click", num); + else + snprintf(buf, sizeof(buf), + "Item #%.02i - Normal item", num); return strdup(buf); } @@ -4143,19 +4146,19 @@ static void _gl_del_sel(void *data, Evas_Object *obj, void *event_info) { int num = (int)(uintptr_t)data; - int num_category = num % 4; + int num_category = num % 10; Elm_Object_Item *it = event_info; Elm_Genlist_Item_Class *itc = (Elm_Genlist_Item_Class *)elm_genlist_item_item_class_get(it); - if (num_category == 0) + if (num_category == 3) elm_object_item_del(it); - else if (num_category == 1) + else if (num_category == 5) { elm_genlist_clear(obj); _gl_del_item_append(obj, itc); } - else if (num_category == 2) + else if (num_category == 7) { evas_object_del(obj); } |