widget: return self for buttons

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-10-24 17:48:50 +02:00
parent f43c455035
commit 0b5a681171
2 changed files with 3 additions and 1 deletions

View file

@ -1146,7 +1146,6 @@ luaA_button_array_set(lua_State *L, int idx, button_array_t *buttons)
button_ref(b);
lua_pop(L, 1);
}
lua_pop(L, 1);
}
/** Push an array of button as an Lua table onto the stack.

View file

@ -396,7 +396,10 @@ luaA_widget_buttons(lua_State *L)
button_array_t *buttons = &(*widget)->buttons;
if(lua_gettop(L) == 2)
{
luaA_button_array_set(L, 2, buttons);
return 1;
}
return luaA_button_array_get(L, buttons);
}