Move ErrorDialog to ArchHooks

This commit is contained in:
Steve Checkoway
2003-09-24 09:50:07 +00:00
parent e4b14cc302
commit b23fb8efff
2 changed files with 0 additions and 52 deletions
@@ -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, &params, &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 */