Added button to open the crash log
This commit is contained in:
@@ -40,15 +40,26 @@ void InformUserOfCrash()
|
|||||||
"\n"
|
"\n"
|
||||||
" http://sourceforge.net/tracker/?func=add&group_id=37892&atid=421366",
|
" http://sourceforge.net/tracker/?func=add&group_id=37892&atid=421366",
|
||||||
kCFStringEncodingASCII);
|
kCFStringEncodingASCII);
|
||||||
CFStringRef OK = CFStringCreateWithCString(NULL, "OK", kCFStringEncodingASCII);
|
CFStringRef OK = CFStringCreateWithCString(NULL, "Open crashinfo", kCFStringEncodingASCII);
|
||||||
struct AlertStdCFStringAlertParamRec params = {kStdCFStringAlertVersionOne, true, false, OK, NULL, NULL,
|
CFStringRef Cancel = CFStringCreateWithCString(NULL, "Cancel", kCFStringEncodingASCII);
|
||||||
kAlertStdAlertOKButton, NULL, kWindowAlertPositionParentWindowScreen, NULL};
|
struct AlertStdCFStringAlertParamRec params = {kStdCFStringAlertVersionOne, true, false, OK, Cancel, NULL,
|
||||||
|
kAlertStdAlertOKButton, kAlertStdAlertCancelButton, kWindowAlertPositionParentWindowScreen, NULL};
|
||||||
DialogRef dialog;
|
DialogRef dialog;
|
||||||
SInt16 unused;
|
SInt16 button;
|
||||||
|
|
||||||
CreateStandardAlert(kAlertStopAlert, error, NULL, ¶ms, &dialog);
|
CreateStandardAlert(kAlertStopAlert, error, NULL, ¶ms, &dialog);
|
||||||
AutoSizeDialog(dialog);
|
AutoSizeDialog(dialog);
|
||||||
RunStandardAlert(dialog, NULL, &unused);
|
RunStandardAlert(dialog, NULL, &button);
|
||||||
|
switch (button)
|
||||||
|
{
|
||||||
|
case kAlertStdAlertOKButton:
|
||||||
|
if (system(NULL))
|
||||||
|
system("open /tmp/crashinfo.txt");
|
||||||
|
else
|
||||||
|
SysBeep(30);
|
||||||
|
break;
|
||||||
|
}
|
||||||
CFRelease(OK);
|
CFRelease(OK);
|
||||||
|
CFRelease(Cancel);
|
||||||
CFRelease(error);
|
CFRelease(error);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user