equal
deleted
inserted
replaced
26 #include "cpbk2cmditemmycard.h" |
26 #include "cpbk2cmditemmycard.h" |
27 #include "cpbk2mycard.h" |
27 #include "cpbk2mycard.h" |
28 #include "Pbk2NamesListEx.hrh" |
28 #include "Pbk2NamesListEx.hrh" |
29 #include "cpbk2contextlaunch.h" |
29 #include "cpbk2contextlaunch.h" |
30 |
30 |
31 #include "CPbk2ThumbnailManager.h" |
|
32 #include <spbcontentprovider.h> |
31 #include <spbcontentprovider.h> |
33 |
32 |
34 // Phonebook 2 |
33 // Phonebook 2 |
35 #include <CPbk2UIExtensionView.h> |
34 #include <CPbk2UIExtensionView.h> |
36 #include <MPbk2AppUi.h> |
35 #include <MPbk2AppUi.h> |
238 delete iControlProxy; |
237 delete iControlProxy; |
239 |
238 |
240 delete iMyCard; |
239 delete iMyCard; |
241 CCoeEnv::Static()->RemoveForegroundObserver( *this ); |
240 CCoeEnv::Static()->RemoveForegroundObserver( *this ); |
242 |
241 |
243 |
|
244 delete iThumbManager; |
|
245 delete iContextLauncher; |
242 delete iContextLauncher; |
246 FeatureManager::UnInitializeLib(); |
243 FeatureManager::UnInitializeLib(); |
247 } |
244 } |
248 |
245 |
249 // -------------------------------------------------------------------------- |
246 // -------------------------------------------------------------------------- |
289 iStoreConfiguration->AddObserverL( *this ); |
286 iStoreConfiguration->AddObserverL( *this ); |
290 PBK2_PROFILE_END(Pbk2Profile::ENamesListRegisterStoreConfiguration); |
287 PBK2_PROFILE_END(Pbk2Profile::ENamesListRegisterStoreConfiguration); |
291 |
288 |
292 iControlProxy = new( ELeave )CPbk2ContactUiControlProxy; |
289 iControlProxy = new( ELeave )CPbk2ContactUiControlProxy; |
293 |
290 |
294 iThumbManager = CPbk2ThumbnailManager::NewL( *iContactManager ); |
|
295 iContextLauncher = new(ELeave) CPbk2ContextLaunch( iCCAConnection ); |
291 iContextLauncher = new(ELeave) CPbk2ContextLaunch( iCCAConnection ); |
296 |
292 |
297 PBK2_PROFILE_END(Pbk2Profile::ENamesListPenSupportConstruction); |
293 PBK2_PROFILE_END(Pbk2Profile::ENamesListPenSupportConstruction); |
298 |
294 |
299 if( FeatureManager::FeatureSupported( KFeatureIdffContactsMycard ) ) |
295 if( FeatureManager::FeatureSupported( KFeatureIdffContactsMycard ) ) |
604 { |
600 { |
605 // get command item count |
601 // get command item count |
606 TInt commandCount = iControl->CommandItemCount(); |
602 TInt commandCount = iControl->CommandItemCount(); |
607 |
603 |
608 // Check if there is need to create MyCard |
604 // Check if there is need to create MyCard |
609 if( !iMyCard && IsPhoneMemoryUsedL() ) |
605 if( FeatureManager::FeatureSupported( KFeatureIdffContactsMycard ) && |
|
606 ( !iMyCard && IsPhoneMemoryUsedL() ) ) |
610 { |
607 { |
611 // Get the phoneStore for MyCard |
608 // Get the phoneStore for MyCard |
612 MVPbkContactStore* phoneStore = iContactManager->ContactStoresL() |
609 MVPbkContactStore* phoneStore = iContactManager->ContactStoresL() |
613 .Find(VPbkContactStoreUris::DefaultCntDbUri() ); |
610 .Find(VPbkContactStoreUris::DefaultCntDbUri() ); |
614 |
611 |
799 { |
796 { |
800 TInt pos; |
797 TInt pos; |
801 if ( aMenuPane->MenuItemExists( aCmd, pos ) ) |
798 if ( aMenuPane->MenuItemExists( aCmd, pos ) ) |
802 { |
799 { |
803 aMenuPane->SetItemDimmed( aCmd, ETrue ); |
800 aMenuPane->SetItemDimmed( aCmd, ETrue ); |
804 } |
|
805 } |
|
806 |
|
807 // -------------------------------------------------------------------------- |
|
808 // CPbk2NamesListExView::HandleForegroundEventL |
|
809 // -------------------------------------------------------------------------- |
|
810 // |
|
811 void CPbk2NamesListExView::HandleForegroundEventL( TBool aForeground ) |
|
812 { |
|
813 // CPbk2AppView::HandleForegroundEventL( aForeground ); |
|
814 |
|
815 // If this view is gaining foreground, then make sure that thumbnail |
|
816 // gets drawn |
|
817 if ( aForeground && iControl ) |
|
818 { |
|
819 if ( iControl->IsVisible() ) |
|
820 { |
|
821 iControl->ShowThumbnail(); |
|
822 } |
|
823 } |
801 } |
824 } |
802 } |
825 |
803 |
826 // -------------------------------------------------------------------------- |
804 // -------------------------------------------------------------------------- |
827 // CPbk2NamesListExView::ViewStateLC |
805 // CPbk2NamesListExView::ViewStateLC |
1205 Find( VPbkContactStoreUris::DefaultCntDbUri() ) ); |
1183 Find( VPbkContactStoreUris::DefaultCntDbUri() ) ); |
1206 } |
1184 } |
1207 |
1185 |
1208 if( !phoneStore ) |
1186 if( !phoneStore ) |
1209 { |
1187 { |
1210 iContactManager->LoadContactStoreL( VPbkContactStoreUris::DefaultCntDbUri() ); |
1188 TRAP_IGNORE( iContactManager->LoadContactStoreL( |
|
1189 VPbkContactStoreUris::DefaultCntDbUri() ) ); |
1211 } |
1190 } |
1212 } |
1191 } |
1213 |
1192 |
1214 // -------------------------------------------------------------------------- |
1193 // -------------------------------------------------------------------------- |
1215 // CPbk2NamesListExView::ConfigurationChangedComplete |
1194 // CPbk2NamesListExView::ConfigurationChangedComplete |
1480 container, |
1459 container, |
1481 *iContactManager, |
1460 *iContactManager, |
1482 *Phonebook2::Pbk2AppUi()->ApplicationServices(). |
1461 *Phonebook2::Pbk2AppUi()->ApplicationServices(). |
1483 ViewSupplier().AllContactsViewL(), |
1462 ViewSupplier().AllContactsViewL(), |
1484 *iNameFormatter, |
1463 *iNameFormatter, |
1485 Phonebook2::Pbk2AppUi()->ApplicationServices().StoreProperties(), |
1464 Phonebook2::Pbk2AppUi()->ApplicationServices().StoreProperties() ); |
1486 iThumbManager ); |
|
1487 |
1465 |
1488 PBK2_PROFILE_END |
1466 PBK2_PROFILE_END |
1489 ( Pbk2Profile::ENamesListViewCreateNamesListControl ); |
1467 ( Pbk2Profile::ENamesListViewCreateNamesListControl ); |
1490 |
1468 |
1491 PBK2_PROFILE_START(Pbk2Profile::ENamesListViewSetControl); |
1469 PBK2_PROFILE_START(Pbk2Profile::ENamesListViewSetControl); |
1858 |
1836 |
1859 // This flag is used to force the find box to be re-initialized when the application |
1837 // This flag is used to force the find box to be re-initialized when the application |
1860 // is back in the foreground. |
1838 // is back in the foreground. |
1861 iNeedSetFocus = EFalse; |
1839 iNeedSetFocus = EFalse; |
1862 } |
1840 } |
|
1841 |
|
1842 // -------------------------------------------------------------------------- |
|
1843 // CPbk2NamesListExView::UIExtensionViewExtension |
|
1844 // -------------------------------------------------------------------------- |
|
1845 // |
|
1846 TAny* CPbk2NamesListExView::UIExtensionViewExtension( |
|
1847 TUid aExtensionUid ) |
|
1848 { |
|
1849 if( aExtensionUid == KMPbk2UIExtensionView2Uid ) |
|
1850 { |
|
1851 return static_cast<MPbk2UIExtensionView2*>( this ); |
|
1852 } |
|
1853 |
|
1854 return NULL; |
|
1855 } |
|
1856 |
|
1857 // -------------------------------------------------------------------------- |
|
1858 // CPbk2NamesListExView::HandleForegroundEventL |
|
1859 // -------------------------------------------------------------------------- |
|
1860 // |
|
1861 void CPbk2NamesListExView::HandleForegroundEventL(TBool aForeground) |
|
1862 { |
|
1863 if ( iControl ) |
|
1864 { |
|
1865 iControl->HandleViewForegroundEventL( aForeground ); |
|
1866 } |
|
1867 } |
|
1868 |
1863 // End of File |
1869 // End of File |