Skip to content
Open
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
2 changes: 1 addition & 1 deletion io.github.revisto.drum-machine.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id" : "io.github.revisto.drum-machine",
"runtime" : "org.gnome.Platform",
"runtime-version" : "48",
"runtime-version" : "49",
"sdk" : "org.gnome.Sdk",
"command" : "drum-machine",
"finish-args" : [
Expand Down
2 changes: 1 addition & 1 deletion po/POTFILES.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ src/utils/name_utils.py
src/ui/drum_grid_builder.py
src/window.py
src/window.ui
src/gtk/help-overlay.blp
src/gtk/shortcuts-dialog.blp
src/gtk/save-changes-dialog.blp
src/gtk/audio-export-dialog.blp
src/gtk/reset-defaults-dialog.blp
8 changes: 4 additions & 4 deletions python-dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/59/ef/f96536f1df42c668cbacb727a8c6da7afc9c05ece6d558927fb1722693e1/numpy-2.3.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
"sha256": "8145dd6d10df13c559d1e4314df29695613575183fa2e2d11fac4c208c8a1f73"
"url": "https://files.pythonhosted.org/packages/04/dc/46066ce18d01645541f0186877377b9371b8fa8017fa8262002b4ef22612/numpy-2.4.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
"sha256": "d0d9b7c93578baafcbc5f0b83eaf17b79d345c6f36917ba0c67f45226911d499"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/91/ba/f4ebf257f08affa464fe6036e13f2bf9d4642a40228781dc1235da81be9f/numpy-2.3.2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl",
"sha256": "572d5512df5470f50ada8d1972c5f1082d9a0b7aa5944db8084077570cf98370"
"url": "https://files.pythonhosted.org/packages/19/fb/cbfdbfa3057a10aea5422c558ac57538e6acc87ec1669e666d32ac198da7/numpy-2.4.2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl",
"sha256": "c3cd545784805de05aafe1dde61752ea49a359ccba9760c1e5d1c88a93bbf2b7"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion src/drum-machine.gresource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<file alias="style.css">style.css</file>
<file alias="style-dark.css">style-dark.css</file>
<file preprocess="xml-stripblanks">window.ui</file>
<file preprocess="xml-stripblanks">gtk/help-overlay.ui</file>
<file preprocess="xml-stripblanks" alias="shortcuts-dialog.ui">gtk/shortcuts-dialog.ui</file>
<file preprocess="xml-stripblanks">gtk/save-changes-dialog.ui</file>
<file preprocess="xml-stripblanks">gtk/audio-export-dialog.ui</file>
<file preprocess="xml-stripblanks">gtk/reset-defaults-dialog.ui</file>
Expand Down
119 changes: 0 additions & 119 deletions src/gtk/help-overlay.blp

This file was deleted.

121 changes: 121 additions & 0 deletions src/gtk/shortcuts-dialog.blp
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
using Gtk 4.0;
using Adw 1;

Adw.ShortcutsDialog shortcuts_dialog {
Adw.ShortcutsSection {
title: C_("shortcut window", "General");

Adw.ShortcutsItem {
title: C_("shortcut window", "Show Shortcuts");
action-name: "app.shortcuts";
}

Adw.ShortcutsItem {
title: C_("shortcut window", "Quit");
action-name: "win.quit";
accelerator: "<Primary>q";
}
}

Adw.ShortcutsSection {
title: C_("shortcut window", "Playback Controls");

Adw.ShortcutsItem {
title: C_("shortcut window", "Play/Pause");
action-name: "win.play_pause";
accelerator: "space";
}

Adw.ShortcutsItem {
title: C_("shortcut window", "Clear All");
action-name: "win.clear_toggles";
accelerator: "<Primary>Delete";
}
}

Adw.ShortcutsSection {
title: C_("shortcut window", "BPM & Volume Controls");

Adw.ShortcutsItem {
title: C_("shortcut window", "Increase BPM");
action-name: "win.increase_bpm";
accelerator: "plus equal";
}

Adw.ShortcutsItem {
title: C_("shortcut window", "Decrease BPM");
action-name: "win.decrease_bpm";
accelerator: "minus";
}
}

Adw.ShortcutsSection {
Adw.ShortcutsItem {
title: C_("shortcut window", "Increase Volume");
action-name: "win.increase_volume";
accelerator: "<Primary>Up";
}

Adw.ShortcutsItem {
title: C_("shortcut window", "Decrease Volume");
action-name: "win.decrease_volume";
accelerator: "<Primary>Down";
}
}

Adw.ShortcutsSection {
Adw.ShortcutsItem {
title: C_("shortcut window", "Mute");
action-name: "win.mute";
accelerator: "<Primary>m";
}
}

Adw.ShortcutsSection {
title: C_("shortcut window", "Pattern Management");

Adw.ShortcutsItem {
title: C_("shortcut window", "Load Pattern");
action-name: "win.load_pattern";
accelerator: "<Primary>o";
}

Adw.ShortcutsItem {
title: C_("shortcut window", "Save Pattern");
action-name: "win.save_pattern";
accelerator: "<Primary>s";
}
}

Adw.ShortcutsSection {
Adw.ShortcutsItem {
title: C_("shortcut window", "Export Audio");
action-name: "win.export_audio";
accelerator: "<Primary>e";
}
}

Adw.ShortcutsSection {
title: C_("shortcut window", "Navigation");

Adw.ShortcutsItem {
title: C_("shortcut window", "Go to Instrument");
action-name: "win.go_to_instrument";
accelerator: "<Primary>i";
}
}

Adw.ShortcutsSection {
Adw.ShortcutsItem {
title: C_("shortcut window", "Previous Page");
action-name: "win.previous_page";
accelerator: "Page_Up";
}

Adw.ShortcutsItem {
title: C_("shortcut window", "Next Page");
action-name: "win.next_page";
accelerator: "Page_Down";
}
}
}
6 changes: 0 additions & 6 deletions src/handlers/window_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def setup_actions(self) -> None:
"""Setup all window actions and keyboard shortcuts"""
actions = [
("open_menu", self.on_open_menu_action, ["F10"]),
("show-help-overlay", self.on_show_help_overlay, ["<primary>question"]),
("play_pause", self.handle_play_pause_action, ["space"]),
("clear_toggles", self.handle_clear_action, ["<primary>Delete"]),
("increase_bpm", self.increase_bpm_action, ["plus", "equal"]),
Expand Down Expand Up @@ -77,11 +76,6 @@ def on_open_menu_action(
) -> None:
self.window.menu_button.activate()

def on_show_help_overlay(
self, action: Gio.SimpleAction, param: Optional[object]
) -> None:
self.window.get_help_overlay().present()

def handle_play_pause_action(
self, action: Gio.SimpleAction, param: Optional[object]
) -> None:
Expand Down
2 changes: 1 addition & 1 deletion src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ gnome = import('gnome')
blueprint_compiler = find_program('blueprint-compiler', required: true)

blueprint_files = files(
'gtk/help-overlay.blp',
'gtk/shortcuts-dialog.blp',
'gtk/audio-export-dialog.blp',
'gtk/save-changes-dialog.blp',
'gtk/reset-defaults-dialog.blp',
Expand Down
2 changes: 1 addition & 1 deletion src/window.ui
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ audio-volume-medium-symbolic</property>
<section>
<item>
<attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
<attribute name="action">win.show-help-overlay</attribute>
<attribute name="action">app.shortcuts</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_About Drum Machine</attribute>
Expand Down