Bug 173264 - Add hotkey for "Change colors"
Summary: Add hotkey for "Change colors"
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.7.2
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
: 266157 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-10-22 00:52 UTC by Claus Appel
Modified: 2019-05-05 13:46 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.12.0
Sentry Crash Report:


Attachments
pacth fix (1.49 KB, patch)
2013-10-25 08:11 UTC, Ciro Santilli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Claus Appel 2008-10-22 00:52:54 UTC
Version:           0.7.2 (using KDE 4.1.2)
OS:                Linux
Installed from:    Fedora RPMs

Please add the option to set up a hotkey to turn the "Change colors" switch on and off (currently reachable via Settings -> Configure Okular -> Accessibility -> Change colors").
Comment 1 Tomasz Meresiński 2013-01-28 08:34:57 UTC
Lack of fast way to switch off/on change color option makes this option useless. There are some pdfs that look terrible with change color switched on - the ones with photos are good example.
Comment 2 Ciro Santilli 2013-10-25 08:11:06 UTC
Created attachment 83100 [details]
pacth fix
Comment 3 Ciro Santilli 2013-10-25 08:34:15 UTC
Sorry for double post, first patch and I have just figured that the patch comment goes to the devel list...

Added default shortcut Ctrl + I for change colors.

This should have the exact same of clicking the toolbox Settigs > Configure Okular > Accessibility > Change colors and then Ok, therefore changing the saved configs.

I am not sure if:

-  viewport()->update() is the right way to update the screen after this config change?

    Where is the `update()` method defined? If I tracked well, viewport() returns a DocumentViewport, which does not seem to have such a method.

- did I put things in the right place

but it seems to work.
Comment 4 Albert Astals Cid 2013-10-25 14:48:43 UTC
please post the patch to reviewboard.kde.org
Comment 5 Albert Astals Cid 2013-10-25 14:49:25 UTC
*** Bug 266157 has been marked as a duplicate of this bug. ***
Comment 6 Albert Astals Cid 2013-10-26 09:43:34 UTC
Git commit afc74e76ef70abf70d993d4099000742080a8a85 by Albert Astals Cid, on behalf of Ciro Santilli.
Committed on 26/10/2013 at 09:40.
Pushed by aacid into branch 'master'.

Add an action to toggle Change Colors

This has the exact same behaviour of clicking the toolbox Settigs > Configure Okular > Accessibility > Change colors and then clicking Ok, therefore changing the saved configs.
FIXED-IN: 4.12.0

M  +11   -0    ui/pageview.cpp
M  +1    -0    ui/pageview.h

http://commits.kde.org/okular/afc74e76ef70abf70d993d4099000742080a8a85
Comment 7 Ali 2014-04-18 23:26:20 UTC
the coments here seem to suggest that
the ctrl-i shortcut is added in kde version 4.12.0

i am now running kubuntu 14.04 
which run kde 4.13 
and okular 0.19

and this patch still did not make it to it 
this is really a key feature, to be able to easily invert color 
i hope it gets more attentions and be re-opened actually 
unless its an issue in kubuntu, not pulling this in
Comment 8 Albert Astals Cid 2014-04-18 23:32:31 UTC
The feauture is implemented. It just doesn't have a default shortcut, you can just assign the one you prefer for this really key feature
Comment 9 Ciro Santilli 2014-04-20 08:48:18 UTC
@Albert I propose Okular reconsiders the decision not to assign a default key and assigns one for the following reasons:

- when new users want the feature, which is really way better with a shortcut, they have to do the work of setting it up.

- users have to think themselves about a good way to dispose their many shourtcuts without conflict, while keeping them as mnemonic as possible. Just imagine if, say, Vim had no default shortcuts =) Okular devs are the ones who can make the best choice.

If we add the shortcut by default we remove both of those burdens from new users. This is is specially important to attract new users who are not likely to search a lot for how to do things when using a new program.

And if more advanced users want to change that shortcut, they can always do so.
Comment 10 Albert Astals Cid 2014-04-20 14:48:08 UTC
If we add a shortcut to each action we run of of shortcuts. So no.
Comment 11 Ciro Santilli 2014-04-20 14:50:56 UTC
@Albert we could select the most useful ones until we run out =)
Comment 12 Albert Astals Cid 2014-04-20 15:32:45 UTC
Yes, you can, there's a configure dialog for that.