155 // --------------------------------------------------------------------------- |
156 // --------------------------------------------------------------------------- |
156 // Add the command handlers |
157 // Add the command handlers |
157 // --------------------------------------------------------------------------- |
158 // --------------------------------------------------------------------------- |
158 // |
159 // |
159 EXPORT_C void CGlxFullScreenViewPluginBase::AddCommandHandlersL() |
160 EXPORT_C void CGlxFullScreenViewPluginBase::AddCommandHandlersL() |
160 { |
161 { |
161 TRACER("CGlxFullScreenViewPluginBase::AddCommandHandlersL()"); |
162 TRACER("CGlxFullScreenViewPluginBase::AddCommandHandlersL()"); |
162 |
163 |
163 // Note that the order in which the command handlers are added determines |
164 // Note that the order in which the command handlers are added determines |
164 // the order in which the toolbar displays the icons |
165 // the order in which the toolbar displays the icons |
165 |
166 |
166 GLX_LOG_INFO( "Adding CGlxCommandHandlerSave" ); |
167 TFileName uiutilitiesrscfile; |
167 iFullScreenView->AddCommandHandlerL( |
168 uiutilitiesrscfile.Append( |
168 CGlxCommandHandlerSave::NewL() ); |
169 CGlxResourceUtilities::GetUiUtilitiesResourceFilenameL()); |
169 |
170 GLX_LOG_INFO( "Adding CGlxCommandHandlerSave" ); |
170 GLX_LOG_INFO( "Adding CGlxCommandHandlerSlideshow" ); |
171 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerSave::NewL()); |
171 iFullScreenView->AddCommandHandlerL( |
172 |
172 CGlxCommandHandlerSlideshow::NewL( iFullScreenView, ETrue , ETrue ) ); |
173 GLX_LOG_INFO( "Adding CGlxCommandHandlerSlideshow" ); |
173 |
174 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerSlideshow::NewL( |
174 GLX_LOG_INFO("Adding CGlxCommandHandlerDetails"); |
175 iFullScreenView, ETrue, ETrue, uiutilitiesrscfile)); |
175 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerDetails:: |
176 |
176 NewL(iFullScreenView)); |
177 GLX_LOG_INFO("Adding CGlxCommandHandlerAddToContainer"); |
177 |
178 iFullScreenView->AddCommandHandlerL( |
178 GLX_LOG_INFO("Adding CGlxCommandHandlerAddToContainer"); |
179 CGlxCommandHandlerAddToContainer::NewAddToAlbumCommandHandlerL( |
179 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerAddToContainer:: |
180 iFullScreenView, EFalse, uiutilitiesrscfile)); |
180 NewAddToAlbumCommandHandlerL(iFullScreenView, EFalse)); |
181 |
181 |
182 GLX_LOG_INFO("Adding CGlxCommandHandlerAddToContainer"); |
182 GLX_LOG_INFO("Adding CGlxCommandHandlerAddToContainer"); |
183 iFullScreenView->AddCommandHandlerL( |
183 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerAddToContainer:: |
184 CGlxCommandHandlerAddToContainer::NewAddToFavCommandHandlerL( |
184 NewAddToFavCommandHandlerL(iFullScreenView, EFalse)); |
185 iFullScreenView, EFalse, uiutilitiesrscfile)); |
185 |
186 |
186 GLX_LOG_INFO("Adding CGlxCommandHandlerDetails"); |
187 GLX_LOG_INFO("Adding CGlxCommandHandlerDetails"); |
187 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerDetails:: |
188 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerDetails::NewL( |
188 NewL(iFullScreenView)); |
189 iFullScreenView, uiutilitiesrscfile)); |
189 |
190 |
190 GLX_LOG_INFO("Adding CGlxCommandHandlerAddToContainer"); |
191 GLX_LOG_INFO("Adding CGlxCommandHandlerAddToContainer"); |
191 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerAddToContainer:: |
192 iFullScreenView->AddCommandHandlerL( |
192 NewAddToTagCommandHandlerL(iFullScreenView, EFalse)); |
193 CGlxCommandHandlerAddToContainer::NewAddToTagCommandHandlerL( |
193 // The AIW service handlers |
194 iFullScreenView, EFalse, uiutilitiesrscfile)); |
194 // ShowMap must be the first one |
195 // The AIW service handlers |
195 GLX_LOG_INFO("Adding CGlxCommandHandlerAiwShowMap"); |
196 GLX_LOG_INFO("Adding CGlxCommandHandlerAiwAssign"); |
196 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerAiwShowMap:: |
197 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerAiwAssign::NewL( |
197 NewL(iFullScreenView, iResourceIds.iMenuId)); |
198 iFullScreenView, iResourceIds.iMenuId, uiutilitiesrscfile)); |
198 // Assign must be the second one |
199 GLX_LOG_INFO("Adding CGlxCommandHandlerAiwEdit"); |
199 GLX_LOG_INFO("Adding CGlxCommandHandlerAiwAssign"); |
200 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerAiwEdit::NewL( |
200 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerAiwAssign:: |
201 iFullScreenView)); |
201 NewL(iFullScreenView, iResourceIds.iMenuId)); |
202 GLX_LOG_INFO("Adding CGlxCommandHandlerAiwPrintPreview"); |
202 GLX_LOG_INFO("Adding CGlxCommandHandlerAiwEdit"); |
203 iFullScreenView->AddCommandHandlerL( |
203 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerAiwEdit:: |
204 CGlxCommandHandlerAiwPrintPreview::NewL(iFullScreenView, |
204 NewL(iFullScreenView)); |
205 iResourceIds.iMenuId, uiutilitiesrscfile)); |
205 GLX_LOG_INFO("Adding CGlxCommandHandlerAiwPrintPreview"); |
206 GLX_LOG_INFO("Adding CGlxCommandHandlerAiwShareOnOvi"); |
206 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerAiwPrintPreview:: |
207 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerAiwShareOnOvi::NewL( |
207 NewL(iFullScreenView, iResourceIds.iMenuId)); |
208 iFullScreenView, iResourceIds.iMenuId, uiutilitiesrscfile)); |
208 GLX_LOG_INFO("Adding CGlxCommandHandlerAiwShareOnOvi"); |
209 // End of AIW service handlers |
209 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerAiwShareOnOvi:: |
210 |
210 NewL(iFullScreenView, iResourceIds.iMenuId)); |
|
211 // End of AIW service handlers |
|
212 |
|
213 GLX_LOG_INFO("Adding CGlxCommandHandlerMoreInfo"); |
|
214 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerMoreInfo:: |
|
215 NewL(iFullScreenView,EFalse)); |
|
216 GLX_LOG_INFO("Adding CGlxCommandHandlerHideUi"); |
|
217 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerHideUi::NewL()); |
|
218 |
211 |
219 //Fix for error ID EVTY-7M87LF |
212 //Fix for error ID EVTY-7M87LF |
220 //@ Registration of Video Playback Command handler has to before UPnP. |
213 //@ Registration of Video Playback Command handler has to before UPnP. |
221 //@ else UPnP will not get play command once video playback command is consumed. |
214 //@ else UPnP will not get play command once video playback command is consumed. |
222 GLX_LOG_INFO("Adding CGlxCommandHandlerVideoPlayback"); |
215 GLX_LOG_INFO("Adding CGlxCommandHandlerVideoPlayback"); |
223 iFullScreenView->AddCommandHandlerL( |
216 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerVideoPlayback::NewL( |
224 CGlxCommandHandlerVideoPlayback::NewL( iFullScreenView ) ); |
217 iFullScreenView)); |
225 |
218 |
226 //Fix for error ID EVTY-7M87LF |
219 //Toolbar commands for all Fullscreen views. May also be present in Options menu. |
227 //@ Registration of UPnP Command handler has to be after video play back command |
220 GLX_LOG_INFO("Adding CGlxCommandHandlerSend"); |
228 //@ priorty of command handling is last registered in first server basis. |
221 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerSend::NewL( |
229 //@ UPnP will get play command first everytime, where it'll check for UPnP active. |
222 iFullScreenView, ETrue, uiutilitiesrscfile)); |
230 //@ if UPnP is active it'll consume the event, else it'll allow other registered command to execute it. |
223 |
231 |
224 GLX_LOG_INFO("Adding CGlxCommandHandlerDelete"); |
232 GLX_LOG_INFO("Adding CGlxCommandHandlerShowVisUpnp"); |
225 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerDelete::NewL( |
233 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerShowViaUpnp::NewL( |
226 iFullScreenView, EFalse, ETrue, uiutilitiesrscfile)); |
234 iFullScreenView,EFalse)); |
227 GLX_LOG_INFO("Adding CGlxCommandHandlerUpload"); |
235 |
228 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerUpload::NewL( |
236 //Toolbar commands for all Fullscreen views. May also be present in Options menu. |
229 iFullScreenView, ETrue)); |
237 GLX_LOG_INFO("Adding CGlxCommandHandlerSend"); |
230 |
238 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerSend::NewL( |
231 } |
239 iFullScreenView, ETrue)); |
|
240 GLX_LOG_INFO("Adding CGlxCommandHandlerDelete"); |
|
241 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerDelete:: |
|
242 NewL(iFullScreenView, EFalse, ETrue)); |
|
243 GLX_LOG_INFO("Adding CGlxCommandHandlerUpload"); |
|
244 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerUpload::NewL( |
|
245 iFullScreenView, ETrue)); |
|
246 |
|
247 GLX_LOG_INFO("Adding CGlxCommandHandlerAiwShowMapHardKey"); |
|
248 iFullScreenView->AddCommandHandlerL(CGlxCommandHandlerAiwShowMapHardKey::NewL( |
|
249 iFullScreenView, ETrue)); |
|
250 } |
|
251 |
232 |
252 // --------------------------------------------------------------------------- |
233 // --------------------------------------------------------------------------- |
253 // GetResourceFilenameL |
234 // GetResourceFilenameL |
254 // --------------------------------------------------------------------------- |
235 // --------------------------------------------------------------------------- |
255 // |
236 // |