[okular] [Bug 452017] Feature to rename open PDF files with F2 keyboard shortcut
Klaus
bugzilla_noreply at kde.org
Mon Mar 31 09:59:47 BST 2025
https://bugs.kde.org/show_bug.cgi?id=452017
--- Comment #18 from Klaus <bauer.klaus.dieter at gmail.com> ---
(In reply to Bug Janitor Service from comment #17)
> A possibly relevant merge request was started @
> https://invent.kde.org/graphics/okular/-/merge_requests/922
Maybe it is too late at this point to comment, but since the last activity on
the pull request was 11 months ago, I'll share my observations.
(In reply to andreas.naumann from comment #4)
> When I select "save as", I get a "save as"-dialoge. That dialog allows to
> save the file with a new name AND rename existing files. In particular, if I
> press F2 in the "save as" dialog, I get the "rename element" dialog for the
> current file.
This does not really provide a rename feature similar to Sumatra PDF.
What the SumatraPDF rename feature does is
1. Open a "save as" like dialog.
2. Allow selecting any new file name, including in OTHER directories.
3. MOVE the file upon confirmation, or
4. RETAIN the old file name upon cancelling.
What the workaround does is:
1. Show the actual "save as" dialog with the current file name being selected.
2. Upon pressing "F2", show the dolphin file rename dialog.
3. Upon confirmation of this dialog, rename the original file, and select
the renamed entry in the dialog.
4. OVERWRITE the renamed file upon confirmation, BUT
5. IGNORE the renaming if the "save as" is not confirmed, treating it
as if the file has been deleted, instead of switching the viewer
to the documents new name.
So the workaround has two main issues, even when it is available:
1. Okular is not actually aware of the file being renamed, allowing for
outcomes where Okular keeps displaying the file under its old, no
longer existing name.
2. It does not allow to move the file to other directories.
Additionally, the workaround relies on the specific file-selector
dialog implementation being used. Specifically, on the KDE file
selector dialog acting like a streamlined subset of dolphin, with a
full context menu and the hotkeys that come with it (F2 in this case).
The only other GUI toolkit I am aware of, that provides similar
features, is the native desktop GUI toolkit on Windows.
Hence it is also not viable to call this a missing feature of Unity
(comment #8), given that many GUI toolkits share that design decision.
The biggest give-away, that it is only a workaround and not a
replacement, however, is the behavior when renaming the file in the
"save as" dialog and then not overwriting the renamed file
(comment #10 and comment #16).
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Okular-devel
mailing list