diff options
Diffstat (limited to 'src/GuiLua')
-rw-r--r-- | src/GuiLua/GuiLua.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/GuiLua/GuiLua.c b/src/GuiLua/GuiLua.c index 2fa9bcb..5815b45 100644 --- a/src/GuiLua/GuiLua.c +++ b/src/GuiLua/GuiLua.c | |||
@@ -204,6 +204,7 @@ static int action(lua_State *L) | |||
204 | if (wid && strcmp(wid->magic, "Widget") == 0) | 204 | if (wid && strcmp(wid->magic, "Widget") == 0) |
205 | { | 205 | { |
206 | //PD("Setting action : %s\n", action); | 206 | //PD("Setting action : %s\n", action); |
207 | free(wid->action); | ||
207 | wid->action = strdup(action); | 208 | wid->action = strdup(action); |
208 | } | 209 | } |
209 | return 0; | 210 | return 0; |
@@ -302,7 +303,7 @@ static int window(lua_State *L) | |||
302 | } | 303 | } |
303 | 304 | ||
304 | win = winFangAdd(parent, 5, 26, w, h, title, name, world); | 305 | win = winFangAdd(parent, 5, 26, w, h, title, name, world); |
305 | win->module = module; | 306 | win->module = strdup(module); |
306 | if (gl) | 307 | if (gl) |
307 | { | 308 | { |
308 | // If there's no parent, we become the parent. | 309 | // If there's no parent, we become the parent. |
@@ -418,7 +419,7 @@ PD("GuiLua 3"); | |||
418 | 419 | ||
419 | push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "loopWindow", "Run our windows main loop.", loopWindow, 0); | 420 | push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "loopWindow", "Run our windows main loop.", loopWindow, 0); |
420 | push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "quit", "Quit, exit, remove thyself.", quit, 0); | 421 | push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "quit", "Quit, exit, remove thyself.", quit, 0); |
421 | push_lua(L, "@ ( = $ $ & $ )", skang, THINGASM, skang, "closeWindow", "Closes a window.", closeWindow, "userdata", 0); // TODO - closeWindow, "userdata"); | 422 | push_lua(L, "@ ( = $ $ & $ )", skang, THINGASM, skang, "closeWindow", "Closes a window.", closeWindow, "userdata", 0); |
422 | 423 | ||
423 | // A test of the array building stuff. | 424 | // A test of the array building stuff. |
424 | push_lua(L, "@ ( { = $ $ % $widget !required } )", skang, THINGASM, skang, "wibble", "It's wibbly!", 1, "'edit', 'The wibblinator:', 1, 1, 10, 50", 1, 0); | 425 | push_lua(L, "@ ( { = $ $ % $widget !required } )", skang, THINGASM, skang, "wibble", "It's wibbly!", 1, "'edit', 'The wibblinator:', 1, 1, 10, 50", 1, 0); |