Bug 335852 - Multiple tabs session restore fails
Summary: Multiple tabs session restore fails
Status: RESOLVED DUPLICATE of bug 364680
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 20.12.0
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
: 336074 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-06-05 19:31 UTC by Chris
Modified: 2022-07-25 13:26 UTC (History)
5 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 Chris 2014-06-05 19:31:00 UTC
First go in "configure okular/general options" and toggle "open new files in tabs".
Then in a terminal, open two pdf files.
Then logout - login.
Only the rightmost tab has been restored.


Reproducible: Always

Steps to Reproduce:
1.toggle "open new files in tabs"
2.open two pdf files from a terminal
3.logout - login
Actual Results:  
Only the rightmost tab has been restored.

Expected Results:  
All tabs should have been restored.

When I follow the same steps but with several instances of Okular (different windows). All the windows are restored: all the files are correctly saved and restored. It is the same behaviour I'd like to have with multiple tabs.

The platform is debian testing, but the okular version it that of debian unstable: 4:4.13.1-2.
I tried it on two different computers with roughly the same configuration. It yielded the same results.
Comment 1 Albert Astals Cid 2014-06-17 21:55:36 UTC
Jonathan, more tabs breakage.
Comment 2 Jonathan Doman 2014-06-17 22:33:47 UTC
Okay, got it. I'm settled in a new city now, so I'll put up patches as fast as you can review them.
Comment 3 Christoph Feck 2014-07-15 02:18:37 UTC
*** Bug 336074 has been marked as a duplicate of this bug. ***
Comment 4 Albert Astals Cid 2014-07-30 22:19:03 UTC
Jonathan any chance we can get a fix for this for 4.14.0 (tagging in one week)?
Comment 5 Jonathan Doman 2015-02-03 04:35:57 UTC
I'm trying to work on this bug but hitting some roadblocks due to the Part plugin design. The Shell needs to get and set some information on each Part (the viewport), and this can't really be done using signals/slots. Can I add appropriate functions to the ViewerInterface?
Comment 6 Albert Astals Cid 2015-02-03 21:23:37 UTC
It's a possibilty, what do you need in there?
Comment 7 Albert Astals Cid 2015-03-16 22:56:50 UTC
Git commit 1cfb007b6339fa51c010fdd27e8de4838dadb5a5 by Albert Astals Cid, on behalf of Jonathan Doman.
Committed on 16/03/2015 at 22:55.
Pushed by aacid into branch 'Applications/15.04'.

Fix session restore/save with multiple tabs
REVIEW: 122570

M  +0    -20   part.cpp
M  +0    -2    part.h
M  +1    -1    shell/main.cpp
M  +27   -19   shell/shell.cpp
M  +7    -6    shell/shell.h
M  +119  -0    tests/mainshelltest.cpp

http://commits.kde.org/okular/1cfb007b6339fa51c010fdd27e8de4838dadb5a5
Comment 8 Eric 2016-04-23 20:21:10 UTC
Hi all, I'm sorry for my low level in linux. But I'd like to use the 'restores multy-tab session' in okular, and I'm not clear about the steps to add or use that option. Could you explain in few and easy steps please?, I don't know where should I put those files. Thank you
Comment 9 Eric 2016-04-23 20:22:12 UTC
Hi all, I'm sorry for my low level in linux. But I'd like to use the 'restore multi-tab session' in okular, and I'm not clear about the steps to add or use that option. Could you explain in few and easy steps please?, I don't know where should I put those files. Thank you
Comment 10 Chris 2021-01-01 14:50:38 UTC
Hi, I don't know how the functionality did work between 2016 and now.
However I've been giving it a try starting one month ago, and I can say it fails every time.
On logout or reboot, when session is restored, only the tab that was on the left before the operation is restored.
So you have to figure out scratching your head what were the tabs that were opened before that.
Maybe it is just my system that is poorly configured, but since I'm a lousy admin, I usually do nothing fancy, and leave things in their default configuration. System is up-to-date.
Comment 11 Chris 2021-01-19 15:47:40 UTC
This is how I see it:

If you haven't changed your settings, and you do a log-out action, with a multi-tabs Okular, the log-out operation is really frozen, blocked, by an Okular popup warning you that you have several tabs opened and do you want to close them or not.

When it's plain log-out that you are doing, selecting "cancel" in the pop-up, really reverses (cancel) the log-out action itself. If you do not select anything, the log-out action will remain blocked indefinitely. Only if you select "OK", will your log-out action be completed. Which by the way could be considered a security issue, because when you log-out you don't want your session to remain opened for someone coming after you, but it's not the line I'm following here.

Now if your log-out action is subsequent to a shutdown or reboot action, the shutdown will be executed in the end, without the user doing anything in the concern of the Okular pop-up.

It is dubious that answering a popup during shutdown is relevant.

When Okular is satisfied its popup has been duly answered to, the session is correctly saved. And later restored.

In the alternative, it saves only the leftmost tab. In any case the result is your session is almost completely lost.

So that would be related to: https://bugs.kde.org/show_bug.cgi?id=403848

And I forgot to mention that if you always log-out through shutdown or reboot, the popup only appears as a glitch, a sort of bug, and you never have the idea to really think about it.

And that behavior of warning the user of multiple tabs closing at logout time, it is useless. Especially if the session is correctly saved: the tabs are not even closed from the user point of view.
Comment 12 postix 2022-07-25 13:26:07 UTC

*** This bug has been marked as a duplicate of bug 364680 ***