[gtk+] inspector: Add menu models to the tree
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] inspector: Add menu models to the tree
- Date: Sun, 23 Nov 2014 03:26:31 +0000 (UTC)
commit a7ba57f7515c2efabf401be5727875debc7fca0e
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Nov 22 21:33:57 2014 -0500
inspector: Add menu models to the tree
Add both the appmenu and the menubar models as children of the
application, if they exist.
gtk/inspector/object-tree.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/gtk/inspector/object-tree.c b/gtk/inspector/object-tree.c
index 6f0ac32..f8f1d2a 100644
--- a/gtk/inspector/object-tree.c
+++ b/gtk/inspector/object-tree.c
@@ -801,6 +801,19 @@ gtk_inspector_object_tree_append_object (GtkInspectorObjectTree *wt,
gtk_inspector_object_tree_append_object (wt, clock, &iter, "frame-clock");
}
}
+
+ if (GTK_IS_APPLICATION (object))
+ {
+ GObject *menu;
+
+ menu = (GObject *)gtk_application_get_app_menu (GTK_APPLICATION (object));
+ if (menu)
+ gtk_inspector_object_tree_append_object (wt, menu, &iter, "app-menu");
+
+ menu = (GObject *)gtk_application_get_menubar (GTK_APPLICATION (object));
+ if (menu)
+ gtk_inspector_object_tree_append_object (wt, menu, &iter, "menubar");
+ }
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]