44 #include <glxicons.mbg> |
44 #include <glxicons.mbg> |
45 #include <glxsetappstate.h> // set PCFW app state |
45 #include <glxsetappstate.h> // set PCFW app state |
46 #include <glxsettingsmodel.h> |
46 #include <glxsettingsmodel.h> |
47 #include <glxupnprenderer.h> // get UPnP state |
47 #include <glxupnprenderer.h> // get UPnP state |
48 #include <glxgeneraluiutilities.h> |
48 #include <glxgeneraluiutilities.h> |
|
49 #include <glxthumbnailattributeinfo.h> |
|
50 |
49 namespace |
51 namespace |
50 { |
52 { |
51 const TInt KShwDefaultBufferSize = 128; |
53 const TInt KShwDefaultBufferSize = 128; |
52 } |
54 } |
53 |
55 |
551 TRACER("CGlxCommandHandlerSlideshow::PopulateToolbarL"); |
553 TRACER("CGlxCommandHandlerSlideshow::PopulateToolbarL"); |
552 iUiUtility->ScreenFurniture()->SetTooltipL(EGlxCmdSlideshowPlay, |
554 iUiUtility->ScreenFurniture()->SetTooltipL(EGlxCmdSlideshowPlay, |
553 CAknButton::EPositionLeft); |
555 CAknButton::EPositionLeft); |
554 } |
556 } |
555 |
557 |
|
558 // ----------------------------------------------------------------------------- |
|
559 // DynInitMenuPaneL |
|
560 // ----------------------------------------------------------------------------- |
|
561 // |
|
562 void CGlxCommandHandlerSlideshow::DynInitMenuPaneL(TInt /*aResourceId*/, |
|
563 CEikMenuPane* aMenuPane, TBool aIsBrowseMode) |
|
564 { |
|
565 TRACER("CGlxCommandHandlerSlideshow::DynInitMenuPaneL"); |
|
566 MGlxMediaList& mediaList = MediaList(); |
|
567 if (aMenuPane) |
|
568 { |
|
569 TInt pos = 0; |
|
570 if (mediaList.Count()) |
|
571 { |
|
572 TInt focusIndex = mediaList.FocusIndex(); |
|
573 if (!aIsBrowseMode && focusIndex > KErrNotFound && focusIndex |
|
574 < mediaList.Count()) |
|
575 { |
|
576 if (aMenuPane->MenuItemExists(EGlxCmdSlideshowPlay, pos)) |
|
577 { |
|
578 const TGlxMedia& media = mediaList.Item(focusIndex); |
|
579 if (EMPXVideo == media.Category()) |
|
580 { |
|
581 aMenuPane->SetItemDimmed(EGlxCmdSlideshowPlay, ETrue); |
|
582 } |
|
583 else |
|
584 { |
|
585 CEikMenuPaneItem::SData& item = |
|
586 aMenuPane->ItemDataByIndexL(pos); |
|
587 if (item.iFlags & EEikMenuItemSpecific) |
|
588 { |
|
589 TSize tnSize = iUiUtility->GetGridIconSize(); |
|
590 TMPXAttribute thumbnailAttribute( |
|
591 KGlxMediaIdThumbnail, |
|
592 GlxFullThumbnailAttributeId(ETrue, |
|
593 tnSize.iWidth, tnSize.iHeight)); |
|
594 |
|
595 const CGlxThumbnailAttribute* value = |
|
596 media.ThumbnailAttribute( |
|
597 thumbnailAttribute); |
|
598 |
|
599 // No thumbnail available, hence there might be |
|
600 // no vaild items to play slideshow |
|
601 if (!value) |
|
602 { |
|
603 aMenuPane->SetItemDimmed( |
|
604 EGlxCmdSlideshowPlay, ETrue); |
|
605 } |
|
606 } |
|
607 } |
|
608 } |
|
609 } |
|
610 |
|
611 if (aIsBrowseMode) |
|
612 { |
|
613 if (aMenuPane->MenuItemExists(EGlxCmdSlideshow, pos) |
|
614 && mediaList.SelectionCount()) |
|
615 { |
|
616 aMenuPane->SetItemDimmed(EGlxCmdSlideshow, ETrue); |
|
617 } |
|
618 |
|
619 if (aMenuPane->MenuItemExists(EGlxCmdSlideshowPlay, pos) |
|
620 && mediaList.SelectionCount() == 0) |
|
621 { |
|
622 CEikMenuPaneItem::SData& item = |
|
623 aMenuPane->ItemDataByIndexL(pos); |
|
624 if (item.iFlags & EEikMenuItemSpecific |
|
625 && EMPXVideo == mediaList.Item( |
|
626 mediaList.FocusIndex()).Category()) |
|
627 { |
|
628 aMenuPane->SetItemDimmed(EGlxCmdSlideshowPlay, ETrue); |
|
629 } |
|
630 } |
|
631 } |
|
632 } |
|
633 else |
|
634 { |
|
635 if (aMenuPane->MenuItemExists(EGlxCmdSlideshowPlay, pos)) |
|
636 { |
|
637 aMenuPane->SetItemDimmed(EGlxCmdSlideshowPlay, ETrue); |
|
638 } |
|
639 |
|
640 if (aMenuPane->MenuItemExists(EGlxCmdSlideshow, pos)) |
|
641 { |
|
642 aMenuPane->SetItemDimmed(EGlxCmdSlideshow, ETrue); |
|
643 } |
|
644 } |
|
645 } |
|
646 } |
|
647 |
|
648 |
556 // End of File |
649 // End of File |