Re-apply naughty: Fix builds without dbus (d5088c5)

This got lost in 355f106 (naughty: Split up into core and dbus).
This commit is contained in:
Daniel Hahler 2015-02-06 23:08:07 +01:00
parent 02bfd06038
commit 516dd91027
1 changed files with 12 additions and 8 deletions

View File

@ -47,17 +47,21 @@ dbus.config.mapping = {
} }
local function sendActionInvoked(notificationId, action) local function sendActionInvoked(notificationId, action)
if capi.dbus then
capi.dbus.emit_signal("session", "/org/freedesktop/Notifications", capi.dbus.emit_signal("session", "/org/freedesktop/Notifications",
"org.freedesktop.Notifications", "ActionInvoked", "org.freedesktop.Notifications", "ActionInvoked",
"i", notificationId, "i", notificationId,
"s", action) "s", action)
end
end end
local function sendNotificationClosed(notificationId, reason) local function sendNotificationClosed(notificationId, reason)
if capi.dbus then
capi.dbus.emit_signal("session", "/org/freedesktop/Notifications", capi.dbus.emit_signal("session", "/org/freedesktop/Notifications",
"org.freedesktop.Notifications", "NotificationClosed", "org.freedesktop.Notifications", "NotificationClosed",
"i", notificationId, "i", notificationId,
"i", reason) "i", reason)
end
end end
local function convert_icon(w, h, rowstride, channels, data) local function convert_icon(w, h, rowstride, channels, data)