This fixes the 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().
Details
Details
Seams to work fine.
Diff Detail
Diff Detail
- Repository
- R33 KDevPlatform
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
Generally, I like the idea.
Lean and mean.
shell/mainwindow.cpp | ||
---|---|---|
379 | Move that new block after line 386, then you can just do += i18n(" (read only)") And better be safe than sorry: Check whether activeDocument() returns null, too |
Comment Actions
Will test & push that patch.
Thanks!
shell/mainwindow.cpp | ||
---|---|---|
379 | Still not checking whether activeDocument() is null, but I'll fix that locally. |