Skip to content

Commit 37b19f9

Browse files
authored
Merge pull request #201 from UrtsiSantsi/adw_shortcuts
Port to AdwShortcutsDialog
2 parents 241517d + be6bc9b commit 37b19f9

File tree

7 files changed

+125
-129
lines changed

7 files changed

+125
-129
lines changed

build-aux/io.github.flattool.Warehouse.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "io.github.flattool.Warehouse",
33
"runtime": "org.gnome.Platform",
4-
"runtime-version": "48",
4+
"runtime-version": "49",
55
"sdk": "org.gnome.Sdk",
66
"command": "warehouse",
77
"finish-args": [
@@ -34,7 +34,7 @@
3434
{
3535
"type": "git",
3636
"url": "https://gitlab.gnome.org/jwestman/blueprint-compiler",
37-
"tag": "v0.16.0"
37+
"tag": "v0.18.0"
3838
}
3939
],
4040
"cleanup": ["*"]

po/POTFILES

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ src/gtk/app_row.blp
88
src/gtk/attempt_install_dialog.blp
99
src/gtk/attempt_install_dialog.py
1010
src/gtk/error_toast.py
11-
src/gtk/help-overlay.blp
11+
src/gtk/shortcuts-dialog.blp
1212
src/gtk/installation_chooser.blp
1313
src/gtk/installation_chooser.py
1414
src/gtk/loading_status.blp

src/gtk/help-overlay.blp

Lines changed: 0 additions & 123 deletions
This file was deleted.

src/gtk/shortcuts-dialog.blp

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
using Gtk 4.0;
2+
using Adw 1;
3+
4+
Adw.ShortcutsDialog shortcuts_dialog {
5+
Adw.ShortcutsSection {
6+
title: _("General");
7+
Adw.ShortcutsItem {
8+
title: _("Refresh");
9+
action-name: "app.refresh";
10+
}
11+
Adw.ShortcutsItem {
12+
title: _("Open Files");
13+
action-name: "app.open-files";
14+
}
15+
Adw.ShortcutsItem {
16+
title: _("Open Menu");
17+
action-name: "app.open-menu";
18+
}
19+
Adw.ShortcutsItem {
20+
title: _("Show Shortcuts");
21+
action-name: "app.shortcuts";
22+
}
23+
Adw.ShortcutsItem {
24+
title: _("Quit");
25+
action-name: "app.quit";
26+
}
27+
}
28+
Adw.ShortcutsSection {
29+
title: _("Navigation");
30+
Adw.ShortcutsItem {
31+
title: _("Show Packages Page");
32+
action-name: "app.show-packages-page";
33+
}
34+
Adw.ShortcutsItem {
35+
title: _("Show Remotes Page");
36+
action-name: "app.show-remotes-page";
37+
}
38+
Adw.ShortcutsItem {
39+
title: _("Show User Data Page");
40+
action-name: "app.show-user-data-page";
41+
}
42+
Adw.ShortcutsItem {
43+
title: _("Show Snapshots Page");
44+
action-name: "app.show-snapshots-page";
45+
}
46+
Adw.ShortcutsItem {
47+
title: _("Show Install Page");
48+
action-name: "app.show-install-page";
49+
}
50+
}
51+
Adw.ShortcutsSection {
52+
title: _("Packages Page");
53+
Adw.ShortcutsItem {
54+
title: _("Search Mode");
55+
action-name: "app.search-mode";
56+
}
57+
Adw.ShortcutsItem {
58+
title: _("Edit Filters");
59+
action-name: "app.filter";
60+
}
61+
Adw.ShortcutsItem {
62+
title: _("Selection Mode");
63+
action-name: "app.toggle-select-mode";
64+
}
65+
}
66+
Adw.ShortcutsSection {
67+
title: _("Remotes Page");
68+
Adw.ShortcutsItem {
69+
title: _("Search Mode");
70+
action-name: "app.search-mode";
71+
}
72+
Adw.ShortcutsItem {
73+
title: _("Show or Hide Disabled Remotes");
74+
action-name: "app.filter";
75+
}
76+
Adw.ShortcutsItem {
77+
title: _("New Remote");
78+
action-name: "app.new";
79+
}
80+
}
81+
Adw.ShortcutsSection {
82+
title: _("User Data Page");
83+
Adw.ShortcutsItem {
84+
title: _("Search Mode");
85+
action-name: "app.search-mode";
86+
}
87+
Adw.ShortcutsItem {
88+
title: _("Edit Sorting Modes");
89+
action-name: "app.filter";
90+
}
91+
Adw.ShortcutsItem {
92+
title: _("Selection Mode");
93+
action-name: "app.toggle-select-mode";
94+
}
95+
Adw.ShortcutsItem {
96+
title: _("Show Active Data");
97+
action-name: "app.active-data-view";
98+
}
99+
Adw.ShortcutsItem {
100+
title: _("Show Leftover Data");
101+
action-name: "app.leftover-data-view";
102+
}
103+
}
104+
Adw.ShortcutsSection {
105+
title: _("Snapshots Page");
106+
Adw.ShortcutsItem {
107+
title: _("Search Mode");
108+
action-name: "app.search-mode";
109+
}
110+
Adw.ShortcutsItem {
111+
title: _("Selection Mode");
112+
action-name: "app.toggle-select-mode";
113+
}
114+
Adw.ShortcutsItem {
115+
title: _("New Snapshots");
116+
action-name: "app.new";
117+
}
118+
}
119+
}

src/main_window/window.blp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ menu primary_menu {
163163
}
164164
item {
165165
label: _("_Keyboard Shortcuts");
166-
action: "win.show-help-overlay";
166+
action: "app.shortcuts";
167167
}
168168
item {
169169
label: _("_About Warehouse");

src/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ gnome = import('gnome')
55
blueprints = custom_target('blueprints',
66
input: files(
77
'gtk/app_row.blp',
8-
'gtk/help-overlay.blp',
8+
'gtk/shortcuts-dialog.blp',
99
'gtk/loading_status.blp',
1010
'gtk/installation_chooser.blp',
1111
'gtk/attempt_install_dialog.blp',

src/warehouse.gresource.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<gresources>
33
<gresource prefix="/io/github/flattool/Warehouse">
44
<file alias="style.css">../data/style.css</file>
5-
<file preprocess="xml-stripblanks">gtk/help-overlay.ui</file>
5+
<file preprocess="xml-stripblanks" alias="shortcuts-dialog.ui">gtk/shortcuts-dialog.ui</file>
66
<file preprocess="xml-stripblanks">gtk/loading_status.ui</file>
77
<file preprocess="xml-stripblanks">gtk/app_row.ui</file>
88
<file preprocess="xml-stripblanks">gtk/installation_chooser.ui</file>

0 commit comments

Comments
 (0)