[gtk/wip/otte/inscription: 5/14] inspector: Add inscription support




commit abdbef1b5ebb5407123906985026a8e8503362ab
Author: Benjamin Otte <otte redhat com>
Date:   Tue Jun 7 17:30:14 2022 +0200

    inspector: Add inscription support
    
    Allow searching for inscription text and show it in the label column.

 gtk/inspector/object-tree.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gtk/inspector/object-tree.c b/gtk/inspector/object-tree.c
index 9e88e19f62..34a7406683 100644
--- a/gtk/inspector/object-tree.c
+++ b/gtk/inspector/object-tree.c
@@ -836,6 +836,8 @@ match_object (GObject    *object,
 
   if (GTK_IS_LABEL (object))
     return match_string (gtk_label_get_label (GTK_LABEL (object)), text);
+  if (GTK_IS_INSCRIPTION (object))
+    return match_string (gtk_inscription_get_text (GTK_INSCRIPTION (object)), text);
   else if (GTK_IS_BUTTON (object))
     return match_string (gtk_button_get_label (GTK_BUTTON (object)), text);
   else if (GTK_IS_WINDOW (object))
@@ -1086,6 +1088,8 @@ bind_label_cb (GtkSignalListItemFactory *factory,
 
   if (GTK_IS_LABEL (item))
     binding = g_object_bind_property (item, "label", inscription, "text", G_BINDING_SYNC_CREATE);
+  if (GTK_IS_INSCRIPTION (item))
+    binding = g_object_bind_property (item, "text", inscription, "text", G_BINDING_SYNC_CREATE);
   else if (GTK_IS_BUTTON (item))
     binding = g_object_bind_property (item, "label", inscription, "text", G_BINDING_SYNC_CREATE);
   else if (GTK_IS_WINDOW (item))


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