[gtk/wip/otte/for-main: 1/2] inspector: Allow searching for editable text
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/for-main: 1/2] inspector: Allow searching for editable text
- Date: Tue, 7 Jun 2022 17:14:26 +0000 (UTC)
commit fa1dca29b691afa30e6a026a26ab73363370b7b8
Author: Benjamin Otte <otte redhat com>
Date: Tue Jun 7 17:32:03 2022 +0200
inspector: Allow searching for editable text
... and display 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 b0cef52e83..e49c494c5c 100644
--- a/gtk/inspector/object-tree.c
+++ b/gtk/inspector/object-tree.c
@@ -841,6 +841,8 @@ match_object (GObject *object,
return match_string (gtk_window_get_title (GTK_WINDOW (object)), text);
else if (GTK_IS_TREE_VIEW_COLUMN (object))
return match_string (gtk_tree_view_column_get_title (GTK_TREE_VIEW_COLUMN (object)), text);
+ else if (GTK_IS_EDITABLE (object))
+ return match_string (gtk_editable_get_text (GTK_EDITABLE (object)), text);
address = g_strdup_printf ("%p", object);
ret = match_string (address, text);
@@ -1094,6 +1096,8 @@ bind_label_cb (GtkSignalListItemFactory *factory,
binding = g_object_bind_property (item, "title", label, "label", G_BINDING_SYNC_CREATE);
else if (GTK_IS_TREE_VIEW_COLUMN (item))
binding = g_object_bind_property (item, "title", label, "label", G_BINDING_SYNC_CREATE);
+ else if (GTK_IS_EDITABLE (item))
+ binding = g_object_bind_property (item, "text", label, "label", G_BINDING_SYNC_CREATE);
else
gtk_label_set_label (GTK_LABEL (label), NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]