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;