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