Give the user 3 choices. "File Bug Report" opens REPORT_BUG_URL and the crashinfo.txt. "Open crashinfo.txt" just opens crashinfo.txt. You can guess what "Quit" does.

This commit is contained in:
Steve Checkoway
2006-01-28 07:22:26 +00:00
parent eb7b96178b
commit 0175a59715
+8 -4
View File
@@ -6,19 +6,23 @@ void InformUserOfCrash( const char *sPath )
NSString *s = @PRODUCT_NAME " has crashed. Debugging information has been output to\n\n%s\n\n" NSString *s = @PRODUCT_NAME " has crashed. Debugging information has been output to\n\n%s\n\n"
@"Please file a bug report at\n\n" REPORT_BUG_URL; @"Please file a bug report at\n\n" REPORT_BUG_URL;
int ret = NSRunAlertPanel( @PRODUCT_NAME " has crashed", s, @"Open crashinfo.txt", @"Quit", nil, sPath ); int ret = NSRunCriticalAlertPanel( @PRODUCT_NAME " has crashed", s, @"File Bug Report",
@"Quit", @"Open crashinfo.txt", sPath );
if( ret == NSAlertDefaultReturn )
{
NSWorkspace *ws = [NSWorkspace sharedWorkspace]; NSWorkspace *ws = [NSWorkspace sharedWorkspace];
switch( ret )
{
case NSAlertDefaultReturn:
[ws openURL:[NSURL URLWithString:@REPORT_BUG_URL]]; // fall through
case NSAlertOtherReturn:
[ws openFile:[NSString stringWithUTF8String:sPath]]; [ws openFile:[NSString stringWithUTF8String:sPath]];
} }
[pool release]; [pool release];
} }
/* /*
* (c) 2003-2005 Steve Checkoway * (c) 2003-2006 Steve Checkoway
* All rights reserved. * All rights reserved.
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a