shortcuts-dialog: Add initial shortcuts
This commit is contained in:
@@ -10,7 +10,13 @@ python.install_sources(
|
||||
)
|
||||
|
||||
blueprints = custom_target(
|
||||
input: files('cover.blp', 'game-details.blp', 'game-item.blp', 'window.blp'),
|
||||
input: files(
|
||||
'cover.blp',
|
||||
'game-details.blp',
|
||||
'game-item.blp',
|
||||
'shortcuts-dialog.blp',
|
||||
'window.blp',
|
||||
),
|
||||
output: '.',
|
||||
command: [
|
||||
blueprint_compiler,
|
||||
|
||||
47
cartridges/ui/shortcuts-dialog.blp
Normal file
47
cartridges/ui/shortcuts-dialog.blp
Normal file
@@ -0,0 +1,47 @@
|
||||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
Adw.ShortcutsDialog shortcuts_dialog {
|
||||
Adw.ShortcutsSection {
|
||||
title: _("General");
|
||||
|
||||
Adw.ShortcutsItem {
|
||||
title: _("Search");
|
||||
accelerator: "<Control>f";
|
||||
}
|
||||
|
||||
Adw.ShortcutsItem {
|
||||
title: _("Main Menu");
|
||||
accelerator: "F10";
|
||||
}
|
||||
|
||||
Adw.ShortcutsItem {
|
||||
title: _("Keyboard Shortcuts");
|
||||
action-name: "app.shortcuts";
|
||||
}
|
||||
|
||||
Adw.ShortcutsItem {
|
||||
title: _("Quit");
|
||||
action-name: "app.quit";
|
||||
}
|
||||
}
|
||||
|
||||
Adw.ShortcutsSection {
|
||||
title: _("Games");
|
||||
|
||||
Adw.ShortcutsItem {
|
||||
title: _("Add Game");
|
||||
accelerator: "<Control>n";
|
||||
}
|
||||
|
||||
Adw.ShortcutsItem {
|
||||
title: _("Show Hidden Games");
|
||||
accelerator: "<Control>h";
|
||||
}
|
||||
|
||||
Adw.ShortcutsItem {
|
||||
title: _("Remove Game");
|
||||
accelerator: "Delete";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
<file>cover.ui</file>
|
||||
<file>game-details.ui</file>
|
||||
<file>game-item.ui</file>
|
||||
<file>shortcuts-dialog.ui</file>
|
||||
<file>window.ui</file>
|
||||
<file>style.css</file>
|
||||
</gresource>
|
||||
|
||||
@@ -114,6 +114,7 @@ template $Window: Adw.ApplicationWindow {
|
||||
primary: true;
|
||||
|
||||
menu-model: menu {
|
||||
item (_("Keyboard Shortcuts"), "app.shortcuts")
|
||||
item (_("About Cartridges"), "app.about")
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user