WIP: notification
This commit is contained in:
parent
aa4395c1ae
commit
a70d4fcf21
|
@ -139,3 +139,4 @@ void on_openfile_response_complete(GObject *source_object,
|
||||||
void ui_set_stack(const char *mode);
|
void ui_set_stack(const char *mode);
|
||||||
|
|
||||||
void ui_send_notification(const char *message);
|
void ui_send_notification(const char *message);
|
||||||
|
void ui_send_internal_notification(const char *message);
|
||||||
|
|
|
@ -116,6 +116,16 @@ static void gem_graph_client_application_init(GemGraphClientApplication *self)
|
||||||
ui_disable_action("presentmode");
|
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(
|
static void gem_graph_client_application_class_init(
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
<interface>
|
<interface>
|
||||||
<!-- interface-name gem-graph.ui -->
|
<!-- interface-name gem-graph.ui -->
|
||||||
<requires lib="gtk" version="4.6"/>
|
<requires lib="gtk" version="4.6"/>
|
||||||
<requires lib="libadwaita" version="1.1"/>
|
|
||||||
<template class="GemGraphClientWindow" parent="GtkApplicationWindow">
|
<template class="GemGraphClientWindow" parent="GtkApplicationWindow">
|
||||||
<property name="default-height">720</property>
|
<property name="default-height">720</property>
|
||||||
<property name="default-width">1080</property>
|
<property name="default-width">1080</property>
|
||||||
|
@ -116,7 +115,7 @@
|
||||||
</property>
|
</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkStackPage">
|
<object class="GtkStackPage">
|
||||||
<property name="name">home</property>
|
<property name="name">home</property>
|
||||||
<property name="child">
|
<property name="child">
|
||||||
|
|
|
@ -301,7 +301,7 @@ void ui_set_stack(const char *mode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ui_send_notification(const char *message)
|
void ui_send_internal_notification(const char *message)
|
||||||
{
|
{
|
||||||
if (window->toast_overlay == NULL) {
|
if (window->toast_overlay == NULL) {
|
||||||
g_printerr("Can't find self->toast_overlay !\n");
|
g_printerr("Can't find self->toast_overlay !\n");
|
||||||
|
|
Loading…
Reference in New Issue