Disable View mode shortcuts outside of View mode

Authored by huoni on May 6 2018, 11:38 PM.

Description

Disable View mode shortcuts outside of View mode

Summary:
The document view zoom actions like Zoom to Fit only apply to
View mode.
In the case of Zoom to Fit, the default keyboard shortcut is
F, which interferes with single-letter keypresses in Browse
mode (to skip to files starting with that letter).

There is an existing function that enables or disables these View
mode actions based on whether ViewMainPage is visible, however this
function isn't called when leaving View mode. This patch ensures
that these actions are updated when ViewMainPage is reset, ensuring
these actions are disabled when View mode is not active.

Test Plan:
Ensure default F shortcut for Zoom to Fit is set.
Go to Browse in a folder containing at least one image starting with F.
Press F - selection to jump to that image.
Go to {View, and ensure F triggers Zoom to Fit.
Go back to Browse and ensure F still works as previously.

Reviewers: Gwenview, rkflx

Reviewed By: Gwenview, rkflx

Subscribers: ngraham, rkflx

Tags: Gwenview

Differential Revision: https://phabricator.kde.org/D11633

Details

Committed
huoniMay 9 2018, 3:50 AM
Reviewer
Gwenview
Differential Revision
D11633: Disable View mode shortcuts outside of View mode
Parents
R260:dd0d608a2771: Fix custom folder icons using an absolute path entry
Branches
Unknown
Tags
Unknown