diff --git a/gtk/inspector/resource-list.c b/gtk/inspector/resource-list.c
index 7331d98287..5e3816fc72 100644
--- a/gtk/inspector/resource-list.c
+++ b/gtk/inspector/resource-list.c
@@ -303,19 +303,6 @@ close_details (GtkWidget *button,
gtk_stack_set_visible_child_name (GTK_STACK (sl->priv->buttons), "list");
}
-static void
-visible_child_name_changed (GObject *obj, GParamSpec *pspec, GtkInspectorResourceList *sl)
-{
- const gchar *child;
- gboolean resources_visible;
-
- child = gtk_stack_get_visible_child_name (GTK_STACK (gtk_widget_get_parent (GTK_WIDGET (sl))));
- resources_visible = g_strcmp0 (child, "resources") == 0;
-
- gtk_widget_set_visible (sl->priv->buttons, resources_visible);
- gtk_widget_set_sensitive (sl->priv->open_details_button, can_show_details (sl));
-}
-
static void
load_resources (GtkInspectorResourceList *sl)
{
@@ -369,15 +356,7 @@ on_map (GtkWidget *widget)
gtk_tree_view_expand_all (GTK_TREE_VIEW (sl->priv->tree));
gtk_stack_set_visible_child_name (GTK_STACK (sl->priv->stack), "list");
-}
-
-static void
-parent_set (GtkWidget *widget, GtkWidget *old_parent)
-{
- if (old_parent)
- g_signal_handlers_disconnect_by_func (old_parent, visible_child_name_changed, widget);
- g_signal_connect (gtk_widget_get_parent (widget), "notify::visible-child-name",
- G_CALLBACK (visible_child_name_changed), widget);
+ gtk_widget_set_sensitive (sl->priv->open_details_button, can_show_details (sl));
}
static void
@@ -600,8 +579,6 @@ gtk_inspector_resource_list_init (GtkInspectorResourceList *sl)
size_data_func, sl, NULL);
g_signal_connect (sl, "map", G_CALLBACK (on_map), NULL);
- g_signal_connect (sl->priv->stack, "notify::visible-child-name",
- G_CALLBACK (visible_child_name_changed), sl);
gtk_search_bar_connect_entry (GTK_SEARCH_BAR (sl->priv->search_bar),
GTK_ENTRY (sl->priv->search_entry));
@@ -687,8 +664,6 @@ gtk_inspector_resource_list_class_init (GtkInspectorResourceListClass *klass)
object_class->constructed = constructed;
object_class->finalize = finalize;
- widget_class->parent_set = parent_set;
-
g_object_class_install_property (object_class, PROP_BUTTONS,
g_param_spec_object ("buttons", NULL, NULL,
GTK_TYPE_WIDGET, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
diff --git a/gtk/inspector/statistics.c b/gtk/inspector/statistics.c
index 72b248f514..de13e943de 100644
--- a/gtk/inspector/statistics.c
+++ b/gtk/inspector/statistics.c
@@ -244,27 +244,6 @@ type_data_free (gpointer data)
g_free (type_data);
}
-static void
-visible_child_name_changed (GObject *obj, GParamSpec *pspec, GtkInspectorStatistics *sl)
-{
- const gchar *child;
- gboolean visible;
-
- child = gtk_stack_get_visible_child_name (GTK_STACK (gtk_widget_get_parent (GTK_WIDGET (sl))));
- visible = g_strcmp0 (child, "statistics") == 0;
-
- gtk_widget_set_visible (sl->priv->button, visible);
-}
-
-static void
-parent_set (GtkWidget *widget, GtkWidget *old_parent)
-{
- if (old_parent)
- g_signal_handlers_disconnect_by_func (old_parent, visible_child_name_changed, widget);
- g_signal_connect (gtk_widget_get_parent (widget), "notify::visible-child-name",
- G_CALLBACK (visible_child_name_changed), widget);
-}
-
static gboolean
key_press_event (GtkWidget *window,
GdkEvent *event,
@@ -452,8 +431,6 @@ gtk_inspector_statistics_class_init (GtkInspectorStatisticsClass *klass)
object_class->constructed = constructed;
object_class->finalize = finalize;
- widget_class->parent_set = parent_set;
-
g_object_class_install_property (object_class, PROP_BUTTON,
g_param_spec_object ("button", NULL, NULL,
GTK_TYPE_WIDGET, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
diff --git a/gtk/inspector/window.c b/gtk/inspector/window.c
index da54753ae7..79b1cb60d6 100644
--- a/gtk/inspector/window.c
+++ b/gtk/inspector/window.c
@@ -126,30 +126,12 @@ open_object_details (GtkWidget *button, GtkInspectorWindow *iw)
gtk_stack_set_visible_child_name (GTK_STACK (iw->object_buttons), "details");
}
-static void
-visible_child_name_changed (GObject *obj, GParamSpec *pspec, GtkInspectorWindow *iw)
-{
- const gchar *child;
- gboolean objects_visible;
-
- child = gtk_stack_get_visible_child_name (GTK_STACK (iw->top_stack));
- objects_visible = g_strcmp0 (child, "objects") == 0;
-
- gtk_widget_set_visible (iw->select_object, objects_visible);
- gtk_widget_set_visible (iw->object_buttons, objects_visible);
-}
-
static void
gtk_inspector_window_init (GtkInspectorWindow *iw)
{
gtk_widget_init_template (GTK_WIDGET (iw));
gtk_window_group_add_window (gtk_window_group_new (), GTK_WINDOW (iw));
-
- g_signal_connect (iw->top_stack, "notify::visible-child-name",
- G_CALLBACK (visible_child_name_changed), iw);
- g_signal_connect (iw->object_stack, "notify::visible-child-name",
- G_CALLBACK (visible_child_name_changed), iw);
}
static void
diff --git a/gtk/inspector/window.ui b/gtk/inspector/window.ui
index 349d21070c..9752614413 100644
--- a/gtk/inspector/window.ui
+++ b/gtk/inspector/window.ui
@@ -9,34 +9,40 @@
True
True
-
-
-
- True
-
-
- True
- Show Details
+ horizontal
+ 6
+
+
+ True
+ Select an Object
+ center
+ center
+
+
+
+
+ True
+ find-location-symbolic
+ 1
+
+
+
+
+
+
+ True
+
+
+ True
+ Show Details
center
center
@@ -77,15 +83,18 @@
details
+
+
- start
+ objects
+ True
Collect Statistics
- center
+ start
center