Move ErrorDialog to ArchHooks
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* ErrorDialog_darwin.cpp
|
||||
* stepmania
|
||||
*
|
||||
* Created by Steve Checkoway on Wed Jul 23 2003.
|
||||
* Copyright (c) 2003 Steve Checkoway. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "global.h"
|
||||
#include "ErrorDialog_darwin.h"
|
||||
#include <Carbon/Carbon.h>
|
||||
|
||||
void ErrorDialog_darwin::ShowError() {
|
||||
CFStringRef error = CFStringCreateWithCString(NULL, GetErrorText().c_str(), kCFStringEncodingASCII);
|
||||
CFStringRef OK = CFStringCreateWithCString(NULL, "OK", kCFStringEncodingASCII);
|
||||
struct AlertStdCFStringAlertParamRec params = {kStdCFStringAlertVersionOne, true, false, OK, NULL, NULL,
|
||||
kAlertStdAlertOKButton, NULL, kWindowAlertPositionParentWindowScreen, NULL};
|
||||
DialogRef dialog;
|
||||
SInt16 unused;
|
||||
OSErr err;
|
||||
|
||||
CreateStandardAlert(kAlertStopAlert, error, NULL, ¶ms, &dialog);
|
||||
err = AutoSizeDialog(dialog);
|
||||
ASSERT(err == noErr);
|
||||
RunStandardAlert(dialog, NULL, &unused);
|
||||
CFRelease(error);
|
||||
CFRelease(OK);
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
#ifndef ERROR_DIALOG_DARWIN_H
|
||||
#define ERROR_DIALOG_DARWIN_H
|
||||
/*
|
||||
* ErrorDialog_darwin.h
|
||||
* stepmania
|
||||
*
|
||||
* Created by Steve Checkoway on Wed Jul 23 2003.
|
||||
* Copyright (c) 2003 Steve Checkoway. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ErrorDialog.h"
|
||||
|
||||
class ErrorDialog_darwin : public ErrorDialog
|
||||
{
|
||||
public:
|
||||
void ShowError();
|
||||
};
|
||||
|
||||
#undef ARCH_ERROR_DIALOG
|
||||
#define ARCH_ERROR_DIALOG ErrorDialog_darwin
|
||||
|
||||
#endif /* ERROR_DIALOG_DARWIN_H */
|
||||
Reference in New Issue
Block a user