mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
help-overlay: add help overlay to SpWindow and app menu
This adds an app menu and window action to activate the keyboard shortcuts overlay.
This commit is contained in:
82
src/resources/gtk/help-overlay.ui
Normal file
82
src/resources/gtk/help-overlay.ui
Normal file
@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkShortcutsWindow" id="help_overlay">
|
||||
<child>
|
||||
<object class="GtkShortcutsSection">
|
||||
<property name="visible">1</property>
|
||||
<property name="section-name">sysprof</property>
|
||||
<property name="title" translatable="yes" context="shortcut window">Sysprof Shortcuts</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes" context="shortcut window">Recording</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes" context="shortcut window">Stop recording</property>
|
||||
<property name="accelerator">Escape</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes" context="shortcut window">Callgraph</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes" context="shortcut window">Expand function</property>
|
||||
<property name="subtitle" translatable="yes" context="shortcut window">Shows the direct descendants of the callgraph function</property>
|
||||
<property name="accelerator">Right</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes" context="shortcut window">Collapse function</property>
|
||||
<property name="subtitle" translatable="yes" context="shortcut window">Hides all callgraph descendants below the selected function</property>
|
||||
<property name="accelerator">Left</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes" context="shortcut window">Jump into function</property>
|
||||
<property name="subtitle" translatable="yes" context="shortcut window">Selects the function or file as the top of the callgraph</property>
|
||||
<property name="accelerator">Return</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes" context="shortcut window">Visualizers</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes" context="shortcut window">Zoom in</property>
|
||||
<property name="accelerator"><primary>plus</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes" context="shortcut window">Zoom out</property>
|
||||
<property name="accelerator"><primary>minus</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes" context="shortcut window">Reset zoom</property>
|
||||
<property name="accelerator"><primary>0</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@ -22,6 +22,10 @@
|
||||
<attribute name="label" translatable="yes">Help</attribute>
|
||||
<attribute name="action">app.help</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">Keyboard Shortcuts</attribute>
|
||||
<attribute name="action">app.show-help-overlay</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Quit</attribute>
|
||||
<attribute name="action">app.quit</attribute>
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
<gresource prefix="/org/gnome/sysprof">
|
||||
<!-- Automatic GTK resources -->
|
||||
<file>gtk/menus.ui</file>
|
||||
<file>gtk/help-overlay.ui</file>
|
||||
|
||||
<!-- Application icons -->
|
||||
<file alias="icons/16x16/apps/sysprof.png">../../data/icons/16x16/apps/sysprof.png</file>
|
||||
|
||||
Reference in New Issue
Block a user