diff -r 7d9067c6fcb1 -r 9a9c174934f5 photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwshowmap.cpp --- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwshowmap.cpp Mon Jan 18 20:19:20 2010 +0200 +++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwshowmap.cpp Tue Jan 26 11:58:28 2010 +0200 @@ -28,6 +28,9 @@ #include #include #include +#include +#include +#include // For LocationFW @@ -110,7 +113,9 @@ TBool isDisabled = IsItemWithLocationInfoSelected(MediaList()); // Should it be disabled - if ((isDisabled) || (MediaList().SelectionCount() > 1)) + if ( (isDisabled) || + (MediaList().SelectionCount() != 1 && + !IsInFullScreenViewingModeL()) ) { // if so delete it. aMenuPane->DeleteMenuItem(EGlxCmdAiwShowMap); @@ -248,3 +253,35 @@ { CGlxCommandHandlerAiwBase::PreDynInitMenuPaneL(aResourceId); } + +// ----------------------------------------------------------------------------- +// IsInFullScreenViewingModeL +// ----------------------------------------------------------------------------- +// +TBool CGlxCommandHandlerAiwShowMap::IsInFullScreenViewingModeL() + { + TBool fullscreenViewingMode = EFalse; + CGlxNavigationalState* aNavigationalState = CGlxNavigationalState::InstanceL(); + CMPXCollectionPath* naviState = aNavigationalState->StateLC(); + + if ( naviState->Levels() >= 1) + { + if (aNavigationalState->ViewingMode() == NGlxNavigationalState::EBrowse) + { + // For image viewer collection, goto view mode + if (naviState->Id() == TMPXItemId(KGlxCollectionPluginImageViewerImplementationUid)) + { + //it means we are in img viewer + fullscreenViewingMode = ETrue; + } + } + else + { + //it means we are in Fullscreen + fullscreenViewingMode = ETrue; + } + } + CleanupStack::PopAndDestroy( naviState ); + aNavigationalState->Close(); + return fullscreenViewingMode; + }