From 11262ae9125148ef2a03b1d3ffde61f159560ef3 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Wed, 16 May 2007 08:02:01 +0000 Subject: [PATCH] Use GoToURL since HOOKS is set up by this point. --- stepmania/src/archutils/Darwin/Crash.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/stepmania/src/archutils/Darwin/Crash.cpp b/stepmania/src/archutils/Darwin/Crash.cpp index 427d4478c6..a48409e6ea 100644 --- a/stepmania/src/archutils/Darwin/Crash.cpp +++ b/stepmania/src/archutils/Darwin/Crash.cpp @@ -1,6 +1,7 @@ #include "global.h" #include "Crash.h" #include "ProductInfo.h" +#include "arch/ArchHooks/ArchHooks.h" #include #include #include @@ -19,16 +20,6 @@ RString CrashHandler::GetLogsDirectory() return RString( dir ) + "/Logs/" PRODUCT_ID; } -// More or less copied from ArchHooks_darwin::GoToURL(), hmm. -static void OpenURL( const RString sURL ) -{ - CFURLRef url = CFURLCreateWithBytes( kCFAllocatorDefault, (const UInt8*)sURL.data(), - sURL.length(), kCFStringEncodingUTF8, NULL ); - - LSOpenCFURLRef( url, NULL ); - CFRelease( url ); -} - // XXX Can we use LocalizedString here instead? #define LSTRING(b,x) CFBundleCopyLocalizedString( (b), CFSTR(x), NULL, CFSTR("Localizable") ) @@ -58,11 +49,11 @@ void CrashHandler::InformUserOfCrash( const RString& sPath ) switch( response ) { case kCFUserNotificationDefaultResponse: - OpenURL( REPORT_BUG_URL ); + HOOKS->GoToURL( REPORT_BUG_URL ); // Fall through. case kCFUserNotificationOtherResponse: // Open the file with the default application (probably TextEdit). - OpenURL( "file://" + sPath ); + HOOKS->GoToURL( "file://" + sPath ); break; } CFRelease( sBody );