Bug 407547 - Open new files in tabs does not work in windows
Summary: Open new files in tabs does not work in windows
Status: CONFIRMED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Microsoft Windows Microsoft Windows
: HI normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
: 435994 436387 442763 451826 456480 462704 466225 489183 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-05-15 05:57 UTC by ric
Modified: 2024-08-29 11:00 UTC (History)
18 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 ric 2019-05-15 05:57:32 UTC
SUMMARY
On my system I have a Win7 and I recently downloaded Okular from 
https://binary-factory.kde.org/view/Windows%2064-bit (presumably build 12).

Okular version 1.7.70


STEPS TO REPRODUCE
1. Go in okular menu to "Tools->Configure Okular..."
2. Under "General" activate "Open new files in tabs"
3. Close okular or keep it open, it does not matter. Ich checked the 
   ~/AppData/Local/okular/okularpartrc and I find a line with
   "ShellOpenFileInTabs=true"
4. Open any two PDFs in Windows Explorer

OBSERVED RESULT
There will be two instances of Okular showing the PDFs in their own window.

EXPECTED RESULT
One instance of Okular is showing the two PDFs in two tabs.

SOFTWARE/OS VERSIONS
Windows: Win7
macOS:  -
Linux/KDE Plasma:  -
(available in About System)
KDE Plasma Version: -
KDE Frameworks Version: 5.57.0
Qt Version: 5.12.3

ADDITIONAL INFORMATION
https://binary-factory.kde.org/view/Windows%2064-bit/job/Okular_Nightly_win64/12/
Comment 1 justenjoy034 2020-12-21 12:27:14 UTC
same problem in windows 10 and flatpak installed okular in debian 10
Comment 2 d0rf3n 2021-03-31 20:00:16 UTC
Still same problem.

Opening another/or same pdf in file explorer opens new instance.
Opening through File -> Open... opens in new tab or switches to open file.

Okular 20.12.2
Windows 10

Related to this issue on github, though I don't use flatpak: https://github.com/flathub/org.kde.okular/issues/36
Comment 3 Albert Astals Cid 2021-04-21 18:48:45 UTC
*** Bug 435994 has been marked as a duplicate of this bug. ***
Comment 4 Albert Astals Cid 2021-04-30 15:17:07 UTC
*** Bug 436387 has been marked as a duplicate of this bug. ***
Comment 5 aj520418 2022-05-04 07:19:27 UTC
SUMMARY
 `Open new files in tabs` works only from inside of Okular

STEPS TO REPRODUCE
1. Double-click on .pdf file in File Manager

OBSERVED RESULT
it opens it in a new Okular Window

EXPECTED RESULT
it opens it in a new tab

SOFTWARE/OS VERSIONS
Windows:  11
Comment 6 aj520418 2022-05-04 07:25:18 UTC
(In reply to aj520418 from comment #5)
> SUMMARY
>  `Open new files in tabs` works only from inside of Okular
> 
> STEPS TO REPRODUCE
> 1. Double-click on .pdf file in File Manager
> 
> OBSERVED RESULT
> it opens it in a new Okular Window
> 
> EXPECTED RESULT
> it opens it in a new tab
> 
> SOFTWARE/OS VERSIONS
> Windows:  11

Okular version 22.04.0
Comment 7 Jack Hill 2022-10-20 20:24:57 UTC
*** Bug 442763 has been marked as a duplicate of this bug. ***
Comment 8 Jack Hill 2022-10-20 20:25:14 UTC
*** Bug 451826 has been marked as a duplicate of this bug. ***
Comment 9 Jack Hill 2022-10-20 20:25:38 UTC
*** Bug 456480 has been marked as a duplicate of this bug. ***
Comment 10 Albert Astals Cid 2022-12-10 11:08:26 UTC
*** Bug 462704 has been marked as a duplicate of this bug. ***
Comment 11 bugzilla123 2023-02-23 20:09:37 UTC
This still doesn't work. Why isn't it being fixed?
Thanks
Comment 12 serkonda7 2023-02-23 20:44:14 UTC
(In reply to bugzilla123 from comment #11)
> This still doesn't work. Why isn't it being fixed?
> Thanks

This is open source. It's fixed if someone volunteers to do it.
Comment 13 Albert Astals Cid 2023-02-23 22:21:57 UTC
*** Bug 466225 has been marked as a duplicate of this bug. ***
Comment 14 yhd1km 2024-01-21 20:08:58 UTC
Faced the exact same problem with all versions provided by the website namely:
Windows store (23.08.1), nightly stable (23.08.04) and nightly experimental (24.01.80) build. 

I managed to build the newest version from source myself (24.07.70) and with that version the problem was not there.  I followed a wiki entry for building KDE connect on Windows using Visual Studio and craft without modifying any settings or source code. (https://community.kde.org/KDEConnect/Build_Windows) I also build it with QT6, whereas the other versions used QT5.

However, I don't know what resolved the matter (build settings, newer Okular version, newer QT version,...).
Comment 15 Albert Astals Cid 2024-01-22 22:39:44 UTC
(In reply to yhd1km from comment #14)
> Faced the exact same problem with all versions provided by the website
> namely:
> Windows store (23.08.1), nightly stable (23.08.04) and nightly experimental
> (24.01.80) build. 
> 
> I managed to build the newest version from source myself (24.07.70) and with
> that version the problem was not there.  I followed a wiki entry for
> building KDE connect on Windows using Visual Studio and craft without
> modifying any settings or source code.
> (https://community.kde.org/KDEConnect/Build_Windows) I also build it with
> QT6, whereas the other versions used QT5.
> 
> However, I don't know what resolved the matter (build settings, newer Okular
> version, newer QT version,...).

Potentially you built and run dbus which would make it work, but we don't ship dbus with Okular because it's a bit messy.

One potential solution is to use https://github.com/KDAB/KDSingleApplication instead of dbus stuff to make the "should i start myself or attach to another app" logic.
Comment 16 Sune Vuorela 2024-06-26 08:02:56 UTC
*** Bug 489183 has been marked as a duplicate of this bug. ***
Comment 17 Philipp 2024-08-29 11:00:41 UTC
Confirm this behavior for 23.08.1 with Windows 10P22H2/19045.4780