Bug 511456

Summary: Whistlist: Easily select between "Open in new Window" and "Open in new Tab"
Product: [Applications] okular Reporter: Philipp Hahn <pmhahn+kde>
Component: generalAssignee: Okular developers <okular-devel>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 25.04.2   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=442891
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Philipp Hahn 2025-11-01 10:44:58 UTC
SUMMARY

I really like the feature to open several PDF files in one Okular instance with multiple tabs as opening them in new windows easily clutters my desktop. Sadly I cannot make this the default as `okular` is also used when I open a PDF from `mutt`: `mutt` saves the PDF to a temporary file and then invokes `okular $tmp.pdf` and waits for that command to return. When the "Open new documents in sub window" is enabled, that command returns immediately if another instance of Okular is already running. `mutt` den deletes the temporary file and Okular is left with nothing to display.
Sadly there also is no inverse of `okular --unique` which `mutt` could use the get a new instance.


STEPS TO REPRODUCE
1. Launch Okular
2. Go to "settings" / "Generel" and enable "Neue Dateien in Unterfester öffnen"
3. In a shell: ```tmp=$(mktemp --suffix=.pdf); cp Some.pdf "$tmp"; okular "$tmp"; rm "$tmp"```

OBSERVED RESULT
 
If Okular is fast enough, it will succeed to open the PDF.
Most often it will fail.

EXPECTED RESULT

1. Running `okular` from the command line should have an option to wait, until the document is closed or Okular exits.
2. The should be an option in the "Open..."-dialog to open documents in tabs if the option is turned off.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian-13-Trixie (Wat
KDE Plasma Version: 6.3.6
KDE Frameworks Version: 6.13.0
Qt Version: 6.8.2

ADDITIONAL INFORMATION