Hi,

I managed to miss this in the layouts patch serie. If there is no icon
in a notification, the textbox will be indexed at 2 and therefore won't
work...this got me for the second time, tricky.

I tried to fix this with table.insert, but for some reason it didn't
work on the widgets table, anyone can tell me why? Anyway, thats why I
fixed it the way I did.

cheers
lukash
>From 95f25eb4701d11d9c7bec7d23d491710d1e10766 Mon Sep 17 00:00:00 2001
From: Lukas Hrazky <[email protected]>
Date: Mon, 26 Oct 2009 23:31:20 +0100
Subject: [PATCH] naughty: update to new widget layouts

Signed-off-by: Lukas Hrazky <[email protected]>
---
 lib/naughty.lua.in |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/lib/naughty.lua.in b/lib/naughty.lua.in
index 590d29f..0146176 100644
--- a/lib/naughty.lua.in
+++ b/lib/naughty.lua.in
@@ -403,7 +403,11 @@ function notify(args)
     notification.idx = offset.idx
 
     -- populate widgets
-    notification.box.widgets = { iconbox, textbox, ["layout"] = layout.horizontal.leftright }
+    if iconbox then
+        notification.box.widgets = { iconbox, textbox, ["layout"] = layout.horizontal.leftright }
+    else
+        notification.box.widgets = { textbox, ["layout"] = layout.horizontal.leftright }
+    end
 
     -- insert the notification to the table
     table.insert(notifications[screen][notification.position], notification)
-- 
1.6.5

Reply via email to