From 57aeb2b85e24b41f80ace34944996585f3b067f7 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 27 Apr 2009 18:40:35 +0200 Subject: [PATCH] awful.widget.launcher: export new correctly Signed-off-by: Julien Danjou --- lib/awful/widget/launcher.lua.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/awful/widget/launcher.lua.in b/lib/awful/widget/launcher.lua.in index 8ac628c9..5d22f38d 100644 --- a/lib/awful/widget/launcher.lua.in +++ b/lib/awful/widget/launcher.lua.in @@ -5,6 +5,7 @@ --------------------------------------------------------------------------- local setmetatable = setmetatable +local unpack = unpack local util = require("awful.util") local wbutton = require("awful.widget.button") local button = require("awful.button") @@ -15,7 +16,7 @@ module("awful.widget.launcher") -- @param args Standard widget table arguments, plus image for the image path -- and command for the command to run on click, or either menu to create menu. -- @return A launcher widget. -local function new(_, args) +local function new(args) if not args.command and not args.menu then return end local w = wbutton(args) if not w then return end @@ -30,6 +31,6 @@ local 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