Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv28524/src/gui
Modified Files:
wxComposeView.cpp
Log Message:
don't ask whether to convert the message to another encoding when we're
autosaving it in the background as this could result in accumulation of many
message boxes; don't ask this question again for the same message at all if the
user answered it affirmatively already
Index: wxComposeView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxComposeView.cpp,v
retrieving revision 1.407
retrieving revision 1.408
diff -b -u -2 -r1.407 -r1.408
--- wxComposeView.cpp 23 Jun 2006 23:27:30 -0000 1.407
+++ wxComposeView.cpp 24 Jun 2006 01:27:45 -0000 1.408
@@ -1736,4 +1736,6 @@
m_isModified = false;
+ m_okToConvertOnSend = false;
+
m_editor = NULL;
m_encoding = wxFONTENCODING_SYSTEM;
@@ -4330,5 +4332,5 @@
SendMessage *
-wxComposeView::BuildMessage() const
+wxComposeView::BuildMessage(int flags) const
{
// create the message object
@@ -4404,11 +4406,13 @@
if ( !ok )
{
+ if ( (flags & Interactive) && !m_okToConvertOnSend )
+ {
if ( !MDialog_YesNoDialog
(
wxString::Format
(
- _("Text of this message can't be converted to
"
- "the encoding \"%s\", would you like to "
- "send it in encoding \"%s\" instead?"),
+ _("Text of this message can't be converted
"
+ "to the encoding \"%s\", would you like "
+ " to send it in encoding \"%s\"
instead?"),
wxFontMapper::GetEncodingName(encodingMsg).c_str(),
wxFontMapper::GetEncodingName(encodingPart).c_str()
@@ -4425,4 +4429,9 @@
}
+ // don't ask again for this message
+ m_okToConvertOnSend = true;
+ }
+ //else: don't ask, convert by default
+
// FIXME: this doesn't work if we have 2 text parts in
// different encodings, we should use UTF8 in this
@@ -4503,5 +4512,5 @@
);
}
- else
+ else if ( flags & Interactive )
{
wxLogError(_("Cannot read file '%s' included in "
@@ -4511,5 +4520,5 @@
delete [] buffer;
}
- else
+ else if ( flags & Interactive )
{
wxLogError(_("Cannot open file '%s' included in "
@@ -5073,9 +5082,10 @@
}
-SendMessage *wxComposeView::BuildDraftMessage() const
+SendMessage *wxComposeView::BuildDraftMessage(int flags) const
{
- SendMessage *msg = BuildMessage();
+ SendMessage *msg = BuildMessage(flags);
if ( !msg )
{
+ if ( flags & Interactive )
wxLogError(_("Failed to create the message to save."));
@@ -5235,5 +5245,5 @@
}
- SendMessage_obj msg(BuildDraftMessage());
+ SendMessage_obj msg(BuildDraftMessage(NonInteractive));
if ( !msg )
return false;
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates