phoneuis/easydialing/src/easydialingplugin.cpp
branchRCL_3
changeset 12 b68fcd923911
parent 9 91c2fb4b78df
child 14 b8d67d6176f5
equal deleted inserted replaced
10:ba54057fe027 12:b68fcd923911
    32 #include <aknlists.h>
    32 #include <aknlists.h>
    33 #include <AknUtils.h>
    33 #include <AknUtils.h>
    34 #include <e32cmn.h>
    34 #include <e32cmn.h>
    35 #include <bidivisual.h>
    35 #include <bidivisual.h>
    36 
    36 
       
    37 #include <aknlayoutscalable_avkon.cdl.h>
       
    38 
    37 // Predictive search header files
    39 // Predictive search header files
    38 #include <CPsSettings.h>
    40 #include <CPsSettings.h>
    39 #include <CPsQuery.h>
    41 #include <CPsQuery.h>
    40 #include <CPsQueryItem.h>
    42 #include <CPsQueryItem.h>
    41 #include <CPsClientData.h>
    43 #include <CPsClientData.h>
    61 
    63 
    62 // AIW header files
    64 // AIW header files
    63 #include <AiwContactAssignDataTypes.h>
    65 #include <AiwContactAssignDataTypes.h>
    64 #include <AiwContactSelectionDataTypes.h>
    66 #include <AiwContactSelectionDataTypes.h>
    65 
    67 
       
    68 #include <StringLoader.h>
       
    69 
    66 // CCA contactor service.
    70 // CCA contactor service.
    67 #include "edcontactorservice.h"
    71 #include "edcontactorservice.h"
    68 
    72 
    69 // Open system trace
    73 // Open system trace
    70 #include "OstTraceDefinitions.h"
    74 #include "OstTraceDefinitions.h"
   265     if ( iContactListBox )
   269     if ( iContactListBox )
   266         {
   270         {
   267         GfxTransEffect::Deregister( iContactListBox );
   271         GfxTransEffect::Deregister( iContactListBox );
   268         }
   272         }
   269     
   273     
       
   274     delete iInfoLabelLine1;
       
   275     delete iInfoLabelLine2;
       
   276     delete iInfoLabelTextLine1;
       
   277     delete iInfoLabelTextLine2;
       
   278 
   270     delete iContactListBox;
   279     delete iContactListBox;
   271 
   280 
   272     if (iContactLauncher)
   281     if (iContactLauncher)
   273         {
   282         {
   274         iContactLauncher->Close();
   283         iContactLauncher->Close();
   283     if ( iAsyncCallBack )
   292     if ( iAsyncCallBack )
   284         {
   293         {
   285         iAsyncCallBack->Cancel();
   294         iAsyncCallBack->Cancel();
   286         }
   295         }
   287     delete iAsyncCallBack;
   296     delete iAsyncCallBack;
       
   297     
       
   298     delete iContactToBeLaunched;
       
   299     delete iContactToBeLaunchedName;
   288     
   300     
   289     OstTrace0( TRACE_NORMAL, CEASYDIALINGPLUGIN_UNLOAD_PLUGIN, "Plugin unloaded" );
   301     OstTrace0( TRACE_NORMAL, CEASYDIALINGPLUGIN_UNLOAD_PLUGIN, "Plugin unloaded" );
   290     LOGSTRING("EasyDialingPlugin: Plugin unloaded");
   302     LOGSTRING("EasyDialingPlugin: Plugin unloaded");
   291     }
   303     }
   292 
   304 
   322 
   334 
   323     iContactListBox->MakeVisible( EFalse );
   335     iContactListBox->MakeVisible( EFalse );
   324     
   336     
   325     SetFocus( EFalse );
   337     SetFocus( EFalse );
   326     iContactListBox->ActivateL();
   338     iContactListBox->ActivateL();
       
   339     
       
   340     _LIT( KEDNewLine, "\n" );
       
   341     HBufC* infoLabelText = StringLoader::LoadLC( R_QTN_EASYDIAL_ENTER_NUMBER, iCoeEnv );
       
   342     TInt newLine = infoLabelText->Find( KEDNewLine );
       
   343     if ( newLine == KErrNotFound )
       
   344         {
       
   345         iInfoLabelTextLine1 = infoLabelText;
       
   346         CleanupStack::Pop( infoLabelText );
       
   347         iInfoLabelTextLine2 = HBufC::NewL(0);
       
   348         }
       
   349     else
       
   350         {
       
   351         iInfoLabelTextLine1 = infoLabelText->Left( newLine ).AllocL();
       
   352         iInfoLabelTextLine2 = infoLabelText->Mid( newLine + 1 ).AllocL();
       
   353         CleanupStack::PopAndDestroy( infoLabelText );
       
   354         }
       
   355             
       
   356     iInfoLabelLine1 = new( ELeave ) CEikLabel;
       
   357     iInfoLabelLine1->SetContainerWindowL( *this );
       
   358     iInfoLabelLine1->SetParent( this );
       
   359     iInfoLabelLine1->SetMopParent( this ); 
       
   360     iInfoLabelLine1->SetLabelAlignment( ELayoutAlignCenter );
       
   361     iInfoLabelLine1->SetTextL( *iInfoLabelTextLine1 );
       
   362     iInfoLabelLine1->ActivateL();
       
   363 
       
   364     iInfoLabelLine2 = new( ELeave ) CEikLabel;
       
   365     iInfoLabelLine2->SetContainerWindowL( *this );
       
   366     iInfoLabelLine2->SetParent( this );
       
   367     iInfoLabelLine2->SetMopParent( this ); 
       
   368     iInfoLabelLine2->SetLabelAlignment( ELayoutAlignCenter );
       
   369     iInfoLabelLine2->SetTextL( *iInfoLabelTextLine2 );
       
   370     iInfoLabelLine2->ActivateL();
       
   371 
       
   372     SetInfoLabelColourL();
   327     
   373     
   328     GfxTransEffect::Register( iContactListBox, 
   374     GfxTransEffect::Register( iContactListBox, 
   329                               KGfxContactListBoxUid, EFalse );
   375                               KGfxContactListBoxUid, EFalse );
   330     
   376     
   331     iCoeEnv->AddForegroundObserverL( *this );
   377     iCoeEnv->AddForegroundObserverL( *this );
   565 //
   611 //
   566 // -----------------------------------------------------------------------------
   612 // -----------------------------------------------------------------------------
   567 //
   613 //
   568 TInt CEasyDialingPlugin::CountComponentControls() const
   614 TInt CEasyDialingPlugin::CountComponentControls() const
   569     {
   615     {
   570     return iNumberOfNames > 0 ? 1 : 0;
   616     return iNumberOfNames > 0 ? 3 : 2;
   571     }
   617     }
   572 
   618 
   573 
   619 
   574 // -----------------------------------------------------------------------------
   620 // -----------------------------------------------------------------------------
   575 // ComponentControl
   621 // ComponentControl
   576 //
   622 //
   577 // -----------------------------------------------------------------------------
   623 // -----------------------------------------------------------------------------
   578 //
   624 //
   579 CCoeControl* CEasyDialingPlugin::ComponentControl( TInt aIndex ) const
   625 CCoeControl* CEasyDialingPlugin::ComponentControl( TInt aIndex ) const
   580     {
   626     {
   581     return aIndex == 0 ? iContactListBox : NULL;
   627     switch ( aIndex )
       
   628         {
       
   629         case 0:
       
   630             return iInfoLabelLine1;
       
   631         case 1:
       
   632             return iInfoLabelLine2;
       
   633         case 2:
       
   634             return iContactListBox;
       
   635         default:
       
   636             return NULL;
       
   637         }
   582     }
   638     }
   583 
   639 
   584 
   640 
   585 // -----------------------------------------------------------------------------
   641 // -----------------------------------------------------------------------------
   586 // MakeVisible
   642 // MakeVisible
   598             SetFocus( EFalse );
   654             SetFocus( EFalse );
   599             }
   655             }
   600         }
   656         }
   601     }
   657     }
   602 
   658 
       
   659 // -----------------------------------------------------------------------------
       
   660 // HandleResourceChange
       
   661 //
       
   662 // -----------------------------------------------------------------------------
       
   663 //
       
   664 void CEasyDialingPlugin::HandleResourceChange( TInt /*aType*/ )
       
   665     {
       
   666     TRAP_IGNORE( SetInfoLabelColourL() );
       
   667     }
   603 
   668 
   604 // -----------------------------------------------------------------------------
   669 // -----------------------------------------------------------------------------
   605 // SizeChanged
   670 // SizeChanged
   606 //
   671 //
   607 // -----------------------------------------------------------------------------
   672 // -----------------------------------------------------------------------------
   621         // if no current item is set, make sure that the list is then 
   686         // if no current item is set, make sure that the list is then 
   622         // scrolled to the bottom.
   687         // scrolled to the bottom.
   623         itemToMakeVisible = iNumberOfNames - 1;
   688         itemToMakeVisible = iNumberOfNames - 1;
   624         } 
   689         } 
   625     iContactListBox->ScrollToMakeItemVisible( itemToMakeVisible );
   690     iContactListBox->ScrollToMakeItemVisible( itemToMakeVisible );
       
   691 
       
   692     // get info label locations and fonts from layout
       
   693     TRect baseRect = Rect();
       
   694     TAknTextComponentLayout labelLayoutLine1 = 
       
   695         AknLayoutScalable_Avkon::main_pane_empty_t1( 0 );
       
   696     TAknTextComponentLayout labelLayoutLine2 = 
       
   697         AknLayoutScalable_Avkon::main_pane_empty_t2( 0 );
       
   698     AknLayoutUtils::LayoutLabel( iInfoLabelLine1, baseRect, labelLayoutLine1 );
       
   699     AknLayoutUtils::LayoutLabel( iInfoLabelLine2, baseRect, labelLayoutLine2 );
       
   700     
       
   701     // the layouts used place the text too low, so center the labels vertically
       
   702     TInt labelHeight = iInfoLabelLine2->Rect().iBr.iY - iInfoLabelLine1->Rect().iTl.iY;
       
   703     TInt centeredTop = ( baseRect.Height() - labelHeight ) / 2;
       
   704     TInt offset = centeredTop - iInfoLabelLine1->Rect().iTl.iY;
       
   705     iInfoLabelLine1->SetPosition( TPoint( iInfoLabelLine1->Rect().iTl.iX,
       
   706                                           iInfoLabelLine1->Rect().iTl.iY + offset ) );
       
   707     iInfoLabelLine2->SetPosition( TPoint( iInfoLabelLine2->Rect().iTl.iX,
       
   708                                           iInfoLabelLine2->Rect().iTl.iY + offset ) );
       
   709     
       
   710     TRAP_IGNORE( SetInfoLabelColourL() );
   626     }
   711     }
   627 
   712 
   628 
   713 
   629 // -----------------------------------------------------------------------------
   714 // -----------------------------------------------------------------------------
   630 // FocusChanged
   715 // FocusChanged
   636     iContactListBox->SetFocus( IsFocused() );
   721     iContactListBox->SetFocus( IsFocused() );
   637     if( !IsFocused() )
   722     if( !IsFocused() )
   638         {
   723         {
   639         // To be on the safe side, cancel async callback and reset input block.
   724         // To be on the safe side, cancel async callback and reset input block.
   640         CancelActionLaunchAndInputBlock();
   725         CancelActionLaunchAndInputBlock();
       
   726         iContactListBox->View()->ItemDrawer()->ClearFlags( CListItemDrawer::ESingleClickDisabledHighlight );
   641         }
   727         }
   642     CCoeControl::FocusChanged( aDrawNow );
   728     CCoeControl::FocusChanged( aDrawNow );
   643     InformObservers( MDialingExtensionObserver::EFocusChanged );
   729     InformObservers( MDialingExtensionObserver::EFocusChanged );
   644     }
   730     }
   645 
   731 
   675         // handling etc, then dialer and thus ed is already set invisible
   761         // handling etc, then dialer and thus ed is already set invisible
   676         // and effect will not be shown as listbox is already invisible.
   762         // and effect will not be shown as listbox is already invisible.
   677         // However if user empties number entry, then it's feasible to show
   763         // However if user empties number entry, then it's feasible to show
   678         // effect.
   764         // effect.
   679         HideContactListBoxWithEffect();
   765         HideContactListBoxWithEffect();
       
   766         iInfoLabelLine1->SetTextL( *iInfoLabelTextLine1 );
       
   767         iInfoLabelLine2->SetTextL( *iInfoLabelTextLine2 );
       
   768         iInfoLabelLine1->DrawDeferred();
       
   769         iInfoLabelLine2->DrawDeferred();
   680         Reset();
   770         Reset();
   681         }
   771         }
   682     else // proper search string
   772     else // proper search string
   683         {
   773         {
       
   774         iInfoLabelLine1->SetTextL( KNullDesC );
       
   775         iInfoLabelLine2->SetTextL( KNullDesC );
       
   776         iInfoLabelLine1->DrawDeferred();
       
   777         iInfoLabelLine2->DrawDeferred();
   684         iSearchString.Copy( aSearchString.Left( iSearchString.MaxLength() ) );
   778         iSearchString.Copy( aSearchString.Left( iSearchString.MaxLength() ) );
   685         LaunchSearchL();
   779         LaunchSearchL();
   686         }
   780         }
   687     }
   781     }
   688 
   782 
  1125         
  1219         
  1126         // Scroll the list to bottom
  1220         // Scroll the list to bottom
  1127         iContactListBox->ScrollToMakeItemVisible( iNumberOfNames-1 );
  1221         iContactListBox->ScrollToMakeItemVisible( iNumberOfNames-1 );
  1128 
  1222 
  1129         ShowContactListBoxWithEffect();
  1223         ShowContactListBoxWithEffect();
       
  1224         iContactListBox->View()->ItemDrawer()->ClearFlags( CListItemDrawer::ESingleClickDisabledHighlight );
       
  1225         static_cast<CEasyDialingListBoxView*>( iContactListBox->View() )->SetCurrentItemIndexToNone();
  1130         }
  1226         }
  1131     else
  1227     else
  1132         {  
  1228         {  
  1133         HideContactListBoxWithEffect();
  1229         HideContactListBoxWithEffect();
  1134         }
  1230         }
  1191 // -----------------------------------------------------------------------------
  1287 // -----------------------------------------------------------------------------
  1192 //
  1288 //
  1193 void CEasyDialingPlugin::LaunchCurrentContactL()
  1289 void CEasyDialingPlugin::LaunchCurrentContactL()
  1194     {
  1290     {
  1195     __ASSERT_DEBUG( iNumberOfNames > 0, EasyDialingPanic( EEasyDialingPanicNoResults ) );
  1291     __ASSERT_DEBUG( iNumberOfNames > 0, EasyDialingPanic( EEasyDialingPanicNoResults ) );
  1196     __ASSERT_DEBUG( iContactListBox->CurrentItemIndex() >= 0, EasyDialingPanic( EEasyDialingPanicNoContactSelected ) );
  1292     __ASSERT_DEBUG( iContactToBeLaunched, EasyDialingPanic( EEasyDialingPanicNoContactSelected ) );
  1197 
  1293 
  1198     if (( iContactLauncherActive ) || ( iNumberOfNames == 0 ) || ( !iContactListBox ) || ( iContactListBox->CurrentItemIndex() < 0 ))
  1294     if (( iContactLauncherActive ) || ( iNumberOfNames == 0 ) || ( !iContactListBox ) || ( !iContactToBeLaunched ))
  1199         {
  1295         {
  1200         OstTrace0( TRACE_ERROR, CEASYDIALINGPLUGIN_LAUNCHCURRENTCONTACTL_ERROR, "LaunchCurrentContactL: Parameter error" );
  1296         OstTrace0( TRACE_ERROR, CEASYDIALINGPLUGIN_LAUNCHCURRENTCONTACTL_ERROR, "LaunchCurrentContactL: Parameter error" );
  1201         LOGSTRING("EasyDialingPlugin: LaunchCurrentContactL - Parameter error");
  1297         LOGSTRING("EasyDialingPlugin: LaunchCurrentContactL - Parameter error");
  1202         return;
  1298         return;
  1203         }
  1299         }
  1211     // It must never be closed, so we must use this flag.
  1307     // It must never be closed, so we must use this flag.
  1212     launchParameters->SetConnectionFlag(MCCAParameter::ESoftExit);
  1308     launchParameters->SetConnectionFlag(MCCAParameter::ESoftExit);
  1213     
  1309     
  1214     launchParameters->SetContactDataFlag(MCCAParameter::EContactLink);
  1310     launchParameters->SetContactDataFlag(MCCAParameter::EContactLink);
  1215 
  1311 
  1216     // Get the contact link of the current contact item.
  1312     // Expand contact link into 16-bit descriptor because cca launcher api expects this. 
  1217     HBufC8* contact8 = iContactListBox->CurrentContactLinkLC();
  1313     HBufC16* contact16 = HBufC16::NewLC( iContactToBeLaunched->Length() );
  1218     
  1314     contact16->Des().Copy( *iContactToBeLaunched );
  1219     // Expand it into 16-bit descriptor because cca launcher api expects this. 
       
  1220     HBufC16* contact16 = HBufC16::NewLC( contact8->Length() );
       
  1221     contact16->Des().Copy( *contact8 );
       
  1222 
  1315 
  1223     launchParameters->SetContactDataL( *contact16 );
  1316     launchParameters->SetContactDataL( *contact16 );
  1224 
  1317 
  1225     CleanupStack::PopAndDestroy( contact16 );
  1318     CleanupStack::PopAndDestroy( contact16 );
  1226     CleanupStack::PopAndDestroy( contact8 );
  1319 
  1227 
  1320     OstTraceExt1( TRACE_NORMAL, CEASYDIALINGPLUGIN_LAUNCHCURRENTCONTACTL_LAUNCH_CCA, "Launch CL for contact: '%S'", *iContactToBeLaunchedName );
  1228     TPtrC selectedName = iListBoxModel->MdcaPoint( iContactListBox->CurrentItemIndex() );
  1321     LOGSTRING1("EasyDialingPlugin: Launch CL for contact: '%S'", iContactToBeLaunchedName );
  1229     OstTraceExt1( TRACE_NORMAL, CEASYDIALINGPLUGIN_LAUNCHCURRENTCONTACTL_LAUNCH_CCA, "Launch CL for contact: '%S'", selectedName );
  1322 
  1230     LOGSTRING1("EasyDialingPlugin: Launch CL for contact: '%S'", &selectedName );
  1323     delete iContactToBeLaunched;
  1231 
  1324     iContactToBeLaunched = NULL;
       
  1325     delete iContactToBeLaunchedName;
       
  1326     iContactToBeLaunchedName = NULL;    
       
  1327     
  1232     iContactLauncher->LaunchAppL( *launchParameters, this );
  1328     iContactLauncher->LaunchAppL( *launchParameters, this );
  1233 
  1329 
  1234     // Ownership of parameter transferred to CCA launcher => pop but do not destroy.
  1330     // Ownership of parameter transferred to CCA launcher => pop but do not destroy.
  1235     CleanupStack::Pop( launchParameters );
  1331     CleanupStack::Pop( launchParameters );
  1236 
  1332 
  1619 // -----------------------------------------------------------------------------
  1715 // -----------------------------------------------------------------------------
  1620 //
  1716 //
  1621 void CEasyDialingPlugin::AsyncActionLaunchL( TEasyDialingAction aAction )
  1717 void CEasyDialingPlugin::AsyncActionLaunchL( TEasyDialingAction aAction )
  1622     {
  1718     {
  1623     iActionToBeLaunched = aAction;
  1719     iActionToBeLaunched = aAction;
       
  1720 
       
  1721     delete iContactToBeLaunched;
       
  1722     iContactToBeLaunched = NULL;
       
  1723     delete iContactToBeLaunchedName;
       
  1724     iContactToBeLaunchedName = NULL;
       
  1725        
       
  1726     if ( aAction == ECallCurrentContact
       
  1727             || aAction == EVideoCallCurrentContact
       
  1728             || aAction == ESendMessageCurrentContact
       
  1729             || aAction == ELaunchCurrentContact )
       
  1730         {
       
  1731         // Need to save current contact link and name. Listbox current item
       
  1732         // index might not be correct when callback is handled.
       
  1733         iContactToBeLaunched = iContactListBox->CurrentContactLinkLC();
       
  1734         CleanupStack::Pop( iContactToBeLaunched );
       
  1735         
       
  1736         TPtrC contactString( iListBoxModel->MdcaPoint( iContactListBox->CurrentItemIndex() ) );
       
  1737         TPtrC fullNameSeparators;
       
  1738         TInt error = TextUtils::ColumnText( fullNameSeparators, 1, &contactString );
       
  1739         __ASSERT_DEBUG( error == KErrNone, EasyDialingPanic( EEasyDialingPanicInvalidListBoxModelString ) );
       
  1740         
       
  1741         // Remove highlight separators. It is possible that some contactor API has problem with them.
       
  1742         iContactToBeLaunchedName = AllocWithoutHighlightSeparatorsLC( fullNameSeparators );
       
  1743         CleanupStack::Pop( iContactToBeLaunchedName );
       
  1744         }
  1624     
  1745     
  1625     CancelActionLaunchAndInputBlock();
  1746     CancelActionLaunchAndInputBlock();
  1626     
  1747     
  1627     if ( aAction == ELaunchSearch )
  1748     if ( aAction == ELaunchSearch )
  1628         {
  1749         {
  1713         {
  1834         {
  1714         LOGSTRING("EasyDialingPlugin: LaunchActionL - contactor service is busy!");
  1835         LOGSTRING("EasyDialingPlugin: LaunchActionL - contactor service is busy!");
  1715         return;
  1836         return;
  1716         }
  1837         }
  1717  
  1838  
  1718     // Get current contact link.
       
  1719     HBufC8* contact8 = iContactListBox->CurrentContactLinkLC();
       
  1720     
       
  1721     TPtrC contactString( iListBoxModel->MdcaPoint( iContactListBox->CurrentItemIndex() ) );
       
  1722     
       
  1723     TPtrC fullNameSeparators;
       
  1724     TInt error = TextUtils::ColumnText( fullNameSeparators , 1, &contactString );
       
  1725     __ASSERT_DEBUG( error == KErrNone, EasyDialingPanic( EEasyDialingPanicInvalidListBoxModelString ) );
       
  1726     
       
  1727     // Remove highlight separators. It is possible that some contactor API has problem with them.
       
  1728     HBufC* fullName = AllocWithoutHighlightSeparatorsLC( fullNameSeparators );
       
  1729     
       
  1730     VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector selector( 
  1839     VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector selector( 
  1731             VPbkFieldTypeSelectorFactory::EEmptySelector );
  1840             VPbkFieldTypeSelectorFactory::EEmptySelector );
  1732     
  1841     
  1733     switch ( iActionToBeLaunched ) 
  1842     switch ( iActionToBeLaunched ) 
  1734         {
  1843         {
  1767             
  1876             
  1768             selector = VPbkFieldTypeSelectorFactory::EUniEditorSelector;
  1877             selector = VPbkFieldTypeSelectorFactory::EUniEditorSelector;
  1769             break;
  1878             break;
  1770             
  1879             
  1771         default:
  1880         default:
  1772             CleanupStack::PopAndDestroy( fullName );           
  1881             delete iContactToBeLaunched;
  1773             CleanupStack::PopAndDestroy( contact8 );
  1882             iContactToBeLaunched = NULL;
       
  1883             delete iContactToBeLaunchedName;
       
  1884             iContactToBeLaunchedName = NULL;
  1774             __ASSERT_DEBUG( EFalse, EasyDialingPanic( EEasyDialingActionNotSupported ) );
  1885             __ASSERT_DEBUG( EFalse, EasyDialingPanic( EEasyDialingActionNotSupported ) );
  1775             return;
  1886             return;
  1776         }
  1887         }
  1777 
  1888 
  1778     CEDContactorService::TCSParameter param( selector, *contact8, 
  1889     CEDContactorService::TCSParameter param( selector, *iContactToBeLaunched, 
  1779                                              CEDContactorService::TCSParameter::EEnableDefaults, 
  1890                                              CEDContactorService::TCSParameter::EEnableDefaults, 
  1780                                              *fullName );
  1891                                              *iContactToBeLaunchedName );
  1781 
  1892 
  1782     iContactorService->ExecuteServiceL( param );
  1893     iContactorService->ExecuteServiceL( param );
  1783 
  1894 
  1784     CleanupStack::PopAndDestroy( fullName );
  1895     delete iContactToBeLaunched;
  1785     CleanupStack::PopAndDestroy( contact8 );
  1896     iContactToBeLaunched = NULL;
       
  1897     delete iContactToBeLaunchedName;
       
  1898     iContactToBeLaunchedName = NULL;
  1786     }
  1899     }
  1787 
  1900 
  1788 
  1901 
  1789 // -----------------------------------------------------------------------------
  1902 // -----------------------------------------------------------------------------
  1790 // CancelActionLaunchAndInputBlock
  1903 // CancelActionLaunchAndInputBlock
  1830             break;
  1943             break;
  1831             
  1944             
  1832         case EEventFlickStopped:
  1945         case EEventFlickStopped:
  1833         case EEventPanningStopped:
  1946         case EEventPanningStopped:
  1834         case KEasyDialingScrollingStopped:
  1947         case KEasyDialingScrollingStopped:
       
  1948             iContactListBox->View()->ItemDrawer()->ClearFlags( CListItemDrawer::ESingleClickDisabledHighlight );
       
  1949             static_cast<CEasyDialingListBoxView*>( iContactListBox->View() )->SetCurrentItemIndexToNone();
  1835             iContactDataManager->Pause( EFalse );
  1950             iContactDataManager->Pause( EFalse );
  1836             
  1951             
  1837             // Touching the listbox always removes the visual focus from any list item.
  1952             // Touching the listbox always removes the visual focus from any list item.
  1838             // Move the focus away from the listbox after panning has ended to
  1953             // Move the focus away from the listbox after panning has ended to
  1839             // align our internal state with the visual lack of focus.
  1954             // align our internal state with the visual lack of focus.
  1993         canBeUsed = ETrue;
  2108         canBeUsed = ETrue;
  1994         }
  2109         }
  1995     
  2110     
  1996     return canBeUsed;
  2111     return canBeUsed;
  1997     }
  2112     }
       
  2113 
       
  2114 // -----------------------------------------------------------------------------
       
  2115 // CEasyDialingPlugin::SetInfoLabelColourL
       
  2116 // -----------------------------------------------------------------------------
       
  2117 //
       
  2118 void CEasyDialingPlugin::SetInfoLabelColourL()
       
  2119     {
       
  2120     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
       
  2121     TRgb skinColor;
       
  2122     TInt error = AknsUtils::GetCachedColor( skin, skinColor,
       
  2123             KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6 );
       
  2124             
       
  2125     if ( error == KErrNone )
       
  2126         {
       
  2127         iInfoLabelLine1->OverrideColorL( EColorLabelText, skinColor );
       
  2128         iInfoLabelLine2->OverrideColorL( EColorLabelText, skinColor );
       
  2129         }    
       
  2130     }
       
  2131 
  1998 
  2132 
  1999 /*
  2133 /*
  2000  * ==============================================================================
  2134  * ==============================================================================
  2001  * 
  2135  * 
  2002  * Local functions
  2136  * Local functions