inspector: Add menu models to the tree

Add both the appmenu and the menubar models as children of the
application, if they exist.
This commit is contained in:
Matthias Clasen 2014-11-22 21:33:57 -05:00
parent 0a37493384
commit a7ba57f751

View File

@ -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