Bug 319839 - --unique-per-file option
Summary: --unique-per-file option
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.19.3
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-14 18:47 UTC by Ansa
Modified: 2016-01-27 06:47 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ansa 2013-05-14 18:47:49 UTC
The --unique option is great! However, it would be great to have also a --unique-per-file option, so that if file A is already open and I try to open it again, it just reloads it, but if I try to open file B, a new Okular window/tab is opened (so that in the end I have two Okular windows/tabs and I can view both files simultaneously).

This would be particularly useful together with tex compiling in Kile and the forward/inverse search --- see also http://forum.kde.org/viewtopic.php?f=251&t=89613&p=264987#p264987

Reproducible: Always
Comment 1 Ansa 2015-05-06 11:11:16 UTC
I still miss this option. Clarification: on an attempt to open a file that is already open, the following should happen:
- the file is reloaded,
- the position in the file is updated as specified in the URL that was sent to okular (after the # sign),
- the okular window and tab with the file come to focus.
Comment 2 Jonathan Verner 2015-05-07 17:17:47 UTC
This seemed like a rather simple change, so I went ahead and tried implementing it. 

I am not sure I followed the right procedure, but I posted a patch to reviewboard here:

https://git.reviewboard.kde.org/r/123676/
Comment 3 Walter Rudametkin 2015-12-06 15:48:56 UTC
Hi,

Is there anything missing for your patch to be applied? I'd really like to see this in Okular.

Regards,
Comment 4 Jonathan Verner 2016-01-27 06:47:06 UTC
(In reply to Walter Rudametkin from comment #3)
> Hi,
> 
> Is there anything missing for your patch to be applied? I'd really like to
> see this in Okular.
> 
> Regards,

It is not fully tested yet (missing unit tests)... If you are brave, you might try downloading Okular's source, applying the patch and building it yourself.

I planned to work on it at the end of last year but unfortunately life again got into the way. As it stands, I currently don't have much time, so the chances of me finishing it soon are rather slim :-( Sorry for that.