# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1284541986 -10800 # Node ID 5b238bc8ffb637aa38c7082fdb09952c515ca5bc # Parent 34937ec34dac7bfab293d83e3bdb87c569ba6095 Revision: 201035 Kit: 201036 diff -r 34937ec34dac -r 5b238bc8ffb6 photosgallery/slideshow/view/src/shwslideshowview.cpp --- a/photosgallery/slideshow/view/src/shwslideshowview.cpp Tue Sep 14 21:19:17 2010 +0300 +++ b/photosgallery/slideshow/view/src/shwslideshowview.cpp Wed Sep 15 12:13:06 2010 +0300 @@ -71,6 +71,8 @@ #include #include #include +#include +#include namespace { @@ -243,6 +245,14 @@ { iWaitDialog->ProcessFinishedL(); } + HBufC* popupText = NULL; + //Load the "No Images to Play Slideshow" string from the resource file + popupText = StringLoader::LoadLC(R_GLX_NO_IMAGES_TO_PLAY_SLIDESHOW); + // Show the Info Note. + GlxGeneralUiUtilities::ShowInfoNoteL(popupText->Des(), EFalse); + // LoadLC will push text on to cleanupstack, + // hence it should be poped and destroyed + CleanupStack::PopAndDestroy(popupText); } else { diff -r 34937ec34dac -r 5b238bc8ffb6 photosgallery/viewframework/tvout/src/glxhdmisurfaceupdater.cpp --- a/photosgallery/viewframework/tvout/src/glxhdmisurfaceupdater.cpp Tue Sep 14 21:19:17 2010 +0300 +++ b/photosgallery/viewframework/tvout/src/glxhdmisurfaceupdater.cpp Wed Sep 15 12:13:06 2010 +0300 @@ -71,6 +71,9 @@ TRAP_IGNORE(iDecoderObserver.HandleHDMIDecodingEventL(EHdmiDisconnected)); ReleaseContent(); + + delete iNextImagePath; + if (iWindow) { iWindow->RemoveBackgroundSurface(ETrue); @@ -80,11 +83,8 @@ iTimer->Cancel(); } delete iTimer; - if (iGlxDecoderAO) - { - delete iGlxDecoderAO; - } - iGlxDecoderAO = NULL; + delete iGlxDecoderAO; + delete iSurfBufferAO; iFsSession.Close(); if (iSurfManager) { @@ -99,7 +99,6 @@ iSurfChunk->Close(); } delete iSurfChunk; - iSurfChunk = NULL; GLX_LOG_INFO( "CGlxHdmiSurfaceUpdater::~CGlxHdmiSurfaceUpdater(). iSurfManager->CloseSurface()"); iSurfManager->CloseSurface(iSurfId); @@ -107,7 +106,6 @@ "CGlxHdmiSurfaceUpdater::~CGlxHdmiSurfaceUpdater(). iSurfManager->Close()"); iSurfManager->Close(); delete iSurfManager; - iSurfManager = NULL; } } @@ -238,6 +236,9 @@ const TDesC& aNextImageFile, CFbsBitmap* aFsBitmap) { TRACER("CGlxHdmiSurfaceUpdater::UpdateNewImageL()"); + delete iNextImagePath; + iNextImagePath = NULL; + if (!aImageFile.CompareC(*iImagePath) && !iDecodingCurrent && !iDecodingNext) { @@ -268,11 +269,6 @@ else { ReleaseContent(); - if (iNextImagePath) - { - delete iNextImagePath; - iNextImagePath = NULL; - } // Ongoing decoding is cancelled if any,reset the decoding flags. iDecodingNext = EFalse; iDecodingCurrent = EFalse; @@ -1004,11 +1000,8 @@ TRACER("CGlxHdmiSurfaceUpdater::DecodeNextImageL()"); ReleaseContent(); iImagePath = iNextImagePath->Alloc(); - if (iNextImagePath) - { - delete iNextImagePath; - iNextImagePath = NULL; - } + delete iNextImagePath; + iNextImagePath = NULL; iIsNonJpeg = EFalse; GLX_LOG_INFO("Before - iWindow->Size()"); iTvScreenSize = iWindow->Size(); diff -r 34937ec34dac -r 5b238bc8ffb6 photosgallery/viewframework/views/fullscreenview/src/glxfullscreenviewimp.cpp --- a/photosgallery/viewframework/views/fullscreenview/src/glxfullscreenviewimp.cpp Tue Sep 14 21:19:17 2010 +0300 +++ b/photosgallery/viewframework/views/fullscreenview/src/glxfullscreenviewimp.cpp Wed Sep 15 12:13:06 2010 +0300 @@ -554,6 +554,12 @@ //Since the toolbar should not be present for ImageViewer. if(!iImgViewerMode) { + TInt focusIndex = iMediaList->FocusIndex(); + if (focusIndex >= 0 && focusIndex < iMediaList->Count()) + { + TBool dimmed = (EMPXVideo == iMediaList->Item(focusIndex).Category()); + Toolbar()->SetItemDimmed(EGlxCmdSlideshowPlay, dimmed, ETrue); + } //show the toolbar EnableFSToolbar(ETrue); } @@ -1031,6 +1037,7 @@ TRACER("CGlxFullScreenViewImp::offerEventL"); if ( aEvent.IsKeyEvent()) { + GLX_LOG_INFO1("CGlxFullScreenViewImp::OfferEventL aEvent.KeyEvent().iScanCode: %d",aEvent.KeyEvent().iScanCode); switch ( aEvent.KeyEvent().iScanCode ) { case EStdKeyNkpAsterisk : @@ -1043,12 +1050,19 @@ //EKeyApplicationC for which TStdScancode is EStdKeyApplicatoinC case EStdKeyApplicationC: { - if(EEventKeyDown == aEvent.Code()) + TInt focusIndex = iMediaList->FocusIndex(); + if (focusIndex >= 0 && focusIndex < iMediaList->Count()) { - HideUi(EFalse); - TRAP_IGNORE( ActivateZoomControlL(EZoomStartKey)); - return EEventConsumed; + if (EEventKey == aEvent.Code() && (EMPXImage + == iMediaList->Item(focusIndex).Category())) + { + HideUi(EFalse); + SetSliderToMin(); + TRAP_IGNORE(ActivateZoomControlL(EZoomStartKey)); + return EEventHandled; + } } + // Fall through to show the UI in case of EMPXVideo } case EStdKeyUpArrow: case EStdKeyDownArrow: @@ -2122,13 +2136,16 @@ DeactivateZoomControlL(); } SetItemToHDMIL(); - if (focusIndex != KErrNotFound && EUiOn == GetUiState()) + if (focusIndex != KErrNotFound && focusIndex < iMediaList->Count() && EUiOn + == GetUiState()) { // show/hide the slider if (iSliderWidget) { iSliderWidget->ShowWidget(CheckIfSliderToBeShownL()); } + TBool dimmed = (EMPXVideo == iMediaList->Item(focusIndex).Category()); + Toolbar()->SetItemDimmed(EGlxCmdSlideshowPlay, dimmed, ETrue); } /** if this is the last image deleted when Photo is in foreground, go back to the previous view*/ if (mlCount == 0 && IsForeground() && iNaviState->ViewingMode() diff -r 34937ec34dac -r 5b238bc8ffb6 photosgallery/viewframework/views/metadatadialog/src/glxmetadatacontainer.cpp --- a/photosgallery/viewframework/views/metadatadialog/src/glxmetadatacontainer.cpp Tue Sep 14 21:19:17 2010 +0300 +++ b/photosgallery/viewframework/views/metadatadialog/src/glxmetadatacontainer.cpp Wed Sep 15 12:13:06 2010 +0300 @@ -1075,7 +1075,7 @@ { CleanupStack::PushL(modifiedUri); //Check if media item was renamed - if (modifiedUri->Compare(*iUri) != 0) + if (modifiedUri->CompareF(*iUri) != 0) { //Set rename command as started since //Rename is also possible from File Manager @@ -1287,7 +1287,8 @@ TInt /*aEndIndex*/, MGlxMediaList* /*aList*/) { TRACER("CGlxMetadataContainer::HandleItemRemovedL()"); - if (!iItemMediaList->Count() && !iIsPopupShown) + //Ignore if this callback corresponds to a rename operation. + if (!iItemMediaList->Count() && !iIsPopupShown && !iRenameStarted) { iDialogObesrver.HandleItemRemovedL(); } diff -r 34937ec34dac -r 5b238bc8ffb6 photosgallery/viewframework/views/viewbase/src/glxtoolbarcontroller.cpp --- a/photosgallery/viewframework/views/viewbase/src/glxtoolbarcontroller.cpp Tue Sep 14 21:19:17 2010 +0300 +++ b/photosgallery/viewframework/views/viewbase/src/glxtoolbarcontroller.cpp Wed Sep 15 12:13:06 2010 +0300 @@ -322,13 +322,21 @@ if (navigationalState->ViewingMode() == NGlxNavigationalState::EView) { SetToolbarItemsDimmed(EFalse); - } + TInt focusIndex = aList->FocusIndex(); + if (focusIndex >= 0 && focusIndex < aList->Count()) + { + TBool dimmed = (EMPXVideo + == aList->Item(focusIndex).Category()); + iToolbar->SetItemDimmed(EGlxCmdSlideshowPlay, dimmed, ETrue); + } + } else if (navigationalState->ViewingMode() == NGlxNavigationalState::EBrowse) { TBool dimmed = aList->SelectionCount() ? EFalse : ETrue; iToolbar->SetItemDimmed(EGlxCmdSend, dimmed, ETrue); iToolbar->SetItemDimmed(EGlxCmdUpload, dimmed, ETrue); + iToolbar->SetItemDimmed(EGlxCmdSlideshowPlay, EFalse, ETrue); } CleanupStack::PopAndDestroy(navigationalState); } @@ -385,6 +393,7 @@ iToolbar->SetItemDimmed(EGlxCmdStartMultipleMarking, aDimmed, ETrue); iToolbar->SetItemDimmed(EGlxCmdSend, aDimmed, ETrue); iToolbar->SetItemDimmed(EGlxCmdUpload, aDimmed, ETrue); + iToolbar->SetItemDimmed(EGlxCmdDelete, aDimmed, ETrue); } } diff -r 34937ec34dac -r 5b238bc8ffb6 photosgallery/viewframework/views/viewbase/src/glxviewbase.cpp --- a/photosgallery/viewframework/views/viewbase/src/glxviewbase.cpp Tue Sep 14 21:19:17 2010 +0300 +++ b/photosgallery/viewframework/views/viewbase/src/glxviewbase.cpp Wed Sep 15 12:13:06 2010 +0300 @@ -551,10 +551,6 @@ CAknToolbar* toolbar = GetToolBar(); if(toolbar) { - CAknButton* slideshowButton = - static_cast (toolbar->ControlOrNull(EGlxCmdSlideshow)); - TBool slideshowdimmed = EFalse; - //Here after the toolbar cmd is processed it is enabled //back. For share the toolbar state should be same as it was //earlier, so we take the current state and reset back after @@ -566,28 +562,35 @@ CAknButton* markButton = static_cast (toolbar->ControlOrNull(EGlxCmdStartMultipleMarking)); TBool markButtondimmed = EFalse; - - if(slideshowButton) - { - // Get current button state - CAknButtonState* currentState = slideshowButton->State(); - slideshowdimmed = slideshowButton->IsDimmed(); - } + + CAknButton* deleteButton = + static_cast (toolbar->ControlOrNull(EGlxCmdDelete)); + TBool deleteButtondimmed = EFalse; + + CAknButton* sendButton = + static_cast (toolbar->ControlOrNull(EGlxCmdSend)); + TBool sendButtondimmed = EFalse; if(markButton) { - // Get current button state - CAknButtonState* currentState = markButton->State(); markButtondimmed = markButton->IsDimmed(); } if(uploadButton) { - // Get current button state - CAknButtonState* currentState = uploadButton->State(); uploaddimmed = uploadButton->IsDimmed(); + } + + if(deleteButton) + { + deleteButtondimmed = deleteButton->IsDimmed(); } - + + if(sendButton) + { + sendButtondimmed = sendButton->IsDimmed(); + } + // Deactivate the toolbar. Don't accept the toolbar input when the command // execution is already in progress. SetToolbarItemsDimmed(ETrue); @@ -599,20 +602,28 @@ // after command execution. SetToolbarStateL(); + // Note: Slideshow toolbar item update is done + // at CGlxToolbarController::SetStatusL() + if(!markButtondimmed) { toolbar->SetItemDimmed(EGlxCmdStartMultipleMarking, EFalse, ETrue); } - if(!slideshowdimmed) - { - toolbar->SetItemDimmed(EGlxCmdSlideshowPlay, EFalse, ETrue); - } - if(uploaddimmed || (aCommand == EGlxCmdStartMultipleMarking)) { toolbar->SetItemDimmed(EGlxCmdUpload, ETrue, ETrue); } + + if(!deleteButtondimmed) + { + toolbar->SetItemDimmed(EGlxCmdDelete, EFalse, ETrue); + } + + if(!sendButtondimmed) + { + toolbar->SetItemDimmed(EGlxCmdSend, EFalse, ETrue); + } } } @@ -739,6 +750,8 @@ toolbar->SetItemDimmed(EGlxCmdSlideshowPlay, aDimmed, ETrue); toolbar->SetItemDimmed(EGlxCmdStartMultipleMarking, aDimmed, ETrue); toolbar->SetItemDimmed(EGlxCmdUpload, aDimmed, ETrue); + toolbar->SetItemDimmed(EGlxCmdDelete, aDimmed, ETrue); + toolbar->SetItemDimmed(EGlxCmdSend, aDimmed, ETrue); } }