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