Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
Clocks
Commits
a5c5247b
Commit
a5c5247b
authored
Dec 09, 2015
by
Matthias Clasen
Committed by
Paolo Borelli
Dec 10, 2015
Browse files
Add a help overlay
https://bugzilla.gnome.org/show_bug.cgi?id=757837
parent
b1937095
Changes
4
Hide whitespace changes
Inline
Side-by-side
data/gnome-clocks.gresource.xml
View file @
a5c5247b
...
...
@@ -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>
...
...
data/gtk/help-overlay.ui
0 → 100644
View file @
a5c5247b
<?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"
>
<
ctrl
><
alt
>
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"
>
<
ctrl
><
alt
>
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"
>
<
alt
>
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"
>
<
ctrl
>
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"
>
<
ctrl
>
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"
>
<
ctrl
>
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"
>
<
ctrl
>
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>
data/gtk/menus.ui
View file @
a5c5247b
...
...
@@ -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"
>
<
Primary
>
F1
</attribute>
</item>
<item>
<attribute
name=
"label"
translatable=
"yes"
>
_Help
</attribute>
<attribute
name=
"action"
>
win.help
</attribute>
...
...
src/window.vala
View file @
a5c5247b
...
...
@@ -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
();
});
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment