style (spacing)
This commit is contained in:
@@ -7,26 +7,29 @@
|
|||||||
|
|
||||||
static SInt16 ShowAlert( int type, CFStringRef message, CFStringRef OK, CFStringRef cancel = NULL )
|
static SInt16 ShowAlert( int type, CFStringRef message, CFStringRef OK, CFStringRef cancel = NULL )
|
||||||
{
|
{
|
||||||
struct AlertStdCFStringAlertParamRec params = {kStdCFStringAlertVersionOne, true, false, OK, cancel, NULL,
|
struct AlertStdCFStringAlertParamRec params =
|
||||||
kAlertStdAlertOKButton, kAlertStdAlertCancelButton, kWindowAlertPositionParentWindowScreen, 0};
|
{
|
||||||
|
kStdCFStringAlertVersionOne, true, false, OK, cancel, NULL,
|
||||||
|
kAlertStdAlertOKButton, kAlertStdAlertCancelButton, kWindowAlertPositionParentWindowScreen, 0
|
||||||
|
};
|
||||||
DialogRef dialog;
|
DialogRef dialog;
|
||||||
SInt16 result;
|
SInt16 result;
|
||||||
OSErr err;
|
OSErr err;
|
||||||
|
|
||||||
CreateStandardAlert(type, message, NULL, ¶ms, &dialog);
|
CreateStandardAlert( type, message, NULL, ¶ms, &dialog );
|
||||||
err = AutoSizeDialog(dialog);
|
err = AutoSizeDialog( dialog );
|
||||||
ASSERT(err == noErr);
|
ASSERT( err == noErr );
|
||||||
RunStandardAlert(dialog, NULL, &result);
|
RunStandardAlert( dialog, NULL, &result );
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogDriver_Cocoa::OK( CString sMessage, CString sID )
|
void DialogDriver_Cocoa::OK( CString sMessage, CString sID )
|
||||||
{
|
{
|
||||||
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") );
|
||||||
|
|
||||||
CFRelease(message);
|
CFRelease( message );
|
||||||
if( result == kAlertStdAlertCancelButton )
|
if( result == kAlertStdAlertCancelButton )
|
||||||
Dialog::IgnoreMessage( sID );
|
Dialog::IgnoreMessage( sID );
|
||||||
}
|
}
|
||||||
@@ -34,9 +37,9 @@ void DialogDriver_Cocoa::OK( CString sMessage, CString sID )
|
|||||||
void DialogDriver_Cocoa::Error( CString sError, CString sID )
|
void DialogDriver_Cocoa::Error( CString sError, CString sID )
|
||||||
{
|
{
|
||||||
CFStringRef error = CFStringCreateWithCString( NULL, sError, kCFStringEncodingASCII );
|
CFStringRef error = CFStringCreateWithCString( NULL, sError, kCFStringEncodingASCII );
|
||||||
ShowAlert(kAlertStopAlert, error, CFSTR("OK"));
|
ShowAlert( kAlertStopAlert, error, CFSTR("OK") );
|
||||||
|
|
||||||
CFRelease(error);
|
CFRelease( error );
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXX: should show three options, not two
|
// XXX: should show three options, not two
|
||||||
|
|||||||
Reference in New Issue
Block a user