[gnome-builder] core: add title to IdeNotification.repr()



commit 559c188269df214061042b1de1161ed71ab1e720
Author: Christian Hergert <chergert redhat com>
Date:   Mon Nov 29 12:24:28 2021 -0800

    core: add title to IdeNotification.repr()

 src/libide/core/ide-notification.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/src/libide/core/ide-notification.c b/src/libide/core/ide-notification.c
index f41c4ed29..4888c0e34 100644
--- a/src/libide/core/ide-notification.c
+++ b/src/libide/core/ide-notification.c
@@ -78,6 +78,17 @@ clear_button (Button *button)
   g_clear_object (&button->icon);
 }
 
+static gchar *
+ide_notification_repr (IdeObject *object)
+{
+  IdeNotification *self = IDE_NOTIFICATION (object);
+  IdeNotificationPrivate *priv = ide_notification_get_instance_private (self);
+
+  return g_strdup_printf ("%s label=%s",
+                          G_OBJECT_TYPE_NAME (self),
+                          priv->title);
+}
+
 static void
 ide_notification_destroy (IdeObject *object)
 {
@@ -210,6 +221,7 @@ ide_notification_class_init (IdeNotificationClass *klass)
   object_class->set_property = ide_notification_set_property;
 
   ide_object_class->destroy = ide_notification_destroy;
+  ide_object_class->repr = ide_notification_repr;
 
   /**
    * IdeNotification:body:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]