photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerback.cpp
equal
deleted
inserted
replaced
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 <glxcollectionpluginimageviewer.hrh> |
45 #include <glxbackservicewrapper.h> |
|
46 #include <glxgallery.hrh> |
45 #include <glxgallery.hrh> |
47 |
46 |
48 #include "glxmediaselectionpopup.h" |
47 #include "glxmediaselectionpopup.h" |
49 //constants |
48 //constants |
50 |
49 |
123 aCommandId ); |
122 aCommandId ); |
124 iCurrentCommandId = aCommandId; |
123 iCurrentCommandId = aCommandId; |
125 iNavigationalState = CGlxNavigationalState::InstanceL(); |
124 iNavigationalState = CGlxNavigationalState::InstanceL(); |
126 iIsViewActivated = EFalse; |
125 iIsViewActivated = EFalse; |
127 |
126 |
128 iBSWrapper = CGlxBackServiceWrapper::NewL( TUid::Uid( KGlxGalleryApplicationUid ) ); |
|
129 iAppUi = static_cast< CAknAppUi* >( CCoeEnv::Static()->AppUi() ); |
127 iAppUi = static_cast< CAknAppUi* >( CCoeEnv::Static()->AppUi() ); |
130 |
|
131 } |
128 } |
132 |
129 |
133 // --------------------------------------------------------------------------- |
130 // --------------------------------------------------------------------------- |
134 // Destructor |
131 // Destructor |
135 // --------------------------------------------------------------------------- |
132 // --------------------------------------------------------------------------- |
137 EXPORT_C CGlxCommandHandlerBack::~CGlxCommandHandlerBack() |
134 EXPORT_C CGlxCommandHandlerBack::~CGlxCommandHandlerBack() |
138 { |
135 { |
139 TRACER( "CGlxCommandHandlerBack::~CGlxCommandHandlerBack" ); |
136 TRACER( "CGlxCommandHandlerBack::~CGlxCommandHandlerBack" ); |
140 |
137 |
141 iNavigationalState->Close(); |
138 iNavigationalState->Close(); |
142 |
|
143 if( iBSWrapper ) |
|
144 { |
|
145 delete iBSWrapper; |
|
146 } |
|
147 |
|
148 } |
139 } |
149 |
140 |
150 // ----------------------------------------------------------------------------- |
141 // ----------------------------------------------------------------------------- |
151 // ExecuteL |
142 // ExecuteL |
152 // ----------------------------------------------------------------------------- |
143 // ----------------------------------------------------------------------------- |
153 // |
144 // |
154 TBool CGlxCommandHandlerBack::ExecuteL( TInt aCommandId ) |
145 TBool CGlxCommandHandlerBack::ExecuteL( TInt aCommandId ) |
155 { |
146 { |
156 TRACER("CGlxCommandHandlerBack::ExecuteL"); |
147 TRACER("CGlxCommandHandlerBack::ExecuteL"); |
157 _LIT8( KPhotosSuiteNavigation, "SuiteNavigation" ); |
|
158 TBool consume(EFalse); |
148 TBool consume(EFalse); |
159 |
149 |
160 GLX_LOG_INFO1( "CGlxCommandHandlerBack::ExecuteL::Command Id (%d)", |
150 GLX_LOG_INFO1( "CGlxCommandHandlerBack::ExecuteL::Command Id (%d)", |
161 aCommandId ); |
151 aCommandId ); |
162 |
152 |
177 // let Back Stepping Service handle the event |
167 // let Back Stepping Service handle the event |
178 if((2 == navigationalState->Levels()|| |
168 if((2 == navigationalState->Levels()|| |
179 iNavigationalState->StartingLevel() == navigationalState->Levels()-1) |
169 iNavigationalState->StartingLevel() == navigationalState->Levels()-1) |
180 && iNavigationalState->BackExitStatus()) |
170 && iNavigationalState->BackExitStatus()) |
181 { |
171 { |
182 iBSWrapper->HandleBackCommandL( KPhotosSuiteNavigation ); |
|
183 if(iAppUi) |
172 if(iAppUi) |
184 { |
173 { |
185 iAppUi->ProcessCommandL(EAknSoftkeyExit); |
174 iAppUi->ProcessCommandL(EAknSoftkeyExit); |
186 } |
175 } |
187 } |
176 } |