Bug 236371 - View profiles - fast switching between two (or more) preconfigured views
Summary: View profiles - fast switching between two (or more) preconfigured views
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-04 22:39 UTC by Josef Kufner
Modified: 2013-02-17 19:12 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Josef Kufner 2010-05-04 22:39:15 UTC
Version:           4.4.3 (using KDE 4.4.2)
OS:                Linux
Installed from:    Debian testing/unstable Packages

Hello, I often use two view settings:
1. Fit to width, single page (good for reading)
2. Fit page, two facing pages, no scrolling (good for fast browsing and overview)

Problem is slow switching from one settings to another -- each time i have to click too many times to reconfigure okular.

Nice feature would be toolbar button (with shortcut) to switch between two (or more) presets. This button should be 3-state, becouse user can change setting to match no preset.

Each preset should contain everything that is possible to set:
 - Zoom (Fit page, Fit width, X%,)
 - View mode (Single page, Facing pages, Overview)
 - Trim margins (on/off)
 - Continuous (on/off)
Maybe some more options like:
 - Show navigtion panel
 - Rotation
 - Show toolbar/menubar/...

I think it should be pretty easy to implement -- one new page in configuration dialog and toolbar button emitting set of signals.

It will realy save a lot of time!

Thank you and have a nice day.
Josef Kufner.
Comment 1 Josef Kufner 2012-06-18 19:27:45 UTC
Hello, there is patch implementing this feature: https://github.com/jkufner/Okular/tree/view-presets

It adds three toolbar buttons and menu items to okular, each for one preset: Reading, Book and presentation overview. It does not interfere with Okular insides, only invokes three actions at once (zoom, view mode and continuous view). It would be nice to make it configurable, but it is good enough.

Commits:
e0aa7fc View presets: Menu items
b8fb1a0 View Presets: Presentation overview (and drop disabling updates)
75d2744 View Presets: Reading
913ae6d View Preset: Book
Comment 2 Albert Astals Cid 2012-06-18 20:48:55 UTC
Hi Josef, I'm not sold on the idea, can you please try to explain better what are the benefits and why this should be in okular mainline?

Thanks for the code.
Comment 3 Josef Kufner 2012-06-18 22:22:40 UTC
I found, that I use two view settings. But switching between them means I have to click three toolbar buttons. So I made one button for that.

Real world scenario looks like this: I open unknown book in PDF and click "Book" preset. Now I see pages as in real bok and I can easily browse this book using PgUp/PgDown to get idea, what it contains. But since my laptop display has only 14", reading is a bit hard, so I want to "zoom-in" when something interesting is found. But simple zoom is not enough, when interesting information is around bage break, so I want to switch to continuous mode and also to single page view (instead of facing pages) -- now I have "Reading" preset.

This feature is not meant to replace current view options, only to make their changing faster. It is in the same category as warpping mouse pointer from bottom to top when scrolling down. I think it would be nice complement for current zoom buttons on toolbar in default configuration. Actualy, I do not use zoom much, only switching between "fit page" and "fit width".

Last button is for other very common use case -- overview of presentation slides. I've added it mostly for a consistency, but I use that settings very often too (when I have slides to read).

Also, I tried to implement it as least invasive as possible to minimize maintenance costs of this code -- it triggers existing KToggleEvents.
Comment 4 Albert Astals Cid 2012-06-24 22:26:25 UTC
I Josef, I can see the usefulness of this but to be honest i think that shipping the 3 profiles that work for you is a bit too limited, i'd be much in favour of adding a configuration setting page where you can add, edit, etc view profiles so anyone can set the desired profiles he wants to use.

What do you think of that?
Comment 5 Josef Kufner 2012-06-27 18:58:07 UTC
Yes, in current implementation, it is limited.

I had same idea about configuration, but I had not enough time to implement it. So I started with small and good enough feature, and hoping it will become awsome later (I will have a bit more time during summer).

I was also thinking about using QtScript to bring even more powerful tool (like macros in World of Warcraft). Becouse such macro is simple string, it is easy to implement configuration GUI. It is easy to understand when kept simple ("zoomFitPage(); viewContinuous(false);" can write almost everyone when good and very short manual is attached to config. dialog), while it can offer a lot of options. This would also allow us to do some magic when such script is passed to Okular via command line arguments (like scripted demonstrations).
Comment 6 Albert Astals Cid 2012-06-27 22:00:31 UTC
I don't think i like the QtScript idea at all, but if you want to get something like this merged it needs to be configurable. You have lots of time until 4.10 that will be released around Januay next year :-)