RetryCancel -> AbortRetry

remove Dialog::cancel
This commit is contained in:
Glenn Maynard
2005-01-20 19:40:24 +00:00
parent 38c6dcbb0b
commit 2b73f63ea8
7 changed files with 12 additions and 13 deletions
+1 -3
View File
@@ -541,7 +541,7 @@ try_element_again:
if( category != Other ) if( category != Other )
res = Dialog::AbortRetryIgnore(sMessage, "MissingThemeElement"); res = Dialog::AbortRetryIgnore(sMessage, "MissingThemeElement");
else else
res = Dialog::RetryCancel(sMessage, "MissingThemeElement"); res = Dialog::AbortRetry(sMessage, "MissingThemeElement");
switch( res ) switch( res )
{ {
case Dialog::retry: case Dialog::retry:
@@ -562,9 +562,7 @@ try_element_again:
Cache[sFileName] = GetPath( category, "", "_missing" ); Cache[sFileName] = GetPath( category, "", "_missing" );
return Cache[sFileName]; return Cache[sFileName];
/* XXX: "abort" and "cancel" are synonyms; merge */
case Dialog::abort: case Dialog::abort:
case Dialog::cancel:
RageException::Throw( "Theme element '%s/%s' could not be found in '%s' or '%s'.", RageException::Throw( "Theme element '%s/%s' could not be found in '%s' or '%s'.",
sCategory.c_str(), sCategory.c_str(),
sFileName.c_str(), sFileName.c_str(),
+4 -4
View File
@@ -169,23 +169,23 @@ Dialog::Result Dialog::AbortRetryIgnore( CString sMessage, CString ID )
return ret; return ret;
} }
Dialog::Result Dialog::RetryCancel( CString sMessage, CString ID ) Dialog::Result Dialog::AbortRetry( CString sMessage, CString ID )
{ {
Dialog::Init(); Dialog::Init();
LOG->Trace( "Dialog: \"%s\" [%s]", sMessage.c_str(), ID.c_str() ); LOG->Trace( "Dialog: \"%s\" [%s]", sMessage.c_str(), ID.c_str() );
if( ID != "" && MessageIsIgnored( ID ) ) if( ID != "" && MessageIsIgnored( ID ) )
return g_NullDriver.RetryCancel( sMessage, ID ); return g_NullDriver.AbortRetry( sMessage, ID );
g_bIsShowingDialog = true; g_bIsShowingDialog = true;
// only show Dialog if windowed // only show Dialog if windowed
Dialog::Result ret; Dialog::Result ret;
if( !g_bWindowed ) if( !g_bWindowed )
ret = g_NullDriver.RetryCancel( sMessage, ID ); ret = g_NullDriver.AbortRetry( sMessage, ID );
else else
ret = g_pImpl->RetryCancel( sMessage, ID ); // call derived version ret = g_pImpl->AbortRetry( sMessage, ID ); // call derived version
g_bIsShowingDialog = false; g_bIsShowingDialog = false;
+2 -2
View File
@@ -11,11 +11,11 @@ namespace Dialog
void SetWindowed( bool bWindowed ); void SetWindowed( bool bWindowed );
bool IsShowingDialog(); bool IsShowingDialog();
enum Result { abort, retry, ignore, cancel }; enum Result { abort, retry, ignore };
void Error( CString error, CString ID = "" ); void Error( CString error, CString ID = "" );
void OK( CString sMessage, CString ID = "" ); void OK( CString sMessage, CString ID = "" );
Result AbortRetryIgnore( CString sMessage, CString ID = "" ); Result AbortRetryIgnore( CString sMessage, CString ID = "" );
Result RetryCancel( CString sMessage, CString ID = "" ); Result AbortRetry( CString sMessage, CString ID = "" );
/* for DialogDrivers */ /* for DialogDrivers */
void IgnoreMessage( CString ID ); void IgnoreMessage( CString ID );
+1 -1
View File
@@ -9,7 +9,7 @@ public:
virtual void Error( CString sMessage, CString ID ) { printf("Error: %s\n", sMessage.c_str()); } virtual void Error( CString sMessage, CString ID ) { printf("Error: %s\n", sMessage.c_str()); }
virtual void OK( CString sMessage, CString ID ) {} virtual void OK( CString sMessage, CString ID ) {}
virtual Dialog::Result AbortRetryIgnore( CString sMessage, CString ID ) { return Dialog::ignore; } 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 CString Init() { return ""; }
virtual ~DialogDriver() { } virtual ~DialogDriver() { }
@@ -39,6 +39,7 @@ void DialogDriver_Cocoa::Error( CString sError, CString ID )
CFRelease(error); CFRelease(error);
} }
// XXX: should show three options, not two
Dialog::Result DialogDriver_Cocoa::AbortRetryIgnore( CString sMessage, CString ID ) Dialog::Result DialogDriver_Cocoa::AbortRetryIgnore( CString sMessage, CString ID )
{ {
CFStringRef error = CFStringCreateWithCString( NULL, sMessage, kCFStringEncodingASCII ); 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) #if defined(HAVE_SDL)
SDL_PumpEvents(); SDL_PumpEvents();
@@ -176,7 +176,7 @@ Dialog::Result DialogDriver_Win32::RetryCancel( CString sMessage, CString ID )
{ {
case IDRETRY: return Dialog::retry; case IDRETRY: return Dialog::retry;
default: ASSERT(0); 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 Error( CString sMessage, CString ID );
void OK( CString sMessage, CString ID ); void OK( CString sMessage, CString ID );
Dialog::Result AbortRetryIgnore( 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 #define HAVE_DIALOG_WIN32