aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/bin/test_gengrid.c
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2012-04-02 06:20:28 +0000
committerDaniel Juyung Seo <seojuyung2@gmail.com>2012-04-02 06:20:28 +0000
commit7f2fc8ef80fbce254730f9823e356a9fdb215340 (patch)
tree7e339c26d0ebc9d662db18ff2a971a170572ce9f /legacy/elementary/src/bin/test_gengrid.c
parentRevert a wrong commit. Un-wanted files are committed together. (diff)
downloadefl-7f2fc8ef80fbce254730f9823e356a9fdb215340.tar.gz
elm bin: Use convenient utility function elm_win_util_standard_add()
instead of elm_win_add() + elm_bg_add(). This is for normal style (ELM_WIN_BASIC) window. SVN revision: 69848
Diffstat (limited to 'legacy/elementary/src/bin/test_gengrid.c')
-rw-r--r--legacy/elementary/src/bin/test_gengrid.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/legacy/elementary/src/bin/test_gengrid.c b/legacy/elementary/src/bin/test_gengrid.c
index 20e03147c0..b17c8f9712 100644
--- a/legacy/elementary/src/bin/test_gengrid.c
+++ b/legacy/elementary/src/bin/test_gengrid.c
@@ -469,19 +469,13 @@ cursor_bt_clicked(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *even
void
test_gengrid(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bt, *content_box, *bxx, *bx, *tg;
+ Evas_Object *win, *bt, *content_box, *bxx, *bx, *tg;
api_data *api = calloc(1, sizeof(api_data));
- win = elm_win_add(NULL, "gengrid", ELM_WIN_BASIC);
- elm_win_title_set(win, "GenGrid");
+ win = elm_win_util_standard_add("gengrid", "GenGrid");
elm_win_autodel_set(win, EINA_TRUE);
evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _cleanup_cb, api);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
bxx = elm_box_add(win);
api->box = bxx;
elm_win_resize_object_add(win, bxx);
@@ -686,17 +680,11 @@ _size_changed(void *data, Evas_Object *obj, void *event_info __UNUSED__)
void
test_gengrid2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *grid, *bx, *hbx, *bt, *ck;
+ Evas_Object *win, *grid, *bx, *hbx, *bt, *ck;
- win = elm_win_add(NULL, "gengrid2", ELM_WIN_BASIC);
- elm_win_title_set(win, "GenGrid2");
+ win = elm_win_util_standard_add("gengrid2", "GenGrid 2");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
@@ -788,20 +776,14 @@ test_gengrid2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
void
test_gengrid3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *grid;
+ Evas_Object *win, *grid;
static Testitem ti[144];
int i, n;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "gengrid_group", ELM_WIN_BASIC);
- elm_win_title_set(win, "GenGrid Group");
+ win = elm_win_util_standard_add("gengrid_group", "GenGrid Group");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
grid = elm_gengrid_add(win);
elm_gengrid_item_size_set(grid, 150, 150);
elm_gengrid_group_item_size_set(grid, 31, 31);