https://bugs.kde.org/show_bug.cgi?id=486641

Waqar Ahmed <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|REPORTED                    |RESOLVED
      Latest Commit|                            |https://invent.kde.org/util
                   |                            |ities/kate/-/commit/471e1e2
                   |                            |78dddd514d3a8a84fb24a12f86d
                   |                            |1032fc

--- Comment #1 from Waqar Ahmed <[email protected]> ---
Git commit 471e1e278dddd514d3a8a84fb24a12f86d1032fc by Waqar Ahmed.
Committed on 20/08/2025 at 07:21.
Pushed by waqar into branch 'master'.

Allow pinnning documents

Document pinning allows a user to pin one or more document such that the
said documents are automatically opened in every session/window. This
can be useful for example for people who do their task management using
simple txt files and just want that file to be automatically opened. See
the linked bug. Perhaps there are other usecases.

The implementation is quite simple. The pinned documents are stored as
urls inside KateDocManager. When kate exits, these urls are stored in
the global config. The urls are opened after the view restoration inside
of KateViewManager is done. A pinned document will have a "pin" icon
instead of its mimetype-icon (unless its modified).

A document can be pinned/unpinned in 2 ways:
1. Right click a tab, then click "Pin Document"
2. Open command bar (Ctrl+Alt+I), then search for "pin document"

A convenience action "Open Next Pinned Document" is available in the
command bar (can be added to the toolbar), which will take the user
to the next pinned document.

Pinned tabs don't have any special behaviour apart from the icon. You
can close them, move them etc. This makes the implementation simpler.
If we disallow closing a document or try to keep pinned documents in
certain positions things get complicated quickly because then we need
to think about cases when the tabs are limited or when we try to reuse
tabs. Note that, closing a pinned document doesn't "unpin" it. It is
still pinned.

M  +52   -0    apps/lib/katedocmanager.cpp
M  +13   -0    apps/lib/katedocmanager.h
M  +17   -0    apps/lib/katemainwindow.cpp
M  +3    -0    apps/lib/katetabbar.cpp
M  +32   -0    apps/lib/kateviewmanager.cpp
M  +1    -0    apps/lib/kateviewmanager.h
M  +16   -0    apps/lib/kateviewspace.cpp

https://invent.kde.org/utilities/kate/-/commit/471e1e278dddd514d3a8a84fb24a12f86d1032fc

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to