Bug 419096 - Feature: When opening a file, have the option for okular to redirect to an already open document rather than open another instance
Summary: Feature: When opening a file, have the option for okular to redirect to an al...
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-22 07:05 UTC by br_shadow
Modified: 2020-04-25 16:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 1.11.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description br_shadow 2020-03-22 07:05:52 UTC
When I open a document that is already open in okular (dozens of tabs most of the time!) have an option for okular to redirect you to the window/tab where that document is open, rather than opening it in another tab (when it's already open!)
Comment 1 Nate Graham 2020-04-15 04:47:53 UTC
This should probably just be the default behavior. What's the use case for opening two instances of the same document in the same app?
Comment 2 David Hurka 2020-04-15 11:12:25 UTC
There are use cases, which are partially based on the lack of split view (Bug 169847)

Imagine any long datasheet, where page 27 references some table cells on page 125. Or an instruction set summary, where branch conditions are explained on page 123 and the instruction of interest is on page 17562. You can’t scroll back and forth in such cases.

Imagine that you review a slide show, which gives contrary information on slide 25 and slide 60, which is referenced at slide 81. So you need two instances to compare slide 25 and slide 60 side by side, and one instance to make annotations on slide 81.

Imagine that you heavily annotate a document, and suddenly you want to see how it looked without the annotations.

Imagine that you open a remote document, which is created on-the-fly, and changes with every reload.

Even Kate, which was used as example for other applications switching instance instead of opening a document twice, can open the same document in multiple windows, although it has split view.

BTW: The merge request for this is here: https://invent.kde.org/kde/okular/-/merge_requests/148
Comment 3 Nate Graham 2020-04-15 14:13:46 UTC
Thanks, that makes sense. I wonder if a real split view feature would be an ultimately more appropriate solution though.
Comment 4 Albert Astals Cid 2020-04-23 07:39:34 UTC
Git commit d735d50cdea61cefc2413637ca164d0b33221eaa by Albert Astals Cid, on behalf of Andi Sardina Ramos.
Committed on 23/04/2020 at 07:39.
Pushed by aacid into branch 'master'.

Give the option of switching to a tab if the file is already open instead of opening a new tab

Disabled by default

M  +36   -0    autotests/mainshelltest.cpp
M  +5    -7    conf/dlggeneral.cpp
M  +0    -3    conf/dlggeneral.h
M  +31   -33   conf/dlggeneralbase.ui
M  +3    -0    conf/okular.kcfg
M  +1    -1    interfaces/viewerinterface.h
M  +5    -0    part.cpp
M  +1    -0    part.h
M  +28   -2    shell/shell.cpp
M  +2    -1    shell/shell.h

https://invent.kde.org/kde/okular/commit/d735d50cdea61cefc2413637ca164d0b33221eaa
Comment 5 br_shadow 2020-04-25 16:26:21 UTC
Thank you so much.