mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
confirm deletions
This commit is contained in:
parent
7ed756810f
commit
e46ea4300b
1 changed files with 12 additions and 12 deletions
|
@ -26,11 +26,14 @@
|
||||||
#include "symutil.h"
|
#include "symutil.h"
|
||||||
#include "xwords.hrh"
|
#include "xwords.hrh"
|
||||||
#include "xwords.rsg"
|
#include "xwords.rsg"
|
||||||
|
#include "xwappview.h"
|
||||||
|
|
||||||
|
|
||||||
CXSavedGamesDlg::CXSavedGamesDlg( MPFORMAL CXWGamesMgr* aGameMgr,
|
CXSavedGamesDlg::CXSavedGamesDlg( MPFORMAL CXWordsAppView* aOwner,
|
||||||
const TGameName* aCurName, TGameName* result )
|
CXWGamesMgr* aGameMgr,
|
||||||
: iGameMgr(aGameMgr), iCurName(aCurName), iResultP(result)
|
const TGameName* aCurName,
|
||||||
|
TGameName* result )
|
||||||
|
: iOwner(aOwner), iGameMgr(aGameMgr), iCurName(aCurName), iResultP(result)
|
||||||
{
|
{
|
||||||
MPASSIGN( this->mpool, mpool );
|
MPASSIGN( this->mpool, mpool );
|
||||||
}
|
}
|
||||||
|
@ -78,7 +81,9 @@ CXSavedGamesDlg::OkToExitL( TInt aKeyCode )
|
||||||
TDesC16* selName = &(*iGameMgr->GetNames())[index];
|
TDesC16* selName = &(*iGameMgr->GetNames())[index];
|
||||||
if ( 0 == selName->Compare(*iCurName) ) {
|
if ( 0 == selName->Compare(*iCurName) ) {
|
||||||
/* Warn user why can't delete */
|
/* 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 ) ) {
|
if ( iGameMgr->DeleteSelected( index ) ) {
|
||||||
ResetNames( index );
|
ResetNames( index );
|
||||||
box->DrawDeferred();
|
box->DrawDeferred();
|
||||||
|
@ -117,22 +122,17 @@ CXSavedGamesDlg::ResetNames( TInt aPrefIndex )
|
||||||
box->SetCurrentItemIndex( index );
|
box->SetCurrentItemIndex( index );
|
||||||
} /* ResetNames */
|
} /* ResetNames */
|
||||||
|
|
||||||
TBool
|
|
||||||
CXSavedGamesDlg::ConfirmDelete()
|
|
||||||
{
|
|
||||||
return ETrue;
|
|
||||||
} /* ConfirmDelete */
|
|
||||||
|
|
||||||
void
|
void
|
||||||
CXSavedGamesDlg::EditSelName()
|
CXSavedGamesDlg::EditSelName()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ TBool
|
/* static */ TBool
|
||||||
CXSavedGamesDlg::DoGamesPicker( MPFORMAL CXWGamesMgr* aGameMgr,
|
CXSavedGamesDlg::DoGamesPicker( MPFORMAL CXWordsAppView* aOwner,
|
||||||
|
CXWGamesMgr* aGameMgr,
|
||||||
const TGameName* aCurName, TGameName* result )
|
const TGameName* aCurName, TGameName* result )
|
||||||
{
|
{
|
||||||
CXSavedGamesDlg* me = new CXSavedGamesDlg( MPPARM(mpool)
|
CXSavedGamesDlg* me = new CXSavedGamesDlg( MPPARM(mpool) aOwner,
|
||||||
aGameMgr, aCurName, result );
|
aGameMgr, aCurName, result );
|
||||||
User::LeaveIfNull( me );
|
User::LeaveIfNull( me );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue