Commit a5c5247b authored by Matthias Clasen's avatar Matthias Clasen Committed by Paolo Borelli
parent b1937095
......@@ -3,6 +3,7 @@
<gresource prefix="/org/gnome/clocks">
<file>css/gnome-clocks.css</file>
<file preprocess="xml-stripblanks">gtk/menus.ui</file>
<file preprocess="xml-stripblanks">gtk/help-overlay.ui</file>
<file preprocess="xml-stripblanks">ui/window.ui</file>
<file preprocess="xml-stripblanks">ui/worldlocationdialog.ui</file>
<file preprocess="xml-stripblanks">ui/world.ui</file>
......
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.17 -->
<object class="GtkShortcutsWindow" id="help_overlay">
<property name="modal">1</property>
<child>
<object class="GtkShortcutsSection">
<property name="visible">1</property>
<property name="section-name">shortcuts</property>
<property name="max-height">10</property>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">General</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;&lt;alt&gt;Page_Down</property>
<property name="title" translatable="yes">Go to the next section</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;&lt;alt&gt;Page_Up</property>
<property name="title" translatable="yes">Go to the previous section</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;alt&gt;Q</property>
<property name="title" translatable="yes">Quit</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="view">ClocksWorldFace</property>
<property name="title" translatable="yes">World Clocks</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;N</property>
<property name="title" translatable="yes">Add a world clock</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;A</property>
<property name="title" translatable="yes">Select all world clocks</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="view">ClocksAlarmFace</property>
<property name="title" translatable="yes">Alarm</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;N</property>
<property name="title" translatable="yes">Add an alarm</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;A</property>
<property name="title" translatable="yes">Select all alarms</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="view">ClocksStopwatchFace</property>
<property name="title" translatable="yes">Stopwatch</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">Escape</property>
<property name="title" translatable="yes">Stop / Reset</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="view">ClocksTimerFace</property>
<property name="title" translatable="yes">Timer</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">Escape</property>
<property name="title" translatable="yes">Reset</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>
......@@ -3,6 +3,11 @@
<!-- interface-requires gtk+ 3.0 -->
<menu id="app-menu">
<section>
<item>
<attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
<attribute name="action">win.show-help-overlay</attribute>
<attribute name="accel">&lt;Primary&gt;F1</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Help</attribute>
<attribute name="action">win.help</attribute>
......
......@@ -81,6 +81,8 @@ public class Window : Gtk.ApplicationWindow {
stack_switcher.set_stack (stack);
var stack_id = stack.notify["visible-child"].connect (() => {
var help_overlay = get_help_overlay ();
help_overlay.view_name = Type.from_instance(stack.visible_child).name();
update_header_bar ();
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment