From 516dd91027159d7434a5769abd9eb97d39e83290 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 6 Feb 2015 23:08:07 +0100 Subject: [PATCH] Re-apply naughty: Fix builds without dbus (d5088c5) This got lost in 355f106 (naughty: Split up into core and dbus). --- lib/naughty/dbus.lua.in | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/naughty/dbus.lua.in b/lib/naughty/dbus.lua.in index 4eac95c60..0c6e69b98 100644 --- a/lib/naughty/dbus.lua.in +++ b/lib/naughty/dbus.lua.in @@ -47,17 +47,21 @@ dbus.config.mapping = { } local function sendActionInvoked(notificationId, action) - capi.dbus.emit_signal("session", "/org/freedesktop/Notifications", - "org.freedesktop.Notifications", "ActionInvoked", - "i", notificationId, - "s", action) + if capi.dbus then + capi.dbus.emit_signal("session", "/org/freedesktop/Notifications", + "org.freedesktop.Notifications", "ActionInvoked", + "i", notificationId, + "s", action) + end end local function sendNotificationClosed(notificationId, reason) - capi.dbus.emit_signal("session", "/org/freedesktop/Notifications", - "org.freedesktop.Notifications", "NotificationClosed", - "i", notificationId, - "i", reason) + if capi.dbus then + capi.dbus.emit_signal("session", "/org/freedesktop/Notifications", + "org.freedesktop.Notifications", "NotificationClosed", + "i", notificationId, + "i", reason) + end end local function convert_icon(w, h, rowstride, channels, data)