From d5ee1febca5fba70961c9f9dec91e0342e989712 Mon Sep 17 00:00:00 2001 From: Lukas Radermacher <49586507+lukasrad02@users.noreply.github.com> Date: Mon, 12 Apr 2021 18:48:48 +0200 Subject: [PATCH] Add notification property default_action_name --- src/notification.c | 2 ++ src/notification.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/notification.c b/src/notification.c index b16d671..e9ab576 100644 --- a/src/notification.c +++ b/src/notification.c @@ -288,6 +288,7 @@ void notification_unref(struct notification *n) g_free(n->desktop_entry); g_hash_table_unref(n->actions); + g_free(n->default_action_name); if (n->icon) g_object_unref(n->icon); @@ -386,6 +387,7 @@ struct notification *notification_create(void) n->fullscreen = FS_SHOW; 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; return n; diff --git a/src/notification.h b/src/notification.h index 7457460..1107bfd 100644 --- a/src/notification.h +++ b/src/notification.h @@ -61,6 +61,7 @@ struct notification { int locked; /**< If non-zero the notification is locked **/ GHashTable *actions; + char *default_action_name; /**< The name of the action to be invoked on do_action */ enum markup_mode markup; const char *format;