aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/GuiLua/GuiLua.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-05-06 16:57:08 +1000
committerDavid Walter Seikel2014-05-06 16:57:08 +1000
commit4521683fe65b4f32b1a470e8e8b7cfb61d2834d3 (patch)
treeb738ca50c746d676e3cea88e28c287db85056c9d /src/GuiLua/GuiLua.c
parentEvery window is a winFang now, and winFangs delete their own children. (diff)
downloadSledjHamr-4521683fe65b4f32b1a470e8e8b7cfb61d2834d3.zip
SledjHamr-4521683fe65b4f32b1a470e8e8b7cfb61d2834d3.tar.gz
SledjHamr-4521683fe65b4f32b1a470e8e8b7cfb61d2834d3.tar.bz2
SledjHamr-4521683fe65b4f32b1a470e8e8b7cfb61d2834d3.tar.xz
Now that everything is a winFang, GuiLua doesn't have to track it's own child windows.
Diffstat (limited to 'src/GuiLua/GuiLua.c')
-rw-r--r--src/GuiLua/GuiLua.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/GuiLua/GuiLua.c b/src/GuiLua/GuiLua.c
index 3ff8f94..5c76e15 100644
--- a/src/GuiLua/GuiLua.c
+++ b/src/GuiLua/GuiLua.c
@@ -248,10 +248,7 @@ static int window(lua_State *L)
248 win = winFangAdd(parent, 25, 25, w, h, title, name); 248 win = winFangAdd(parent, 25, 25, w, h, title, name);
249 // If there's no parent, we become the parent. 249 // If there's no parent, we become the parent.
250 if (gl && !parent) 250 if (gl && !parent)
251 {
252 gl->parent = win; 251 gl->parent = win;
253 eina_clist_add_head(&gl->winFangs, &win->node);
254 }
255 lua_pushlightuserdata(L, win); 252 lua_pushlightuserdata(L, win);
256 253
257 return 1; 254 return 1;
@@ -280,7 +277,6 @@ static int quit(lua_State *L)
280 277
281static int closeWindow(lua_State *L) 278static int closeWindow(lua_State *L)
282{ 279{
283 winFang *win;
284 GuiLua *gl; 280 GuiLua *gl;
285 281
286 lua_getfield(L, LUA_REGISTRYINDEX, glName); 282 lua_getfield(L, LUA_REGISTRYINDEX, glName);
@@ -288,12 +284,7 @@ static int closeWindow(lua_State *L)
288 lua_pop(L, 1); 284 lua_pop(L, 1);
289 285
290 if (gl) 286 if (gl)
291 { 287 winFangDel(gl->parent);
292 EINA_CLIST_FOR_EACH_ENTRY(win, &gl->winFangs, winFang, node)
293 {
294 winFangDel(win);
295 }
296 }
297 288
298 return 0; 289 return 0;
299} 290}
@@ -372,7 +363,6 @@ GuiLua *GuiLuaDo(int argc, char **argv, winFang *parent)
372 363
373 result = calloc(1, sizeof(GuiLua)); 364 result = calloc(1, sizeof(GuiLua));
374 result->parent = parent; 365 result->parent = parent;
375 eina_clist_init(&result->winFangs);
376 366
377 L = luaL_newstate(); 367 L = luaL_newstate();
378 if (L) 368 if (L)