From a70d4fcf21cd93b9b14854fe36647b2c20aece76 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Wed, 25 Jan 2023 20:20:25 +0100 Subject: [PATCH] WIP: notification --- include/ui.h | 1 + src/ui/application.c | 10 ++++++++++ src/ui/gemgraph.ui | 3 +-- src/ui/window.c | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/include/ui.h b/include/ui.h index cea99a2..c4915f7 100644 --- a/include/ui.h +++ b/include/ui.h @@ -139,3 +139,4 @@ void on_openfile_response_complete(GObject *source_object, void ui_set_stack(const char *mode); void ui_send_notification(const char *message); +void ui_send_internal_notification(const char *message); diff --git a/src/ui/application.c b/src/ui/application.c index b608c65..a051d19 100644 --- a/src/ui/application.c +++ b/src/ui/application.c @@ -116,6 +116,16 @@ static void gem_graph_client_application_init(GemGraphClientApplication *self) ui_disable_action("presentmode"); } +void ui_send_notification(const char *message) +{ + g_print("NOTIFICATION: %s\n", message); + + g_application_send_notification(G_APPLICATION(application), + "notification", + g_notification_new(message) + ); +} + /* -------------------------------------------------------------------------- */ static void gem_graph_client_application_class_init( diff --git a/src/ui/gemgraph.ui b/src/ui/gemgraph.ui index fae1850..b2f63cc 100644 --- a/src/ui/gemgraph.ui +++ b/src/ui/gemgraph.ui @@ -3,7 +3,6 @@ -