Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29281/src/gui
Modified Files:
wxComposeView.cpp
Log Message:
fixed several bugs related to changing identity in the composer window when
replying: don't use message view to get the text to quote now, remember it in
the composer itself once and for all instead
Index: wxComposeView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxComposeView.cpp,v
retrieving revision 1.396
retrieving revision 1.397
diff -b -u -2 -r1.396 -r1.397
--- wxComposeView.cpp 17 Jan 2006 01:38:32 -0000 1.396
+++ wxComposeView.cpp 12 Feb 2006 16:50:05 -0000 1.397
@@ -96,4 +96,5 @@
#include "SendMessage.h"
#include "Message.h"
+#include "MessageView.h"
#include "Collect.h"
#include "ColourNames.h"
@@ -1669,5 +1670,4 @@
m_OriginalMessage = NULL;
m_DraftMessage = NULL;
- m_msgviewOrig = NULL;
// by default new recipients are "to"
@@ -2730,7 +2730,4 @@
wxComposeView::InitText(Message *msg, const MessageView *msgview)
{
- // store it for the future use in DoInitText()
- m_msgviewOrig = msgview;
-
if ( m_kind == Message_New )
{
@@ -2764,4 +2761,18 @@
ASSERT_MSG( m_OriginalMessage, _T("what do we reply to?") );
+ // we need to show text in the message view to be able to quote it
+ if ( msg && msgview )
+ {
+ const_cast<MessageView *>(msgview)->ShowMessage(msg->GetUId());
+
+ // needed for the message to appear in the message view (FIXME)
+ MEventManager::DispatchPending();
+
+ // remember the text to quote once and for all, so that we still quote
+ // the same text even if the message view selection changes later (and
+ // we're reinitialized because, e.g., of an identity change)
+ m_textToQuote = msgview->GetText();
+ }
+
DoInitText(msg);
}
@@ -2846,5 +2857,5 @@
}
- if ( !m_msgviewOrig )
+ if ( m_textToQuote.empty() )
{
// we don't want to quote anything at all, so remove all occurences of
@@ -2900,5 +2911,5 @@
templateValue,
msgOrig ? msgOrig : m_OriginalMessage,
- m_msgviewOrig
+ m_textToQuote
) )
{
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates