photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwshowmap.cpp
equal
deleted
inserted
replaced
26 #include <glxmedia.h> |
26 #include <glxmedia.h> |
27 #include <glxuiutilities.rsg> |
27 #include <glxuiutilities.rsg> |
28 #include <glxmediageneraldefs.h> |
28 #include <glxmediageneraldefs.h> |
29 #include <glxtracer.h> |
29 #include <glxtracer.h> |
30 #include <mglxmedialist.h> |
30 #include <mglxmedialist.h> |
|
31 #include <glxnavigationalstate.h> |
|
32 #include <mpxcollectionpath.h> |
|
33 #include <glxcollectionpluginimageviewer.hrh> |
31 |
34 |
32 |
35 |
33 // For LocationFW |
36 // For LocationFW |
34 #include <EPos_CPosLandmark.h> |
37 #include <EPos_CPosLandmark.h> |
35 #include <epos_poslandmarkserialization.h> |
38 #include <epos_poslandmarkserialization.h> |
108 { |
111 { |
109 // Check visibility of the menu item |
112 // Check visibility of the menu item |
110 TBool isDisabled = IsItemWithLocationInfoSelected(MediaList()); |
113 TBool isDisabled = IsItemWithLocationInfoSelected(MediaList()); |
111 |
114 |
112 // Should it be disabled |
115 // Should it be disabled |
113 if ((isDisabled) || (MediaList().SelectionCount() > 1)) |
116 if ( (isDisabled) || |
|
117 (MediaList().SelectionCount() != 1 && |
|
118 !IsInFullScreenViewingModeL()) ) |
114 { |
119 { |
115 // if so delete it. |
120 // if so delete it. |
116 aMenuPane->DeleteMenuItem(EGlxCmdAiwShowMap); |
121 aMenuPane->DeleteMenuItem(EGlxCmdAiwShowMap); |
117 } |
122 } |
118 break; |
123 break; |
246 // |
251 // |
247 void CGlxCommandHandlerAiwShowMap::PreDynInitMenuPaneL(TInt aResourceId) |
252 void CGlxCommandHandlerAiwShowMap::PreDynInitMenuPaneL(TInt aResourceId) |
248 { |
253 { |
249 CGlxCommandHandlerAiwBase::PreDynInitMenuPaneL(aResourceId); |
254 CGlxCommandHandlerAiwBase::PreDynInitMenuPaneL(aResourceId); |
250 } |
255 } |
|
256 |
|
257 // ----------------------------------------------------------------------------- |
|
258 // IsInFullScreenViewingModeL |
|
259 // ----------------------------------------------------------------------------- |
|
260 // |
|
261 TBool CGlxCommandHandlerAiwShowMap::IsInFullScreenViewingModeL() |
|
262 { |
|
263 TBool fullscreenViewingMode = EFalse; |
|
264 CGlxNavigationalState* aNavigationalState = CGlxNavigationalState::InstanceL(); |
|
265 CMPXCollectionPath* naviState = aNavigationalState->StateLC(); |
|
266 |
|
267 if ( naviState->Levels() >= 1) |
|
268 { |
|
269 if (aNavigationalState->ViewingMode() == NGlxNavigationalState::EBrowse) |
|
270 { |
|
271 // For image viewer collection, goto view mode |
|
272 if (naviState->Id() == TMPXItemId(KGlxCollectionPluginImageViewerImplementationUid)) |
|
273 { |
|
274 //it means we are in img viewer |
|
275 fullscreenViewingMode = ETrue; |
|
276 } |
|
277 } |
|
278 else |
|
279 { |
|
280 //it means we are in Fullscreen |
|
281 fullscreenViewingMode = ETrue; |
|
282 } |
|
283 } |
|
284 CleanupStack::PopAndDestroy( naviState ); |
|
285 aNavigationalState->Close(); |
|
286 return fullscreenViewingMode; |
|
287 } |