From 3a25e7822440e0873dcb9bd2238961da2ba06428 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 5 Jan 2013 20:52:00 +0100 Subject: [PATCH] wibox.layout.rotate: Add some good constructor arguments Signed-off-by: Uli Schlachter --- lib/wibox/layout/rotate.lua.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/wibox/layout/rotate.lua.in b/lib/wibox/layout/rotate.lua.in index c5119e1e..5654263b 100644 --- a/lib/wibox/layout/rotate.lua.in +++ b/lib/wibox/layout/rotate.lua.in @@ -99,7 +99,7 @@ end --- Returns a new rotate layout. A rotate layout rotates a given widget. Use -- :set_widget() to set the widget and :set_direction() for the direction. -- The default direction is "north" which doesn't change anything. -local function new() +local function new(widget, dir) local ret = widget_base.make_widget() for k, v in pairs(rotate) do @@ -112,6 +112,9 @@ local function new() ret:emit_signal("widget::updated") end + ret:set_widget(widget) + ret:set_direction(dir or "north") + return ret end -- 2.11.4.GIT