commonuis/CommonDialogs/src/CAknFileSelectionEventHandler.cpp
branchRCL_3
changeset 18 0aa5fbdfbc30
parent 16 71dd06cfe933
child 55 aecbbf00d063
equal deleted inserted replaced
16:71dd06cfe933 18:0aa5fbdfbc30
   294 
   294 
   295     switch( aEvent )
   295     switch( aEvent )
   296         {
   296         {
   297         case ERightSoftkeyPress: // USER HAS HIT RIGHT SOFTKEY
   297         case ERightSoftkeyPress: // USER HAS HIT RIGHT SOFTKEY
   298             {
   298             {
   299             while( iModel->DirectoryLevel() > 0 ) // Find until existing contents
       
   300                 {
       
   301                 entries = iModel->GotoParentFolderL();
       
   302                 PopIndices( aTopItemIndex, aFocusedItemIndex );
       
   303                 if( entries > 0 || entries < KErrNotFound )
       
   304                     {
       
   305                     break;
       
   306                     }
       
   307                 }
       
   308             if( iModel->DirectoryLevel() > 0 ) // We are not in the root folder
   299             if( iModel->DirectoryLevel() > 0 ) // We are not in the root folder
   309                 {
   300                 {
       
   301                 while( iModel->DirectoryLevel() > 0 ) // Find until existing contents
       
   302                     {
       
   303                     entries = iModel->GotoParentFolderL();
       
   304                     PopIndices( aTopItemIndex, aFocusedItemIndex );
       
   305                     if( entries > 0 || entries < KErrNotFound )
       
   306                         {
       
   307                         break;
       
   308                         }
       
   309                     }
   310                 if( entries > 0 )
   310                 if( entries > 0 )
   311                     {
   311                     {
   312                     if (aFocusedItemIndex >= entries)
   312                     if (aFocusedItemIndex >= entries)
   313                         {
   313                         {
   314                         aFocusedItemIndex = entries - 1;
   314                         aFocusedItemIndex = entries - 1;
   315                         }
   315                         }
   316                     UpdateSoftkeysL( aFocusedItemIndex, aContainer );
   316                     UpdateSoftkeysL( aFocusedItemIndex, aContainer );
   317                     returnType = EItemsUpdated;
   317                     returnType = EItemsUpdated;
       
   318                     }
       
   319                 else
       
   320                     {
       
   321                     returnType = ETryingToExit;
   318                     }
   322                     }
   319                 }
   323                 }
   320             else // We are in the root folder
   324             else // We are in the root folder
   321                 {
   325                 {
   322                 returnType = ETryingToExit;
   326                 returnType = ETryingToExit;