commonuis/CommonDialogs/src/CAknCommonDialogsRadioButtonSettingPage.cpp
branchRCL_3
changeset 15 08e69e956a8c
parent 0 2f259fa3e83a
child 55 aecbbf00d063
equal deleted inserted replaced
10:9f56a4e1b8ab 15:08e69e956a8c
   128                 return response;
   128                 return response;
   129                 // No break needed after return
   129                 // No break needed after return
   130                 }
   130                 }
   131 
   131 
   132             case EKeyOK:
   132             case EKeyOK:
   133                 {
   133             case EKeyEnter:
       
   134                 {
       
   135                 if ( ListBoxControl()->ItemDrawer()->Flags() 
       
   136                          & CListItemDrawer::ESingleClickDisabledHighlight )
       
   137                     {
       
   138                     return CAknSettingPage::OfferKeyEventL( aKeyEvent, aType );
       
   139                     }
       
   140               
   134                 TInt focus( lb->CurrentItemIndex() );
   141                 TInt focus( lb->CurrentItemIndex() );
   135                 TInt topIndex( lb->TopItemIndex() );
   142                 TInt topIndex( lb->TopItemIndex() );
   136 
   143 
   137                 if( iObserver.HandleEventL(
   144                 if( iObserver.HandleEventL(
   138                     MAknCommonDialogsEventObserver::ESelectionKeyPress, focus, topIndex, Cba() )
   145                     MAknCommonDialogsEventObserver::ESelectionKeyPress, focus, topIndex, Cba() )
   192 //
   199 //
   193 //
   200 //
   194 // -----------------------------------------------------------------------------
   201 // -----------------------------------------------------------------------------
   195 //  
   202 //  
   196 void CAknCommonDialogsRadioButtonSettingPage::ProcessCommandL(TInt aCommandId)
   203 void CAknCommonDialogsRadioButtonSettingPage::ProcessCommandL(TInt aCommandId)
   197     {
   204     {  
   198     if(!IsEditable() && !(aCommandId == EAknSoftkeyBack || aCommandId == EAknSoftkeyCancel))
   205     CAknRadioButtonSettingPage::ProcessCommandL( aCommandId );
   199         {
       
   200         return;
       
   201         }
       
   202     
       
   203     HideMenu();
       
   204     
       
   205     // Respond to softkey events
       
   206     switch (aCommandId)
       
   207         {
       
   208         case EAknSoftkeyOk:
       
   209         case EAknSoftkeySelect:  
       
   210         case EAknSoftkeyDone:            
       
   211             {
       
   212             SelectCurrentItemL(); // has non-trivial implemenations in listbox type 
       
   213             // controls to put the selection on the current item
       
   214             AttemptExitL(ETrue);
       
   215             break;  
       
   216             }
       
   217         case EAknSoftkeyBack:
       
   218         case EAknSoftkeyCancel:
       
   219             AttemptExitL(EFalse);
       
   220             break;
       
   221         case EAknSoftkeyOptions:
       
   222             DisplayMenuL();
       
   223             break;
       
   224         default:
       
   225             break;
       
   226         }
       
   227     }
   206     }
   228 // -----------------------------------------------------------------------------
   207 // -----------------------------------------------------------------------------
   229 // CAknCommonDialogsRadioButtonSettingPage::NotifyDrivesChangedL
   208 // CAknCommonDialogsRadioButtonSettingPage::NotifyDrivesChangedL
   230 //
   209 //
   231 //
   210 //