stif/ConsoleUI/src/Consolemenus.cpp
changeset 34 7259cf1302ad
parent 28 1c75ea0eb44d
equal deleted inserted replaced
33:0d72cc2a29a3 34:7259cf1302ad
  3873             }                
  3873             }                
  3874         if( aArray.Append( KSetStartPar ) != KErrNone )
  3874         if( aArray.Append( KSetStartPar ) != KErrNone )
  3875             {
  3875             {
  3876             return KErrNoMemory;
  3876             return KErrNoMemory;
  3877             }
  3877             }
       
  3878         if( aArray.Append( KSetUnload ) != KErrNone )
       
  3879             {
       
  3880             return KErrNoMemory;
       
  3881             }                        
  3878         if( aArray.Append( KSetRemove ) != KErrNone )
  3882         if( aArray.Append( KSetRemove ) != KErrNone )
  3879             {
  3883             {
  3880             return KErrNoMemory;
  3884             return KErrNoMemory;
  3881             }                
  3885             }                
  3882         if( aArray.Append( KSetSave ) != KErrNone )
  3886         if( aArray.Append( KSetSave ) != KErrNone )
  4024                 iSubMenu = 0;
  4028                 iSubMenu = 0;
  4025                 iSubMenu = CStartedTestSetMenu::NewL( iMain, 
  4029                 iSubMenu = CStartedTestSetMenu::NewL( iMain, 
  4026                                         this, 
  4030                                         this, 
  4027                                         _L("Started test sets menu"));
  4031                                         _L("Started test sets menu"));
  4028                 return iSubMenu;
  4032                 return iSubMenu;
       
  4033             case ESetUnload:
       
  4034                 ret = iMain->UIStore().UnloadTestSet( iTestSetName );
       
  4035                 if( ret != KErrNone )
       
  4036                     {
       
  4037                     User::InfoPrint( _L("Test set unload failed") );
       
  4038                     }
       
  4039                 iTestSetCreated = EFalse;                  
       
  4040                 break;
  4029             case ESetRemove: 
  4041             case ESetRemove: 
  4030                 ret = iMain->UIStore().RemoveTestSet( iTestSetName );
  4042                 ret = iMain->UIStore().RemoveTestSet( iTestSetName );
  4031                 if( ret != KErrNone )
  4043                 if( ret != KErrNone )
  4032                     {
  4044                     {
  4033                     User::InfoPrint( _L("Test set creation failed") );
  4045                     User::InfoPrint( _L("Test set remove failed") );
  4034                     }
  4046                     }
  4035                 iTestSetCreated = EFalse;  
  4047                 iTestSetCreated = EFalse;  
  4036                 break;
  4048                 break;
  4037             case ESetCaseAdd:   
  4049             case ESetCaseAdd:   
  4038                 delete iSubMenu;
  4050                 delete iSubMenu;
  4255 */
  4267 */
  4256 TInt CTestSetChoiceMenu::ItemTexts( RRefArray<TDesC>& aArray )
  4268 TInt CTestSetChoiceMenu::ItemTexts( RRefArray<TDesC>& aArray )
  4257     {
  4269     {
  4258 
  4270 
  4259    TInt ret = iMain->UIStore().GetTestSetsList( aArray );
  4271    TInt ret = iMain->UIStore().GetTestSetsList( aArray );
  4260   
  4272 
       
  4273 	if ( ret != KErrNone )
       
  4274 		{
       
  4275 		return ret;
       
  4276 		}
       
  4277 
  4261    iFileList.ResetAndDestroy();
  4278    iFileList.ResetAndDestroy();
  4262    TRAPD( err,
  4279    TRAPD( err,
  4263 	//Assign aArray to iFileList, it is used in LoadTestSet
  4280 	//Assign aArray to iFileList, it is used in LoadTestSet
  4264    for( TInt i=0 ; i < aArray.Count(); i++)
  4281    for( TInt i=0 ; i < aArray.Count(); i++)
  4265 	  {
  4282 	  {
  4378             case EKeyEnter:
  4395             case EKeyEnter:
  4379             case EKeyRightArrow:
  4396             case EKeyRightArrow:
  4380                 {           
  4397                 {           
  4381                 if(iPosOnScreen < iFileList.Count())
  4398                 if(iPosOnScreen < iFileList.Count())
  4382                     {
  4399                     {
  4383                     const TDesC& aSetName = iFileList.operator [](iPosOnScreen)->Des();
       
  4384                 
       
  4385                     ret = iMain->UIStore().LoadTestSet( iFileList.operator [](iPosOnScreen)->Des() );
  4400                     ret = iMain->UIStore().LoadTestSet( iFileList.operator [](iPosOnScreen)->Des() );
  4386                     if (ret == KErrNone)
  4401                     if (ret == KErrNone)
  4387                         {
  4402                         {
  4388                         ((CTestSetMenu*)iParent)->SetCreated();
  4403                         ((CTestSetMenu*)iParent)->SetCreated();
  4389                         ((CTestSetMenu*)iParent)->SetTestSetFileName(iFileList.operator [](iPosOnScreen)->Des());
  4404                         ((CTestSetMenu*)iParent)->SetTestSetFileName(iFileList.operator [](iPosOnScreen)->Des());
  5679         delete iTestCaseMenu;
  5694         delete iTestCaseMenu;
  5680         iTestCaseMenu = NULL;
  5695         iTestCaseMenu = NULL;
  5681         }
  5696         }
  5682     iTestCaseMenu = aTestCaseMenu;
  5697     iTestCaseMenu = aTestCaseMenu;
  5683     }
  5698     }
  5684 // End of file
  5699 
       
  5700 // End of File