From 0175a597151e397ba33bd82fa5a351aa75439147 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Sat, 28 Jan 2006 07:22:26 +0000 Subject: [PATCH] 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. --- stepmania/src/archutils/Darwin/Crash.m | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/stepmania/src/archutils/Darwin/Crash.m b/stepmania/src/archutils/Darwin/Crash.m index d8c24da736..6195036063 100644 --- a/stepmania/src/archutils/Darwin/Crash.m +++ b/stepmania/src/archutils/Darwin/Crash.m @@ -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" @"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]; + + switch( ret ) { - NSWorkspace *ws = [NSWorkspace sharedWorkspace]; - + case NSAlertDefaultReturn: + [ws openURL:[NSURL URLWithString:@REPORT_BUG_URL]]; // fall through + case NSAlertOtherReturn: [ws openFile:[NSString stringWithUTF8String:sPath]]; } [pool release]; } /* - * (c) 2003-2005 Steve Checkoway + * (c) 2003-2006 Steve Checkoway * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a