diff options
author | Ken Moore <ken@pcbsd.org> | 2016-08-08 15:34:47 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2016-08-08 15:34:47 -0400 |
commit | 9e11c2d2525f23d54f909354385580702e0b4267 (patch) | |
tree | fe8196bcb6694b07ce117431bdf12df0de5eadd5 /src-qt5/desktop-utils/lumina-textedit | |
parent | Tag version 1.0.1 in the source tree (Base version 1.0, minor update 1). (diff) | |
download | lumina-9e11c2d2525f23d54f909354385580702e0b4267.tar.gz lumina-9e11c2d2525f23d54f909354385580702e0b4267.tar.bz2 lumina-9e11c2d2525f23d54f909354385580702e0b4267.zip |
Add a prompt about reloading a file when it changes by some other utility.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-textedit')
-rw-r--r-- | src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp | 7 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-textedit/lumina-textedit.pro | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp b/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp index 1ec746a3..6f583e4e 100644 --- a/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp +++ b/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp @@ -12,6 +12,7 @@ #include <QFileDialog> #include <QDebug> #include <QApplication> +#include <QMessageBox> #include <LuminaUtils.h> @@ -281,13 +282,13 @@ void PlainTextEditor::textChanged(){ void PlainTextEditor::fileChanged(){ qDebug() << "File Changed:" << currentFile(); bool update = !hasChanges; //Go ahead and reload the file automatically - no custom changes in the editor - /*QString text = tr("The following file has been changed by some other utility. Do you want to re-load it?"); + QString text = tr("The following file has been changed by some other utility. Do you want to re-load it?"); text.append("\n"); text.append( tr("(Note: You will lose all currently-unsaved changes)") ); - text.append("\n\n%1");*/ + text.append("\n\n%1"); if(!update){ - //update = (QMessageBox::Yes == QMessageBox::question(this->parent(), tr("File Modified"),text.arg(currentFile()) , QMessageBox::Yes | QMessageBox::No, QMessageBox::No) ); + update = (QMessageBox::Yes == QMessageBox::question(this, tr("File Modified"),text.arg(currentFile()) , QMessageBox::Yes | QMessageBox::No, QMessageBox::No) ); } //Now update the text in the editor as needed if(update){ diff --git a/src-qt5/desktop-utils/lumina-textedit/lumina-textedit.pro b/src-qt5/desktop-utils/lumina-textedit/lumina-textedit.pro index 2d0ea525..edf697de 100644 --- a/src-qt5/desktop-utils/lumina-textedit/lumina-textedit.pro +++ b/src-qt5/desktop-utils/lumina-textedit/lumina-textedit.pro @@ -93,7 +93,7 @@ desktop.files=lumina-textedit.desktop desktop.path=$${L_SHAREDIR}/applications/ link.path=$${L_BINDIR} -link.extra=ln -sf $${L_BINDIR}/lumina-textedit $(INSTALL_ROOT)$${L_BINDIR}/lte +link.extra=ln -sf lumina-textedit $(INSTALL_ROOT)$${L_BINDIR}/lte INSTALLS += target desktop link |