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,18 +47,22 @@ dbus.config.mapping = {
}
local function sendActionInvoked(notificationId, 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)
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)
-- Do the arguments look sane? (e.g. we have enough data)