equal
deleted
inserted
replaced
25 #include <CPbk2StoreConfiguration.h> |
25 #include <CPbk2StoreConfiguration.h> |
26 #include <MPbk2Command.h> |
26 #include <MPbk2Command.h> |
27 #include <Pbk2UIControls.hrh> |
27 #include <Pbk2UIControls.hrh> |
28 #include <Pbk2UIControls.rsg> |
28 #include <Pbk2UIControls.rsg> |
29 #include <CPbk2ViewState.h> |
29 #include <CPbk2ViewState.h> |
|
30 #include <MPbk2AppUi.h> |
|
31 #include <MPbk2ApplicationServices.h> |
|
32 #include <MPbk2ContactViewSupplier.h> |
30 |
33 |
31 // Virtual Phonebook |
34 // Virtual Phonebook |
32 #include <MVPbkContactViewBase.h> |
35 #include <MVPbkContactViewBase.h> |
33 #include <CVPbkContactLinkArray.h> |
36 #include <CVPbkContactLinkArray.h> |
34 #include <MVPbkContactLink.h> |
37 #include <MVPbkContactLink.h> |
85 { |
88 { |
86 if (iContactView) |
89 if (iContactView) |
87 { |
90 { |
88 iContactView->RemoveObserver( *iControl ); |
91 iContactView->RemoveObserver( *iControl ); |
89 } |
92 } |
|
93 if ( iStoreConfiguration ) |
|
94 { |
|
95 iStoreConfiguration->RemoveObserver( *this ); |
|
96 } |
90 } |
97 } |
91 |
98 |
92 // -------------------------------------------------------------------------- |
99 // -------------------------------------------------------------------------- |
93 // CPbk2FetchDlgPage::ConstructL |
100 // CPbk2FetchDlgPage::ConstructL |
94 // -------------------------------------------------------------------------- |
101 // -------------------------------------------------------------------------- |
99 ( iParentDlg.FetchDlgControl( iControlId ) ); |
106 ( iParentDlg.FetchDlgControl( iControlId ) ); |
100 iContactView = &iParentDlg.FetchDlgViewL( iControlId ); |
107 iContactView = &iParentDlg.FetchDlgViewL( iControlId ); |
101 |
108 |
102 iControl->AddObserverL( *this ); |
109 iControl->AddObserverL( *this ); |
103 iContactView->AddObserverL( *iControl ); |
110 iContactView->AddObserverL( *iControl ); |
|
111 iStoreConfiguration = &Phonebook2::Pbk2AppUi()->ApplicationServices().StoreConfiguration(); |
|
112 iStoreConfiguration->AddObserverL( *this ); |
104 |
113 |
105 AknLayoutUtils::LayoutControl |
114 AknLayoutUtils::LayoutControl |
106 ( iControl, iParentDlg.FetchDlgClientRect(), |
115 ( iControl, iParentDlg.FetchDlgClientRect(), |
107 AknLayout::list_gen_pane( 0 ) ); |
116 AknLayout::list_gen_pane( 0 ) ); |
108 } |
117 } |
381 } |
390 } |
382 } |
391 } |
383 return text; |
392 return text; |
384 } |
393 } |
385 |
394 |
|
395 // -------------------------------------------------------------------------- |
|
396 // CPbk2FetchDlgPage::ConfigurationChanged |
|
397 // -------------------------------------------------------------------------- |
|
398 // |
|
399 void CPbk2FetchDlgPage::ConfigurationChanged() |
|
400 { |
|
401 if ( iControl ) |
|
402 { |
|
403 iControl->Reset(); |
|
404 } |
|
405 } |
|
406 |
|
407 // -------------------------------------------------------------------------- |
|
408 // CPbk2FetchDlgPage::ConfigurationChangedComplete |
|
409 // -------------------------------------------------------------------------- |
|
410 // |
|
411 void CPbk2FetchDlgPage::ConfigurationChangedComplete() |
|
412 { |
|
413 if ( iControl ) |
|
414 { |
|
415 MVPbkContactViewBase* allContactsView = NULL; |
|
416 |
|
417 TRAPD( res, allContactsView = Phonebook2::Pbk2AppUi()-> |
|
418 ApplicationServices().ViewSupplier().AllContactsViewL() ); |
|
419 |
|
420 if ( res == KErrNone ) |
|
421 { |
|
422 TRAP( res, iControl->SetViewL( *allContactsView ) ); |
|
423 iControl->DrawNow(); |
|
424 } |
|
425 |
|
426 if ( res != KErrNone ) |
|
427 { |
|
428 CCoeEnv::Static()->HandleError( res ); |
|
429 iControl->Reset(); |
|
430 } |
|
431 } |
|
432 } |
386 // End of File |
433 // End of File |