ID for MessageBoxError

This commit is contained in:
Glenn Maynard
2004-01-16 22:43:59 +00:00
parent 4f901a9f00
commit 454cbe482e
6 changed files with 14 additions and 12 deletions
+6 -4
View File
@@ -26,10 +26,13 @@ void ArchHooks::IgnoreMessage( CString ID )
PREFSMAN->m_sIgnoredMessageWindows = join( ",", list );
PREFSMAN->SaveGlobalPrefsToDisk();
}
#include "RageLog.h"
void ArchHooks::MessageBoxError( CString sMessage )
void ArchHooks::MessageBoxError( CString sMessage, CString ID )
{
MessageBoxErrorPrivate( sMessage );
if( ID != "" && MessageIsIgnored( ID ) )
return;
MessageBoxErrorPrivate( sMessage, ID );
}
void ArchHooks::MessageBoxOK( CString sMessage, CString ID )
@@ -38,7 +41,6 @@ void ArchHooks::MessageBoxOK( CString sMessage, CString ID )
return;
// don't show MessageBox if windowed
if(LOG)LOG->Trace("wind %i", DISPLAY->IsWindowed());
if( !DISPLAY->IsWindowed() )
ArchHooks::MessageBoxOKPrivate( sMessage, ID );
else
+2 -2
View File
@@ -30,7 +30,7 @@ public:
* to identify a class of messages, for "don't display this dialog"-type
* prompts. (Don't overload these, overload *Private below.) */
enum MessageBoxResult { abort, retry, ignore, cancel };
void MessageBoxError( CString error );
void MessageBoxError( CString error, CString ID = "" );
void MessageBoxOK( CString sMessage, CString ID = "" );
MessageBoxResult MessageBoxAbortRetryIgnore( CString sMessage, CString ID = "" );
MessageBoxResult MessageBoxRetryCancel( CString sMessage, CString ID = "" );
@@ -43,7 +43,7 @@ public:
virtual void RestartProgram() { }
protected:
virtual void MessageBoxErrorPrivate( CString sMessage ) { printf("Error: %s\n", sMessage.c_str()); }
virtual void MessageBoxErrorPrivate( CString sMessage, CString ID ) { printf("Error: %s\n", sMessage.c_str()); }
virtual void MessageBoxOKPrivate( CString sMessage, CString ID ) {}
virtual MessageBoxResult MessageBoxAbortRetryIgnorePrivate( CString sMessage, CString ID ) { return ignore; }
virtual MessageBoxResult MessageBoxRetryCancelPrivate( CString sMessage, CString ID ) { return cancel; }
@@ -145,7 +145,7 @@ static BOOL CALLBACK ErrorWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
return FALSE;
}
void ArchHooks_Win32::MessageBoxErrorPrivate( CString error )
void ArchHooks_Win32::MessageBoxErrorPrivate( CString error, CString ID )
{
g_sErrorString = error;
// throw up a pretty error dialog
@@ -8,7 +8,7 @@ public:
ArchHooks_Win32();
void DumpDebugInfo();
void MessageBoxOKPrivate( CString sMessage, CString ID );
void MessageBoxErrorPrivate( CString error );
void MessageBoxErrorPrivate( CString error, CString ID );
MessageBoxResult MessageBoxAbortRetryIgnorePrivate( CString sMessage, CString ID );
MessageBoxResult MessageBoxRetryCancelPrivate( CString sMessage, CString ID );
void RestartProgram();
@@ -255,7 +255,7 @@ void ArchHooks_darwin::MessageBoxOKPrivate(CString sMessage, CString ID)
IgnoreMessage(ID);
}
void ArchHooks_darwin::MessageBoxErrorPrivate(CString sError)
void ArchHooks_darwin::MessageBoxErrorPrivate(CString sError, CString ID)
{
CFStringRef error = CFStringCreateWithCString(NULL, sError, kCFStringEncodingASCII);
ShowAlert(kAlertStopAlert, error, CFSTR("OK"));
@@ -21,9 +21,9 @@ public:
~ArchHooks_darwin() { }
void DumpDebugInfo();
protected:
void MessageBoxErrorPrivate(CString sError);
void MessageBoxOKPrivate(CString sMessage, CString ID = "");
MessageBoxResult MessageBoxAbortRetryIgnorePrivate(CString sMessage, CString ID = "");
void MessageBoxErrorPrivate(CString sError, CString ID);
void MessageBoxOKPrivate(CString sMessage, CString ID);
MessageBoxResult MessageBoxAbortRetryIgnorePrivate(CString sMessage, CString ID);
};
#undef ARCH_HOOKS