diff options
Diffstat (limited to 'src/frontend/displaywindow/cwritewindow.cpp')
-rw-r--r-- | src/frontend/displaywindow/cwritewindow.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/frontend/displaywindow/cwritewindow.cpp b/src/frontend/displaywindow/cwritewindow.cpp index c60d9cd..7496dd7 100644 --- a/src/frontend/displaywindow/cwritewindow.cpp +++ b/src/frontend/displaywindow/cwritewindow.cpp @@ -8,17 +8,14 @@ **********/ -#include "cwritewindow.h" +#include "frontend/displaywindow/cwritewindow.h" #include "backend/drivers/cswordmoduleinfo.h" #include "backend/keys/cswordversekey.h" - +#include "frontend/display/cwritedisplay.h" #include "frontend/keychooser/ckeychooser.h" #include "frontend/profile/cprofilewindow.h" -#include "frontend/display/cwritedisplay.h" - - -#include <QMessageBox> +#include "util/dialogutil.h" using namespace Profile; @@ -112,13 +109,13 @@ void CWriteWindow::lookupSwordKey( CSwordKey* newKey ) { if ( modules().count() ) { displayWidget()->setText( key()->rawText() ); } - setCaption( windowCaption() ); + setWindowTitle(windowCaption()); } bool CWriteWindow::queryClose() { //save the text if it has changed if (m_writeDisplay->isModified()) { - switch (QMessageBox::question( this, tr("Save Text?"), tr("Save text before closing?"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, QMessageBox::Yes) ) { + switch (util::showQuestion( this, tr("Save Text?"), tr("Save text before closing?"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, QMessageBox::Yes) ) { case QMessageBox::Yes: //save and close saveCurrentText(); m_writeDisplay->setModified( false ); @@ -140,7 +137,7 @@ void CWriteWindow::beforeKeyChange(const QString& key) { //If the text changed and we'd do a lookup ask the user if the text should be saved if (modules().first() && ((CWriteDisplay*)displayWidget())->isModified()) { - switch (QMessageBox::question( this, tr("Save Text?"), tr("Save changed text?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) ) { + switch (util::showQuestion( this, tr("Save Text?"), tr("Save changed text?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) ) { case QMessageBox::Yes: { //save the changes saveCurrentText( key ); break; |