34 #include <StringLoader.h> |
32 #include <StringLoader.h> |
35 #include <aknnotewrappers.h> |
33 #include <aknnotewrappers.h> |
36 #include <e32base.h> |
34 #include <e32base.h> |
37 #include <barsread.h> |
35 #include <barsread.h> |
38 #include <bautils.h> |
36 #include <bautils.h> |
39 #include <aknnavilabel.h> |
|
40 #include <data_caging_path_literals.hrh> |
37 #include <data_caging_path_literals.hrh> |
41 #include <textresolver.h> |
38 #include <textresolver.h> |
42 |
39 |
43 #include <mpxlog.h> |
40 #include <mpxlog.h> |
44 #include <mpxcollectionutility.h> |
41 #include <mpxcollectionutility.h> |
216 void CMPXAddTracksDialog::BackupPreviousStatusPaneL() |
211 void CMPXAddTracksDialog::BackupPreviousStatusPaneL() |
217 { |
212 { |
218 MPX_FUNC( "CMPXAddTracksDialog::BackupPreviousStatusPaneL" ); |
213 MPX_FUNC( "CMPXAddTracksDialog::BackupPreviousStatusPaneL" ); |
219 CEikStatusPane* sp = iAvkonAppUi->StatusPane(); |
214 CEikStatusPane* sp = iAvkonAppUi->StatusPane(); |
220 |
215 |
221 // Backup navi pane |
|
222 iNaviPane = static_cast<CAknNavigationControlContainer*> |
|
223 ( sp->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) ); |
|
224 iOrigNaviPane = iNaviPane->Top(); |
|
225 |
|
226 iNaviPane->PushDefaultL(); |
|
227 |
|
228 // Backup title pane |
216 // Backup title pane |
229 iTitlePane = static_cast<CAknTitlePane*> |
217 iTitlePane = static_cast<CAknTitlePane*> |
230 ( sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); |
218 ( sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); |
231 iOrigTitle = iTitlePane->Text()->AllocL(); |
219 iOrigTitle = iTitlePane->Text()->AllocL(); |
232 |
220 |
251 MPX_FUNC( "CMPXAddTracksDialog::RestorePreviousStatusPaneL" ); |
239 MPX_FUNC( "CMPXAddTracksDialog::RestorePreviousStatusPaneL" ); |
252 if ( iOrigTitle ) |
240 if ( iOrigTitle ) |
253 { |
241 { |
254 // Set original title pane |
242 // Set original title pane |
255 iTitlePane->SetTextL( *iOrigTitle ); |
243 iTitlePane->SetTextL( *iOrigTitle ); |
256 } |
|
257 |
|
258 // Set original navi pane |
|
259 iNaviPane->Pop( iNaviLabelPane ); |
|
260 if ( iOrigNaviPane ) |
|
261 { |
|
262 iNaviPane->PushL( *iOrigNaviPane ); |
|
263 } |
|
264 else |
|
265 { |
|
266 iNaviPane->PushDefaultL(); |
|
267 } |
244 } |
268 |
245 |
269 // Restore original context icon |
246 // Restore original context icon |
270 if ( iOrigIcon ) |
247 if ( iOrigIcon ) |
271 { |
248 { |
1094 // ----------------------------------------------------------------------------- |
1071 // ----------------------------------------------------------------------------- |
1095 // CMPXAddTracksDialog::StopAnimL |
1072 // CMPXAddTracksDialog::StopAnimL |
1096 // Stop animation. |
1073 // Stop animation. |
1097 // ----------------------------------------------------------------------------- |
1074 // ----------------------------------------------------------------------------- |
1098 // |
1075 // |
1099 void CMPXAddTracksDialog::StopAnimL() |
1076 void CMPXAddTracksDialog::StopAnimL( TBool aHighlightCurrent ) |
1100 { |
1077 { |
|
1078 MPX_FUNC( "CMPXAddTracksDialog::StopAnimL" ); |
1101 if( ( iPeriodic->IsActive() || |
1079 if( ( iPeriodic->IsActive() || |
1102 iAnimIconIndex == |
1080 iAnimIconIndex == |
1103 CMPXAddTracksLbxArray::EMPXATLbxIconSongAddedAnim4 ) ) |
1081 CMPXAddTracksLbxArray::EMPXATLbxIconSongAddedAnim4 ) ) |
1104 { |
1082 { |
1105 iAnimIconIndex = 0; |
1083 iAnimIconIndex = 0; |
1106 iPeriodic->Cancel(); |
1084 iPeriodic->Cancel(); |
1107 iListModel->SetAnimationIconNum( iSelectIndex, 0 ); |
1085 iListModel->SetAnimationIconNum( iSelectIndex, 0 ); |
1108 TInt bottomIdx = iListBox->BottomItemIndex(); |
1086 |
1109 TInt topIdx = iListBox->TopItemIndex(); |
1087 // highlights the item pointed by iSelectIndex. |
1110 if ( topIdx <= iSelectIndex && iSelectIndex <= bottomIdx ) |
1088 // if Efalse, then iSelectIndex does not match to the tapped item but it is updated later when AddCurrentTractToPlaylistL is called. |
1111 { |
1089 if ( aHighlightCurrent ) |
1112 HighlightListItem( iSelectIndex ); |
1090 { |
1113 } |
1091 TInt bottomIdx = iListBox->BottomItemIndex(); |
1114 // restore origional navi pane text |
1092 TInt topIdx = iListBox->TopItemIndex(); |
1115 iNaviPane->Pop( iNaviLabelPane ); |
1093 if ( topIdx <= iSelectIndex && iSelectIndex <= bottomIdx ) |
1116 iNaviPane->PushDefaultL(); |
1094 { |
|
1095 HighlightListItem( iSelectIndex ); |
|
1096 } |
|
1097 } |
1117 } |
1098 } |
1118 } |
1099 } |
1119 |
1100 |
1120 // --------------------------------------------------------------------------- |
1101 // --------------------------------------------------------------------------- |
1121 // load resources |
1102 // load resources |
1365 if (aError != KErrNotReady && aError != KErrArgument ) |
1346 if (aError != KErrNotReady && aError != KErrArgument ) |
1366 { |
1347 { |
1367 iCommonUiHelper->HandleErrorL( aError ); |
1348 iCommonUiHelper->HandleErrorL( aError ); |
1368 } |
1349 } |
1369 } |
1350 } |
1370 else |
1351 |
1371 { |
|
1372 // Song added text display in navi pane |
|
1373 iNaviPane->PushL( *iNaviDecorator ); |
|
1374 } |
|
1375 CMPXMedia* media = (CMPXMedia*) aArgument; |
1352 CMPXMedia* media = (CMPXMedia*) aArgument; |
1376 delete media; |
1353 delete media; |
1377 MPX_DEBUG1("<--CMPXAddTracksDialog::HandleOperationCompleteL"); |
1354 MPX_DEBUG1("<--CMPXAddTracksDialog::HandleOperationCompleteL"); |
1378 } |
1355 } |
1379 |
1356 |
1435 // Enable speed scrolling |
1412 // Enable speed scrolling |
1436 iLbxExtFeat = CMPXLbxExtendedFeatures::NewL( iListBox, EFalse ); |
1413 iLbxExtFeat = CMPXLbxExtendedFeatures::NewL( iListBox, EFalse ); |
1437 iLbxExtFeat->EnableSpeedScrollL( ETrue ); |
1414 iLbxExtFeat->EnableSpeedScrollL( ETrue ); |
1438 |
1415 |
1439 CEikStatusPane* statusPane = iAvkonAppUi->StatusPane(); |
1416 CEikStatusPane* statusPane = iAvkonAppUi->StatusPane(); |
1440 iNaviPane = static_cast<CAknNavigationControlContainer*> |
|
1441 ( statusPane->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) ); |
|
1442 // read the navigation pane text resource |
|
1443 HBufC* text = StringLoader::LoadLC( R_MPX_CUI_ADDSONGS_SONG_ADDED ); |
|
1444 iNaviDecorator = iNaviPane->CreateNavigationLabelL( *text ); |
|
1445 CleanupStack::PopAndDestroy( text ); |
|
1446 |
1417 |
1447 // Animation icon timer |
1418 // Animation icon timer |
1448 iPeriodic = CPeriodic::NewL( CActive::EPriorityIdle ); |
1419 iPeriodic = CPeriodic::NewL( CActive::EPriorityIdle ); |
1449 |
1420 |
1450 // Set empty text |
1421 // Set empty text |
1735 void CMPXAddTracksDialog::HandleListBoxEventL( |
1706 void CMPXAddTracksDialog::HandleListBoxEventL( |
1736 CEikListBox* /*aListBox*/, |
1707 CEikListBox* /*aListBox*/, |
1737 TListBoxEvent aEventType) |
1708 TListBoxEvent aEventType) |
1738 { |
1709 { |
1739 MPX_FUNC( "CMPXAddTracksDialog::HandleListBoxEventL" ); |
1710 MPX_FUNC( "CMPXAddTracksDialog::HandleListBoxEventL" ); |
1740 StopAnimL(); |
1711 StopAnimL( EFalse ); |
1741 if ( aEventType == EEventEnterKeyPressed || aEventType == EEventItemDoubleClicked |
1712 if ( aEventType == EEventEnterKeyPressed || aEventType == EEventItemDoubleClicked |
1742 #ifdef SINGLE_CLICK_INCLUDED |
1713 #ifdef SINGLE_CLICK_INCLUDED |
1743 || aEventType == EEventItemSingleClicked |
1714 || aEventType == EEventItemSingleClicked |
1744 #endif |
1715 #endif |
1745 ) |
1716 ) |