aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSangHyeon Lee <sh10233.lee@samsung.com>2016-03-30 17:47:56 +0900
committerSangHyeon Lee <sh10233.lee@samsung.com>2016-03-30 17:47:56 +0900
commit01c1fcb3c3d4e0767f6a7e3227f82f45e64ffb60 (patch)
tree7261470b117fdb17b576b4ab554db4f4db352f8c
parentfix gengrid test cursor sample in elementary_test (diff)
downloadefl-01c1fcb3c3d4e0767f6a7e3227f82f45e64ffb60.tar.gz
fix gengrid restore sample in elementary_test
-rw-r--r--src/bin/elementary/test_gengrid.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/bin/elementary/test_gengrid.c b/src/bin/elementary/test_gengrid.c
index 709d08e76f..11f45c93e3 100644
--- a/src/bin/elementary/test_gengrid.c
+++ b/src/bin/elementary/test_gengrid.c
@@ -28,6 +28,7 @@ struct _api_data
{
unsigned int state; /* What state we are testing */
Evas_Object *box; /* Use this to get box content */
+ Evas_Object *bt; /* Use this to get button content */
Evas_Object *grid;
Evas_Object *grid2;
Elm_Gengrid_Item_Field_Type field_type;
@@ -403,13 +404,17 @@ create_gengrid(Evas_Object *obj, int items)
return grid;
}
+
+
static void
restore_bt_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
api_data *api = data;
- elm_box_clear(api->box);
+ elm_box_unpack(api->box, api->grid);
+ evas_object_del(api->grid);
+
api->grid = create_gengrid(obj, (12 * 12));
- elm_box_pack_end(api->box, api->grid);
+ elm_box_pack_after(api->box, api->grid, api->bt);
evas_object_show(api->grid);
}
@@ -546,7 +551,7 @@ test_gengrid(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
elm_win_resize_object_add(win, bxx);
evas_object_show(bxx);
- bt = elm_button_add(win);
+ api->bt = bt = elm_button_add(win);
elm_object_text_set(bt, "Next API function");
evas_object_smart_callback_add(bt, "clicked", _api_bt_clicked, (void *)api);
elm_box_pack_end(bxx, bt);