summaryrefslogtreecommitdiff
path: root/gtk/inspector/object-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/inspector/object-tree.c')
-rw-r--r--gtk/inspector/object-tree.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gtk/inspector/object-tree.c b/gtk/inspector/object-tree.c
index f8f1d2a396..6c481936e3 100644
--- a/gtk/inspector/object-tree.c
+++ b/gtk/inspector/object-tree.c
@@ -408,6 +408,14 @@ previous_match (GtkButton *button,
}
static void
+stop_search (GtkWidget *entry,
+ GtkInspectorObjectTree *wt)
+{
+ gtk_entry_set_text (GTK_ENTRY (wt->priv->search_entry), "");
+ gtk_search_bar_set_search_mode (GTK_SEARCH_BAR (wt->priv->search_bar), FALSE);
+}
+
+static void
gtk_inspector_object_tree_init (GtkInspectorObjectTree *wt)
{
guint signal_id;
@@ -492,6 +500,7 @@ gtk_inspector_object_tree_class_init (GtkInspectorObjectTreeClass *klass)
gtk_widget_class_bind_template_callback (widget_class, on_search_changed);
gtk_widget_class_bind_template_callback (widget_class, next_match);
gtk_widget_class_bind_template_callback (widget_class, previous_match);
+ gtk_widget_class_bind_template_callback (widget_class, stop_search);
}
typedef struct