aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/GuiLua/GuiLua.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/GuiLua/GuiLua.c b/src/GuiLua/GuiLua.c
index 643a9d5..fe398c8 100644
--- a/src/GuiLua/GuiLua.c
+++ b/src/GuiLua/GuiLua.c
@@ -299,14 +299,10 @@ static int quit(lua_State *L)
299 299
300static int closeWindow(lua_State *L) 300static int closeWindow(lua_State *L)
301{ 301{
302 GuiLua *gl; 302 winFang *win = NULL;
303
304 lua_getfield(L, LUA_REGISTRYINDEX, glName);
305 gl = lua_touserdata(L, -1);
306 lua_pop(L, 1);
307 303
308 if (gl) 304 pull_lua(L, 1, "*window", &win);
309 winFangDel(gl->parent); 305 if (win) winFangDel(win);
310 306
311 return 0; 307 return 0;
312} 308}
@@ -368,7 +364,7 @@ PD("GuiLua 3");
368 push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "Colour", "Change widget colours.", colour, 0); 364 push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "Colour", "Change widget colours.", colour, 0);
369 push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "loopWindow", "Run our windows main loop.", loopWindow, 0); 365 push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "loopWindow", "Run our windows main loop.", loopWindow, 0);
370 push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "quit", "Quit, exit, remove thyself.", quit, 0); 366 push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "quit", "Quit, exit, remove thyself.", quit, 0);
371 push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "closeWindow", "Closes our window.", closeWindow, 0); 367 push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "closeWindow", "Closes a window.", closeWindow, 0); // TODO - closeWindow, "userdata");
372 368
373 // A test of the array building stuff. 369 // A test of the array building stuff.
374 push_lua(L, "@ ( { = $ $ % $widget !required } )", skang, THINGASM, skang, "wibble", "It's wibbly!", 1, "'edit', 'The wibblinator:', 1, 1, 10, 50", 1, 0); 370 push_lua(L, "@ ( { = $ $ % $widget !required } )", skang, THINGASM, skang, "wibble", "It's wibbly!", 1, "'edit', 'The wibblinator:', 1, 1, 10, 50", 1, 0);