photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerdetails.cpp
equal
deleted
inserted
replaced
206 uriPtr.Append( isVideo ); |
206 uriPtr.Append( isVideo ); |
207 |
207 |
208 GLX_DEBUG2("GLX_Property::DoExecuteL::URI:%S:",&uri); |
208 GLX_DEBUG2("GLX_Property::DoExecuteL::URI:%S:",&uri); |
209 |
209 |
210 iUiUtility->SetViewNavigationDirection(EGlxNavigationForwards); |
210 iUiUtility->SetViewNavigationDirection(EGlxNavigationForwards); |
211 if (aList.Collection().UidL().iUid == KGlxCollectionPluginImageViewerImplementationUid) |
211 if (aList.Collection().UidL().iUid == |
|
212 KGlxCollectionPluginImageViewerImplementationUid) |
212 { |
213 { |
213 CGlxImgVwrMetadataDialog* dialog = CGlxImgVwrMetadataDialog::NewL( uri); |
214 CGlxImgVwrMetadataDialog* dialog = CGlxImgVwrMetadataDialog::NewL( uri); |
214 dialog->ExecuteLD(); |
215 dialog->ExecuteLD(); |
215 } |
216 } |
216 else |
217 else |
280 // ----------------------------------------------------------------------------- |
281 // ----------------------------------------------------------------------------- |
281 // |
282 // |
282 TBool CGlxCommandHandlerDetails::DoIsDisabled(TInt aCommandId, |
283 TBool CGlxCommandHandlerDetails::DoIsDisabled(TInt aCommandId, |
283 MGlxMediaList& aList) const |
284 MGlxMediaList& aList) const |
284 { |
285 { |
|
286 TRACER("CGlxCommandHandlerDetails:DoIsDisabled"); |
285 TBool fullscreenViewingMode = EFalse; |
287 TBool fullscreenViewingMode = EFalse; |
286 CGlxNavigationalState* aNavigationalState = CGlxNavigationalState::InstanceL(); |
288 CGlxNavigationalState* aNavigationalState = CGlxNavigationalState::InstanceL(); |
287 CMPXCollectionPath* naviState = aNavigationalState->StateLC(); |
289 CMPXCollectionPath* naviState = aNavigationalState->StateLC(); |
288 |
290 |
289 if ( naviState->Levels() >= 1) |
291 if ( naviState->Levels() >= 1) |
309 } |
311 } |
310 } |
312 } |
311 CleanupStack::PopAndDestroy( naviState ); |
313 CleanupStack::PopAndDestroy( naviState ); |
312 aNavigationalState->Close(); |
314 aNavigationalState->Close(); |
313 |
315 |
314 if(EGlxCmdDetails==aCommandId && (0 == aList.Count() || 1 != aList.SelectionCount())&& !fullscreenViewingMode ) |
316 // If fullscreen view is there but media item dont have yet |
|
317 // data to be shown in detail than hide detail option |
|
318 if(fullscreenViewingMode && !IsThumbnailAvailable(aList)) |
|
319 { |
|
320 return ETrue; |
|
321 } |
|
322 |
|
323 if(EGlxCmdDetails==aCommandId && (0 == aList.Count() || 1 != aList.SelectionCount()) |
|
324 && !fullscreenViewingMode ) |
315 { |
325 { |
316 return ETrue; |
326 return ETrue; |
317 } |
327 } |
318 return EFalse; |
328 return EFalse; |
319 } |
329 } |
320 |
330 |
|
331 // ----------------------------------------------------------------------------- |
|
332 // IsThumbnailAvailable |
|
333 // ----------------------------------------------------------------------------- |
|
334 // |
|
335 TBool CGlxCommandHandlerDetails::IsThumbnailAvailable(MGlxMediaList& aList) const |
|
336 { |
|
337 TRACER("CGlxCommandHandlerDetails::IsThumbnailAvailable"); |
|
338 if (0 == aList.Count()) |
|
339 { |
|
340 return EFalse; |
|
341 } |
|
342 |
|
343 TMPXAttribute attr; |
|
344 TSize size = iUiUtility->DisplaySize(); |
|
345 GLX_LOG_INFO2( |
|
346 "CGlxCommandHandlerDetails::IsThumbnailAvailable() w(%d) h(%d)", |
|
347 size.iWidth, size.iHeight); |
|
348 return aList.Item(aList.FocusIndex()).GetClosestThumbnail(attr, size, |
|
349 EFalse); |
|
350 } |
321 |
351 |
322 //End of file |
352 //End of file |