Fix compile

This commit is contained in:
Steve Checkoway
2004-06-11 05:31:35 +00:00
parent e80b8885db
commit ae65e34dbd
3 changed files with 6 additions and 8 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ void Dialog::Init()
if( !DriversToTry[i].CompareNoCase("Win32") ) g_pImpl = new DialogDriver_Win32;
#endif
#if defined(HAVE_DIALOG_COCOA)
if( !DriversToTry[i].CompareNoCase("Cocoa") ) g_pImpl = new LoadingWindow_Cocoa;
if( !DriversToTry[i].CompareNoCase("Cocoa") ) g_pImpl = new DialogDriver_Cocoa;
#endif
if( !DriversToTry[i].CompareNoCase("Null") ) g_pImpl = new DialogDriverNull;
}
@@ -27,8 +27,6 @@ static SInt16 ShowAlert( int type, CFStringRef message, CFStringRef OK, CFString
void DialogDriver_Cocoa::OK( CString sMessage, CString ID )
{
bool allowHush = ID != "";
CFStringRef message = CFStringCreateWithCString(NULL, sMessage, kCFStringEncodingASCII);
SInt16 result = ShowAlert(kAlertNoteAlert, message, CFSTR("OK"), CFSTR("Don't show again"));
@@ -49,20 +47,20 @@ Dialog::Result DialogDriver_Cocoa::AbortRetryIgnore( CString sMessage, CString I
{
CFStringRef error = CFStringCreateWithCString( NULL, sMessage, kCFStringEncodingASCII );
SInt16 result = ShowAlert( kAlertNoteAlert, error, CFSTR("Retry"), CFSTR("Ignore") );
ArchHooks::MessageBoxResult ret;
Dialog::Result ret;
CFRelease(error);
switch (result)
{
case kAlertStdAlertOKButton:
ret = retry;
ret = Dialog::retry;
break;
case kAlertStdAlertCancelButton:
ret = ignore;
ret = Dialog::ignore;
break;
default:
ASSERT(0);
ret = ignore;
ret = Dialog::ignore;
}
return ret;
@@ -8,7 +8,7 @@ class DialogDriver_Cocoa: public DialogDriver
public:
void Error(CString sError, CString ID);
void OK(CString sMessage, CString ID);
MessageBoxResult AbortRetryIgnore(CString sMessage, CString ID);
Dialog::Result AbortRetryIgnore(CString sMessage, CString ID);
};
#define HAVE_DIALOG_COCOA