241 |
237 |
242 iMediaList->AddContextL(iTitleAttributeContext, KMaxTInt); |
238 iMediaList->AddContextL(iTitleAttributeContext, KMaxTInt); |
243 iMediaList->AddContextL(iSubtitleAttributeContext, KGlxFetchContextPriorityNormal); |
239 iMediaList->AddContextL(iSubtitleAttributeContext, KGlxFetchContextPriorityNormal); |
244 if (iMediaList->IdSpaceId(0) != KGlxIdSpaceIdRoot) |
240 if (iMediaList->IdSpaceId(0) != KGlxIdSpaceIdRoot) |
245 { |
241 { |
246 iOtherAttribsContext = new (ELeave) CGlxAttributeContext( |
242 iNonVisibleThumbnailIterator.SetRangeOffsets(KListDataWindowSize, |
247 &iThumbnailIterator); |
243 KListNonVisibleDataWindowSize); |
248 iOtherAttribsContext->AddAttributeL(KMPXMediaGeneralCount); |
|
249 |
|
250 iNonVisibleThumbnailIterator.SetRangeOffsets(0, KListNonVisibleDataWindowSize); |
|
251 iNonVisibleSubtitleAttributeContext |
244 iNonVisibleSubtitleAttributeContext |
252 = new (ELeave) CGlxAttributeContext( |
245 = new (ELeave) CGlxAttributeContext( |
253 &iNonVisibleThumbnailIterator); |
246 &iNonVisibleThumbnailIterator); |
254 iNonVisibleSubtitleAttributeContext->AddAttributeL( |
247 iNonVisibleSubtitleAttributeContext->AddAttributeL( |
255 KGlxMediaCollectionPluginSpecificSubTitle); |
248 KGlxMediaCollectionPluginSpecificSubTitle); |
256 iMediaList->AddContextL(iNonVisibleSubtitleAttributeContext, |
249 iMediaList->AddContextL(iNonVisibleSubtitleAttributeContext, |
257 KGlxFetchContextPriorityLow); |
250 KGlxFetchContextPriorityLow); |
258 iNonVisibleOtherAttribsContext = new (ELeave) CGlxAttributeContext( |
|
259 &iNonVisibleThumbnailIterator); |
|
260 iNonVisibleOtherAttribsContext->AddAttributeL(KMPXMediaGeneralCount); |
|
261 |
251 |
262 CMPXCollectionPath* path = iMediaList->PathLC( |
252 CMPXCollectionPath* path = iMediaList->PathLC( |
263 NGlxListDefs::EPathParent); |
253 NGlxListDefs::EPathParent); |
264 if (path->Id(0) == KGlxCollectionPluginAlbumsImplementationUid) |
254 if (path->Id(0) == KGlxCollectionPluginAlbumsImplementationUid) |
265 { |
255 { |
|
256 iOtherAttribsContext = new (ELeave) CGlxAttributeContext( |
|
257 &iThumbnailIterator); |
266 iOtherAttribsContext->AddAttributeL(KGlxMediaGeneralSystemItem); |
258 iOtherAttribsContext->AddAttributeL(KGlxMediaGeneralSystemItem); |
267 iOtherAttribsContext->AddAttributeL( |
259 iOtherAttribsContext->AddAttributeL( |
268 KGlxMediaGeneralSlideshowableContent); |
260 KGlxMediaGeneralSlideshowableContent); |
269 |
261 iMediaList->AddContextL(iOtherAttribsContext, |
|
262 KGlxFetchContextPriorityNormal); |
|
263 |
|
264 iNonVisibleOtherAttribsContext = new (ELeave) CGlxAttributeContext( |
|
265 &iNonVisibleThumbnailIterator); |
270 iNonVisibleOtherAttribsContext->AddAttributeL( |
266 iNonVisibleOtherAttribsContext->AddAttributeL( |
271 KGlxMediaGeneralSystemItem); |
267 KGlxMediaGeneralSystemItem); |
272 iNonVisibleOtherAttribsContext->AddAttributeL( |
268 iNonVisibleOtherAttribsContext->AddAttributeL( |
273 KGlxMediaGeneralSlideshowableContent); |
269 KGlxMediaGeneralSlideshowableContent); |
|
270 iMediaList->AddContextL(iNonVisibleOtherAttribsContext, |
|
271 KGlxFetchContextPriorityLow); |
274 } |
272 } |
275 CleanupStack::PopAndDestroy(path); |
273 CleanupStack::PopAndDestroy(path); |
276 |
274 |
277 iMediaList->AddContextL(iOtherAttribsContext, |
|
278 KGlxFetchContextPriorityNormal); |
|
279 iThumbnailContext = new (ELeave) CGlxAttributeContext( |
275 iThumbnailContext = new (ELeave) CGlxAttributeContext( |
280 &iThumbnailIterator); |
276 &iThumbnailIterator); |
281 TMPXAttribute tnAttr(KGlxMediaIdThumbnail, |
277 TMPXAttribute tnAttr(KGlxMediaIdThumbnail, |
282 GlxFullThumbnailAttributeId(ETrue, iGridIconSize.iWidth, |
278 GlxFullThumbnailAttributeId(ETrue, iGridIconSize.iWidth, |
283 iGridIconSize.iHeight)); |
279 iGridIconSize.iHeight)); |
285 iGridIconSize.iHeight); |
281 iGridIconSize.iHeight); |
286 iThumbnailContext->AddAttributeL(tnAttr); |
282 iThumbnailContext->AddAttributeL(tnAttr); |
287 iMediaList->AddContextL(iThumbnailContext, |
283 iMediaList->AddContextL(iThumbnailContext, |
288 KGlxFetchContextPriorityNormal); |
284 KGlxFetchContextPriorityNormal); |
289 |
285 |
290 iMediaList->AddContextL(iNonVisibleOtherAttribsContext, |
|
291 KGlxFetchContextPriorityLow); |
|
292 iNonVisibleThumbnailContext = new (ELeave) CGlxAttributeContext( |
286 iNonVisibleThumbnailContext = new (ELeave) CGlxAttributeContext( |
293 &iNonVisibleThumbnailIterator); |
287 &iNonVisibleThumbnailIterator); |
294 iNonVisibleThumbnailContext->SetDefaultSpec(iGridIconSize.iWidth, |
288 iNonVisibleThumbnailContext->SetDefaultSpec(iGridIconSize.iWidth, |
295 iGridIconSize.iHeight); |
289 iGridIconSize.iHeight); |
296 iNonVisibleThumbnailContext->AddAttributeL(tnAttr); |
290 iNonVisibleThumbnailContext->AddAttributeL(tnAttr); |
308 GLX_LOG_INFO1("CGlxListViewImp::DoMLViewActivateL() - " |
302 GLX_LOG_INFO1("CGlxListViewImp::DoMLViewActivateL() - " |
309 "iBackwardNavigation(%d)", iBackwardNavigation); |
303 "iBackwardNavigation(%d)", iBackwardNavigation); |
310 |
304 |
311 iPreviewTNBinding = CGlxPreviewThumbnailBinding::NewL(*this); |
305 iPreviewTNBinding = CGlxPreviewThumbnailBinding::NewL(*this); |
312 CreateListL(); |
306 CreateListL(); |
313 if (iMediaList->IdSpaceId(0) == KGlxIdSpaceIdRoot && iPreviewTNBinding |
|
314 && iBackwardNavigation && iMediaList->FocusIndex() == 0) |
|
315 { |
|
316 GLX_LOG_INFO("CGlxListViewImp::DoMLViewActivateL() - HandleItemChangedL()"); |
|
317 iPopulateListTNs = ETrue; |
|
318 CMPXCollectionPath* path = iMediaList->PathLC( |
|
319 NGlxListDefs::EPathFocusOrSelection); |
|
320 iPreviewTNBinding->HandleItemChangedL(*path, iPopulateListTNs, |
|
321 iIsRefreshNeeded, iBackwardNavigation); |
|
322 CleanupStack::PopAndDestroy(path); |
|
323 } |
|
324 iProgressIndicator = CGlxProgressIndicator::NewL(*this); |
307 iProgressIndicator = CGlxProgressIndicator::NewL(*this); |
325 iProgressIndicator->ShowProgressbarL(); |
|
326 iMMCNotifier = CGlxMMCNotifier::NewL(*this); |
308 iMMCNotifier = CGlxMMCNotifier::NewL(*this); |
327 } |
309 } |
328 |
310 |
329 // --------------------------------------------------------------------------- |
311 // --------------------------------------------------------------------------- |
330 // From CAknView |
312 // From CAknView |
545 for (TInt i=aRequestStart; i<= aRequestEnd; i++) |
527 for (TInt i=aRequestStart; i<= aRequestEnd; i++) |
546 { |
528 { |
547 const TGlxMedia& item = iMediaList->Item(i); |
529 const TGlxMedia& item = iMediaList->Item(i); |
548 iList->ItemL(i).SetTitleL(item.Title()); |
530 iList->ItemL(i).SetTitleL(item.Title()); |
549 iList->ItemL(i).SetTextL(item.SubTitle()); |
531 iList->ItemL(i).SetTextL(item.SubTitle()); |
550 UpdatePreviewL(i); |
532 if(iMediaList->IdSpaceId(0) != KGlxIdSpaceIdRoot) |
551 } |
533 { |
552 |
534 UpdatePreviewL(i); |
553 if(iMediaList->IdSpaceId(0) == KGlxIdSpaceIdRoot) |
535 } |
554 { |
536 } |
555 if ( visIndex != iLastFocusedIndex && !iPopulateListTNs) |
537 |
556 { |
538 if (iMediaList->IdSpaceId(0) == KGlxIdSpaceIdRoot && iBackwardNavigation) |
557 GLX_LOG_INFO1("CGlxListViewImp::RequestL - SetFocusL()" |
539 { |
558 " iPopulateListTNs(%d)", iPopulateListTNs); |
540 iMediaList->SetFocusL(NGlxListDefs::EAbsolute, 0); |
559 GLX_LOG_INFO1("CGlxListViewImp::RequestL - SetFocusL()" |
541 CMPXCollectionPath* path = iMediaList->PathLC( |
560 " visIndex(%d)", visIndex); |
542 NGlxListDefs::EPathFocusOrSelection); |
561 iPopulateListTNs = ETrue; |
543 GLX_LOG_INFO("CGlxListViewImp::RequestL() - HandleItemChangedL()"); |
562 iStartIndex = KErrNotFound; |
544 iPreviewTNBinding->HandleItemChangedL(*path, iIsRefreshNeeded, |
563 iMediaList->SetFocusL(NGlxListDefs::EAbsolute, visIndex); |
545 iBackwardNavigation); |
564 } |
546 CleanupStack::PopAndDestroy(path); |
565 } |
547 } |
566 else |
548 else |
567 { |
549 { |
568 iMediaList->SetFocusL(NGlxListDefs::EAbsolute, visIndex); |
550 iMediaList->SetFocusL(NGlxListDefs::EAbsolute, visIndex); |
569 } |
551 } |
570 } |
552 } |
571 |
553 |
572 |
|
573 void CGlxListViewImp::Release(TInt /*aBufferStart*/, TInt /*aBufferEnd*/) |
554 void CGlxListViewImp::Release(TInt /*aBufferStart*/, TInt /*aBufferEnd*/) |
574 { |
555 { |
575 TRACER("CGlxListViewImp::Release"); |
556 TRACER("CGlxListViewImp::Release"); |
576 } |
557 } |
577 |
558 |
578 void CGlxListViewImp::HandleSelectL( TInt aIndex ) |
559 void CGlxListViewImp::HandleSelectL(TInt aIndex) |
579 { |
560 { |
580 TRACER("CGlxListViewImp::HandleSelectL"); |
561 TRACER("CGlxListViewImp::HandleSelectL"); |
581 if(0 <= aIndex && aIndex < iMediaList->Count()) |
562 if (0 <= aIndex && aIndex < iMediaList->Count()) |
582 { |
563 { |
583 iPopulateListTNs = EFalse; |
564 iMediaList->SetFocusL(NGlxListDefs::EAbsolute, aIndex); |
584 iMediaList->SetFocusL(NGlxListDefs::EAbsolute, aIndex); |
565 } |
585 } |
|
586 } |
566 } |
587 |
567 |
588 void CGlxListViewImp::HandleOpenL( TInt aIndex ) |
568 void CGlxListViewImp::HandleOpenL( TInt aIndex ) |
589 { |
569 { |
590 TRACER("CGlxListViewImp::HandleOpenL"); |
570 TRACER("CGlxListViewImp::HandleOpenL"); |
591 |
571 |
592 #ifndef __WINSCW__ |
|
593 GLX_LOG_INFO1("CGlxListViewImp RProperty::Get leftVariable %d",(iUiUtility->GetItemsLeftCount())); |
572 GLX_LOG_INFO1("CGlxListViewImp RProperty::Get leftVariable %d",(iUiUtility->GetItemsLeftCount())); |
594 |
573 |
595 if (iUiUtility->GetItemsLeftCount()) |
574 if (iUiUtility->GetItemsLeftCount()) |
596 { |
575 { |
597 if(!iProgressIndicator) |
576 if(!iProgressIndicator) |
644 void CGlxListViewImp::PreviewTNReadyL(CFbsBitmap* aBitmap, CFbsBitmap* |
623 void CGlxListViewImp::PreviewTNReadyL(CFbsBitmap* aBitmap, CFbsBitmap* |
645 /*aMask*/) |
624 /*aMask*/) |
646 { |
625 { |
647 TRACER("CGlxListViewImp::PreviewTNReadyL"); |
626 TRACER("CGlxListViewImp::PreviewTNReadyL"); |
648 |
627 |
649 if (!iPopulateListTNs) |
628 iPreviewTNBinding->StopTimer(); |
|
629 |
|
630 if (iMediaList->FocusIndex() != EGlxListItemAll || iMediaList->IdSpaceId( |
|
631 0) != KGlxIdSpaceIdRoot) |
650 { |
632 { |
651 GLX_LOG_INFO("CGlxListViewImp::PreviewTNReadyL()- Ignore!"); |
633 GLX_LOG_INFO("CGlxListViewImp::PreviewTNReadyL()- Ignore!"); |
652 return; |
634 return; |
653 } |
635 } |
654 iPreviewTNBinding->StopTimer(); |
636 |
655 |
|
656 TInt focusIndex = iMediaList->FocusIndex(); |
|
657 TInt mediaCount = iMediaList->Count(); |
|
658 GLX_LOG_INFO1("CGlxListViewImp::PreviewTNReadyL() focusIndex(%d)", |
|
659 focusIndex); |
|
660 |
|
661 TGlxIdSpaceId id = iMediaList->IdSpaceId(0); |
|
662 if (aBitmap) |
637 if (aBitmap) |
663 { |
638 { |
664 iList->ItemL(focusIndex).SetIcon(CGulIcon::NewL(aBitmap)); |
639 iList->ItemL(EGlxListItemAll).SetIcon(CGulIcon::NewL(aBitmap)); |
665 if (id == KGlxIdSpaceIdRoot && focusIndex == EGlxListItemAll) |
|
666 { |
|
667 CFbsBitmap* bitmap = new (ELeave) CFbsBitmap; |
|
668 bitmap->Duplicate(aBitmap->Handle()); |
|
669 iList->ItemL(EGlxListItemMonth).SetIcon(CGulIcon::NewL(bitmap)); |
|
670 } |
|
671 else if (iBackwardNavigation && id == KGlxIdSpaceIdRoot && focusIndex |
|
672 == EGlxListItemMonth) |
|
673 { |
|
674 CFbsBitmap* bitmap = new (ELeave) CFbsBitmap; |
|
675 bitmap->Duplicate(aBitmap->Handle()); |
|
676 iList->ItemL(EGlxListItemAll).SetIcon(CGulIcon::NewL(bitmap)); |
|
677 } |
|
678 } |
640 } |
679 else |
641 else |
680 { |
642 { |
681 // In main list view, default thumbnails will be set according |
643 // In main list view, default thumbnails will be set according |
682 // to the list items. |
644 // to the list items. |
683 //Displays default thumbnail if aBitmap is NULL |
645 //Displays default thumbnail if aBitmap is NULL |
684 SetDefaultThumbnailL(focusIndex); |
646 SetDefaultThumbnailL(EGlxListItemAll); |
685 if(id == KGlxIdSpaceIdRoot && focusIndex == EGlxListItemAll) |
647 } |
686 { |
648 |
687 SetDefaultThumbnailL(EGlxListItemMonth); |
649 iList->RefreshScreen(EGlxListItemAll); |
688 } |
|
689 } |
|
690 |
|
691 GLX_DEBUG2("CGlxListViewImp::PreviewTNReadyL()" |
|
692 " RefreshList(%d)", focusIndex); |
|
693 RefreshList(focusIndex); |
|
694 |
|
695 if (iPopulateListTNs) |
|
696 { |
|
697 if(iStartIndex == KErrNotFound) |
|
698 { |
|
699 iStartIndex = focusIndex; |
|
700 } |
|
701 |
|
702 TInt count = iMediaList->Count(); |
|
703 if(count) |
|
704 { |
|
705 TInt focus = (focusIndex + 1) % count; |
|
706 if (!iBackwardNavigation && id == KGlxIdSpaceIdRoot && focus |
|
707 == EGlxListItemMonth) |
|
708 { |
|
709 focus += 1; |
|
710 } |
|
711 if (focus != iStartIndex) |
|
712 { |
|
713 iMediaList->SetFocusL(NGlxListDefs::EAbsolute, focus); |
|
714 } |
|
715 else |
|
716 { |
|
717 iPopulateListTNs = EFalse; |
|
718 iIsRefreshNeeded = EFalse; |
|
719 |
|
720 // iStartIndex holds the focus index of the item. |
|
721 // If the focus is not on 0th index and if USB is Connected/Disconnected |
|
722 // or some files are deleted from file manager, |
|
723 // Once the updation of all items is done, the focus should be set to |
|
724 // previous focus index(not to 0th index). |
|
725 |
|
726 iMediaList->SetFocusL(NGlxListDefs::EAbsolute, |
|
727 iStartIndex); |
|
728 iList->SetSelectedIndex(iStartIndex); |
|
729 iList->RefreshScreen(iStartIndex); |
|
730 |
|
731 iStartIndex = KErrNotFound; |
|
732 |
|
733 /* The medialist doesn't give the callback for focuschanged if the count is one. |
|
734 * So we have to explicitly start the timer of 2 seconds after populating the list |
|
735 * TN's ie., after gettting the first thumbnail. |
|
736 * The callback is not given because the setfocus index is same as the focused index |
|
737 * in medialist. |
|
738 */ |
|
739 if(count==1 ) |
|
740 { |
|
741 if(id == KGlxIdSpaceIdRoot ) |
|
742 { |
|
743 CMPXCollectionPath* path = iMediaList->PathLC( |
|
744 NGlxListDefs::EPathFocusOrSelection ); |
|
745 GLX_LOG_INFO("CGlxListViewImp::PreviewTNReadyL() - HandleItemChangedL()"); |
|
746 iPreviewTNBinding->HandleItemChangedL(*path, |
|
747 iPopulateListTNs, iIsRefreshNeeded, iBackwardNavigation); |
|
748 CleanupStack::PopAndDestroy( path ); |
|
749 } |
|
750 } |
|
751 } |
|
752 } |
|
753 } |
|
754 } |
650 } |
755 |
651 |
756 // ---------------------------------------------------------------------------- |
652 // ---------------------------------------------------------------------------- |
757 // CreateListL |
653 // CreateListL |
758 // ---------------------------------------------------------------------------- |
654 // ---------------------------------------------------------------------------- |
759 // |
655 // |
760 void CGlxListViewImp::CreateListL() |
656 void CGlxListViewImp::CreateListL() |
761 { |
657 { |
762 TRACER("CGlxListViewImp::CreateListL"); |
658 TRACER("CGlxListViewImp::CreateListL"); |
763 |
659 |
764 iStartIndex = KErrNotFound; |
|
765 TInt mediaCount = iMediaList->Count(); |
660 TInt mediaCount = iMediaList->Count(); |
766 GLX_DEBUG2("CGlxListViewImp::CreateListL() mediaCount=%d", mediaCount); |
661 GLX_DEBUG2("CGlxListViewImp::CreateListL() mediaCount=%d", mediaCount); |
767 |
662 |
768 if (!iList) |
663 if (!iList) |
769 { |
664 { |
962 iList->RefreshScreen(aItemIndex); |
851 iList->RefreshScreen(aItemIndex); |
963 } |
852 } |
964 |
853 |
965 // If there is some modified in grid/fullscreen view, |
854 // If there is some modified in grid/fullscreen view, |
966 // HandleAttributesAvailableL will get called. Here we are setting |
855 // HandleAttributesAvailableL will get called. Here we are setting |
967 // iIsRefreshNeeded flag to ETrue |
856 // iIsRefreshNeeded flag to ETrue to cleanup once! |
968 if (!iIsRefreshNeeded && iBackwardNavigation) |
857 if (!iIsRefreshNeeded && iBackwardNavigation) |
969 { |
858 { |
970 iIsRefreshNeeded = ETrue; |
859 if (iMediaList->IdSpaceId(0) != KGlxIdSpaceIdRoot) |
971 if(iMediaList->IdSpaceId(0) != KGlxIdSpaceIdRoot) |
860 { |
972 { |
861 iIsRefreshNeeded = ETrue; |
973 CleanUpL(); |
862 CleanUpL(); |
974 } |
863 } |
975 } |
864 } |
976 // Set iPopulateListTNs to ETrue and refresh all the items in |
865 // Refresh thumbnail, if subtitle is updated for the All collection |
977 // list view if subtitle is updated |
866 if (iMediaList->IdSpaceId(0) == KGlxIdSpaceIdRoot && |
978 else if (iPreviewTNBinding && ((!iPopulateListTNs && aItemIndex |
867 iPreviewTNBinding && aItemIndex == 0) |
979 == aList->Count() - 1) || (iIsRefreshNeeded))) |
868 { |
980 { |
869 if (iBackwardNavigation) |
981 iPopulateListTNs = ETrue; |
870 { |
982 iStartIndex = KErrNotFound; |
871 iIsRefreshNeeded = ETrue; |
|
872 } |
|
873 iMediaList->SetFocusL(NGlxListDefs::EAbsolute, 0); |
983 CMPXCollectionPath* path = iMediaList->PathLC( |
874 CMPXCollectionPath* path = iMediaList->PathLC( |
984 NGlxListDefs::EPathFocusOrSelection); |
875 NGlxListDefs::EPathFocusOrSelection); |
985 GLX_LOG_INFO("CGlxListViewImp::HandleAttributesAvailableL() - HandleItemChangedL()"); |
876 GLX_LOG_INFO("CGlxListViewImp::HandleAttributesAvailableL() - HandleItemChangedL()"); |
986 iPreviewTNBinding->HandleItemChangedL(*path, iPopulateListTNs, |
877 iPreviewTNBinding->HandleItemChangedL(*path, iIsRefreshNeeded, |
987 iIsRefreshNeeded, iBackwardNavigation); |
878 iBackwardNavigation); |
988 CleanupStack::PopAndDestroy(path); |
879 CleanupStack::PopAndDestroy(path); |
989 } |
880 } |
990 } |
881 } |
991 |
882 |
992 if (iMediaList->IdSpaceId(0) != KGlxIdSpaceIdRoot) |
883 if (iMediaList->IdSpaceId(0) != KGlxIdSpaceIdRoot) |
993 { |
884 { |
994 TMPXAttribute countAttrib(KMPXMediaGeneralCount); |
885 TMPXAttribute countAttrib(KMPXMediaGeneralCount); |
995 TMPXAttribute thumbnailAttribute(KGlxMediaIdThumbnail, |
886 TMPXAttribute thumbnailAttribute(KGlxMediaIdThumbnail, |
996 GlxFullThumbnailAttributeId(ETrue, iGridIconSize.iWidth, |
887 GlxFullThumbnailAttributeId(ETrue, iGridIconSize.iWidth, |
997 iGridIconSize.iHeight)); |
888 iGridIconSize.iHeight)); |
998 if ((KErrNotFound != aAttributes.Find(thumbnailAttribute, match)) |
889 if (iIsRefreshNeeded && KErrNotFound != aAttributes.Find( |
999 || (KErrNotFound != aAttributes.Find(countAttrib, match))) |
890 thumbnailAttribute, match)) |
1000 { |
891 { |
1001 iIsRefreshNeeded = EFalse; |
892 iIsRefreshNeeded = EFalse; |
1002 UpdatePreviewL(aItemIndex); |
893 } |
1003 } |
894 |
1004 } |
895 if ((KErrNotFound != aAttributes.Find(thumbnailAttribute, match)) |
|
896 || (KErrNotFound != aAttributes.Find(countAttrib, match))) |
|
897 { |
|
898 UpdatePreviewL(aItemIndex); |
|
899 } |
|
900 } |
1005 } |
901 } |
1006 |
902 |
1007 // ---------------------------------------------------------------------------- |
903 // ---------------------------------------------------------------------------- |
1008 // HandleFocusChangedL |
904 // HandleFocusChangedL |
1009 // ---------------------------------------------------------------------------- |
905 // ---------------------------------------------------------------------------- |
1010 // |
906 // |
1011 void CGlxListViewImp::HandleFocusChangedL( NGlxListDefs:: |
907 void CGlxListViewImp::HandleFocusChangedL( NGlxListDefs:: |
1012 TFocusChangeType /*aType*/, TInt /*aNewIndex*/, TInt /*aOldIndex*/, |
908 TFocusChangeType /*aType*/, TInt /*aNewIndex*/, TInt /*aOldIndex*/, |
1013 MGlxMediaList* /*aList*/ ) |
909 MGlxMediaList* /*aList*/ ) |
1014 { |
910 { |
1015 TRACER( "CGlxListViewImp::HandleFocusChangedL"); |
|
1016 if (iPreviewTNBinding && iPopulateListTNs) |
|
1017 { |
|
1018 if(iMediaList->IdSpaceId(0) == KGlxIdSpaceIdRoot) |
|
1019 { |
|
1020 CMPXCollectionPath* path = iMediaList->PathLC( |
|
1021 NGlxListDefs::EPathFocusOrSelection); |
|
1022 if (!iBackwardNavigation && path->Levels() == KGlxCollectionRootLevel |
|
1023 && path->Id(0) == KGlxCollectionPluginMonthsImplementationUid) |
|
1024 { |
|
1025 CleanupStack::PopAndDestroy(path); |
|
1026 return; |
|
1027 } |
|
1028 GLX_LOG_INFO("CGlxListViewImp::HandleFocusChangedL() - HandleItemChangedL()"); |
|
1029 iPreviewTNBinding->HandleItemChangedL(*path, iPopulateListTNs, |
|
1030 iIsRefreshNeeded, iBackwardNavigation); |
|
1031 CleanupStack::PopAndDestroy(path); |
|
1032 } |
|
1033 } |
|
1034 } |
911 } |
1035 |
912 |
1036 // ---------------------------------------------------------------------------- |
913 // ---------------------------------------------------------------------------- |
1037 // HandleItemSelected |
914 // HandleItemSelected |
1038 // ---------------------------------------------------------------------------- |
915 // ---------------------------------------------------------------------------- |