8000 Add Keyboard Shortcuts window by ryonakano · Pull Request #310 · ryonakano/reco · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add Keyboard Shortcuts window #310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ builddir*
# subprojects
subprojects/live-chart
subprojects/ryokucha
subprojects/blueprint-compiler
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ flatpak run com.github.ryonakano.reco.Devel
### From Source Code (Native)
You'll need the following dependencies to build:

* blueprint-compiler
* libadwaita-1-dev
* libgee-0.8-dev
* libglib2.0-dev (>= 2.74)
Expand Down
13 changes: 13 additions & 0 deletions build-aux/appcenter/com.github.ryonakano.reco.Devel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@ modules:
type: git
tag-pattern: '^([\d.]+)$'

- name: blueprint-compiler
buildsystem: meson
cleanup:
- '*'
sources:
- type: git
url: https://gitlab.gnome.org/jwestman/blueprint-compiler.git
tag: v0.16.0
commit: 04ef0944db56ab01307a29aaa7303df6067cb3c0
x-checker-data:
type: git
tag-pattern: ^v([\d.]+)$

- name: reco
buildsystem: meson
config-opts:
Expand Down
13 changes: 13 additions & 0 deletions build-aux/flathub/com.github.ryonakano.reco.Devel.yml
< 10000 td class="blob-code blob-code-addition js-file-line"> - type: git
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@ modules:
type: git
tag-pattern: '^([\d.]+)$'

- name: blueprint-compiler
buildsystem: meson
cleanup:
- '*'
sources:
url: https://gitlab.gnome.org/jwestman/blueprint-compiler.git
tag: v0.16.0
commit: 04ef0944db56ab01307a29aaa7303df6067cb3c0
x-checker-data:
type: git
tag-pattern: ^v([\d.]+)$

- name: reco
buildsystem: meson
config-opts:
Expand Down
13 changes: 13 additions & 0 deletions com.github.ryonakano.reco.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,19 @@ modules:
type: git
tag-pattern: '^([\d.]+)$'

- name: blueprint-compiler
buildsystem: meson
cleanup:
- '*'
sources:
- type: git
url: https://gitlab.gnome.org/jwestman/blueprint-compiler.git
tag: v0.16.0
commit: 04ef0944db56ab01307a29aaa7303df6067cb3c0
x-checker-data:
type: git
tag-pattern: ^v([\d.]+)$

- name: reco
buildsystem: meson
config-opts:
Expand Down
15 changes: 15 additions & 0 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,24 @@ install_data(
install_dir: get_option('datadir') / 'glib-2.0' / 'schemas'
)

blueprints = custom_target('blueprints',
input: files(
'ui/help-overlay.blp',
),
output: '.',
command: [
find_program('blueprint-compiler'),
'batch-compile',
'@OUTPUT@',
'@CURRENT_SOURCE_DIR@',
'@INPUT@'
]
)

asresources = gnome.compile_resources(
'as-resources',
'reco.gresource.xml',
dependencies: blueprints,
source_dir: 'data',
c_name: 'as'
)
3 changes: 3 additions & 0 deletions data/reco.gresource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
<gresources>
<gresource prefix="/com/github/ryonakano/reco">
<file alias="Application.css">Application.css</file>

<file preprocess="xml-stripblanks" alias="gtk/help-overlay.ui">ui/help-overlay.ui</file>
</gresource>

<gresource prefix="/com/github/ryonakano/reco/icons">
<file compressed="true" preprocess="xml-stripblanks" alias="record-completed-symbolic.svg">icons/record-completed-symbolic.svg</file>
</gresource>
Expand Down
32 changes: 32 additions & 0 deletions data/ui/help-overlay.blp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using Gtk 4.0;

ShortcutsWindow help_overlay {
modal: true;

ShortcutsSection {
section-name: "shortcuts";

ShortcutsGroup {
title: C_("shortcut window", "General");

ShortcutsShortcut {
title: C_("shortcut window", "Keyboard Shortcuts");
action-name: "win.show-help-overlay";
}

ShortcutsShortcut {
title: C_("shortcut window", "Quit");
action-name: "app.quit";
}
}

ShortcutsGroup {
title: C_("shortcut window", "Recording");

ShortcutsShortcut {
title: C_("shortcut window", "Start/Stop recording");
accelerator: "<Shift><Ctrl>R";
}
}
}
}
1 change: 1 addition & 0 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class MainWindow : Adw.ApplicationWindow {

var main_menu = new Menu ();
main_menu.append_submenu (_("_Style"), style_submenu);
main_menu.append (_("_Keyboard Shortcuts"), "win.show-help-overlay");

var menu_button = new Gtk.MenuButton () {
tooltip_text = _("Main Menu"),
Expand Down
4 changes: 0 additions & 4 deletions src/View/RecordView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ public class View.RecordView : AbstractView {

stop_button = new Gtk.Button () {
icon_name = "media-playback-stop-symbolic",
#if USE_GRANITE
tooltip_markup = Granite.markup_accel_tooltip ({"<Shift><Ctrl>R"}, _("Finish recording")),
#else
tooltip_text = _("Finish recording"),
#endif
halign = Gtk.Align.CENTER,
width_request = 48,
height_request = 48
Expand Down
4 changes: 0 additions & 4 deletions src/View/WelcomeView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,7 @@ public class View.WelcomeView : AbstractView {

record_button = new Gtk.Button () {
icon_name = "audio-input-microphone-symbolic",
#if USE_GRANITE
tooltip_markup = Granite.markup_accel_tooltip ({"<Shift><Ctrl>R"}, _("Start recording")),
#else
tooltip_text = _("Start recording"),
#endif
halign = Gtk.Align.CENTER,
margin_top = 12,
width_request = 48,
Expand Down
8 changes: 8 additions & 0 deletions subprojects/blueprint-compiler.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[wrap-git]
directory = blueprint-compiler
url = https://gitlab.gnome.org/jwestman/blueprint-compiler.git
revision = v0.16.0
depth = 1

[provide]
program_names = blueprint-compiler
Loading
0