34 #include <aknViewAppUi.h> // CAknViewAppUi |
34 #include <aknViewAppUi.h> // CAknViewAppUi |
35 #include <eikmenub.h> // CEikMenuBar, CEikMenuPane |
35 #include <eikmenub.h> // CEikMenuBar, CEikMenuPane |
36 #include <eikmenup.h> // CEikMenuPaneItem |
36 #include <eikmenup.h> // CEikMenuPaneItem |
37 #include <akntitle.h> // CAknTitlePane |
37 #include <akntitle.h> // CAknTitlePane |
38 #include <StringLoader.h> // StringLoader |
38 #include <StringLoader.h> // StringLoader |
39 #include <AknInfoPopupNoteController.h> // CAknInfoPopupNoteController |
|
40 #include <appmngr2.rsg> // Resource IDs |
39 #include <appmngr2.rsg> // Resource IDs |
41 |
40 |
42 const TUid KStatusPaneUid = { EEikStatusPaneUidTitle }; |
41 const TUid KStatusPaneUid = { EEikStatusPaneUidTitle }; |
43 |
42 |
44 |
43 |
45 // ======== MEMBER FUNCTIONS ======== |
44 // ======== MEMBER FUNCTIONS ======== |
46 |
45 |
47 // --------------------------------------------------------------------------- |
46 // --------------------------------------------------------------------------- |
48 // CAppMngr2ListView::ConstructL() |
47 // CAppMngr2ListView::ConstructL() |
49 // --------------------------------------------------------------------------- |
48 // --------------------------------------------------------------------------- |
50 // |
49 // |
51 void CAppMngr2ListView::ConstructL( TInt aResourceId ) |
50 void CAppMngr2ListView::ConstructL( TInt aResourceId ) |
52 { |
51 { |
53 FLOG( "CAppMngr2ListView::ConstructL( 0x%08x )", aResourceId ); |
52 FLOG( "CAppMngr2ListView::ConstructL( 0x%08x )", aResourceId ); |
54 |
53 |
55 BaseConstructL( aResourceId ); |
54 BaseConstructL( aResourceId ); |
56 } |
55 } |
57 |
56 |
58 // --------------------------------------------------------------------------- |
57 // --------------------------------------------------------------------------- |
59 // CAppMngr2ListView::~CAppMngr2ListView() |
58 // CAppMngr2ListView::~CAppMngr2ListView() |
60 // --------------------------------------------------------------------------- |
59 // --------------------------------------------------------------------------- |
61 // |
60 // |
62 CAppMngr2ListView::~CAppMngr2ListView() |
61 CAppMngr2ListView::~CAppMngr2ListView() |
63 { |
62 { |
64 FLOG( "CAppMngr2ListView::~CAppMngr2ListView" ); |
63 FLOG( "CAppMngr2ListView::~CAppMngr2ListView" ); |
65 |
64 |
66 if( iContainer ) |
65 if( iContainer ) |
67 { |
66 { |
68 AppUi()->RemoveFromViewStack( *this, iContainer ); |
67 AppUi()->RemoveFromViewStack( *this, iContainer ); |
69 delete iContainer; |
68 delete iContainer; |
70 } |
69 } |
71 delete iInfoPopup; |
|
72 } |
70 } |
73 |
71 |
74 // --------------------------------------------------------------------------- |
72 // --------------------------------------------------------------------------- |
75 // CAppMngr2ListView::RefreshL() |
73 // CAppMngr2ListView::RefreshL() |
76 // --------------------------------------------------------------------------- |
74 // --------------------------------------------------------------------------- |
77 // |
75 // |
78 void CAppMngr2ListView::RefreshL( TInt aMoreRefreshesExpected ) |
76 void CAppMngr2ListView::RefreshL( TInt aMoreRefreshesExpected ) |
79 { |
77 { |
80 if( iContainer ) |
78 if( iContainer ) |
81 { |
79 { |
|
80 FLOG( "CAppMngr2ListView::RefreshL( %d ) begin", aMoreRefreshesExpected ); |
|
81 |
82 TBool selectedItemChanged = EFalse; |
82 TBool selectedItemChanged = EFalse; |
83 iContainer->RefreshL( iMaintainFocus, selectedItemChanged, aMoreRefreshesExpected ); |
83 iContainer->RefreshL( iMaintainFocus, selectedItemChanged, aMoreRefreshesExpected ); |
84 if( selectedItemChanged ) |
84 if( selectedItemChanged ) |
85 { |
85 { |
86 UpdateMiddleSoftkeyCommandL(); |
86 UpdateMiddleSoftkeyCommandL(); |
87 StopDisplayingMenuBar(); |
87 StopDisplayingMenuBar(); |
88 iMaintainFocus = EFalse; |
88 iMaintainFocus = EFalse; |
89 } |
89 } |
90 |
90 |
91 // Close progress note used in application startup |
91 FLOG( "CAppMngr2ListView::RefreshL() end" ); |
92 if( iInfoPopup && !aMoreRefreshesExpected ) |
|
93 { |
|
94 iInfoPopup->HideInfoPopupNote(); |
|
95 delete iInfoPopup; |
|
96 iInfoPopup = NULL; |
|
97 } |
|
98 } |
92 } |
99 } |
93 } |
100 |
94 |
101 // --------------------------------------------------------------------------- |
95 // --------------------------------------------------------------------------- |
102 // CAppMngr2ListView::UpdateMiddleSoftkeyCommandL() |
96 // CAppMngr2ListView::UpdateMiddleSoftkeyCommandL() |
103 // --------------------------------------------------------------------------- |
97 // --------------------------------------------------------------------------- |
104 // |
98 // |
105 void CAppMngr2ListView::UpdateMiddleSoftkeyCommandL() |
99 void CAppMngr2ListView::UpdateMiddleSoftkeyCommandL() |
106 { |
100 { |
107 FLOG_PERF_STATIC_BEGIN( UpdateMiddleSoftkeyCommandL ); |
101 FLOG_PERF_STATIC_BEGIN( UpdateMiddleSoftkeyCommandL ); |
108 |
102 |
109 if( iContainer && !iContainer->IsListEmpty() ) |
103 if( iContainer && !iContainer->IsListEmpty() ) |
110 { |
104 { |
111 // add item-specific MSK if the current item has one |
105 // add item-specific MSK if the current item has one |
112 CAppMngr2InfoBase& currentItem = iContainer->CurrentItem(); |
106 CAppMngr2InfoBase& currentItem = iContainer->CurrentItem(); |
113 TInt resourceId = 0; |
107 TInt resourceId = 0; |
217 // |
211 // |
218 void CAppMngr2ListView::DoActivateL( const TVwsViewId& /*aPrevViewId*/, |
212 void CAppMngr2ListView::DoActivateL( const TVwsViewId& /*aPrevViewId*/, |
219 TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/ ) |
213 TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/ ) |
220 { |
214 { |
221 FLOG( "CAppMngr2ListView::DoActivateL, id 0x%08x", Id().iUid ); |
215 FLOG( "CAppMngr2ListView::DoActivateL, id 0x%08x", Id().iUid ); |
222 |
216 |
223 CAknTitlePane* titlePane = NULL; |
217 CAknTitlePane* titlePane = NULL; |
224 titlePane = static_cast<CAknTitlePane*>( StatusPane()->ControlL( KStatusPaneUid ) ); |
218 titlePane = static_cast<CAknTitlePane*>( StatusPane()->ControlL( KStatusPaneUid ) ); |
225 SetTitleL( *titlePane ); |
219 SetTitleL( *titlePane ); |
226 |
220 |
227 if( iContainer == NULL ) |
221 if( iContainer == NULL ) |
228 { |
222 { |
229 iContainer = CreateContainerL(); |
223 iContainer = CreateContainerL(); |
230 iContainer->SetMopParent( this ); |
224 iContainer->SetMopParent( this ); |
231 AppUi()->AddToViewStackL( *this, iContainer ); |
225 AppUi()->AddToViewStackL( *this, iContainer ); |
232 iContainer->ActivateL(); |
226 iContainer->ActivateL(); |
233 } |
227 } |
234 UpdateMiddleSoftkeyCommandL(); |
228 UpdateMiddleSoftkeyCommandL(); |
235 |
229 |
236 if( iInfoPopup == NULL ) |
230 // Note Infopopup is removed and replaced with wait dialog. |
237 { |
|
238 iInfoPopup = CAknInfoPopupNoteController::NewL(); |
|
239 iInfoPopup->SetTimePopupInView( 0 ); |
|
240 iInfoPopup->HideWhenAppFaded( EFalse ); |
|
241 HBufC* noteText = StringLoader::LoadLC( R_QTN_AM_SCANNING_MEMORY ); |
|
242 iInfoPopup->SetTextL( *noteText ); |
|
243 CleanupStack::PopAndDestroy( noteText ); |
|
244 iInfoPopup->ShowInfoPopupNote(); |
|
245 } |
|
246 } |
231 } |
247 |
232 |
248 // --------------------------------------------------------------------------- |
233 // --------------------------------------------------------------------------- |
249 // CAppMngr2ListView::DoDeactivate() |
234 // CAppMngr2ListView::DoDeactivate() |
250 // --------------------------------------------------------------------------- |
235 // --------------------------------------------------------------------------- |
251 // |
236 // |
252 void CAppMngr2ListView::DoDeactivate() |
237 void CAppMngr2ListView::DoDeactivate() |
253 { |
238 { |
254 FLOG( "CAppMngr2ListView::DoDeactivate, id 0x%08x", Id().iUid ); |
239 FLOG( "CAppMngr2ListView::DoDeactivate, id 0x%08x", Id().iUid ); |
255 |
240 |
256 if( iContainer ) |
241 if( iContainer ) |
257 { |
242 { |
258 AppUi()->RemoveFromViewStack( *this, iContainer ); |
243 AppUi()->RemoveFromViewStack( *this, iContainer ); |
259 delete iContainer; |
244 delete iContainer; |
260 iContainer = NULL; |
245 iContainer = NULL; |
261 } |
246 } |
262 if( iInfoPopup ) |
|
263 { |
|
264 delete iInfoPopup; |
|
265 iInfoPopup = NULL; |
|
266 } |
|
267 } |
247 } |
268 |
248 |
269 // --------------------------------------------------------------------------- |
249 // --------------------------------------------------------------------------- |
270 // CAppMngr2ListView::Model() |
250 // CAppMngr2ListView::Model() |
271 // --------------------------------------------------------------------------- |
251 // --------------------------------------------------------------------------- |