53 |
52 |
54 // ----------------------------------------------------------------------------- |
53 // ----------------------------------------------------------------------------- |
55 // NewL |
54 // NewL |
56 // ----------------------------------------------------------------------------- |
55 // ----------------------------------------------------------------------------- |
57 // |
56 // |
58 EXPORT_C CGlxMetadataDialog* CGlxMetadataDialog::NewL(const TDesC& aUri) |
57 EXPORT_C CGlxMetadataDialog* CGlxMetadataDialog::NewL( const TDesC& aUri ) |
59 { |
58 { |
60 TRACER("CGlxMetadataDialog::NewL"); |
59 TRACER("CGlxMetadataDialog::NewL"); |
61 |
60 |
62 CGlxMetadataDialog* self = new (ELeave) CGlxMetadataDialog(aUri); |
61 CGlxMetadataDialog* self = new(ELeave) CGlxMetadataDialog(aUri ); |
63 CleanupStack::PushL(self); |
62 CleanupStack::PushL( self ); |
64 self->ConstructL(); |
63 self->ConstructL(); |
65 CleanupStack::Pop(self); |
64 CleanupStack::Pop( self ); |
66 return self; |
65 return self; |
67 } |
66 } |
68 |
67 |
69 CGlxMetadataDialog::CGlxMetadataDialog(const TDesC& aUri) : |
68 CGlxMetadataDialog::CGlxMetadataDialog(const TDesC& aUri):iUri(aUri) |
70 iUri(aUri) |
69 { |
71 { |
70 |
72 } |
71 } |
73 |
|
74 // ----------------------------------------------------------------------------- |
72 // ----------------------------------------------------------------------------- |
75 // ConstructL |
73 // ConstructL |
76 // ----------------------------------------------------------------------------- |
74 // ----------------------------------------------------------------------------- |
77 // |
75 // |
78 void CGlxMetadataDialog::ConstructL() |
76 void CGlxMetadataDialog::ConstructL() |
79 { |
77 { |
80 TRACER("CGlxMetadataDialog::ConstructL"); |
78 TRACER("CGlxMetadataDialog::ConstructL"); |
81 |
79 |
82 // Load dialog's resource file |
80 // Load dialog's resource file |
83 InitResourceL(); |
81 InitResourceL(); |
84 |
82 |
85 iStatusPaneAvailable = EFalse; |
83 iStatusPaneAvailable = EFalse; |
86 // set the title to the dialog, Note that avkon dialogs do not support |
84 // set the title to the dialog, Note that avkon dialogs do not support |
87 // setting the title in the status pane so we need to do it the hard way |
85 // setting the title in the status pane so we need to do it the hard way |
88 // get status pane |
86 // get status pane |
89 CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane(); |
87 CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane(); |
90 |
88 |
91 if (statusPane && statusPane->IsVisible()) |
89 if (statusPane && statusPane->IsVisible()) |
92 { |
90 { |
93 iStatusPaneAvailable = ETrue; |
91 iStatusPaneAvailable = ETrue; |
94 } |
92 } |
95 |
93 |
96 // make the toolbar disabled |
94 // make the toolbar disabled |
97 SetDetailsDlgToolbarVisibility(EFalse); |
95 SetDetailsDlgToolbarVisibility(EFalse); |
98 |
96 |
99 // do we have status pane |
97 // do we have status pane |
100 if (statusPane) |
98 if (statusPane) |
101 { |
99 { |
102 GLX_LOG_INFO1("GLX_UMP::CGlxMetadataDialog::ConstructL::STATUS PANE = %d",statusPane->IsVisible()); |
100 GLX_LOG_INFO1("GLX_UMP::CGlxMetadataDialog::ConstructL::STATUS PANE = %d",statusPane->IsVisible()); |
103 // load the title text |
101 // load the title text |
104 HBufC* text = StringLoader::LoadL(R_GLX_METADATA_VIEW_TITLE_DETAILS, |
102 HBufC* text = StringLoader::LoadL(R_GLX_METADATA_VIEW_TITLE_DETAILS, |
105 iEikonEnv); |
103 iEikonEnv ); |
106 SetTitleL(*text); |
104 SetTitleL(*text); |
107 if (text) |
105 if (text) |
108 { |
106 { |
109 delete text; |
107 delete text; |
110 } |
108 } |
111 iAvkonAppUi->StatusPane()->MakeVisible(ETrue); |
109 iAvkonAppUi->StatusPane()->MakeVisible(ETrue); |
112 } |
110 } |
113 |
111 |
114 iUiUtility = CGlxUiUtility::UtilityL(); |
112 iUiUtility = CGlxUiUtility::UtilityL(); |
115 TFileName uiutilitiesrscfile; |
113 TFileName uiutilitiesrscfile; |
116 uiutilitiesrscfile.Append( |
114 uiutilitiesrscfile.Append(CGlxResourceUtilities::GetUiUtilitiesResourceFilenameL()); |
117 CGlxResourceUtilities::GetUiUtilitiesResourceFilenameL()); |
115 |
118 |
116 iAddToTag = CGlxCommandHandlerAddToContainer::NewL(this, EGlxCmdAddTag, |
119 iAddToTag = CGlxCommandHandlerAddToContainer::NewL(this, EGlxCmdAddTag, |
117 EFalse, uiutilitiesrscfile); |
120 EFalse, uiutilitiesrscfile); |
118 iAddToAlbum = CGlxCommandHandlerAddToContainer::NewL(this, |
121 iAddToAlbum = CGlxCommandHandlerAddToContainer::NewL(this, |
119 EGlxCmdAddToAlbum, EFalse, uiutilitiesrscfile); |
122 EGlxCmdAddToAlbum, EFalse, uiutilitiesrscfile); |
120 |
123 |
121 // Call the base class' two-phased constructor |
124 // Call the base class' two-phased constructor |
122 CAknDialog::ConstructL(R_METADATA_MENUBAR); |
125 CAknDialog::ConstructL(R_METADATA_MENUBAR); |
123 |
126 |
124 // Instantiate the command handler |
127 // Instantiate the command handler |
125 iMetadataCmdHandler = CGlxMetadataCommandHandler::NewL(this); |
128 iMetadataCmdHandler = CGlxMetadataCommandHandler::NewL(this); |
126 |
129 |
127 //steps to find kinetic scroll threshold value |
130 //steps to find kinetic scroll threshold value |
128 CAknPhysics* physics = CAknPhysics::NewL(*this, NULL); |
131 CAknPhysics* physics = CAknPhysics::NewL(*this, NULL); |
129 CleanupStack::PushL(physics); |
132 CleanupStack::PushL(physics); |
130 iKineticDragThreshold = physics->DragThreshold(); |
133 iKineticDragThreshold = physics->DragThreshold(); |
131 CleanupStack::PopAndDestroy(physics); |
134 CleanupStack::PopAndDestroy(physics); |
132 physics = NULL; |
135 physics = NULL; |
133 } |
136 } |
|
137 |
134 |
138 // ----------------------------------------------------------------------------- |
135 // ----------------------------------------------------------------------------- |
139 // ~CGlxMetadataDialog |
136 // ~CGlxMetadataDialog |
140 // ----------------------------------------------------------------------------- |
137 // ----------------------------------------------------------------------------- |
141 // |
138 // |
218 { |
215 { |
219 TRACER("CGlxMetadataDialog::MediaList"); |
216 TRACER("CGlxMetadataDialog::MediaList"); |
220 // return the refernce of media list |
217 // return the refernce of media list |
221 return iContainer->MediaList(); |
218 return iContainer->MediaList(); |
222 } |
219 } |
223 |
|
224 // ----------------------------------------------------------------------------- |
220 // ----------------------------------------------------------------------------- |
225 // ProcessCommandL |
221 // ProcessCommandL |
226 // ----------------------------------------------------------------------------- |
222 // ----------------------------------------------------------------------------- |
227 // |
223 // |
228 void CGlxMetadataDialog::ProcessCommandL( TInt aCommandId ) |
224 void CGlxMetadataDialog::ProcessCommandL( TInt aCommandId ) |
229 { |
225 { |
230 TRACER("CGlxMetadataDialog::ProcessCommandL"); |
226 TRACER("CGlxMetadataDialog::ProcessCommandL"); |
231 |
227 |
232 // hide menu bar |
228 // hide menu bar |
233 iMenuBar->StopDisplayingMenuBar(); |
229 iMenuBar->StopDisplayingMenuBar(); |
234 |
230 |
235 switch (aCommandId) |
231 switch( aCommandId ) |
236 { |
232 { |
237 case EAknSoftkeyEdit: |
233 case EAknSoftkeyEdit: |
238 case EAknSoftkeyCancel: |
234 case EAknSoftkeyCancel: |
239 case EAknSoftkeySelect: |
235 case EAknSoftkeySelect: |
240 case EAknSoftkeyOk: |
236 case EAknSoftkeyOk: |
241 { |
237 { |
242 TryExitL(aCommandId); |
238 TryExitL( aCommandId ); |
243 break; |
239 break; |
244 } |
240 } |
245 |
241 |
246 case EAknCmdHelp: |
242 case EAknCmdHelp: |
247 { |
243 { |
248 TCoeHelpContext helpContext; |
244 TCoeHelpContext helpContext; |
249 helpContext.iMajor = TUid::Uid(KGlxGalleryApplicationUid); |
245 helpContext.iMajor = TUid::Uid( KGlxGalleryApplicationUid ); |
250 helpContext.iContext.Copy(LGAL_HLP_DETAILS_VIEW); |
246 helpContext.iContext.Copy( LGAL_HLP_DETAILS_VIEW ); |
251 const TInt KListSz = 1; |
247 const TInt KListSz = 1; |
252 CArrayFix<TCoeHelpContext>* contextList = |
248 CArrayFix<TCoeHelpContext>* contextList = |
253 new (ELeave) CArrayFixFlat<TCoeHelpContext> (KListSz); |
249 new (ELeave) CArrayFixFlat<TCoeHelpContext>( KListSz ); |
254 CleanupStack::PushL(contextList); |
250 CleanupStack::PushL(contextList); |
255 contextList->AppendL(helpContext); |
251 contextList->AppendL(helpContext); |
256 HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), |
252 HlpLauncher::LaunchHelpApplicationL( |
257 contextList); |
253 iEikonEnv->WsSession(), contextList ); |
258 CleanupStack::Pop(contextList); |
254 CleanupStack::Pop( contextList ); |
259 break; |
255 break; |
260 } |
256 } |
261 case KGlxDeleteBoundMenuCommandId: |
257 case KGlxDeleteBoundMenuCommandId: |
262 { |
258 { |
263 //Event passed on to container to handle |
259 //Event passed on to container to handle |
264 //Delete the location information of the data. |
260 //Delete the location information of the data. |
265 iContainer->RemoveLocationL(); |
261 iContainer->RemoveLocationL(); |
266 break; |
262 break; |
267 } |
263 } |
268 case KGlxEditBoundMenuCommandId: |
264 case KGlxEditBoundMenuCommandId: |
269 case KGlxViewBoundMenuCommandId: |
265 case KGlxViewBoundMenuCommandId: |
270 { |
266 { |
271 //To edit the details - forward the event to container to edit |
267 //To edit the details - forward the event to container to edit |
272 //Both edit and view details command are handled in the same function based on the item. |
268 //Both edit and view details command are handled in the same function based on the item. |
273 iContainer->HandleListboxChangesL(); |
269 iContainer->HandleListboxChangesL(); |
274 break; |
270 break; |
275 } |
271 } |
276 case EGlxCmdAiwBase: |
272 case EGlxCmdAiwBase: |
277 { |
273 { |
278 // pass aCommandId to command handler |
274 // pass aCommandId to command handler |
279 iMetadataCmdHandler->DoExecuteL(aCommandId, MediaList()); |
275 iMetadataCmdHandler->DoExecuteL( aCommandId, MediaList() ); |
280 } |
276 } |
281 default: |
277 default: |
282 break; |
278 break; |
283 } |
279 } |
284 } |
280 } |
285 |
|
286 //----------------------------------------------------------------------------- |
281 //----------------------------------------------------------------------------- |
287 // CGlxMetadataDialog::CreateCustomControlL |
282 // CGlxMetadataDialog::CreateCustomControlL |
288 //----------------------------------------------------------------------------- |
283 //----------------------------------------------------------------------------- |
289 SEikControlInfo CGlxMetadataDialog::CreateCustomControlL(TInt |
284 SEikControlInfo CGlxMetadataDialog::CreateCustomControlL(TInt |
290 aControlType) |
285 aControlType) |
291 { |
286 { |
292 TRACER("CGlxMetadataDialog::CreateCustomControlL"); |
287 GLX_LOG_INFO("CShwSlideshowSettingsDialog::CreateCustomControlL"); |
293 |
288 |
294 // create control info, no flags or trailer text set |
289 // create control info, no flags or trailer text set |
295 SEikControlInfo controlInfo; |
290 SEikControlInfo controlInfo; |
296 controlInfo.iControl = NULL; |
291 controlInfo.iControl = NULL; |
297 controlInfo.iTrailerTextId = 0; |
292 controlInfo.iTrailerTextId = 0; |
303 controlInfo.iControl = iContainer; // giving ownership |
298 controlInfo.iControl = iContainer; // giving ownership |
304 } |
299 } |
305 return controlInfo; // returns ownership of ItemList |
300 return controlInfo; // returns ownership of ItemList |
306 } |
301 } |
307 |
302 |
|
303 |
308 // ----------------------------------------------------------------------------- |
304 // ----------------------------------------------------------------------------- |
309 // CGlxMetadataDialog::OfferKeyEventL |
305 // CGlxMetadataDialog::OfferKeyEventL |
310 // ----------------------------------------------------------------------------- |
306 // ----------------------------------------------------------------------------- |
311 // |
307 // |
312 TKeyResponse CGlxMetadataDialog::OfferKeyEventL( const TKeyEvent& aKeyEvent, |
308 TKeyResponse CGlxMetadataDialog::OfferKeyEventL( const TKeyEvent& aKeyEvent, |
313 TEventCode aType ) |
309 TEventCode aType ) |
314 { |
310 { |
315 TRACER("CGlxMetadataDialog::OfferKeyEventL"); |
311 TRACER("CGlxMetadataDialog::OfferKeyEventL"); |
316 TKeyResponse response = EKeyWasNotConsumed; |
312 TKeyResponse response = EKeyWasNotConsumed; |
317 switch (aKeyEvent.iCode) |
313 switch(aKeyEvent.iCode) |
318 { |
314 { |
319 case EKeyUpArrow: |
315 case EKeyUpArrow: |
320 case EKeyDownArrow: |
316 case EKeyDownArrow: |
321 { |
317 { |
322 if (!iUiUtility->IsPenSupported()) |
318 if(!iUiUtility->IsPenSupported()) |
323 { |
319 { |
324 iContainer->ChangeMskL(); |
320 iContainer->ChangeMskL(); |
325 } |
321 } |
326 iContainer->EnableMarqueingL(); |
322 iContainer->EnableMarqueingL(); |
327 break; |
323 break; |
328 } |
324 } |
329 default: |
325 default: |
330 break; |
326 break; |
331 } |
327 } |
332 if (response == EKeyWasNotConsumed) |
328 if ( response == EKeyWasNotConsumed ) |
333 { |
329 { |
334 // container didn't consume the key so try the base class |
330 // container didn't consume the key so try the base class |
335 // this is crucial as platform uses a key event to dismiss dialog |
331 // this is crucial as platform uses a key event to dismiss dialog |
336 // when a view changes to another. the base class also consumes all |
332 // when a view changes to another. the base class also consumes all |
337 // the keys we dont want to handle automatically as this is a |
333 // the keys we dont want to handle automatically as this is a |
338 // blocking dialog |
334 // blocking dialog |
339 response = CAknDialog::OfferKeyEventL(aKeyEvent, aType); |
335 response = CAknDialog::OfferKeyEventL( aKeyEvent, aType ); |
340 } |
336 } |
341 return response; |
337 return response; |
342 } |
338 } |
343 |
339 |
344 // ----------------------------------------------------------------------------- |
340 // ----------------------------------------------------------------------------- |
345 // CGlxMetadataDialog::DynInitMenuPaneL |
341 // CGlxMetadataDialog::DynInitMenuPaneL |
346 // ----------------------------------------------------------------------------- |
342 // ----------------------------------------------------------------------------- |
347 // |
343 // |
402 break; |
398 break; |
403 } |
399 } |
404 return retVal; |
400 return retVal; |
405 } |
401 } |
406 |
402 |
|
403 //----------------------------------------------------------------------------- |
|
404 // CGlxMetadataDialog::SizeChanged |
|
405 //----------------------------------------------------------------------------- |
|
406 void CGlxMetadataDialog::SizeChanged() |
|
407 { |
|
408 TRACER("CGlxMetadataDialog::SizeChanged"); |
|
409 CAknDialog::SizeChanged(); |
|
410 } |
407 // ----------------------------------------------------------------------------- |
411 // ----------------------------------------------------------------------------- |
408 // CGlxMetadataDialog::InitResourceL |
412 // CGlxMetadataDialog::InitResourceL |
409 // ----------------------------------------------------------------------------- |
413 // ----------------------------------------------------------------------------- |
410 // |
414 // |
411 void CGlxMetadataDialog::InitResourceL() |
415 void CGlxMetadataDialog::InitResourceL() |
412 { |
416 { |
413 TRACER("CGlxMetadataDialog::InitResourceL"); |
417 TRACER("CGlxMetadataDialog::InitResourceL"); |
|
418 |
414 _LIT(KGlxMetadataDialogResource,"glxmetadatadialog.rsc"); |
419 _LIT(KGlxMetadataDialogResource,"glxmetadatadialog.rsc"); |
415 //add resource file |
420 //add resource file |
416 TParse parse; |
421 TParse parse; |
417 parse.Set(KGlxMetadataDialogResource, &KDC_APP_RESOURCE_DIR, NULL); |
422 parse.Set(KGlxMetadataDialogResource, &KDC_APP_RESOURCE_DIR, NULL); |
418 TFileName resourceFile; |
423 TFileName resourceFile; |
419 resourceFile.Append(parse.FullName()); |
424 resourceFile.Append(parse.FullName()); |
420 CGlxResourceUtilities::GetResourceFilenameL(resourceFile); |
425 CGlxResourceUtilities::GetResourceFilenameL(resourceFile); |
421 iResourceOffset = CCoeEnv::Static()->AddResourceFileL(resourceFile); |
426 iResourceOffset = CCoeEnv::Static()->AddResourceFileL(resourceFile); |
422 } |
427 } |
423 |
428 |
|
429 |
424 // ----------------------------------------------------------------------------- |
430 // ----------------------------------------------------------------------------- |
425 // CGlxMetadataDialog::HandleViewCommandL |
431 // CGlxMetadataDialog::HandleViewCommandL |
426 // ----------------------------------------------------------------------------- |
432 // ----------------------------------------------------------------------------- |
427 // |
433 // |
428 TBool CGlxMetadataDialog::HandleViewCommandL( TInt /*aCommand*/ ) |
434 TBool CGlxMetadataDialog::HandleViewCommandL( TInt /*aCommand*/ ) |
429 { |
435 { |
430 TRACER("CGlxMetadataDialog::HandleViewCommandL"); |
436 TRACER("CGlxMetadataDialog::HandleViewCommandL"); |
431 return EFalse; |
437 return EFalse; |
432 } |
438 } |
433 |
439 // --------------------------------------------------------------------------- |
|
440 // CGlxMetadataDialog::PreLayoutDynInitL |
|
441 // --------------------------------------------------------------------------- |
|
442 // |
|
443 void CGlxMetadataDialog::PreLayoutDynInitL() |
|
444 { |
|
445 // No Implementation |
|
446 } |
|
447 |
434 //----------------------------------------------------------------------------- |
448 //----------------------------------------------------------------------------- |
435 // CGlxMetadataDialog::PostLayoutDynInitL |
449 // CGlxMetadataDialog::PostLayoutDynInitL |
436 //----------------------------------------------------------------------------- |
450 //----------------------------------------------------------------------------- |
437 // |
451 // |
438 void CGlxMetadataDialog::PostLayoutDynInitL() |
452 void CGlxMetadataDialog::PostLayoutDynInitL() |
439 { |
453 { |
440 TRACER("CGlxMetadataDialog::PostLayoutDynInitL"); |
454 TRACER("CGlxMetadataDialog::PostLayoutDynInitL"); |
441 if (!iUiUtility->IsPenSupported()) |
455 if(!iUiUtility->IsPenSupported()) |
442 { |
456 { |
443 iUiUtility->ScreenFurniture()->ModifySoftkeyIdL( |
457 iUiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition, |
444 CEikButtonGroupContainer::EMiddleSoftkeyPosition, |
458 EAknSoftkeyEdit,R_GLX_METADATA_MSK_EDIT); |
445 EAknSoftkeyEdit, R_GLX_METADATA_MSK_EDIT); |
459 } |
446 } |
460 } |
447 } |
461 |
|
462 //----------------------------------------------------------------------------- |
|
463 // CGlxMetadataDialog::Draw |
|
464 //----------------------------------------------------------------------------- |
|
465 // |
|
466 void CGlxMetadataDialog::Draw( const TRect& /*aRect*/ ) const |
|
467 { |
|
468 TRACER("CGlxMetadataDialog::Draw"); |
|
469 TRect rect; |
|
470 AknLayoutUtils::LayoutMetricsRect (AknLayoutUtils::EMainPane, rect); |
|
471 |
|
472 // Get the standard graphics context |
|
473 CWindowGc& gc = SystemGc(); |
|
474 gc.SetBrushColor(KRgbWhite); |
|
475 gc.DrawRect(rect); |
|
476 } |
448 |
477 |
449 //----------------------------------------------------------------------------- |
478 //----------------------------------------------------------------------------- |
450 // CGlxMetadataDialog::HandlePointerEventL |
479 // CGlxMetadataDialog::HandlePointerEventL |
451 //----------------------------------------------------------------------------- |
480 //----------------------------------------------------------------------------- |
452 // |
481 // |
453 void CGlxMetadataDialog::HandlePointerEventL( |
482 void CGlxMetadataDialog::HandlePointerEventL( |
454 const TPointerEvent& aPointerEvent) |
483 const TPointerEvent& aPointerEvent) |
455 { |
484 { |
|
485 |
456 TRACER("CGlxMetadataDialog::HandlePointerEventL"); |
486 TRACER("CGlxMetadataDialog::HandlePointerEventL"); |
457 |
487 |
458 //This has to be called first, as base class implementation sets the flag |
488 //This has to be called first, as base class implementation sets the flag |
459 // of settings dialog with EDisableMarquee |
489 // of settings dialog with EDisableMarquee |
460 CCoeControl::HandlePointerEventL(aPointerEvent); |
490 CCoeControl::HandlePointerEventL( aPointerEvent ); |
461 |
491 |
462 //After the above call we can call our implementation to reset the marque |
492 //After the above call we can call our implementation to reset the marque |
463 // flag and start marqueeing if needed |
493 // flag and start marqueeing if needed |
464 if (aPointerEvent.iType == TPointerEvent::EButton1Down |
494 if(aPointerEvent.iType == TPointerEvent::EButton1Down |
465 || aPointerEvent.iType == TPointerEvent::EButton2Down |
495 || aPointerEvent.iType == TPointerEvent::EButton2Down |
466 || aPointerEvent.iType == TPointerEvent::EButton3Down |
496 || aPointerEvent.iType == TPointerEvent::EButton3Down |
467 || aPointerEvent.iType == TPointerEvent::EDrag) |
497 || aPointerEvent.iType == TPointerEvent::EDrag) |
468 { |
498 { |
469 if (aPointerEvent.iType != TPointerEvent::EDrag) |
499 if(aPointerEvent.iType != TPointerEvent::EDrag) |
470 { |
500 { |
471 iViewDragged = EFalse; |
501 iViewDragged = EFalse; |
472 } |
502 } |
473 |
503 |
474 if (aPointerEvent.iType == TPointerEvent::EDrag) |
504 if(aPointerEvent.iType == TPointerEvent::EDrag) |
475 { |
505 { |
476 TInt delta = iPrev.iY - aPointerEvent.iPosition.iY; |
506 TInt delta = iPrev.iY - aPointerEvent.iPosition.iY; |
477 //Check for physics threshold, if not more than threshold, we can |
507 //Check for physics threshold, if not more than threshold, we can |
478 //still continue marqueeing |
508 //still continue marqueeing |
479 TInt deltaAbs = delta < 0 ? -delta : delta; |
509 TInt deltaAbs = delta < 0 ? -delta : delta; |
480 if (!iViewDragged && deltaAbs >= iKineticDragThreshold) |
510 if(!iViewDragged && deltaAbs >= iKineticDragThreshold) |
481 { |
511 iViewDragged = ETrue; |
482 iViewDragged = ETrue; |
|
483 } |
|
484 } |
512 } |
485 |
513 |
486 //This has to done at every above mentioned event, since the |
514 //This has to done at every above mentioned event, since the |
487 //disable marquee flag is set by base implementation, forcing |
515 //disable marquee flag is set by base implementation, forcing |
488 //us the need to reset it everytime. |
516 //us the need to reset it everytime. |
489 if (!iViewDragged) |
517 if(!iViewDragged) |
490 { |
518 { |
491 iContainer->EnableMarqueingL(); |
519 iContainer->EnableMarqueingL(); |
492 } |
520 } |
493 } |
521 } |
494 |
522 |
495 //record positions unless it is drag event |
523 //record positions unless it is drag event |
496 if (aPointerEvent.iType != TPointerEvent::EDrag) |
524 if(aPointerEvent.iType != TPointerEvent::EDrag) |
497 { |
525 { |
498 iPrev = aPointerEvent.iPosition; |
526 iPrev = aPointerEvent.iPosition; |
499 } |
527 } |
500 } |
528 } |
501 |
529 |
502 // --------------------------------------------------------------------------- |
530 // --------------------------------------------------------------------------- |
503 // CGlxMetadataDialog::OnLocationEditL |
531 // CGlxMetadataDialog::OnLocationEditL |
504 // --------------------------------------------------------------------------- |
532 // --------------------------------------------------------------------------- |
505 // |
533 // |
508 TRACER("CGlxMetadataDialog::OnLocationEditL"); |
536 TRACER("CGlxMetadataDialog::OnLocationEditL"); |
509 OkToExitL( EAknSoftkeyOptions ); |
537 OkToExitL( EAknSoftkeyOptions ); |
510 } |
538 } |
511 |
539 |
512 // --------------------------------------------------------------------------- |
540 // --------------------------------------------------------------------------- |
513 // CGlxMetadataDialog::AddTagL |
541 // CGlxMetadataDialog::AddTag |
514 // --------------------------------------------------------------------------- |
542 // --------------------------------------------------------------------------- |
515 // |
543 // |
516 void CGlxMetadataDialog::AddTagL() |
544 void CGlxMetadataDialog::AddTagL() |
517 { |
545 { |
518 TRACER("CGlxMetadataDialog::AddTagL"); |
|
519 iAddToTag->ExecuteL(EGlxCmdAddTag); |
546 iAddToTag->ExecuteL(EGlxCmdAddTag); |
520 } |
547 } |
521 |
548 // --------------------------------------------------------------------------- |
522 // --------------------------------------------------------------------------- |
549 // CGlxMetadataDialog::AddAlbum |
523 // CGlxMetadataDialog::AddAlbumL |
|
524 // --------------------------------------------------------------------------- |
550 // --------------------------------------------------------------------------- |
525 // |
551 // |
526 void CGlxMetadataDialog::AddAlbumL() |
552 void CGlxMetadataDialog::AddAlbumL() |
527 { |
553 { |
528 TRACER("CGlxMetadataDialog::AddAlbumL"); |
|
529 iAddToAlbum->ExecuteL(EGlxCmdAddToAlbum); |
554 iAddToAlbum->ExecuteL(EGlxCmdAddToAlbum); |
530 } |
555 } |
531 |
|
532 // --------------------------------------------------------------------------- |
|
533 // CGlxMetadataDialog::HandleItemRemovedL |
|
534 // --------------------------------------------------------------------------- |
|
535 // |
|
536 void CGlxMetadataDialog::HandleItemRemovedL() |
|
537 { |
|
538 TRACER("CGlxMetadataDialog::HandleItemRemovedL"); |
|
539 Extension()->iPublicFlags.Set(CEikDialogExtension::EDelayedExit); |
|
540 ProcessCommandL(EAknSoftkeyCancel); |
|
541 Extension()->iPublicFlags.Clear(CEikDialogExtension::EDelayedExit); |
|
542 } |
|
543 |
556 |
544 // --------------------------------------------------------------------------- |
557 // --------------------------------------------------------------------------- |
545 // CGlxMetadataDialog::SetTitleL() |
558 // CGlxMetadataDialog::SetTitleL() |
546 // --------------------------------------------------------------------------- |
559 // --------------------------------------------------------------------------- |
547 void CGlxMetadataDialog::SetTitleL(const TDesC& aTitleText) |
560 void CGlxMetadataDialog::SetTitleL(const TDesC& aTitleText) |
548 { |
561 { |
549 TRACER("CGlxMetadataDialog::SetTitleL"); |
562 TRACER("CGlxFetcherContainer::SetTitleL"); |
550 CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane(); |
563 CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane(); |
551 CleanupStack::PushL(statusPane); |
564 CleanupStack::PushL(statusPane); |
552 // get pointer to the default title pane control |
565 // get pointer to the default title pane control |
553 CAknTitlePane* titlePane = ( CAknTitlePane* )statusPane->ControlL( |
566 CAknTitlePane* titlePane = ( CAknTitlePane* )statusPane->ControlL( |
554 TUid::Uid( EEikStatusPaneUidTitle )); |
567 TUid::Uid( EEikStatusPaneUidTitle )); |
582 prevTitlePane->SetTextL( *iPreviousTitle ); |
595 prevTitlePane->SetTextL( *iPreviousTitle ); |
583 } |
596 } |
584 CleanupStack::Pop(prevTitlePane); |
597 CleanupStack::Pop(prevTitlePane); |
585 CleanupStack::Pop(prevStatusPane); |
598 CleanupStack::Pop(prevStatusPane); |
586 } |
599 } |
|
600 // ----------------------------------------------------------------------------- |
|
601 // CGlxMetadataDialog::HandleResourceChange |
|
602 // ----------------------------------------------------------------------------- |
|
603 // |
|
604 void CGlxMetadataDialog::HandleResourceChange( TInt aType ) |
|
605 { |
|
606 TRACER("CGlxMetadataDialog::HandleResourceChange"); |
|
607 //Handle global resource changes, such as scalable UI or skin events and orientation change (override) |
|
608 CAknDialog::HandleResourceChange( aType ); |
|
609 } |
587 |
610 |
588 // ----------------------------------------------------------------------------- |
611 // ----------------------------------------------------------------------------- |
589 // CGlxMetadataDialog::HandleToolbarResetting |
612 // CGlxMetadataDialog::HandleToolbarResetting |
590 // ----------------------------------------------------------------------------- |
613 // ----------------------------------------------------------------------------- |
591 // |
614 // |
592 void CGlxMetadataDialog::HandleToolbarResetting(TBool aVisible) |
615 void CGlxMetadataDialog::HandleToolbarResetting(TBool aVisible) |
593 { |
616 { |
594 TRACER("CGlxMetadataDialog::HandleToolbarResetting"); |
617 TRACER("CGlxMetadataDialog::HandleToolbarResetting"); |
|
618 |
595 CAknToolbar* popupToolbar = iAvkonAppUi->PopupToolbar(); |
619 CAknToolbar* popupToolbar = iAvkonAppUi->PopupToolbar(); |
596 if(popupToolbar) |
620 if(popupToolbar) |
597 { |
621 { |
598 popupToolbar->SetToolbarVisibility( !aVisible ); |
622 popupToolbar->SetToolbarVisibility( !aVisible ); |
599 popupToolbar->MakeVisible( !aVisible ); |
623 popupToolbar->MakeVisible( !aVisible ); |