Bug 134854

Summary: show read-only files in "File List" and editor tabs
Product: [Developer tools] kdevplatform Reporter: Rob L <robert.leathley>
Component: generalAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: wishlist CC: abirvalg, adymo, aleixpol, foss, gabrimonfa, kfunk
Priority: NOR Keywords: junior-jobs
Version: 0.9.94   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 5.0.0
Sentry Crash Report:

Description Rob L 2006-09-29 15:34:03 UTC
Version:           3.3.4 (using KDE KDE 3.4.3KDE 1.2)
Installed from:    Compiled From SourcesCompiled From Sources

It would be useful if a different icon were used for read only files in the "File List" and on editor tabs.

In particular, this would facilitate working with Rational Clearcase, where 'checked in` files are read only.  Currently the only way to tell from kdevelop, is to try and save and then get an error dialog.
Comment 1 Aleks 2011-09-01 07:21:46 UTC
Same here with KDevelop 4.2.3
I have a lot of Read-Only Tabs open. When I want to make a change to a file, the only way of knowing if it is Read-Only is focus the editor and try to type something. There is no icon on the tab for indication.
This is a major annoyance since I toggle Read-Only on/off a lot.
Comment 2 Kevin Funk 2012-12-21 00:03:40 UTC
Note: This has been just implemented in Kate: https://bugs.kde.org/show_bug.cgi?id=154897
Comment 3 Kevin Funk 2012-12-22 20:30:32 UTC
*** Bug 310757 has been marked as a duplicate of this bug. ***
Comment 4 Kevin Funk 2012-12-22 21:04:37 UTC
*** Bug 294243 has been marked as a duplicate of this bug. ***
Comment 5 Kevin Funk 2015-11-28 12:56:22 UTC
Still not implemented. Should be super trivial to do a similar patch as in https://bugs.kde.org/show_bug.cgi?id=154897 for KDevelop. -> Junior job.
Comment 6 Kevin Funk 2016-01-08 19:37:00 UTC
Steps to reproduce:
- Open a file
- Tools -> [x] Read Only Mode

What happens:
- No indicator

Should happen:
- [read only] in KDevelop caption
Comment 7 Kevin Funk 2016-01-20 08:58:43 UTC
Fixed. Note that the KTextEditor bug is *still* not resolved. I.e. the read-only state of a file is not deduced from its access rights represented on disk. You still have to mark a file as "read only" yourself. -> KTextEditor issue, though.

commit abfa9b80fb61e74cd604473b7ec5810feb7ed5ff
Author: Artur Puzio <cytadela88@gmail.com>
Date:   Tue Jan 19 22:12:50 2016 +0100

    MainWindow: Add indicator for read-only files
    
    Summary:
    This fixes the [[ https://bugs.kde.org/show_bug.cgi?id=134854 | Bug 134854 ]]
    If current file is read-only (checked with `ReadWritePart::isReadWrite()`) the window title changes - "(read only)" is added.
    To check if the read-only status changed `KTextEditor::Document::readWriteChanged` signal is used.
    Note: chmod-ing a file won't make in read only for `ReadWritePart::isReadWrite()`.
    
    Test Plan: Seams to work fine.
    
    BUG: 134854
    
    Reviewers: kfunk
    
    Reviewed By: kfunk
    
    Subscribers: kdevelop-devel
    
    Differential Revision: https://phabricator.kde.org/D794