photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerback.cpp
changeset 1 9ba538e329bd
parent 0 4e91876724a2
child 2 7d9067c6fcb1
equal deleted inserted replaced
0:4e91876724a2 1:9ba538e329bd
    39 #include <glxcollectionplugincamera.hrh>
    39 #include <glxcollectionplugincamera.hrh>
    40 #include <glxcollectionplugindownloads.hrh>
    40 #include <glxcollectionplugindownloads.hrh>
    41 #include <glxcollectionpluginalbums.hrh>
    41 #include <glxcollectionpluginalbums.hrh>
    42 #include <glxcollectionpluginmonths.hrh>
    42 #include <glxcollectionpluginmonths.hrh>
    43 #include <glxcollectionplugintags.hrh>
    43 #include <glxcollectionplugintags.hrh>
       
    44 #include <glxcollectionpluginimageviewer.hrh>
    44 #include <glxbackservicewrapper.h>
    45 #include <glxbackservicewrapper.h>
    45 #include <glxgallery.hrh>
    46 #include <glxgallery.hrh>
    46 
    47 
    47 #include "glxmediaselectionpopup.h"
    48 #include "glxmediaselectionpopup.h"
    48 //constants
    49 //constants
   197                 CleanupStack::PopAndDestroy(navigationalState); 
   198                 CleanupStack::PopAndDestroy(navigationalState); 
   198     			consume = ETrue;
   199     			consume = ETrue;
   199     			break;
   200     			break;
   200     			}
   201     			}
   201     		case EGlxCmdPreviousView:
   202     		case EGlxCmdPreviousView:
   202     			{
   203     		    {
   203     			GLX_LOG_INFO("CGlxCommandHandlerBack::ExecuteL::Go back \
   204     		    GLX_LOG_INFO("CGlxCommandHandlerBack::ExecuteL::Go back \
   204                 to the previous view");
   205     		    to the previous view");
   205                 if (!(iNavigationalState->BackExitStatus()))
   206     		    CMPXCollectionPath* path = iNavigationalState->StateLC();
   206                     {
   207     		    if (path->Id() == TMPXItemId(KGlxCollectionPluginImageViewerImplementationUid))
   207                     if(iAppUi)
   208     		        {
   208                         {
   209     		        if(iAppUi)
   209                         iAppUi->ProcessCommandL(EAknSoftkeyExit);    
   210     		            {
   210                         }
   211     		            iAppUi->ProcessCommandL(EAknSoftkeyExit);    
   211                     }
   212     		            }
   212     			if( iIsViewActivated )
   213     		        }
   213     			    {
   214     		    else
   214                     iIsViewActivated = EFalse;
   215     		        {
   215                     iNavigationalState->ActivatePreviousViewL();
   216     		        if (!(iNavigationalState->BackExitStatus()))
   216     			    
   217     		            {
   217     			    }
   218     		            if(iAppUi)
   218     			consume = ETrue;
   219     		                {
   219     			break;
   220     		                iAppUi->ProcessCommandL(EAknSoftkeyExit);    
   220     			}
   221     		                }
       
   222     		            }
       
   223     		        if( iIsViewActivated )
       
   224     		            {
       
   225     		            iIsViewActivated = EFalse;
       
   226     		            iNavigationalState->ActivatePreviousViewL();
       
   227     		            }
       
   228     		        }
       
   229     		    CleanupStack::PopAndDestroy( path );
       
   230     		    consume = ETrue;
       
   231     		    break;
       
   232     		    }
   221     			
   233     			
   222     		case EGlxCmdContainerPreviousView:
   234     		case EGlxCmdContainerPreviousView:
   223     			{
   235     			{
   224     			GLX_LOG_INFO("CGlxCommandHandlerBack::ExecuteL::Go back \
   236     			GLX_LOG_INFO("CGlxCommandHandlerBack::ExecuteL::Go back \
   225     			    to the previous view when continer is still there else go two views back");
   237     			    to the previous view when continer is still there else go two views back");