Add notification property default_action_name

This commit is contained in:
Lukas Radermacher 2021-04-12 18:48:48 +02:00
parent 941c527af9
commit d5ee1febca
2 changed files with 3 additions and 0 deletions

View File

@ -288,6 +288,7 @@ void notification_unref(struct notification *n)
g_free(n->desktop_entry); g_free(n->desktop_entry);
g_hash_table_unref(n->actions); g_hash_table_unref(n->actions);
g_free(n->default_action_name);
if (n->icon) if (n->icon)
g_object_unref(n->icon); g_object_unref(n->icon);
@ -386,6 +387,7 @@ struct notification *notification_create(void)
n->fullscreen = FS_SHOW; n->fullscreen = FS_SHOW;
n->actions = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); n->actions = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
n->default_action_name = g_strdup("default");
n->script_count = 0; n->script_count = 0;
return n; return n;

View File

@ -61,6 +61,7 @@ struct notification {
int locked; /**< If non-zero the notification is locked **/ int locked; /**< If non-zero the notification is locked **/
GHashTable *actions; GHashTable *actions;
char *default_action_name; /**< The name of the action to be invoked on do_action */
enum markup_mode markup; enum markup_mode markup;
const char *format; const char *format;