sysprof: move view menu into callgraph menu model

This avoids having the extra menu in the header bar and instead puts it
where it has the most value, the callgraph.
This commit is contained in:
Christian Hergert
2023-07-19 16:54:10 -07:00
parent b2e3611c52
commit e45bd8910b
2 changed files with 16 additions and 32 deletions

View File

@ -214,12 +214,26 @@
</template>
<menu id="menu_model">
<section>
<attribute name="label" translatable="yes">Callgraph</attribute>
<item>
<attribute name="label" translatable="yes">Set Function as Root</attribute>
<attribute name="label" translatable="yes">Make Function Root</attribute>
<attribute name="action">callgraph.make-descendant-root</attribute>
</item>
</section>
<section>
<attribute name="label" translatable="yes">Options</attribute>
<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>
</section>
</menu>
</interface>
]]></property>

View File

@ -145,12 +145,6 @@
<property name="menu-model">primary_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>
</object>
</child>
<child type="end">
<object class="GtkToggleButton" id="show_right_sidebar">
<property name="icon-name">dock-right-symbolic</property>
@ -301,28 +295,4 @@
</item>
</section>
</menu>
<menu id="view_menu">
<section>
<item>
<attribute name="label" translatable="yes">Show Sidebar</attribute>
<attribute name="action">win.show-left-sidebar</attribute>
<attribute name="accel">F9</attribute>
</item>
</section>
<section>
<attribute name="label" translatable="yes">Callgraph</attribute>
<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>
</section>
</menu>
</interface>