notifications: Send more signals when changing an action.

If the action own `notification` object changes, also emit the signal
on the old one.
This commit is contained in:
Emmanuel Lepage Vallee 2019-07-09 01:35:03 -04:00
parent 12f1908ef8
commit 7fb6883cac
1 changed files with 10 additions and 0 deletions

View File

@ -103,6 +103,16 @@ for _, prop in ipairs { "name", "icon", "notification", "icon_only" } do
end
end
local set_notif = action.set_notification
function action.set_notification(self, value)
local old = self._private.notification
set_notif(self, value)
if old then
old:emit_signal("property::actions")
end
end
--- Execute this action.
--
-- This only emits the `invoked` signal.