diff options
Diffstat (limited to 'src/GuiLua/GuiLua.c')
-rw-r--r-- | src/GuiLua/GuiLua.c | 16 |
1 files changed, 3 insertions, 13 deletions
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) | |||
185 | { | 185 | { |
186 | Widget *wid; | 186 | Widget *wid; |
187 | 187 | ||
188 | // This two lines is likely the only one that will be different for the different sorts of widgets. | 188 | // These two lines are likely the only ones that will be different for the different sorts of widgets. |
189 | wid = widgetAdd(win, ELM_OBJ_BUTTON_CLASS, win->win, title); | 189 | wid = widgetAdd(win, ELM_OBJ_BUTTON_CLASS, title, x, y, w, h); |
190 | wid->data = L; | ||
191 | eo_do(wid->obj, | ||
192 | evas_obj_visibility_set(EINA_TRUE), | ||
193 | eo_key_data_set("Widget", wid, NULL) | ||
194 | ); | ||
195 | |||
196 | if (x < 0) | ||
197 | elm_layout_box_append(win->win, WF_BOX, wid->obj); | ||
198 | else | ||
199 | elm_grid_pack(win->grid, wid->obj, x, y, w, h); | ||
200 | winFangCalcMinSize(win); | ||
201 | evas_object_smart_callback_add(wid->obj, "clicked", _on_click, wid); | 190 | evas_object_smart_callback_add(wid->obj, "clicked", _on_click, wid); |
191 | wid->data = L; | ||
202 | 192 | ||
203 | lua_pushlightuserdata(L, (void *) wid); | 193 | lua_pushlightuserdata(L, (void *) wid); |
204 | return 1; | 194 | return 1; |