commit 0d1d3538f04284b1d22a9a6aaa871d832ee9d6b6
parent e1221a164f2af80023d0600f7b30be0f86f2b22c
Author: Sweets <Sweets@users.noreply.github.com>
Date: Sun, 26 Apr 2020 13:15:28 -0700
Implement notification IDs from the daemon
Diffstat:
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/callbacks.c b/callbacks.c
@@ -1,6 +1,8 @@
#include "tiramisu.h"
#include "callbacks.h"
+unsigned int notification_id = 0;
+
void method_handler(GDBusConnection *connection, const gchar *sender,
const gchar *object, const gchar *interface, const gchar *method,
GVariant *parameters, GDBusMethodInvocation *invocation,
@@ -40,7 +42,7 @@ void method_handler(GDBusConnection *connection, const gchar *sender,
output(app_name, replaces_id, app_icon, summary, body, actions, hints,
timeout);
- return_value = g_variant_new("(u)", 0);
+ return_value = g_variant_new("(u)", notification_id++);
goto flush;
}
diff --git a/callbacks.h b/callbacks.h
@@ -3,6 +3,8 @@
#include <gio/gio.h>
#include <glib.h>
+unsigned int notification_id;
+
void method_handler(GDBusConnection*, const gchar*, const gchar*, const gchar*,
const gchar*, GVariant*, GDBusMethodInvocation*, gpointer);