awful.widget.button: export new correctly

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-04-27 18:39:55 +02:00
parent 512a5d86e7
commit 24be8643eb
1 changed files with 3 additions and 2 deletions

View File

@ -5,6 +5,7 @@
---------------------------------------------------------------------------
local setmetatable = setmetatable
local unpack = unpack
local type = type
local button = require("awful.button")
local capi = { image = image,
@ -18,7 +19,7 @@ module("awful.widget.button")
-- @param args Standard widget table arguments, plus image for the image path or
-- the image object.
-- @return A textbox widget configured as a button.
function new(_, args)
function new(args)
if not args or not args.image then return end
local img_release
if type(args.image) == "string" then
@ -38,6 +39,6 @@ function new(_, args)
return w
end
setmetatable(_M, { __call = new })
setmetatable(_M, { __call = function(_, ...) return new(unpack(arg)) end })
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80