separate info and query, and use the right one

This commit is contained in:
ehouse 2005-01-13 14:39:12 +00:00
parent d563b84821
commit dbfd94b166
3 changed files with 19 additions and 8 deletions

View file

@ -35,6 +35,8 @@ class CXWAskDlg : public CEikDialog
static TBool DoAskDlg( MPFORMAL XWStreamCtxt* aStream, TBool aKillStream );
static TBool DoAskDlg( MPFORMAL TBuf16<128>* aMessage );
static void DoInfoDlg( MPFORMAL XWStreamCtxt* aStream, TBool aKillStream );
~CXWAskDlg();
private:

View file

@ -159,12 +159,20 @@ TBool CXWAskDlg::OkToExitL( TInt aButtonID /* pressed button */ )
CXWAskDlg::DoAskDlg( MPFORMAL XWStreamCtxt* aStream, TBool aKillStream )
{
CXWAskDlg* me = new(ELeave)CXWAskDlg( MPPARM(mpool) aStream, aKillStream );
return me->ExecuteLD( R_XWORDS_INFO_ONLY );
return me->ExecuteLD( R_XWORDS_CONFIRMATION_QUERY );
}
/* static */ TBool
CXWAskDlg::DoAskDlg( MPFORMAL TBuf16<128>* aMessage )
{
CXWAskDlg* me = new(ELeave)CXWAskDlg( MPPARM(mpool) aMessage );
return me->ExecuteLD( R_XWORDS_INFO_ONLY );
return me->ExecuteLD( R_XWORDS_CONFIRMATION_QUERY );
}
/* static */ void
CXWAskDlg::DoInfoDlg( MPFORMAL XWStreamCtxt* aStream, TBool aKillStream )
{
CXWAskDlg* me = new(ELeave)CXWAskDlg( MPPARM(mpool) aStream, aKillStream );
(void)me->ExecuteLD( R_XWORDS_INFO_ONLY );
}

View file

@ -616,9 +616,10 @@ CXWordsAppView::HandleCommand( TInt aCommand )
case XW_VALUES_COMMAND:
if ( iGame.server != NULL ) {
XWStreamCtxt* stream = MakeSimpleStream( NULL );
server_formatDictCounts( iGame.server, stream, 4 ); /* 4: ncols */
(void)CXWAskDlg::DoAskDlg(MPPARM(mpool) stream, ETrue);
if ( stream != NULL ) {
server_formatDictCounts( iGame.server, stream, 4 ); /* 4: ncols */
CXWAskDlg::DoInfoDlg(MPPARM(mpool) stream, ETrue);
}
}
break;
@ -627,7 +628,7 @@ CXWordsAppView::HandleCommand( TInt aCommand )
XWStreamCtxt* stream = MakeSimpleStream( NULL );
if ( stream ) {
board_formatRemainingTiles( iGame.board, stream );
(void)CXWAskDlg::DoAskDlg(MPPARM(mpool) stream, ETrue);
CXWAskDlg::DoInfoDlg(MPPARM(mpool) stream, ETrue);
}
}
break;
@ -647,7 +648,7 @@ CXWordsAppView::HandleCommand( TInt aCommand )
model_writeGameHistory( iGame.model, stream,
iGame.server, gameOver );
if ( stream_getSize( stream ) > 0 ) {
(void)CXWAskDlg::DoAskDlg( MPPARM(mpool) stream, ETrue );
CXWAskDlg::DoInfoDlg( MPPARM(mpool) stream, ETrue );
}
}
@ -800,7 +801,7 @@ CXWordsAppView::DisplayFinalScoresL()
server_writeFinalScores( iGame.server, stream );
(void)CXWAskDlg::DoAskDlg( MPPARM(mpool) stream, ETrue );
CXWAskDlg::DoInfoDlg( MPPARM(mpool) stream, ETrue );
} /* displayFinalScores */
TBool