mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgcontainer.cpp
--- a/mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgcontainer.cpp Tue May 25 12:39:12 2010 +0300
+++ b/mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgcontainer.cpp Wed Jun 09 09:38:28 2010 +0300
@@ -506,7 +506,7 @@
const TKeyEvent& aKeyEvent,
TEventCode aType )
{
- MPX_DEBUG4( "CMPXCollectionViewHgContainer::HandleKeyEventL(iCode=%d, iScanCode=%d, aType=%d)",
+ MPX_DEBUG4( "CMPXCollectionViewHgContainer::OfferKeyEventL(iCode=%d, iScanCode=%d, aType=%d)",
aKeyEvent.iCode, aKeyEvent.iScanCode, aType );
if ( aKeyEvent.iCode == EKeyUpArrow ||
@@ -576,20 +576,37 @@
aKeyEvent.iCode, aKeyEvent.iScanCode, aKeyEvent.iModifiers, aType );
TKeyResponse response( EKeyWasNotConsumed );
- if ( aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter )
+
+ CHgScroller* list = CurrentListWidget();
+ if ( list )
+ {
+ response = list->OfferKeyEventL( aKeyEvent, aType );
+ }
+ if ( response == EKeyWasNotConsumed && iMediaWall )
{
- SaveSelectedAlbumItemL(iAlbumIndex);
+ response = iMediaWall->OfferKeyEventL( aKeyEvent, aType );
+ // Softkeys are hidden when left/right keys are used in mediawall.
+ if ( response == EKeyWasConsumed && iCurrentViewType == EMPXViewMediawall )
+ {
+ if( iCbaHandler )
+ iCbaHandler->ChangeCbaVisibility( EFalse );
+ }
+ }
+
+ // When LSK is pressed, make the softkeys visible.
+ if ( response == EKeyWasNotConsumed && aKeyEvent.iCode == EKeyDevice0 )
+ {
+ if( iCbaHandler )
+ iCbaHandler->ChangeCbaVisibility( ETrue );
+ }
+
+ if ( response == EKeyWasNotConsumed &&
+ (aKeyEvent.iCode == EKeyOK ||
+ aKeyEvent.iCode == EKeyEnter ) )
+ {
// Handle enter key pressed
iView->ProcessCommandL( EMPXCmdCommonEnterKey );
}
- if ( iListWidget )
- {
- iListWidget->OfferKeyEventL( aKeyEvent, aType );
- }
- else if( iMediaWall )
- {
- iMediaWall->OfferKeyEventL( aKeyEvent, aType );
- }
if ( response == EKeyWasNotConsumed &&
aType == EEventKey &&
aKeyEvent.iCode == EKeyBackspace && iView )
@@ -2663,11 +2680,6 @@
//
void CMPXCollectionViewHgContainer::RefreshL(TInt aDisplayIndex)
{
- if( !iIsForeground )
- {
- return;
- }
-
MPX_FUNC( "CMPXCollectionViewHgContainer::Refresh" );
TInt mediaCount = iListBoxArray->MediaArray().Count();
@@ -5158,9 +5170,8 @@
CleanupStack::PushL( dialog );
- listBox->ConstructL( dialog,
- EAknListBoxSelectionList | EAknListBoxScrollBarSizeExcluded );
-
+ listBox->ConstructL( dialog, EAknListBoxViewerFlags );
+
// title can be hardcoded because it is not shown to user. Just for the calculations.
dialog->SetTitleL(_L("Foo"));
iPopupListRect = dialog->LayoutRect();