Merge pull request #699 from tsipinakis/invalidate_actions
Invalidate actions after notification is closed
This commit is contained in:
commit
ef88e39de6
@ -384,6 +384,8 @@ void signal_notification_closed(struct notification *n, enum reason reason)
|
|||||||
body,
|
body,
|
||||||
&err);
|
&err);
|
||||||
|
|
||||||
|
notification_invalidate_actions(n);
|
||||||
|
|
||||||
n->dbus_valid = false;
|
n->dbus_valid = false;
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
|
@ -598,4 +598,8 @@ void notification_do_action(const struct notification *n)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void notification_invalidate_actions(struct notification *n) {
|
||||||
|
g_hash_table_remove_all(n->actions);
|
||||||
|
}
|
||||||
|
|
||||||
/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */
|
/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */
|
||||||
|
@ -191,6 +191,15 @@ void notification_update_text_to_render(struct notification *n);
|
|||||||
*/
|
*/
|
||||||
void notification_do_action(const struct notification *n);
|
void notification_do_action(const struct notification *n);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove all client action data from the notification.
|
||||||
|
*
|
||||||
|
* This should be called after a notification is closed to avoid showing
|
||||||
|
* actions that will not work anymore since the client has stopped listening
|
||||||
|
* for them.
|
||||||
|
*/
|
||||||
|
void notification_invalidate_actions(struct notification *n);
|
||||||
|
|
||||||
const char *notification_urgency_to_string(const enum urgency urgency);
|
const char *notification_urgency_to_string(const enum urgency urgency);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user