sysprof: add menu button for callgraph options

This is useful for when we are viewing things like flamegraphs which can
take advantage of options in the callgraph.

Also add some labels for the header bar buttons.
This commit is contained in:
Christian Hergert
2023-08-25 16:49:27 -07:00
parent 75c7a99339
commit d1b228bf28

View File

@ -95,6 +95,7 @@
<object class="GtkToggleButton" id="show_left_sidebar">
<property name="icon-name">sidebar-show-symbolic</property>
<property name="active">true</property>
<property name="tooltip-text" translatable="yes">Toggle Left Panel</property>
</object>
</child>
<child type="start">
@ -158,11 +159,20 @@
<object class="GtkMenuButton">
<property name="icon-name">open-menu-symbolic</property>
<property name="menu-model">primary_menu</property>
<property name="tooltip-text" translatable="yes">Main Menu</property>
</object>
</child>
<child type="end">
<object class="GtkMenuButton">
<property name="icon-name">document-properties-symbolic</property>
<property name="menu-model">view_menu</property>
<property name="tooltip-text" translatable="yes">View Options</property>
</object>
</child>
<child type="end">
<object class="GtkToggleButton" id="show_right_sidebar">
<property name="icon-name">sidebar-show-right-symbolic</property>
<property name="tooltip-text" translatable="yes">Toggle Right Panel</property>
</object>
</child>
</object>
@ -348,4 +358,29 @@
</item>
</section>
</menu>
<menu id="view_menu">
<section>
<attribute name="label" translatable="yes">Callgraph</attribute>
<item>
<attribute name="label" translatable="yes">Categorize Frames</attribute>
<attribute name="action">win.callgraph.categorize-frames</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Hide System Libraries</attribute>
<attribute name="action">win.callgraph.hide-system-libraries</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Include Threads</attribute>
<attribute name="action">win.callgraph.include-threads</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Bottom Up</attribute>
<attribute name="action">win.callgraph.bottom-up</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Ignore Process 0</attribute>
<attribute name="action">win.callgraph.ignore-process-0</attribute>
</item>
</section>
</menu>
</interface>