On Thu, 03 Feb 2011 10:04:58 +0100
Uli Schlachter <psyc...@znc.in> wrote:

> Am 03.02.2011 01:33, André Aparício wrote:
> > @@ -272,7 +272,7 @@
> >   -- @return The notification object
> >   function notify(args)
> >       -- gather variables together
> > -    local preset = args.preset or config.default_preset or {}
> > +    local preset = args.preset
> >       local timeout = args.timeout or preset.timeout or 5
> >       local icon = args.icon or preset.icon
> >       local icon_size = args.icon_size or preset.icon_size
> 
> Hi,
> 
> this change will break everything which doesn't come through dbus.
> Previously, naughty.notify({ text = "foo" }) got the default preset
> applied, but with your patch it wouldn't get any preset applied.
> 
> Why do you change this at all? Can't you just leave this chunk in and
> only apply the other change from your patch?
> 
> Also, please send git-formatted patches. That way git will track you
> as the patch's author (and instead of me, you get to write a commit
> message :-P).
> 
> Cheers,
> Uli
> 

Right, I didn't remember that it would be called from other place.
Then I think it's simply this:

From e134a28fe6ce1d42f67e58e81630b4271d75b2d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Apar=C3=ADcio?= <aparici...@gmail.com>
Date: Thu, 3 Feb 2011 15:21:19 +0000
Subject: [PATCH] Fix default naughty preset for dbus notifications

---
 lib/naughty.lua.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/naughty.lua.in b/lib/naughty.lua.in
index 1f5500e..372f95e 100644
--- a/lib/naughty.lua.in
+++ b/lib/naughty.lua.in
@@ -499,7 +499,7 @@ end
 -- Notify
 if capi.dbus then
     capi.dbus.connect_signal("org.freedesktop.Notifications", function
(data, appname, replaces_id, icon, title, text, actions, hints, expire)
-    args = { preset = { } }
+    args = { preset = config.default_preset }
     if data.member == "Notify" then
         if text ~= "" then
             args.text = text
-- 
1.7.3.4


--
To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.

Reply via email to