[gnome-builder] plugins/notification: port to GTK 4
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] plugins/notification: port to GTK 4
- Date: Tue, 12 Jul 2022 06:39:17 +0000 (UTC)
commit 7d33d950f7f0d917d6dc4d08ef4c26a61f88afc7
Author: Christian Hergert <chergert redhat com>
Date: Mon Jul 11 23:08:47 2022 -0700
plugins/notification: port to GTK 4
- Use .Devel icon when necessary
- Remove libdazzle usage
- Update .plugin
src/plugins/notification/ide-notification-addin.c | 9 ++++++++-
src/plugins/notification/notification.plugin | 2 +-
2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/notification/ide-notification-addin.c
b/src/plugins/notification/ide-notification-addin.c
index f9a90c31c..73484fcfd 100644
--- a/src/plugins/notification/ide-notification-addin.c
+++ b/src/plugins/notification/ide-notification-addin.c
@@ -20,8 +20,11 @@
#define G_LOG_DOMAIN "gbp-notification-addin"
+#include "config.h"
+
#include <glib/gi18n.h>
#include <gio/gio.h>
+
#include <libide-foundry.h>
#include "ide-notification-addin.h"
@@ -55,7 +58,7 @@ should_supress_message (IdeNotificationAddin *self,
g_assert (message != NULL);
if (self->last_msg_body == NULL ||
- !dzl_str_equal0 (self->last_msg_body, message) ||
+ !ide_str_equal0 (self->last_msg_body, message) ||
self->last_time + GRACE_PERIOD_USEC < g_get_monotonic_time ())
{
g_free (self->last_msg_body);
@@ -110,7 +113,11 @@ ide_notification_addin_notify (IdeNotificationAddin *self,
msg_body = g_strdup_printf (_("Project “%s” failed to build"), project_name);
}
+#ifdef DEVELOPMENT_BUILD
+ icon = g_themed_icon_new ("org.gnome.Builder.Devel-symbolic");
+#else
icon = g_themed_icon_new ("org.gnome.Builder-symbolic");
+#endif
notification = g_notification_new (msg_title);
g_notification_set_body (notification, msg_body);
diff --git a/src/plugins/notification/notification.plugin b/src/plugins/notification/notification.plugin
index 079e89883..b0e08de0d 100644
--- a/src/plugins/notification/notification.plugin
+++ b/src/plugins/notification/notification.plugin
@@ -4,6 +4,6 @@ Builtin=true
Copyright=Copyright © 2017 Lucie Charvat
Description=Notification of progress when Builder application is not on foreground
Embedded=_ide_notification_register_types
-Hidden=true
Module=notification
Name=Notification of progress
+X-Category=desktop
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]