Bug 327641 - Show navigation panel setting is not read from config file at startup
Summary: Show navigation panel setting is not read from config file at startup
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-15 09:22 UTC by Ciro Santilli
Modified: 2013-11-23 22:33 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.95


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ciro Santilli 2013-11-15 09:22:12 UTC
The setting related to Show Navigation Panel (F7 default shortcut) seems not to be read from the  okularpartrc config file at startup.

Test:

- start with an empty config/okularpartrc
- start okular
- hit F7 once
- OK: the navigation panel disappears. [Main View] ShowLeftPanel=false appears on the rc

- close okular
- restart okular
- Expected:  Navigation panel is not there.
- Actual: Navigation panel is there.

- Hit F7.
- Expected: Navigation panel disappears. `ShowLeftPanel=false`
- Actual: Navigation panel is there. `ShowLeftPanel=false` disappears from rc file.

- Hit F7 again.
- OK: Navigation panel disappears. `ShowLeftPanel=false` appears on the rc file.

The setting is  used mostly under part.cpp and is called `ShowLeftPanel`. What intrigues me the most is that `ShowBottomBar` has very similar code to it but it works. 

Reproducible: Always
Comment 1 Albert Astals Cid 2013-11-18 23:39:52 UTC
Which version of okular are you using?  I've tried this

- start with an empty config/okularpartrc
- start okular
- hit F7 once
- OK: the navigation panel disappears. [Main View] ShowLeftPanel=false appears on the rc

- close okular
- restart okular
- Expected:  Navigation panel is not there.
- Actual: Navigation panel is there.

And it just works fine (i.e. the nav panel is not there)
Comment 2 Christoph Feck 2013-11-18 23:55:40 UTC
The issue is when using Okular inside Konqueror. Often, but not always, the sidebar shows, even while the checkbox in the menu is unchecked.

I just googled "test pdf", and got three links. The first two work correctly (no sidebar), while the third one opens with the sidebar.

http://www.education.gov.yk.ca/pdf/pdf-test.pdf
http://www.tobcon.ie/assets/files/test.pdf
http://www.dmhc.ca.gov/testpage.pdf
Comment 3 Albert Astals Cid 2013-11-19 00:02:09 UTC
Is this random or can you repro? i.e. i just opened these three links in konqueror and it worked fine.
Comment 4 Christoph Feck 2013-11-19 00:17:59 UTC
On the third link, this is reproducible here.

After opening it, navigation panel (not sidebar, sorry) is open, and checkbox in menu unchecked. When I turn on the checkbox "Show Navigation Panel", it keeps visible, unchecking it again it finally hides. When I close the window, and again click the third link, it is shown again.

When I close the window with the checkbox set, it remembers the setting, and starts with panel on all three links. Maybe it has something to do with the contents of the third pdf (it shows a top message "...has forms").

Additionally, with the third link, it always start at the Contents pane. For the other links, the Contents pane is disabled. So it looks like when it even finds a contents table in the PDF, it enforces opening the panel?

KDE daily master, btw.
Comment 5 Ciro Santilli 2013-11-19 07:52:47 UTC
I made my tests by calling Okular directly from a shell with local files as `okular filename.pdf`, so I think at least in my case it is not related to Konqueror.

This happens to me if I compile from a recent git source:

 commit 4f077ed54bb3092ac65c4ce7023c8932708cd389
Author: l10n daemon script <scripty@kde.org>
Date:   Fri Nov 15 04:25:44 2013 +0000

    SVN_SILENT made messages (.desktop file)

installed with a `sudo make install` on Ubuntu 13.10. This shows version 0.17.60

Same happens for the Ubuntu 13.10 package which also shows version 0.17.60.

KDE version: 4.11.2
Comment 6 Lucas Kane 2013-11-19 13:15:42 UTC
isn't this the same behavior I described here: https://bugs.kde.org/show_bug.cgi?id=321169 ?  It seems to me that it has been introduced by the patch referred in the above link.
Comment 7 Ciro Santilli 2013-11-19 13:44:32 UTC
Do you also reproduce my current behaviour Kane?

The behaviour described in the link  is consistent with what I observe, although the description is not as detailed.

I tried going back one commit before the patch and behaviour seems the same to the current,  so it seems that it is not that patch which introduced it.

Still, that issue does seem related. Maybe I am not compiling reinstalling incorrectly. Have you tried to go back one commit before that one to see if it was it that introduced the current bug?
Comment 8 Lucas Kane 2013-11-19 14:03:18 UTC
I can reproduce your issue with okular from kde 4.12 beta 2. After downgrading to okular 17.3, the offending behavior is not reproducible anymore. I.e., in 17.3 the rc setting is always respected. You should try to downgrade too to confirm. It seems you are using kde 4.11.x but with okular from kde 4.12 betas.
Comment 9 Albert Astals Cid 2013-11-20 23:03:15 UTC
Git commit db53b2f3596135fa2e8768333fd3c4b4853b8ce0 by Albert Astals Cid.
Committed on 20/11/2013 at 23:02.
Pushed by aacid into branch 'KDE/4.12'.

Do not show the sidebar if it was hidden when defaulting to show the toc
FIXED-IN: 4.11.95

M  +2    -4    part.cpp
M  +13   -5    ui/sidebar.cpp
M  +4    -1    ui/sidebar.h

http://commits.kde.org/okular/db53b2f3596135fa2e8768333fd3c4b4853b8ce0
Comment 10 Lucas Kane 2013-11-23 22:33:47 UTC
Just wanted to leave a Thank You to Albert for the patch. 

Thank you!