summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/QTReaderApp.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/noncore/apps/opie-reader/QTReaderApp.cpp b/noncore/apps/opie-reader/QTReaderApp.cpp
index 6753698..8ef0674 100644
--- a/noncore/apps/opie-reader/QTReaderApp.cpp
+++ b/noncore/apps/opie-reader/QTReaderApp.cpp
@@ -3113,97 +3113,102 @@ void QTReaderApp::save()
}
FileManager fm;
fm.saveFile( *doc, rt );
}
*/
void QTReaderApp::clear()
{
// if (doc != 0)
// {
// QMessageBox::information(this, PROGNAME, "Deleting doc", 1);
// delete doc;
// QMessageBox::information(this, PROGNAME, "Deleted doc", 1);
// doc = 0;
// }
reader->clear();
}
void QTReaderApp::updateCaption()
{
// if ( !doc )
// setCaption( tr("QTReader") );
// else {
// QString s = doc->name();
// if ( s.isEmpty() )
// s = tr( "Unnamed" );
setCaption( reader->m_string + " - " + tr(SHORTPROGNAME) );
// }
}
void QTReaderApp::setDocument(const QString& fileref)
{
//QMessageBox::information(0, "setDocument", fileref);
openFile(fileref);
// showEditTools();
}
void QTReaderApp::closeEvent( QCloseEvent *e )
{
// qDebug("Close event");
if (m_fullscreen)
{
m_fullscreen = false;
showEditTools();
e->ignore();
}
else if (editorStack->visibleWidget() == m_buttonprefs)
{
- m_buttonprefs->mapkey(Qt::NoButton, Key_Escape);
+ int ret = QMessageBox::warning(this, PROGNAME,
+tr("Do you wish to map this key?\n\nIf you proceed you will map\nthe escape key and you will\nneed to press the close box\ntwice to exit this program\n\nContinue?"), tr("Yes"), tr("No"), QString::null, 0, 1);
+ if (ret == 0)
+ {
+ m_buttonprefs->mapkey(Qt::NoButton, Key_Escape);
+ }
e->ignore();
}
else if (m_dontSave)
{
e->accept();
}
else
{
if (editorStack->visibleWidget() == reader)
{
if ((kmap.find(orKey(Qt::NoButton,Key_Escape,false)) != kmap.end()) && m_bcloseDisabled)
{
// qDebug("Close disabled");
m_bcloseDisabled = false;
e->ignore();
}
else
{
if (m_fontVisible)
{
m_fontBar->hide();
m_fontVisible = false;
e->ignore();
return;
}
if (regVisible)
{
regBar->hide();
#ifdef USEQPE
Global::hideInputMethod();
#endif
regVisible = false;
e->ignore();
return;
}
if (searchVisible)
{
searchBar->hide();
#ifdef USEQPE
Global::hideInputMethod();
#endif
searchVisible = false;
e->ignore();
return;
}
if (m_fBkmksChanged && pBkmklist != NULL)
{
if (QMessageBox::warning(this, PROGNAME, "Save bookmarks?", "Save", "Don't bother") == 0)