Update of /cvsroot/mahogany/M/src/gui
In directory usw-pr-cvs1:/tmp/cvs-serv21944/src/gui
Modified Files:
wxComposeView.cpp
Log Message:
fixed bug with clearing the text and launching the external editor unexpectedly
Index: wxComposeView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxComposeView.cpp,v
retrieving revision 1.261
retrieving revision 1.262
diff -b -u -2 -r1.261 -r1.262
--- wxComposeView.cpp 19 Mar 2002 01:43:44 -0000 1.261
+++ wxComposeView.cpp 28 Mar 2002 15:21:49 -0000 1.262
@@ -1167,4 +1167,5 @@
m_kind = kind;
m_pidEditor = 0;
+ m_alreadyExtEdited = false;
m_procExtEdit = NULL;
m_sending = false;
@@ -2027,4 +2028,9 @@
void wxComposeView::OnFirstTimeModify()
{
+ // don't clear the text below if we already have something there - but
+ // normally we shouldn't
+ CHECK_RET( !IsModified(),
+ "shouldn't be called if we had been already changed!" );
+
// evaluate the template right now if we have one and it hadn't been done
// yet (for messages of kind other than new it is done on creation)
@@ -2395,4 +2401,8 @@
bool wxComposeView::OnFirstTimeFocus()
{
+ // if we had already edited the text, don't launch the editor
+ if ( m_alreadyExtEdited )
+ return true;
+
// it may happen that the message is sent before the composer gets focus,
// avoid starting the external editor by this time!
@@ -2435,4 +2445,8 @@
return true;
}
+
+ // even if we fail to launch it, don't even attempt to do it when we first
+ // get the focus (see OnFirstTimeFocus())
+ m_alreadyExtEdited = true;
bool launchedOk = false;
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates