aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-12-06 09:28:30 -0500
committerKen Moore <ken@ixsystems.com>2017-12-06 09:28:30 -0500
commiteee843173b5f1f3d7e7d7fc1a822f0e735378d38 (patch)
treebe35a325172c4656f617b5ea7941724b71ec4536 /src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h
parentMake sure that on closing, it attempts to save *all* files with pending changes. (diff)
downloadlumina-eee843173b5f1f3d7e7d7fc1a822f0e735378d38.tar.gz
lumina-eee843173b5f1f3d7e7d7fc1a822f0e735378d38.tar.bz2
lumina-eee843173b5f1f3d7e7d7fc1a822f0e735378d38.zip
Add better handling of read-only files in LTE.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h')
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h b/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h
index ec6c6bf7..b0a6cbc7 100644
--- a/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h
+++ b/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.h
@@ -33,6 +33,7 @@ public:
QString currentFile();
bool hasChange();
+ bool readOnlyFile();
//Functions for managing the line number widget (internal - do not need to run directly)
int LNWWidth(); //replacing the LNW size hint detection
@@ -55,8 +56,9 @@ private:
void clearMatchData();
void highlightMatch(QChar ch, bool forward, int fromPos, QChar startch);
- //Flags to keep track of changes
- bool hasChanges;
+ //Flags to keep track of changes/status
+ bool hasChanges, readonly;
+
private slots:
//Functions for managing the line number widget
void LNW_updateWidth(); // Tied to the QPlainTextEdit::blockCountChanged() signal
@@ -68,7 +70,7 @@ private slots:
void textChanged();
void cursorMoved();
//Function for prompting the user if the file changed externally
- void fileChanged();
+ void fileChanged();
protected:
void resizeEvent(QResizeEvent *ev);
bgstack15