phoneuis/dialer/src/cdialernumberentry.cpp
branchRCL_3
changeset 20 3c221667e687
parent 14 b8d67d6176f5
child 23 40a3f856b14d
equal deleted inserted replaced
14:b8d67d6176f5 20:3c221667e687
   151     iObserver = &aObserver;
   151     iObserver = &aObserver;
   152     }
   152     }
   153         
   153         
   154 // ---------------------------------------------------------------------------
   154 // ---------------------------------------------------------------------------
   155 // CDialerNumberEntry::SetFocus
   155 // CDialerNumberEntry::SetFocus
       
   156 // 
       
   157 // IsFocused() and iEditor->IsFocused() may return other values besides ETrue
       
   158 // and EFalse. This is why we need to check their return values against zero
       
   159 // and use the result in comparison against aFocus.
   156 // ---------------------------------------------------------------------------
   160 // ---------------------------------------------------------------------------
   157 //
   161 //
   158 void CDialerNumberEntry::SetFocus( TBool aFocus, TDrawNow aDrawNow )
   162 void CDialerNumberEntry::SetFocus( TBool aFocus, TDrawNow aDrawNow )
   159     {
   163     {
   160     DIALER_PRINT("numberentry::SetFocus<");
   164     DIALER_PRINT("numberentry::SetFocus<");
   161     
   165     
   162     if ( aFocus != IsFocused() )
   166     if ( aFocus != ( IsFocused() ? ETrue : EFalse ) )
   163         {
   167         {
   164         CCoeControl::SetFocus( aFocus, aDrawNow );
   168         CCoeControl::SetFocus( aFocus, aDrawNow );
   165         }
   169         }
   166     
   170     
   167     if ( aFocus != iEditor->IsFocused() )
   171     if ( aFocus != ( iEditor->IsFocused() ? ETrue : EFalse ) )
   168         {
   172         {
   169         iEditor->SetFocus( aFocus );
   173         iEditor->SetFocus( aFocus );
   170         }
   174         }
       
   175     
   171     DIALER_PRINT("numberentry::SetFocus>");
   176     DIALER_PRINT("numberentry::SetFocus>");
   172     }
   177     }
   173 
   178 
   174 
   179 
   175 // ---------------------------------------------------------------------------
   180 // ---------------------------------------------------------------------------