shortcuts-dialog: Port to AdwShortcutsDialog
Changed help-overlay.ui to add adwaita shortcuts dialog and loaded that xml in window.rs also incremented libadwaita version. Fixes #521
This commit is contained in:
parent
538abfbbdf
commit
a50212f741
9 changed files with 291 additions and 354 deletions
|
|
@ -13,7 +13,7 @@ codegen-units = 1
|
||||||
x11 = ["ashpd/gtk4_x11"]
|
x11 = ["ashpd/gtk4_x11"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
adw = { package = "libadwaita", version = "0.8.0", features = ["v1_6"] }
|
adw = { package = "libadwaita", version = "0.8.0", features = ["v1_8"] }
|
||||||
anyhow = { version = "1.0.66" }
|
anyhow = { version = "1.0.66" }
|
||||||
arc-swap = "1.6.0"
|
arc-swap = "1.6.0"
|
||||||
ashpd = { version = "0.12.0", default-features = false, features = [
|
ashpd = { version = "0.12.0", default-features = false, features = [
|
||||||
|
|
|
||||||
|
|
@ -1,348 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<interface>
|
|
||||||
<object class="GtkShortcutsWindow" id="help_overlay">
|
|
||||||
<property name="modal">True</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsSection">
|
|
||||||
<property name="section_name">shortcuts</property>
|
|
||||||
<property name="max-height">12</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsGroup">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">General Shortcuts</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Copy Image or Selected Text to Clipboard</property>
|
|
||||||
<property name="accelerator"><Ctrl>C</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Move Image to Trash</property>
|
|
||||||
<property name="accelerator">Delete</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Permanently Delete Image</property>
|
|
||||||
<property name="accelerator"><Shift>Delete</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Open Image with Other App</property>
|
|
||||||
<property name="accelerator"><Ctrl><Shift>O</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Set as Background</property>
|
|
||||||
<property name="accelerator"><Ctrl>F8</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">New Window</property>
|
|
||||||
<property name="action-name">app.new-window</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Open Help</property>
|
|
||||||
<property name="action-name">app.help</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Show Keyboard Shortcuts</property>
|
|
||||||
<property name="action-name">win.show-help-overlay</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Close Window</property>
|
|
||||||
<property name="action-name">window.close</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Quit</property>
|
|
||||||
<property name="action-name">app.quit</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsGroup">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Navigate Images</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="direction">GTK_TEXT_DIR_LTR</property>
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Next Image</property>
|
|
||||||
<property name="accelerator">Right</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="direction">GTK_TEXT_DIR_LTR</property>
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Previous Image</property>
|
|
||||||
<property name="accelerator">Left</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="direction">GTK_TEXT_DIR_RTL</property>
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Next Image</property>
|
|
||||||
<property name="accelerator">Left</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="direction">GTK_TEXT_DIR_RTL</property>
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Previous Image</property>
|
|
||||||
<property name="accelerator">Right</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">First Image</property>
|
|
||||||
<property name="accelerator">Home</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Last Image</property>
|
|
||||||
<property name="accelerator">End</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsGroup">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Rotate Image</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Rotate Clockwise</property>
|
|
||||||
<property name="accelerator"><Ctrl>R</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Rotate Counterclockwise</property>
|
|
||||||
<property name="accelerator"><Ctrl><Shift>R</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsGroup">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Zoom Image</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Zoom In</property>
|
|
||||||
<property name="accelerator"><Ctrl>plus plus</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Zoom Out</property>
|
|
||||||
<property name="accelerator"><Ctrl>minus minus</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Best Fit</property>
|
|
||||||
<property name="accelerator"><Ctrl>0 0</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Original Scale</property>
|
|
||||||
<property name="accelerator"><Ctrl>1 1</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">200% Scale</property>
|
|
||||||
<property name="accelerator"><Ctrl>2 2</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsGroup">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Pan View</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Pan Left</property>
|
|
||||||
<property name="action-name">win.pan-left</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Pan Right</property>
|
|
||||||
<property name="action-name">win.pan-right</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Pan Up</property>
|
|
||||||
<property name="action-name">win.pan-up</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Pan Down</property>
|
|
||||||
<property name="action-name">win.pan-down</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsGroup">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">View</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Toggle Fullscreen</property>
|
|
||||||
<property name="accelerator">F11</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Leave Fullscreen</property>
|
|
||||||
<property name="accelerator">Escape</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Toggle Image Properties</property>
|
|
||||||
<property name="accelerator"><Alt>Return F9</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Show Main Menu</property>
|
|
||||||
<property name="accelerator">F10</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsGroup">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Gestures</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="direction">GTK_TEXT_DIR_LTR</property>
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Next Image</property>
|
|
||||||
<property name="shortcut-type">gesture-two-finger-swipe-left</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="direction">GTK_TEXT_DIR_LTR</property>
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Previous Image</property>
|
|
||||||
<property name="shortcut-type">gesture-two-finger-swipe-right</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="direction">GTK_TEXT_DIR_RTL</property>
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Next Image</property>
|
|
||||||
<property name="shortcut-type">gesture-two-finger-swipe-right</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="direction">GTK_TEXT_DIR_RTL</property>
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Previous Image</property>
|
|
||||||
<property name="shortcut-type">gesture-two-finger-swipe-left</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Zoom In</property>
|
|
||||||
<property name="shortcut-type">gesture-stretch</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Zoom Out</property>
|
|
||||||
<property name="shortcut-type">gesture-pinch</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Rotate Clockwise</property>
|
|
||||||
<property name="shortcut-type">gesture-rotate-clockwise</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Rotate Counterclockwise</property>
|
|
||||||
<property name="shortcut-type">gesture-rotate-counterclockwise</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsGroup">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Editing</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Open Editing View</property>
|
|
||||||
<property name="accelerator">E</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Replace Original</property>
|
|
||||||
<property name="accelerator"><Ctrl>S</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Save As</property>
|
|
||||||
<property name="accelerator"><Ctrl><Shift>S</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Cancel</property>
|
|
||||||
<property name="accelerator">Escape</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Rotate Clockwise</property>
|
|
||||||
<property name="accelerator"><Ctrl>R</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Rotate Counterclockwise</property>
|
|
||||||
<property name="accelerator"><Ctrl><Shift>R</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Mirror Horizontally</property>
|
|
||||||
<property name="accelerator">H</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Mirror Vertically</property>
|
|
||||||
<property name="accelerator">V</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkShortcutsShortcut">
|
|
||||||
<property name="title" translatable="yes" context="shortcut window">Apply Crop</property>
|
|
||||||
<property name="accelerator"><Ctrl>Return</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</interface>
|
|
||||||
284
data/resources/shortcuts-dialog.ui
Normal file
284
data/resources/shortcuts-dialog.ui
Normal file
|
|
@ -0,0 +1,284 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<interface>
|
||||||
|
<object class="AdwShortcutsDialog" id="shortcuts_dialog">
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsSection">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">General Shortcuts</property>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Copy Image or Selected Text to Clipboard</property>
|
||||||
|
<property name="accelerator"><Ctrl>C</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Move Image to Trash</property>
|
||||||
|
<property name="accelerator">Delete</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Permanently Delete Image</property>
|
||||||
|
<property name="accelerator"><Shift>Delete</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Open Image with Other App</property>
|
||||||
|
<property name="accelerator"><Ctrl><Shift>O</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Set as Background</property>
|
||||||
|
<property name="accelerator"><Ctrl>F8</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">New Window</property>
|
||||||
|
<property name="action-name">app.new-window</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Open Help</property>
|
||||||
|
<property name="action-name">app.help</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Show Keyboard Shortcuts</property>
|
||||||
|
<property name="action-name">app.shortcuts</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Close Window</property>
|
||||||
|
<property name="action-name">window.close</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Quit</property>
|
||||||
|
<property name="action-name">app.quit</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsSection">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Navigate Images</property>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="direction">GTK_TEXT_DIR_LTR</property>
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Next Image</property>
|
||||||
|
<property name="accelerator">Right</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="direction">GTK_TEXT_DIR_LTR</property>
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Previous Image</property>
|
||||||
|
<property name="accelerator">Left</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="direction">GTK_TEXT_DIR_RTL</property>
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Next Image</property>
|
||||||
|
<property name="accelerator">Left</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="direction">GTK_TEXT_DIR_RTL</property>
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Previous Image</property>
|
||||||
|
<property name="accelerator">Right</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">First Image</property>
|
||||||
|
<property name="accelerator">Home</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Last Image</property>
|
||||||
|
<property name="accelerator">End</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsSection">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Rotate Image</property>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Rotate Clockwise</property>
|
||||||
|
<property name="accelerator"><Ctrl>R</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Rotate Counterclockwise</property>
|
||||||
|
<property name="accelerator"><Ctrl><Shift>R</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsSection">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Zoom Image</property>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Zoom In</property>
|
||||||
|
<property name="accelerator"><Ctrl>plus plus</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Zoom Out</property>
|
||||||
|
<property name="accelerator"><Ctrl>minus minus</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Best Fit</property>
|
||||||
|
<property name="accelerator"><Ctrl>0 0</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Original Scale</property>
|
||||||
|
<property name="accelerator"><Ctrl>1 1</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">200% Scale</property>
|
||||||
|
<property name="accelerator"><Ctrl>2 2</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsSection">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Pan View</property>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Pan Left</property>
|
||||||
|
<property name="accelerator"><Ctrl>Left</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Pan Right</property>
|
||||||
|
<property name="accelerator"><Ctrl>Right</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Pan Up</property>
|
||||||
|
<property name="accelerator"><Ctrl>Up</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Pan Down</property>
|
||||||
|
<property name="accelerator"><Ctrl>Down</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsSection">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">View</property>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Toggle Fullscreen</property>
|
||||||
|
<property name="accelerator">F11</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Leave Fullscreen</property>
|
||||||
|
<property name="accelerator">Escape</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Toggle Image Properties</property>
|
||||||
|
<property name="accelerator"><Alt>Return F9</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Show Main Menu</property>
|
||||||
|
<property name="accelerator">F10</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsSection">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Editing</property>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Open Editing View</property>
|
||||||
|
<property name="accelerator">E</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Replace Original</property>
|
||||||
|
<property name="accelerator"><Ctrl>S</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Save As</property>
|
||||||
|
<property name="accelerator"><Ctrl><Shift>S</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Cancel</property>
|
||||||
|
<property name="accelerator">Escape</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Rotate Clockwise</property>
|
||||||
|
<property name="accelerator"><Ctrl>R</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Rotate Counterclockwise</property>
|
||||||
|
<property name="accelerator"><Ctrl><Shift>R</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Mirror Horizontally</property>
|
||||||
|
<property name="accelerator">H</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Mirror Vertically</property>
|
||||||
|
<property name="accelerator">V</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Apply Crop</property>
|
||||||
|
<property name="accelerator"><Ctrl>Return</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
||||||
|
|
@ -12,7 +12,7 @@ i18n = import('i18n')
|
||||||
gnome = import('gnome')
|
gnome = import('gnome')
|
||||||
|
|
||||||
dependency('gtk4', version: '>=4.16.0')
|
dependency('gtk4', version: '>=4.16.0')
|
||||||
dependency('libadwaita-1', version: '>=1.7.0')
|
dependency('libadwaita-1', version: '>=1.8.0')
|
||||||
dependency('gweather4', version: '>=4.0.0')
|
dependency('gweather4', version: '>=4.0.0')
|
||||||
# Required by glycin crate
|
# Required by glycin crate
|
||||||
dependency('lcms2', version: '>=2.12.0')
|
dependency('lcms2', version: '>=2.12.0')
|
||||||
|
|
|
||||||
1
news.d/50.beta/changed-use-adw-shortcuts-dialog
Normal file
1
news.d/50.beta/changed-use-adw-shortcuts-dialog
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Use AdwShortcutsDialog
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
data/org.gnome.Loupe.desktop.in.in
|
data/org.gnome.Loupe.desktop.in.in
|
||||||
data/org.gnome.Loupe.gschema.xml.in
|
data/org.gnome.Loupe.gschema.xml.in
|
||||||
data/org.gnome.Loupe.metainfo.xml.in.in
|
data/org.gnome.Loupe.metainfo.xml.in.in
|
||||||
data/resources/gtk/help-overlay.ui
|
data/resources/shortcuts-dialog.ui
|
||||||
src/about.rs
|
src/about.rs
|
||||||
src/application.rs
|
src/application.rs
|
||||||
src/config.rs
|
src/config.rs
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ mod imp {
|
||||||
klass.add_binding_action(
|
klass.add_binding_action(
|
||||||
gdk::Key::question,
|
gdk::Key::question,
|
||||||
gdk::ModifierType::CONTROL_MASK,
|
gdk::ModifierType::CONTROL_MASK,
|
||||||
"win.show-help-overlay",
|
"app.shortcuts",
|
||||||
);
|
);
|
||||||
|
|
||||||
// Set up actions
|
// Set up actions
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
|
<attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
|
||||||
<attribute name="action">win.show-help-overlay</attribute>
|
<attribute name="action">app.shortcuts</attribute>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<attribute name="label" translatable="yes">_About Image Viewer</attribute>
|
<attribute name="label" translatable="yes">_About Image Viewer</attribute>
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ mod imp {
|
||||||
klass.add_binding_action(
|
klass.add_binding_action(
|
||||||
gdk::Key::question,
|
gdk::Key::question,
|
||||||
gdk::ModifierType::CONTROL_MASK,
|
gdk::ModifierType::CONTROL_MASK,
|
||||||
"win.show-help-overlay",
|
"app.shortcts",
|
||||||
);
|
);
|
||||||
|
|
||||||
WindowAction::init_actions_and_bindings(klass);
|
WindowAction::init_actions_and_bindings(klass);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue