Fix compile
This commit is contained in:
@@ -39,7 +39,7 @@ void Dialog::Init()
|
|||||||
if( !DriversToTry[i].CompareNoCase("Win32") ) g_pImpl = new DialogDriver_Win32;
|
if( !DriversToTry[i].CompareNoCase("Win32") ) g_pImpl = new DialogDriver_Win32;
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_DIALOG_COCOA)
|
#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
|
#endif
|
||||||
if( !DriversToTry[i].CompareNoCase("Null") ) g_pImpl = new DialogDriverNull;
|
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 )
|
void DialogDriver_Cocoa::OK( CString sMessage, CString ID )
|
||||||
{
|
{
|
||||||
bool allowHush = ID != "";
|
|
||||||
|
|
||||||
CFStringRef message = CFStringCreateWithCString(NULL, sMessage, kCFStringEncodingASCII);
|
CFStringRef message = CFStringCreateWithCString(NULL, sMessage, kCFStringEncodingASCII);
|
||||||
SInt16 result = ShowAlert(kAlertNoteAlert, message, CFSTR("OK"), CFSTR("Don't show again"));
|
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 );
|
CFStringRef error = CFStringCreateWithCString( NULL, sMessage, kCFStringEncodingASCII );
|
||||||
SInt16 result = ShowAlert( kAlertNoteAlert, error, CFSTR("Retry"), CFSTR("Ignore") );
|
SInt16 result = ShowAlert( kAlertNoteAlert, error, CFSTR("Retry"), CFSTR("Ignore") );
|
||||||
ArchHooks::MessageBoxResult ret;
|
Dialog::Result ret;
|
||||||
|
|
||||||
CFRelease(error);
|
CFRelease(error);
|
||||||
switch (result)
|
switch (result)
|
||||||
{
|
{
|
||||||
case kAlertStdAlertOKButton:
|
case kAlertStdAlertOKButton:
|
||||||
ret = retry;
|
ret = Dialog::retry;
|
||||||
break;
|
break;
|
||||||
case kAlertStdAlertCancelButton:
|
case kAlertStdAlertCancelButton:
|
||||||
ret = ignore;
|
ret = Dialog::ignore;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
ret = ignore;
|
ret = Dialog::ignore;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ class DialogDriver_Cocoa: public DialogDriver
|
|||||||
public:
|
public:
|
||||||
void Error(CString sError, CString ID);
|
void Error(CString sError, CString ID);
|
||||||
void OK(CString sMessage, 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
|
#define HAVE_DIALOG_COCOA
|
||||||
|
|||||||
Reference in New Issue
Block a user