aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/GuiLua/GuiLua.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-05-12 06:39:49 +1000
committerDavid Walter Seikel2014-05-12 06:39:49 +1000
commitc169cd5547a9f90f2c9607f1fd9b0a77eac46043 (patch)
tree4ea11e6618c80479b5595745814015e6168f28d5 /src/GuiLua/GuiLua.c
parentGuiLua uses box for widgets if there's no x supplied. (diff)
downloadSledjHamr-c169cd5547a9f90f2c9607f1fd9b0a77eac46043.zip
SledjHamr-c169cd5547a9f90f2c9607f1fd9b0a77eac46043.tar.gz
SledjHamr-c169cd5547a9f90f2c9607f1fd9b0a77eac46043.tar.bz2
SledjHamr-c169cd5547a9f90f2c9607f1fd9b0a77eac46043.tar.xz
widgetAdd now does the box / grid decision, and some oter things moved into it.
Diffstat (limited to 'src/GuiLua/GuiLua.c')
-rw-r--r--src/GuiLua/GuiLua.c16
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;