From c169cd5547a9f90f2c9607f1fd9b0a77eac46043 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 12 May 2014 06:39:49 +1000 Subject: widgetAdd now does the box / grid decision, and some oter things moved into it. --- src/GuiLua/GuiLua.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'src/GuiLua/GuiLua.c') diff --git a/src/GuiLua/GuiLua.c b/src/GuiLua/GuiLua.c index bfba073..06bc516 100644 --- a/src/GuiLua/GuiLua.c +++ b/src/GuiLua/GuiLua.c @@ -185,20 +185,10 @@ static int widget(lua_State *L) { Widget *wid; - // This two lines is likely the only one that will be different for the different sorts of widgets. - wid = widgetAdd(win, ELM_OBJ_BUTTON_CLASS, win->win, title); - wid->data = L; - eo_do(wid->obj, - evas_obj_visibility_set(EINA_TRUE), - eo_key_data_set("Widget", wid, NULL) - ); - - if (x < 0) - elm_layout_box_append(win->win, WF_BOX, wid->obj); - else - elm_grid_pack(win->grid, wid->obj, x, y, w, h); - winFangCalcMinSize(win); + // These two lines are likely the only ones that will be different for the different sorts of widgets. + wid = widgetAdd(win, ELM_OBJ_BUTTON_CLASS, title, x, y, w, h); evas_object_smart_callback_add(wid->obj, "clicked", _on_click, wid); + wid->data = L; lua_pushlightuserdata(L, (void *) wid); return 1; -- cgit v1.1