gui: Port GtkShortcutsWindow to AdwShortcutsDialog
Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/611>
This commit is contained in:
+1
-1
@@ -44,11 +44,11 @@ src/gui/gcal-sync-indicator.blp
|
|||||||
src/gui/gcal-weather-settings.blp
|
src/gui/gcal-weather-settings.blp
|
||||||
src/gui/gcal-window.blp
|
src/gui/gcal-window.blp
|
||||||
src/gui/gcal-window.c
|
src/gui/gcal-window.c
|
||||||
src/gui/gtk/help-overlay.blp
|
|
||||||
src/gui/importer/gcal-import-dialog.blp
|
src/gui/importer/gcal-import-dialog.blp
|
||||||
src/gui/importer/gcal-import-dialog.c
|
src/gui/importer/gcal-import-dialog.c
|
||||||
src/gui/importer/gcal-import-file-row.c
|
src/gui/importer/gcal-import-file-row.c
|
||||||
src/gui/importer/gcal-importer.c
|
src/gui/importer/gcal-importer.c
|
||||||
|
src/gui/shortcuts-dialog.blp
|
||||||
src/gui/views/gcal-agenda-view.blp
|
src/gui/views/gcal-agenda-view.blp
|
||||||
src/gui/views/gcal-agenda-view.c
|
src/gui/views/gcal-agenda-view.c
|
||||||
src/gui/views/gcal-month-popover.blp
|
src/gui/views/gcal-month-popover.blp
|
||||||
|
|||||||
@@ -380,7 +380,7 @@ menu menu {
|
|||||||
section {
|
section {
|
||||||
item {
|
item {
|
||||||
label: _("_Keyboard Shortcuts");
|
label: _("_Keyboard Shortcuts");
|
||||||
action: "win.show-help-overlay";
|
action: "app.shortcuts";
|
||||||
}
|
}
|
||||||
|
|
||||||
item {
|
item {
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<gresources>
|
|
||||||
<gresource prefix="/org/gnome/calendar/gtk">
|
|
||||||
<file compressed="true">help-overlay.ui</file>
|
|
||||||
</gresource>
|
|
||||||
</gresources>
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
using Gtk 4.0;
|
|
||||||
|
|
||||||
ShortcutsWindow help_overlay {
|
|
||||||
modal: true;
|
|
||||||
|
|
||||||
ShortcutsSection {
|
|
||||||
section-name: "shortcuts";
|
|
||||||
max-height: 17;
|
|
||||||
|
|
||||||
ShortcutsGroup {
|
|
||||||
title: C_("shortcut window", "General");
|
|
||||||
|
|
||||||
ShortcutsShortcut {
|
|
||||||
title: C_("shortcut window", "Open Main Menu");
|
|
||||||
accelerator: "F10";
|
|
||||||
}
|
|
||||||
|
|
||||||
ShortcutsShortcut {
|
|
||||||
title: C_("shortcut window", "Open Calendars Menu");
|
|
||||||
accelerator: "F8";
|
|
||||||
}
|
|
||||||
|
|
||||||
ShortcutsShortcut {
|
|
||||||
title: C_("shortcut window", "New Event");
|
|
||||||
accelerator: "<Primary>N";
|
|
||||||
}
|
|
||||||
|
|
||||||
ShortcutsShortcut {
|
|
||||||
title: C_("shortcut window", "Manage Calendars");
|
|
||||||
accelerator: "<Ctrl><Alt>m";
|
|
||||||
}
|
|
||||||
|
|
||||||
ShortcutsShortcut {
|
|
||||||
title: C_("shortcut window", "Synchronize Calendars");
|
|
||||||
accelerator: "F5 <Ctrl>r";
|
|
||||||
}
|
|
||||||
|
|
||||||
ShortcutsShortcut {
|
|
||||||
title: C_("shortcut window", "Close Window");
|
|
||||||
accelerator: "<Primary>Q";
|
|
||||||
}
|
|
||||||
|
|
||||||
ShortcutsShortcut {
|
|
||||||
title: C_("shortcut window", "Search");
|
|
||||||
accelerator: "<Primary>F";
|
|
||||||
}
|
|
||||||
|
|
||||||
ShortcutsShortcut {
|
|
||||||
title: C_("shortcut window", "Show Help");
|
|
||||||
accelerator: "F1";
|
|
||||||
}
|
|
||||||
|
|
||||||
ShortcutsShortcut {
|
|
||||||
title: C_("shortcut window", "Shortcuts");
|
|
||||||
accelerator: "<Primary>question";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ShortcutsGroup {
|
|
||||||
title: C_("shortcut window", "Navigation");
|
|
||||||
|
|
||||||
ShortcutsShortcut {
|
|
||||||
title: C_("shortcut window", "Go Back");
|
|
||||||
accelerator: "<Alt>Left Page_Up";
|
|
||||||
}
|
|
||||||
|
|
||||||
ShortcutsShortcut {
|
|
||||||
title: C_("shortcut window", "Go Forward");
|
|
||||||
accelerator: "<Alt>Right Page_Down";
|
|
||||||
}
|
|
||||||
|
|
||||||
ShortcutsShortcut {
|
|
||||||
title: C_("shortcut window", "Show Today");
|
|
||||||
accelerator: "<Alt>Down <Primary>T Home";
|
|
||||||
}
|
|
||||||
|
|
||||||
ShortcutsShortcut {
|
|
||||||
title: C_("shortcut window", "Next View");
|
|
||||||
accelerator: "<Primary>Page_Down";
|
|
||||||
}
|
|
||||||
|
|
||||||
ShortcutsShortcut {
|
|
||||||
title: C_("shortcut window", "Previous View");
|
|
||||||
accelerator: "<Primary>Page_Up";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ShortcutsGroup {
|
|
||||||
title: C_("shortcut window", "View");
|
|
||||||
|
|
||||||
ShortcutsShortcut {
|
|
||||||
title: C_("shortcut window", "Week View");
|
|
||||||
accelerator: "<Alt>1";
|
|
||||||
}
|
|
||||||
|
|
||||||
ShortcutsShortcut {
|
|
||||||
title: C_("shortcut window", "Month View");
|
|
||||||
accelerator: "<Alt>2";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
blueprints = custom_target(
|
|
||||||
'blueprints',
|
|
||||||
input: files(
|
|
||||||
'help-overlay.blp',
|
|
||||||
),
|
|
||||||
output: '.',
|
|
||||||
command: [
|
|
||||||
find_program('blueprint-compiler'),
|
|
||||||
'batch-compile',
|
|
||||||
'@OUTPUT@',
|
|
||||||
'@CURRENT_SOURCE_DIR@',
|
|
||||||
'@INPUT@',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
built_sources += gnome.compile_resources(
|
|
||||||
'gtk-resources',
|
|
||||||
'gtk.gresource.xml',
|
|
||||||
c_name: 'gtk',
|
|
||||||
dependencies: blueprints,
|
|
||||||
)
|
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<gresources>
|
<gresources>
|
||||||
|
<gresource prefix="/org/gnome/calendar">
|
||||||
|
<file compressed="true">shortcuts-dialog.ui</file>
|
||||||
|
</gresource>
|
||||||
<gresource prefix="/org/gnome/calendar/ui/gui">
|
<gresource prefix="/org/gnome/calendar/ui/gui">
|
||||||
<file compressed="true">gcal-calendar-list.ui</file>
|
<file compressed="true">gcal-calendar-list.ui</file>
|
||||||
<file compressed="true">gcal-calendar-navigation-button.ui</file>
|
<file compressed="true">gcal-calendar-navigation-button.ui</file>
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,6 @@
|
|||||||
subdir('calendar-management')
|
subdir('calendar-management')
|
||||||
subdir('common')
|
subdir('common')
|
||||||
subdir('event-editor')
|
subdir('event-editor')
|
||||||
subdir('gtk')
|
|
||||||
subdir('icons')
|
subdir('icons')
|
||||||
subdir('importer')
|
subdir('importer')
|
||||||
subdir('views')
|
subdir('views')
|
||||||
@@ -21,6 +20,7 @@ blueprints = custom_target(
|
|||||||
'gcal-sync-indicator.blp',
|
'gcal-sync-indicator.blp',
|
||||||
'gcal-weather-settings.blp',
|
'gcal-weather-settings.blp',
|
||||||
'gcal-window.blp',
|
'gcal-window.blp',
|
||||||
|
'shortcuts-dialog.blp',
|
||||||
),
|
),
|
||||||
output: '.',
|
output: '.',
|
||||||
command: [
|
command: [
|
||||||
|
|||||||
@@ -0,0 +1,96 @@
|
|||||||
|
using Gtk 4.0;
|
||||||
|
using Adw 1;
|
||||||
|
|
||||||
|
Adw.ShortcutsDialog shortcuts_dialog {
|
||||||
|
Adw.ShortcutsSection {
|
||||||
|
title: C_("shortcut dialog", "General");
|
||||||
|
|
||||||
|
Adw.ShortcutsItem {
|
||||||
|
title: C_("shortcut dialog", "Open Main Menu");
|
||||||
|
accelerator: "F10";
|
||||||
|
}
|
||||||
|
|
||||||
|
Adw.ShortcutsItem {
|
||||||
|
title: C_("shortcut dialog", "Open Calendars Menu");
|
||||||
|
accelerator: "F8";
|
||||||
|
}
|
||||||
|
|
||||||
|
Adw.ShortcutsItem {
|
||||||
|
title: C_("shortcut dialog", "New Event");
|
||||||
|
accelerator: "<Primary>N";
|
||||||
|
}
|
||||||
|
|
||||||
|
Adw.ShortcutsItem {
|
||||||
|
title: C_("shortcut dialog", "Manage Calendars");
|
||||||
|
accelerator: "<Ctrl><Alt>m";
|
||||||
|
}
|
||||||
|
|
||||||
|
Adw.ShortcutsItem {
|
||||||
|
title: C_("shortcut dialog", "Synchronize Calendars");
|
||||||
|
accelerator: "F5 <Ctrl>r";
|
||||||
|
}
|
||||||
|
|
||||||
|
Adw.ShortcutsItem {
|
||||||
|
title: C_("shortcut dialog", "Close Window");
|
||||||
|
accelerator: "<Primary>Q";
|
||||||
|
}
|
||||||
|
|
||||||
|
Adw.ShortcutsItem {
|
||||||
|
title: C_("shortcut dialog", "Search");
|
||||||
|
accelerator: "<Primary>F";
|
||||||
|
}
|
||||||
|
|
||||||
|
Adw.ShortcutsItem {
|
||||||
|
title: C_("shortcut dialog", "Show Help");
|
||||||
|
accelerator: "F1";
|
||||||
|
}
|
||||||
|
|
||||||
|
Adw.ShortcutsItem {
|
||||||
|
title: C_("shortcut dialog", "Shortcuts");
|
||||||
|
accelerator: "<Primary>question";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Adw.ShortcutsSection {
|
||||||
|
title: C_("shortcut dialog", "Navigation");
|
||||||
|
|
||||||
|
Adw.ShortcutsItem {
|
||||||
|
title: C_("shortcut dialog", "Go Back");
|
||||||
|
accelerator: "<Alt>Left Page_Up";
|
||||||
|
}
|
||||||
|
|
||||||
|
Adw.ShortcutsItem {
|
||||||
|
title: C_("shortcut dialog", "Go Forward");
|
||||||
|
accelerator: "<Alt>Right Page_Down";
|
||||||
|
}
|
||||||
|
|
||||||
|
Adw.ShortcutsItem {
|
||||||
|
title: C_("shortcut dialog", "Show Today");
|
||||||
|
accelerator: "<Alt>Down <Primary>T Home";
|
||||||
|
}
|
||||||
|
|
||||||
|
Adw.ShortcutsItem {
|
||||||
|
title: C_("shortcut dialog", "Next View");
|
||||||
|
accelerator: "<Primary>Page_Down";
|
||||||
|
}
|
||||||
|
|
||||||
|
Adw.ShortcutsItem {
|
||||||
|
title: C_("shortcut dialog", "Previous View");
|
||||||
|
accelerator: "<Primary>Page_Up";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Adw.ShortcutsSection {
|
||||||
|
title: C_("shortcut dialog", "View");
|
||||||
|
|
||||||
|
Adw.ShortcutsItem {
|
||||||
|
title: C_("shortcut dialog", "Week View");
|
||||||
|
accelerator: "<Alt>1";
|
||||||
|
}
|
||||||
|
|
||||||
|
Adw.ShortcutsItem {
|
||||||
|
title: C_("shortcut dialog", "Month View");
|
||||||
|
accelerator: "<Alt>2";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user