linuxmint / xviewer

A generic Image viewer
GNU General Public License v2.0
74 stars 37 forks source link

Change hotkeys for rotation to more accessible #165

Open mars4science opened 2 years ago

mars4science commented 2 years ago
 * Xviewer version 3.2.0
 * Distribution Mint 20.2

Issue Ctrl+R and Shift+Ctrl+R are rather cumbersome to press while browsing through pictures with left/right keys. Could you please change these hotkeys to keys close by: e.g. Ctrl+left/right or Shift+left/right or ,/. or Shift+,/.. (< / >) None of them AFAIK is used by Cinnamon display manager to pose conflicts. Or add them keys as "shadow" backups to Ctrl-R and Shift-Ctrl-R. TIA

In the meanwhile could you please point me to code to change myself and rebuild? I understand changing master requires some time + text in edit menu to fix. TIA

Added: I've changed R to M in shortcuts.page, build and installed, version changed but even in menu text for rotation remained with "R".

TL;DR I've followed steps "Build and Install from Source". I've tried text search for "Shift" and "Ctrl", was able to relevantly locate only shortcuts.page where I've replaced R with M `

Rotate clockwise

CtrlM

` On `debuild --no-sign` I got some warnings like "unknown:0: warning: Field descriptions for struct XviewerImage are missing in source code comment block.", in the end: E: xviewer changes: bad-distribution-in-changes-file vanessa E: xviewer source: build-depends-indep-without-arch-indep E: xviewer changes: changed-by-address-malformed Clement Lefebvre E: gir1.2-xviewer-3.0: debian-changelog-file-contains-invalid-email-address clem@macbook E: xviewer: debian-changelog-file-contains-invalid-email-address clem@macbook E: xviewer-dbg: debian-changelog-file-contains-invalid-email-address clem@macbook E: xviewer-dev: debian-changelog-file-contains-invalid-email-address clem@macbook E: xviewer source: maintainer-address-is-root-user Linux Mint E: gir1.2-xviewer-3.0: maintainer-address-is-root-user Linux Mint E: xviewer: maintainer-address-is-root-user Linux Mint E: xviewer-dbg: maintainer-address-is-root-user Linux Mint E: xviewer-dev: maintainer-address-is-root-user Linux Mint W: xviewer source: ancient-standards-version 3.9.6 (released 2014-09-17) (current is 4.5.0) W: xviewer-dbg: extended-description-line-too-long W: xviewer-dbg: priority-extra-is-replaced-by-priority-optional Finished running lintian. and on `sudo debi` dpkg: dependency problems prevent configuration of xviewer: xviewer depends on xapps-common (>= 2.2.7); however: Version of xapps-common on system is 2.2.5+una. ... When I run xviewer I noted new version in about, but hotkey remained with R - both in action and in text in menu.
programmer-ceds commented 2 years ago

If it helps you can configure the mouse scroll and tilt wheels (in combination with no modifier, shift, control and shift and control) to rotate the image by +/- 90 degrees. Not what you are asking for but it might help. With a mouse that has a tilt-wheel you could have tilt left/right move to previous/next image respectively and shift+tilt left/right rotate 270 and 90 degrees respectively.

Edit: changing the short-cut keys for rotating would break the code that provides rotation via the mouse as noted above).

I think that changing the shortcuts.page file will only alter what is displayed by the help system - search for "r" and "r" in xviewer-window.c. However, if you change the shortcut keys there (and in shortcuts.page) could you please also change the code in case 4 of the switch (action) statement in xviewer-scroll-view.c/xviewer_scroll_view_scroll_event() to match so that this will still work.