[gtk+] Inspector: hide the selector tab for non-widgets
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Inspector: hide the selector tab for non-widgets
- Date: Sun, 9 Nov 2014 02:43:58 +0000 (UTC)
commit 8a8c6c0722fb1dd0e9ac55a70fea904408a15d3a
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Nov 8 21:43:26 2014 -0500
Inspector: hide the selector tab for non-widgets
gtk/inspector/selector.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gtk/inspector/selector.c b/gtk/inspector/selector.c
index c984ff7..cfaed2f 100644
--- a/gtk/inspector/selector.c
+++ b/gtk/inspector/selector.c
@@ -68,7 +68,10 @@ gtk_inspector_selector_set_object (GtkInspectorSelector *oh,
gtk_tree_store_clear (oh->priv->model);
if (!GTK_IS_WIDGET (object))
- return;
+ {
+ gtk_widget_hide (GTK_WIDGET (oh));
+ return;
+ }
widget = GTK_WIDGET (object);
@@ -89,6 +92,8 @@ gtk_inspector_selector_set_object (GtkInspectorSelector *oh,
gtk_tree_view_expand_all (oh->priv->tree);
gtk_tree_selection_select_iter (gtk_tree_view_get_selection (oh->priv->tree), &iter);
+
+ gtk_widget_show (GTK_WIDGET (oh));
}
// vim: set et sw=2 ts=2:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]