Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17700/src/gui
Modified Files:
wxMApp.cpp
Log Message:
ask the user whether to send the debug report
Index: wxMApp.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMApp.cpp,v
retrieving revision 1.296
retrieving revision 1.297
diff -b -u -2 -r1.296 -r1.297
--- wxMApp.cpp 9 Apr 2005 15:37:03 -0000 1.296
+++ wxMApp.cpp 9 Apr 2005 16:23:22 -0000 1.297
@@ -477,5 +477,12 @@
AddAll(msg == NULL ? Context_Exception : Context_Current);
- // TODO: include msg in report if not NUL
+ if ( msg )
+ {
+ // include message which resulted in program termination
+ AddText(_T("error.txt"), msg, _("Last error message"));
+ }
+
+ // TODO: include config? this is tricky as it contains sensitive
+ // information such as passwords so we'd have to filter it out
}
@@ -490,9 +497,4 @@
if ( profile )
{
- // create a mail message and send it
- SendMessage_obj sm(SendMessage::Create(profile, Prot_SMTP));
- sm->SetSubject(_T("Mahogany crash report"));
- sm->SetAddresses(_T("[EMAIL PROTECTED]"));
-
wxFile file(GetCompressedFileName());
if ( !file.IsOpened() )
@@ -500,4 +502,23 @@
const wxFileOffset len = file.Length();
+ if ( !MDialog_YesNoDialog
+ (
+ wxString::Format
+ (
+ _("Would you like to send the crash report to "
+ "Mahogany dev team? The report size is %lukB.\n"
+ "\n"
+ "If you answer \"No\" here you will still be able "
+ "to send the report manually later."),
+ len / 1024
+ )
+ ) )
+ return false;
+
+ // create a mail message and send it
+ SendMessage_obj sm(SendMessage::Create(profile, Prot_SMTP));
+ sm->SetSubject(_T("Mahogany crash report"));
+ sm->SetAddresses(_T("[EMAIL PROTECTED]"));
+
wxCharBuffer buf(len);
if ( !file.Read(buf.data(), len) )
@@ -706,13 +727,13 @@
else // failed to send debug report
{
- msg += _("Debug report couldn't be sent.");
-
const wxString& fname = report.GetCompressedFileName();
if ( wxFile::Exists(fname) )
- msg << _("Debug report couldn't be sent but was generated in "
+ msg << _("Debug report wasn't sent but was generated in "
"the file\n")
- << _T(" ") << fname << _T("\n\n")
+ << fname << _T("\n\n")
<< _("Please attach this file to the the bug if you open\n"
- "one in Mahogany bug tracker, thank you in advance.");
+ "one in Mahogany bug tracker.\n"
+ "\n"
+ "Thank you in advance!");
else
msg += _("Debug report couldn't be generated.");
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates