From e46ea4300b183c0e0e2b97131bb004292c16468f Mon Sep 17 00:00:00 2001 From: ehouse Date: Wed, 19 Jan 2005 15:11:07 +0000 Subject: [PATCH] confirm deletions --- symbian/src/symgmdlg.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/symbian/src/symgmdlg.cpp b/symbian/src/symgmdlg.cpp index c7f4a4baf..e569f18ef 100755 --- a/symbian/src/symgmdlg.cpp +++ b/symbian/src/symgmdlg.cpp @@ -26,11 +26,14 @@ #include "symutil.h" #include "xwords.hrh" #include "xwords.rsg" +#include "xwappview.h" -CXSavedGamesDlg::CXSavedGamesDlg( MPFORMAL CXWGamesMgr* aGameMgr, - const TGameName* aCurName, TGameName* result ) - : iGameMgr(aGameMgr), iCurName(aCurName), iResultP(result) +CXSavedGamesDlg::CXSavedGamesDlg( MPFORMAL CXWordsAppView* aOwner, + CXWGamesMgr* aGameMgr, + const TGameName* aCurName, + TGameName* result ) + : iOwner(aOwner), iGameMgr(aGameMgr), iCurName(aCurName), iResultP(result) { MPASSIGN( this->mpool, mpool ); } @@ -78,7 +81,9 @@ CXSavedGamesDlg::OkToExitL( TInt aKeyCode ) TDesC16* selName = &(*iGameMgr->GetNames())[index]; if ( 0 == selName->Compare(*iCurName) ) { /* Warn user why can't delete */ - } else if ( ConfirmDelete() ) { + iOwner->UserErrorFromID( R_ALERT_NO_DELETE_OPEN_GAME ); + } else if ( iOwner->UserQuery( (UtilQueryID)SYM_QUERY_CONFIRM_DELGAME, + NULL ) ) { if ( iGameMgr->DeleteSelected( index ) ) { ResetNames( index ); box->DrawDeferred(); @@ -117,22 +122,17 @@ CXSavedGamesDlg::ResetNames( TInt aPrefIndex ) box->SetCurrentItemIndex( index ); } /* ResetNames */ -TBool -CXSavedGamesDlg::ConfirmDelete() -{ - return ETrue; -} /* ConfirmDelete */ - void CXSavedGamesDlg::EditSelName() { } /* static */ TBool -CXSavedGamesDlg::DoGamesPicker( MPFORMAL CXWGamesMgr* aGameMgr, +CXSavedGamesDlg::DoGamesPicker( MPFORMAL CXWordsAppView* aOwner, + CXWGamesMgr* aGameMgr, const TGameName* aCurName, TGameName* result ) { - CXSavedGamesDlg* me = new CXSavedGamesDlg( MPPARM(mpool) + CXSavedGamesDlg* me = new CXSavedGamesDlg( MPPARM(mpool) aOwner, aGameMgr, aCurName, result ); User::LeaveIfNull( me );