commit
edf21742b8
|
@ -57,7 +57,13 @@ local action = {}
|
|||
-- @propemits true false
|
||||
|
||||
--- When a notification is invoked.
|
||||
--
|
||||
-- Note that it is possible to call `:invoke()` without a notification object.
|
||||
-- It is possible the `notification` parameter will be nil.
|
||||
--
|
||||
-- @signal invoked
|
||||
-- @tparam naughty.action action The action.
|
||||
-- @tparam naughty.notification|nil notification The notification, if known.
|
||||
|
||||
function action:get_selected()
|
||||
return self._private.selected
|
||||
|
|
|
@ -337,7 +337,10 @@ local function new(_, args)
|
|||
update_style(wdg)
|
||||
|
||||
wdg._private.default_buttons = gtable.join(
|
||||
abutton({ }, 1, function(a) a:invoke(args.notification) end)
|
||||
abutton({ }, 1, function(a)
|
||||
local notif = wdg._private.notification or args.notification
|
||||
a:invoke(notif)
|
||||
end)
|
||||
)
|
||||
|
||||
return wdg
|
||||
|
|
Loading…
Reference in New Issue