[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: [PATCH] Cancelling Spell Checker prevents "Discard (y/n)?" prompt
From: Dave Corrie <kde () davecorrie ! com>
Date: 2002-10-21 21:34:14
[Download RAW message or body]
Hi,
If it's not too late for patches to 3.1, can someone commit the attached
(trivial) patch for the compose window? Without the patch, cancelling a
spell check means that you can close the compose window without being
prompted whether you want to save the composition as a draft.
I sometimes get the feeling that I'm the only one who actually uses the
spel chekka... :)
--
Dave
["kmcomposewin.patch" (text/x-diff)]
Index: kmcomposewin.h
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmcomposewin.h,v
retrieving revision 1.177
diff -u -3 -p -r1.177 kmcomposewin.h
--- kmcomposewin.h 2002/10/17 16:27:23 1.177
+++ kmcomposewin.h 2002/10/21 21:06:16
@@ -114,6 +114,7 @@ private:
KProcess *mExtEditorProcess;
bool extEditor;
QString mExtEditor;
+ bool mWasModifiedBeforeSpellCheck;
};
Index: kmcomposewin.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmcomposewin.cpp,v
retrieving revision 1.614
diff -u -3 -p -r1.614 kmcomposewin.cpp
--- kmcomposewin.cpp 2002/10/19 22:48:55 1.614
+++ kmcomposewin.cpp 2002/10/21 21:06:20
@@ -5438,6 +5438,7 @@ KMEdit::KMEdit(QWidget *parent, KMCompos
mSpellingFilter = 0;
mTempFile = 0;
mExtEditorProcess = 0;
+ mWasModifiedBeforeSpellCheck = false;
}
@@ -5590,6 +5591,8 @@ void KMEdit::slotExternalEditorDone(KPro
//-----------------------------------------------------------------------------
void KMEdit::spellcheck()
{
+ mWasModifiedBeforeSpellCheck = isModified();
+
mKSpell = new KSpell(this, i18n("Spellcheck - KMail"), this,
SLOT(slotSpellcheck2(KSpell*)));
connect (mKSpell, SIGNAL( death()),
@@ -5639,6 +5642,7 @@ void KMEdit::slotSpellResult(const QStri
{
kdDebug(5006) << "spelling: canceled - restoring text from SpellingFilter" << endl;
setText(mSpellingFilter->originalText());
+ setModified(mWasModifiedBeforeSpellCheck);
}
mKSpell->cleanUp();
_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic