Bug 154897 - read-only files: add visual indicator
Summary: read-only files: add visual indicator
Status: RESOLVED DUPLICATE of bug 366727
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: VHI normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 232671 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-12-31 13:44 UTC by Maciej Pilichowski
Modified: 2016-09-06 15:33 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Pilichowski 2007-12-31 13:44:21 UTC
Version:            (using KDE KDE 3.5.8)

...for example text "read-only" in the titlebar.

...for example text "read-only" in the titlebar.
Comment 1 Thomas Friedrichsmeier 2008-01-02 13:15:01 UTC
Well, I think it's a very valid wish, but still a wish, not a bug.

Note that implementing this would likely obsolete bug #38167.
Comment 2 Maciej Pilichowski 2008-01-02 15:14:52 UTC
Thomas, sorry, of course this is a wish. Thank you for pointing out that report.
Comment 3 Dotan Cohen 2008-10-12 02:30:56 UTC
Different possible visual indicators:
1) Reduced contrast between the background and the text colour
2) A specific font
3) Cursor has a small X next to it
4) Mouse cursor has a small X next to it when mousing over the text
5) Cursor could be of the large highlight-one-letter variety (like the C64 had)
6) OMG Ponies Pink theme used when opening read-only files.
Comment 4 Dominik Haumann 2010-11-22 23:44:33 UTC
Even more important since we have swap file recovery. There indeed should be a visual indication, change to bug instead of wish.
Comment 5 Christoph Cullmann 2011-06-24 21:01:17 UTC
*** Bug 232671 has been marked as a duplicate of this bug. ***
Comment 6 Joseph Wenninger 2012-10-24 14:26:38 UTC
Git commit e5a6f98c649e4fe4cc01af55ad925b7b7b643517 by Joseph Wenninger.
Committed on 24/10/2012 at 16:23.
Pushed by jowenn into branch 'master'.

KATE & KWrite show [read only] in the caption if a document is set read only. Perhaps kdevelop should do the same. The KTextEditor::Document has a new signal readWriteChanged(Document) which is emitted if the state changes. It should be used together with the related KParts functions

M  +6    -1    kate/app/katemainwindow.cpp
M  +5    -0    ktexteditor/document.h
M  +7    -2    kwrite/kwritemain.cpp
M  +1    -0    part/document/katedocument.cpp
M  +2    -1    part/document/katedocument.h

http://commits.kde.org/kate/e5a6f98c649e4fe4cc01af55ad925b7b7b643517
Comment 7 Milian Wolff 2015-12-01 18:02:09 UTC
I just tested this with kate and kwrite built from kf5 sources - this feature seems to have regressed and is not working anymore.
Comment 8 Kevin Funk 2015-12-01 18:26:16 UTC
@Milian: You need to set the document read-only *yourself*. Then the visual indicator is there.

What does not work is that read-only files from the FS are automatically marked as read-only in the Kate document (bad).
Comment 9 Christoph Cullmann 2016-09-06 15:33:31 UTC
We never had that for "read-only" files on disk, only for "you made the file read-only".
There is a wish for visual indication, thought.

*** This bug has been marked as a duplicate of bug 366727 ***