emailuis/uicomponents/src/fscontrolbutton.cpp
branchRCL_3
changeset 73 c8382f7b54ef
parent 64 3533d4323edc
child 80 726fba06891a
equal deleted inserted replaced
70:968773a0b6ef 73:c8382f7b54ef
   204 void CFsControlButton::SetIconL(
   204 void CFsControlButton::SetIconL(
   205     CAlfTexture& aIcon,
   205     CAlfTexture& aIcon,
   206     TFsControlButtonElem aWhich )
   206     TFsControlButtonElem aWhich )
   207     {
   207     {
   208     FUNC_LOG;
   208     FUNC_LOG;
   209     iModel->SetIconL( aIcon, aWhich );
   209     if ( iModel->Icon( aWhich ) != &aIcon ) // don't set the same icon twice
   210     iVisualiser->UpdateElementL( aWhich );
   210         {
       
   211         iModel->SetIconL( aIcon, aWhich );
       
   212         iVisualiser->UpdateElementL( aWhich );
       
   213         }
   211     }
   214     }
   212 
   215 
   213 
   216 
   214 // ---------------------------------------------------------------------------
   217 // ---------------------------------------------------------------------------
   215 // Sets width of the button.
   218 // Sets width of the button.
   627                 if ( aEvent.KeyEvent().iScanCode == EStdKeyDevice3 )
   630                 if ( aEvent.KeyEvent().iScanCode == EStdKeyDevice3 )
   628                     {
   631                     {
   629                     iParent.HandleButtonEvent(
   632                     iParent.HandleButtonEvent(
   630                         MFsControlButtonObserver::EEventButton,
   633                         MFsControlButtonObserver::EEventButton,
   631                         iModel->Id() );
   634                         iModel->Id() );
   632                     result = ETrue;
   635                     
       
   636                     // EStdKeyDevice3 (EKeyOK) cannot be consumed here.
       
   637                     result = EFalse;
   633 
   638 
   634                     if ( iTriggeredComponent )
   639                     if ( iTriggeredComponent )
   635                         {
   640                         {
   636                         iTriggeredComponent->OpenComponent();
   641                         iTriggeredComponent->OpenComponent();
   637                         }
   642                         }