RetryCancel -> AbortRetry
remove Dialog::cancel
This commit is contained in:
@@ -541,7 +541,7 @@ try_element_again:
|
||||
if( category != Other )
|
||||
res = Dialog::AbortRetryIgnore(sMessage, "MissingThemeElement");
|
||||
else
|
||||
res = Dialog::RetryCancel(sMessage, "MissingThemeElement");
|
||||
res = Dialog::AbortRetry(sMessage, "MissingThemeElement");
|
||||
switch( res )
|
||||
{
|
||||
case Dialog::retry:
|
||||
@@ -562,9 +562,7 @@ try_element_again:
|
||||
|
||||
Cache[sFileName] = GetPath( category, "", "_missing" );
|
||||
return Cache[sFileName];
|
||||
/* XXX: "abort" and "cancel" are synonyms; merge */
|
||||
case Dialog::abort:
|
||||
case Dialog::cancel:
|
||||
RageException::Throw( "Theme element '%s/%s' could not be found in '%s' or '%s'.",
|
||||
sCategory.c_str(),
|
||||
sFileName.c_str(),
|
||||
|
||||
@@ -169,23 +169,23 @@ Dialog::Result Dialog::AbortRetryIgnore( CString sMessage, CString ID )
|
||||
return ret;
|
||||
}
|
||||
|
||||
Dialog::Result Dialog::RetryCancel( CString sMessage, CString ID )
|
||||
Dialog::Result Dialog::AbortRetry( CString sMessage, CString ID )
|
||||
{
|
||||
Dialog::Init();
|
||||
|
||||
LOG->Trace( "Dialog: \"%s\" [%s]", sMessage.c_str(), ID.c_str() );
|
||||
|
||||
if( ID != "" && MessageIsIgnored( ID ) )
|
||||
return g_NullDriver.RetryCancel( sMessage, ID );
|
||||
return g_NullDriver.AbortRetry( sMessage, ID );
|
||||
|
||||
g_bIsShowingDialog = true;
|
||||
|
||||
// only show Dialog if windowed
|
||||
Dialog::Result ret;
|
||||
if( !g_bWindowed )
|
||||
ret = g_NullDriver.RetryCancel( sMessage, ID );
|
||||
ret = g_NullDriver.AbortRetry( sMessage, ID );
|
||||
else
|
||||
ret = g_pImpl->RetryCancel( sMessage, ID ); // call derived version
|
||||
ret = g_pImpl->AbortRetry( sMessage, ID ); // call derived version
|
||||
|
||||
g_bIsShowingDialog = false;
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@ namespace Dialog
|
||||
void SetWindowed( bool bWindowed );
|
||||
bool IsShowingDialog();
|
||||
|
||||
enum Result { abort, retry, ignore, cancel };
|
||||
enum Result { abort, retry, ignore };
|
||||
void Error( CString error, CString ID = "" );
|
||||
void OK( CString sMessage, CString ID = "" );
|
||||
Result AbortRetryIgnore( CString sMessage, CString ID = "" );
|
||||
Result RetryCancel( CString sMessage, CString ID = "" );
|
||||
Result AbortRetry( CString sMessage, CString ID = "" );
|
||||
|
||||
/* for DialogDrivers */
|
||||
void IgnoreMessage( CString ID );
|
||||
|
||||
@@ -9,7 +9,7 @@ public:
|
||||
virtual void Error( CString sMessage, CString ID ) { printf("Error: %s\n", sMessage.c_str()); }
|
||||
virtual void OK( CString sMessage, CString ID ) {}
|
||||
virtual Dialog::Result AbortRetryIgnore( CString sMessage, CString ID ) { return Dialog::ignore; }
|
||||
virtual Dialog::Result RetryCancel( CString sMessage, CString ID ) { return Dialog::cancel; }
|
||||
virtual Dialog::Result AbortRetry( CString sMessage, CString ID ) { return Dialog::abort; }
|
||||
|
||||
virtual CString Init() { return ""; }
|
||||
virtual ~DialogDriver() { }
|
||||
|
||||
@@ -39,6 +39,7 @@ void DialogDriver_Cocoa::Error( CString sError, CString ID )
|
||||
CFRelease(error);
|
||||
}
|
||||
|
||||
// XXX: should show three options, not two
|
||||
Dialog::Result DialogDriver_Cocoa::AbortRetryIgnore( CString sMessage, CString ID )
|
||||
{
|
||||
CFStringRef error = CFStringCreateWithCString( NULL, sMessage, kCFStringEncodingASCII );
|
||||
|
||||
@@ -166,7 +166,7 @@ Dialog::Result DialogDriver_Win32::AbortRetryIgnore( CString sMessage, CString I
|
||||
}
|
||||
}
|
||||
|
||||
Dialog::Result DialogDriver_Win32::RetryCancel( CString sMessage, CString ID )
|
||||
Dialog::Result DialogDriver_Win32::AbortRetry( CString sMessage, CString ID )
|
||||
{
|
||||
#if defined(HAVE_SDL)
|
||||
SDL_PumpEvents();
|
||||
@@ -176,7 +176,7 @@ Dialog::Result DialogDriver_Win32::RetryCancel( CString sMessage, CString ID )
|
||||
{
|
||||
case IDRETRY: return Dialog::retry;
|
||||
default: ASSERT(0);
|
||||
case IDCANCEL: return Dialog::cancel;
|
||||
case IDCANCEL: return Dialog::abort;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ public:
|
||||
void Error( CString sMessage, CString ID );
|
||||
void OK( CString sMessage, CString ID );
|
||||
Dialog::Result AbortRetryIgnore( CString sMessage, CString ID );
|
||||
Dialog::Result RetryCancel( CString sMessage, CString ID );
|
||||
Dialog::Result AbortRetry( CString sMessage, CString ID );
|
||||
};
|
||||
|
||||
#define HAVE_DIALOG_WIN32
|
||||
|
||||
Reference in New Issue
Block a user