mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-31 19:57:06 +01:00
comment stuff out to compile for series 60
This commit is contained in:
parent
e56982b1e8
commit
bd46dba736
3 changed files with 34 additions and 7 deletions
|
@ -17,8 +17,12 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <eikfsel.h>
|
#if defined SERIES_80
|
||||||
#include "xwords.rsg"
|
# include <eikfsel.h>
|
||||||
|
# include "xwords_80.rsg"
|
||||||
|
#elif defined SERIES_60
|
||||||
|
# include "xwords_60.rsg"
|
||||||
|
#endif
|
||||||
#include "xwords.hrh"
|
#include "xwords.hrh"
|
||||||
#include "symgamed.h"
|
#include "symgamed.h"
|
||||||
|
|
||||||
|
@ -31,6 +35,7 @@ CNameEditDlg::CNameEditDlg( TGameName* aGameName )
|
||||||
TBool
|
TBool
|
||||||
CNameEditDlg::OkToExitL( TInt aKeyCode )
|
CNameEditDlg::OkToExitL( TInt aKeyCode )
|
||||||
{
|
{
|
||||||
|
#ifdef SERIES_80
|
||||||
CEikFileNameEditor* ed;
|
CEikFileNameEditor* ed;
|
||||||
ed = static_cast<CEikFileNameEditor*>(Control(EEditNameEdwin));
|
ed = static_cast<CEikFileNameEditor*>(Control(EEditNameEdwin));
|
||||||
|
|
||||||
|
@ -41,17 +46,19 @@ CNameEditDlg::OkToExitL( TInt aKeyCode )
|
||||||
ed->GetText( tmp );
|
ed->GetText( tmp );
|
||||||
iGameName->Copy( tmp );
|
iGameName->Copy( tmp );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return ETrue;
|
return ETrue;
|
||||||
} // OkToExitL
|
} // OkToExitL
|
||||||
|
|
||||||
void
|
void
|
||||||
CNameEditDlg::PreLayoutDynInitL()
|
CNameEditDlg::PreLayoutDynInitL()
|
||||||
{
|
{
|
||||||
|
#ifdef SERIES_80
|
||||||
CEikFileNameEditor* ed;
|
CEikFileNameEditor* ed;
|
||||||
ed = static_cast<CEikFileNameEditor*>(Control(EEditNameEdwin));
|
ed = static_cast<CEikFileNameEditor*>(Control(EEditNameEdwin));
|
||||||
ed->SetTextL( iGameName );
|
ed->SetTextL( iGameName );
|
||||||
ed->SetTextLimit( iGameName->MaxLength() );
|
ed->SetTextLimit( iGameName->MaxLength() );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ TBool
|
/* static */ TBool
|
||||||
|
|
|
@ -19,14 +19,18 @@
|
||||||
|
|
||||||
#include <eikedwin.h>
|
#include <eikedwin.h>
|
||||||
#include <eikmfne.h>
|
#include <eikmfne.h>
|
||||||
#include <eikchlst.h>
|
#if defined SERIES_60
|
||||||
|
# include "xwords_60.rsg"
|
||||||
|
#elif defined SERIES_80
|
||||||
|
# include <eikchlst.h>
|
||||||
|
# include "xwords_80.rsg"
|
||||||
|
#endif
|
||||||
#include <eiktxlbm.h>
|
#include <eiktxlbm.h>
|
||||||
|
|
||||||
#include "symgmdlg.h"
|
#include "symgmdlg.h"
|
||||||
#include "symutil.h"
|
#include "symutil.h"
|
||||||
#include "symgamed.h"
|
#include "symgamed.h"
|
||||||
#include "xwords.hrh"
|
#include "xwords.hrh"
|
||||||
#include "xwords.rsg"
|
|
||||||
#include "xwappview.h"
|
#include "xwappview.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,6 +52,9 @@ CXSavedGamesDlg::PreLayoutDynInitL()
|
||||||
TBool
|
TBool
|
||||||
CXSavedGamesDlg::OkToExitL( TInt aKeyCode )
|
CXSavedGamesDlg::OkToExitL( TInt aKeyCode )
|
||||||
{
|
{
|
||||||
|
#if defined SERIES_60
|
||||||
|
return ETrue;
|
||||||
|
#elif defined SERIES_80
|
||||||
TBool canReturn = EFalse;
|
TBool canReturn = EFalse;
|
||||||
CEikTextListBox* box;
|
CEikTextListBox* box;
|
||||||
const CListBoxView::CSelectionIndexArray* indices;
|
const CListBoxView::CSelectionIndexArray* indices;
|
||||||
|
@ -102,12 +109,16 @@ CXSavedGamesDlg::OkToExitL( TInt aKeyCode )
|
||||||
}
|
}
|
||||||
|
|
||||||
return canReturn;
|
return canReturn;
|
||||||
|
#endif
|
||||||
} /* OkToExitL */
|
} /* OkToExitL */
|
||||||
|
|
||||||
void
|
void
|
||||||
CXSavedGamesDlg::ResetNames( TInt aPrefIndex,
|
CXSavedGamesDlg::ResetNames( TInt aPrefIndex,
|
||||||
const TGameName* aSelName )
|
const TGameName* aSelName )
|
||||||
{
|
{
|
||||||
|
/* PENDING aPrefIndex is a hint what to select next */
|
||||||
|
#if defined SERIES_60
|
||||||
|
#elif defined SERIES_80
|
||||||
CDesC16Array* names = iGameMgr->GetNames();
|
CDesC16Array* names = iGameMgr->GetNames();
|
||||||
TInt index = 0; /* make compiler happy */
|
TInt index = 0; /* make compiler happy */
|
||||||
const TGameName* seekName = NULL;
|
const TGameName* seekName = NULL;
|
||||||
|
@ -135,6 +146,7 @@ CXSavedGamesDlg::ResetNames( TInt aPrefIndex,
|
||||||
box->HandleItemAdditionL();
|
box->HandleItemAdditionL();
|
||||||
|
|
||||||
box->SetCurrentItemIndex( index );
|
box->SetCurrentItemIndex( index );
|
||||||
|
#endif
|
||||||
} /* ResetNames */
|
} /* ResetNames */
|
||||||
|
|
||||||
TBool
|
TBool
|
||||||
|
|
|
@ -24,6 +24,10 @@ extern "C" {
|
||||||
}
|
}
|
||||||
#include "symutil.h"
|
#include "symutil.h"
|
||||||
|
|
||||||
|
#if defined SERIES_60
|
||||||
|
# include <eikenv.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
_LIT( kGameTypeExt, ".xwg" );
|
_LIT( kGameTypeExt, ".xwg" );
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,7 +49,11 @@ CXWGamesMgr::NewL( MPFORMAL CCoeEnv* aCoeEnv, TFileName* aBasePath )
|
||||||
User::LeaveIfNull( self );
|
User::LeaveIfNull( self );
|
||||||
|
|
||||||
// Create the games directory if it doesn't already exist
|
// Create the games directory if it doesn't already exist
|
||||||
|
#if defined SERIES_80
|
||||||
RFs fs = aCoeEnv->FsSession();
|
RFs fs = aCoeEnv->FsSession();
|
||||||
|
#elif defined SERIES_60
|
||||||
|
RFs fs = CEikonEnv::Static()->FsSession();
|
||||||
|
#endif
|
||||||
TInt err = fs.MkDirAll( self->iDir );
|
TInt err = fs.MkDirAll( self->iDir );
|
||||||
|
|
||||||
if ( err != KErrNone && err != KErrAlreadyExists ) {
|
if ( err != KErrNone && err != KErrAlreadyExists ) {
|
||||||
|
@ -209,8 +217,8 @@ CXWGamesMgr::LoadGameL( const TGameName* aName, XWStreamCtxt* aStream )
|
||||||
TBool
|
TBool
|
||||||
CXWGamesMgr::DeleteSelected( TInt aIndex )
|
CXWGamesMgr::DeleteSelected( TInt aIndex )
|
||||||
{
|
{
|
||||||
TPtrC16 aName = (*iNamesList)[aIndex];
|
TPtrC16 name = (*iNamesList)[aIndex];
|
||||||
return DeleteFileFor( &aName );
|
return DeleteFileFor( &name );
|
||||||
} /* DeleteSelected */
|
} /* DeleteSelected */
|
||||||
|
|
||||||
TBool
|
TBool
|
||||||
|
|
Loading…
Add table
Reference in a new issue