|
1 /* |
|
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implementation of Metadata dialog |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "glxmetadatadialog.h" |
|
19 |
|
20 //system includes |
|
21 #include <AknUtils.h> //for AknUtils |
|
22 #include <lbsposition.h> |
|
23 #include <akntitle.h> |
|
24 #include <coeaui.h> |
|
25 #include <data_caging_path_literals.hrh>// KDC_APP_RESOURCE_DIR |
|
26 #include <eikmenub.h> // for CEikMenuBar |
|
27 #include <StringLoader.h> |
|
28 #include <akntoolbar.h> |
|
29 #include <glxcommandhandleraddtocontainer.h> // For CGlxCommandHandlerAddToContainer |
|
30 #include <aknphysics.h> // For Kinetic Scrolling |
|
31 #include <eikdialogext.h> |
|
32 |
|
33 //User includes |
|
34 #include <glxmetadatadialog.rsg> |
|
35 #include <glxresourceutilities.h> |
|
36 #include <glxlog.h> |
|
37 #include <glxtracer.h> |
|
38 #include <glxcollectionpluginall.hrh> |
|
39 #include <glxfilterfactory.h> // for TGlxFilterFactory |
|
40 #include <glxuiutility.h> |
|
41 #include <glxcommandhandlers.hrh> |
|
42 #include <hlplch.h> // for HlpLauncher |
|
43 #include <photos.hlp.hrh> |
|
44 #include <glxgallery.hrh> |
|
45 #include <glxdetailsboundcommand.hrh> |
|
46 #include <glxscreenfurniture.h> |
|
47 #include <glxuiutilities.rsg> |
|
48 #include <glxpanic.h> // For Panics |
|
49 #include <glxresourceutilities.h> // for CGlxResourceUtilities |
|
50 #include "glxmetadatacommandhandler.h" |
|
51 |
|
52 // ============================ MEMBER FUNCTIONS =============================== |
|
53 |
|
54 // ----------------------------------------------------------------------------- |
|
55 // NewL |
|
56 // ----------------------------------------------------------------------------- |
|
57 // |
|
58 EXPORT_C CGlxMetadataDialog* CGlxMetadataDialog::NewL(const TDesC& aUri) |
|
59 { |
|
60 TRACER("CGlxMetadataDialog::NewL"); |
|
61 |
|
62 CGlxMetadataDialog* self = new (ELeave) CGlxMetadataDialog(aUri); |
|
63 CleanupStack::PushL(self); |
|
64 self->ConstructL(); |
|
65 CleanupStack::Pop(self); |
|
66 return self; |
|
67 } |
|
68 |
|
69 CGlxMetadataDialog::CGlxMetadataDialog(const TDesC& aUri) : |
|
70 iUri(aUri) |
|
71 { |
|
72 } |
|
73 |
|
74 // ----------------------------------------------------------------------------- |
|
75 // ConstructL |
|
76 // ----------------------------------------------------------------------------- |
|
77 // |
|
78 void CGlxMetadataDialog::ConstructL() |
|
79 { |
|
80 TRACER("CGlxMetadataDialog::ConstructL"); |
|
81 |
|
82 // Load dialog's resource file |
|
83 InitResourceL(); |
|
84 |
|
85 iStatusPaneAvailable = EFalse; |
|
86 // 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 |
|
88 // get status pane |
|
89 CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane(); |
|
90 |
|
91 if (statusPane && statusPane->IsVisible()) |
|
92 { |
|
93 iStatusPaneAvailable = ETrue; |
|
94 } |
|
95 |
|
96 // make the toolbar disabled |
|
97 SetDetailsDlgToolbarVisibility(EFalse); |
|
98 |
|
99 // do we have status pane |
|
100 if (statusPane) |
|
101 { |
|
102 GLX_LOG_INFO1("GLX_UMP::CGlxMetadataDialog::ConstructL::STATUS PANE = %d",statusPane->IsVisible()); |
|
103 // load the title text |
|
104 HBufC* text = StringLoader::LoadL(R_GLX_METADATA_VIEW_TITLE_DETAILS, |
|
105 iEikonEnv); |
|
106 SetTitleL(*text); |
|
107 if (text) |
|
108 { |
|
109 delete text; |
|
110 } |
|
111 iAvkonAppUi->StatusPane()->MakeVisible(ETrue); |
|
112 } |
|
113 |
|
114 iUiUtility = CGlxUiUtility::UtilityL(); |
|
115 TFileName uiutilitiesrscfile; |
|
116 uiutilitiesrscfile.Append( |
|
117 CGlxResourceUtilities::GetUiUtilitiesResourceFilenameL()); |
|
118 |
|
119 iAddToTag = CGlxCommandHandlerAddToContainer::NewL(this, EGlxCmdAddTag, |
|
120 EFalse, uiutilitiesrscfile); |
|
121 iAddToAlbum = CGlxCommandHandlerAddToContainer::NewL(this, |
|
122 EGlxCmdAddToAlbum, EFalse, uiutilitiesrscfile); |
|
123 |
|
124 // Call the base class' two-phased constructor |
|
125 CAknDialog::ConstructL(R_METADATA_MENUBAR); |
|
126 |
|
127 // Instantiate the command handler |
|
128 iMetadataCmdHandler = CGlxMetadataCommandHandler::NewL(this); |
|
129 |
|
130 //steps to find kinetic scroll threshold value |
|
131 CAknPhysics* physics = CAknPhysics::NewL(*this, NULL); |
|
132 CleanupStack::PushL(physics); |
|
133 iKineticDragThreshold = physics->DragThreshold(); |
|
134 CleanupStack::PopAndDestroy(physics); |
|
135 physics = NULL; |
|
136 } |
|
137 |
|
138 // ----------------------------------------------------------------------------- |
|
139 // ~CGlxMetadataDialog |
|
140 // ----------------------------------------------------------------------------- |
|
141 // |
|
142 CGlxMetadataDialog::~CGlxMetadataDialog() |
|
143 { |
|
144 TRACER("CGlxMetadataDialog::~CGlxMetadataDialog"); |
|
145 |
|
146 //To Disable the status pane if the dialog is launched from fullscreenview |
|
147 if (!iStatusPaneAvailable && iAvkonAppUi) |
|
148 { |
|
149 iAvkonAppUi->StatusPane()->MakeVisible(EFalse); |
|
150 } |
|
151 |
|
152 TRAP_IGNORE(SetPreviousTitleL()); |
|
153 |
|
154 delete iPreviousTitle; |
|
155 delete iMetadataCmdHandler; |
|
156 |
|
157 // Restore the Toolbar as it was in the Calling application |
|
158 SetDetailsDlgToolbarVisibility(ETrue); |
|
159 |
|
160 // If details launched from FullScreen View, while moving back, |
|
161 // all the UI components should be hidden. Hence processing this command here. |
|
162 if (iAvkonAppUi) |
|
163 { |
|
164 TRAP_IGNORE(iAvkonAppUi->ProcessCommandL(EGlxCmdResetView)); |
|
165 } |
|
166 |
|
167 if (iAddToTag) |
|
168 { |
|
169 delete iAddToTag; |
|
170 } |
|
171 |
|
172 if (iAddToAlbum) |
|
173 { |
|
174 delete iAddToAlbum; |
|
175 } |
|
176 |
|
177 if (iUiUtility) |
|
178 { |
|
179 iUiUtility->Close(); |
|
180 } |
|
181 |
|
182 if (iResourceOffset) |
|
183 { |
|
184 CCoeEnv::Static()->DeleteResourceFile(iResourceOffset); |
|
185 } |
|
186 } |
|
187 |
|
188 // --------------------------------------------------------------------------- |
|
189 // SetDetailsDlgToolbarVisibility() |
|
190 // --------------------------------------------------------------------------- |
|
191 void CGlxMetadataDialog::SetDetailsDlgToolbarVisibility(TBool aVisible) |
|
192 { |
|
193 TRACER("CGlxMetadataDialog::SetDetailsDlgToolbarVisibility"); |
|
194 |
|
195 HandleToolbarResetting(aVisible); |
|
196 CAknToolbar* currentPopupToolbar = iAvkonAppUi->CurrentPopupToolbar(); |
|
197 if(currentPopupToolbar) |
|
198 { |
|
199 currentPopupToolbar->SetToolbarVisibility(aVisible); |
|
200 currentPopupToolbar->MakeVisible( aVisible ); |
|
201 } |
|
202 } |
|
203 |
|
204 // ----------------------------------------------------------------------------- |
|
205 // ExecuteLD |
|
206 // ----------------------------------------------------------------------------- |
|
207 // |
|
208 EXPORT_C TInt CGlxMetadataDialog::ExecuteLD() |
|
209 { |
|
210 TRACER("CGlxMetadataDialog::ExecuteLD"); |
|
211 return CAknDialog::ExecuteLD( R_METADATA_DIALOG ); |
|
212 } |
|
213 // --------------------------------------------------------------------------- |
|
214 // MediaList. |
|
215 // --------------------------------------------------------------------------- |
|
216 // |
|
217 MGlxMediaList& CGlxMetadataDialog::MediaList() |
|
218 { |
|
219 TRACER("CGlxMetadataDialog::MediaList"); |
|
220 // return the refernce of media list |
|
221 return iContainer->MediaList(); |
|
222 } |
|
223 |
|
224 // ----------------------------------------------------------------------------- |
|
225 // ProcessCommandL |
|
226 // ----------------------------------------------------------------------------- |
|
227 // |
|
228 void CGlxMetadataDialog::ProcessCommandL( TInt aCommandId ) |
|
229 { |
|
230 TRACER("CGlxMetadataDialog::ProcessCommandL"); |
|
231 |
|
232 // hide menu bar |
|
233 iMenuBar->StopDisplayingMenuBar(); |
|
234 |
|
235 switch (aCommandId) |
|
236 { |
|
237 case EAknSoftkeyEdit: |
|
238 case EAknSoftkeyCancel: |
|
239 case EAknSoftkeySelect: |
|
240 case EAknSoftkeyOk: |
|
241 { |
|
242 TryExitL(aCommandId); |
|
243 break; |
|
244 } |
|
245 |
|
246 case EAknCmdHelp: |
|
247 { |
|
248 TCoeHelpContext helpContext; |
|
249 helpContext.iMajor = TUid::Uid(KGlxGalleryApplicationUid); |
|
250 helpContext.iContext.Copy(LGAL_HLP_DETAILS_VIEW); |
|
251 const TInt KListSz = 1; |
|
252 CArrayFix<TCoeHelpContext>* contextList = |
|
253 new (ELeave) CArrayFixFlat<TCoeHelpContext> (KListSz); |
|
254 CleanupStack::PushL(contextList); |
|
255 contextList->AppendL(helpContext); |
|
256 HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), |
|
257 contextList); |
|
258 CleanupStack::Pop(contextList); |
|
259 break; |
|
260 } |
|
261 case KGlxDeleteBoundMenuCommandId: |
|
262 { |
|
263 //Event passed on to container to handle |
|
264 //Delete the location information of the data. |
|
265 iContainer->RemoveLocationL(); |
|
266 break; |
|
267 } |
|
268 case KGlxEditBoundMenuCommandId: |
|
269 case KGlxViewBoundMenuCommandId: |
|
270 { |
|
271 //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. |
|
273 iContainer->HandleListboxChangesL(); |
|
274 break; |
|
275 } |
|
276 case EGlxCmdAiwBase: |
|
277 { |
|
278 // pass aCommandId to command handler |
|
279 iMetadataCmdHandler->DoExecuteL(aCommandId, MediaList()); |
|
280 } |
|
281 default: |
|
282 break; |
|
283 } |
|
284 } |
|
285 |
|
286 //----------------------------------------------------------------------------- |
|
287 // CGlxMetadataDialog::CreateCustomControlL |
|
288 //----------------------------------------------------------------------------- |
|
289 SEikControlInfo CGlxMetadataDialog::CreateCustomControlL(TInt |
|
290 aControlType) |
|
291 { |
|
292 TRACER("CGlxMetadataDialog::CreateCustomControlL"); |
|
293 |
|
294 // create control info, no flags or trailer text set |
|
295 SEikControlInfo controlInfo; |
|
296 controlInfo.iControl = NULL; |
|
297 controlInfo.iTrailerTextId = 0; |
|
298 controlInfo.iFlags = 0; |
|
299 if (aControlType == EMetaDataDialogListBox) |
|
300 { |
|
301 iContainer = CGlxMetadataContainer::NewL(iAvkonAppUi->ClientRect(), |
|
302 *this, iUri, *this); |
|
303 controlInfo.iControl = iContainer; // giving ownership |
|
304 } |
|
305 return controlInfo; // returns ownership of ItemList |
|
306 } |
|
307 |
|
308 // ----------------------------------------------------------------------------- |
|
309 // CGlxMetadataDialog::OfferKeyEventL |
|
310 // ----------------------------------------------------------------------------- |
|
311 // |
|
312 TKeyResponse CGlxMetadataDialog::OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
313 TEventCode aType ) |
|
314 { |
|
315 TRACER("CGlxMetadataDialog::OfferKeyEventL"); |
|
316 TKeyResponse response = EKeyWasNotConsumed; |
|
317 switch (aKeyEvent.iCode) |
|
318 { |
|
319 case EKeyUpArrow: |
|
320 case EKeyDownArrow: |
|
321 { |
|
322 if (!iUiUtility->IsPenSupported()) |
|
323 { |
|
324 iContainer->ChangeMskL(); |
|
325 } |
|
326 iContainer->EnableMarqueingL(); |
|
327 break; |
|
328 } |
|
329 default: |
|
330 break; |
|
331 } |
|
332 if (response == EKeyWasNotConsumed) |
|
333 { |
|
334 // container didn't consume the key so try the base class |
|
335 // 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 |
|
337 // the keys we dont want to handle automatically as this is a |
|
338 // blocking dialog |
|
339 response = CAknDialog::OfferKeyEventL(aKeyEvent, aType); |
|
340 } |
|
341 return response; |
|
342 } |
|
343 |
|
344 // ----------------------------------------------------------------------------- |
|
345 // CGlxMetadataDialog::DynInitMenuPaneL |
|
346 // ----------------------------------------------------------------------------- |
|
347 // |
|
348 void CGlxMetadataDialog::DynInitMenuPaneL( TInt aMenuId, CEikMenuPane* aMenuPane ) |
|
349 { |
|
350 TRACER("CGlxMetadataDialog::DynInitMenuPaneL"); |
|
351 iMetadataCmdHandler->PreDynInitMenuPaneL(aMenuId); |
|
352 iMetadataCmdHandler->DynInitMenuPaneL(aMenuId,aMenuPane,EFalse); |
|
353 //To enable/diable the options based on the item selected. |
|
354 iContainer->ViewDynInitMenuPaneL(aMenuId, aMenuPane); |
|
355 } |
|
356 |
|
357 // ----------------------------------------------------------------------------- |
|
358 // OkToExitL |
|
359 // ----------------------------------------------------------------------------- |
|
360 // |
|
361 TBool CGlxMetadataDialog::OkToExitL( TInt aKeycode ) |
|
362 { |
|
363 TRACER("CGlxMetadataDialog::OkToExitL"); |
|
364 |
|
365 TBool retVal = EFalse; |
|
366 |
|
367 switch (aKeycode) |
|
368 { |
|
369 case EAknSoftkeySelect: |
|
370 case EAknSoftkeyOk: |
|
371 { |
|
372 break; |
|
373 } |
|
374 case EAknSoftkeyOptions: |
|
375 { |
|
376 // display menu only |
|
377 // show the option menu that can have mutiselect options |
|
378 iMenuBar->SetMenuType( CEikMenuBar::EMenuOptions ); |
|
379 retVal = CAknDialog::OkToExitL( aKeycode ); |
|
380 break; |
|
381 } |
|
382 case EAknSoftkeyBack: |
|
383 case EAknSoftkeyCancel: |
|
384 { |
|
385 retVal = ETrue; |
|
386 break; |
|
387 } |
|
388 |
|
389 case EAknSoftkeyEdit: |
|
390 { |
|
391 if(!iUiUtility->IsPenSupported()) |
|
392 { |
|
393 iContainer->HandleListboxChangesL(); |
|
394 } |
|
395 else |
|
396 { |
|
397 HandleViewCommandL(aKeycode); |
|
398 } |
|
399 break; |
|
400 } |
|
401 default : |
|
402 break; |
|
403 } |
|
404 return retVal; |
|
405 } |
|
406 |
|
407 // ----------------------------------------------------------------------------- |
|
408 // CGlxMetadataDialog::InitResourceL |
|
409 // ----------------------------------------------------------------------------- |
|
410 // |
|
411 void CGlxMetadataDialog::InitResourceL() |
|
412 { |
|
413 TRACER("CGlxMetadataDialog::InitResourceL"); |
|
414 _LIT(KGlxMetadataDialogResource,"glxmetadatadialog.rsc"); |
|
415 //add resource file |
|
416 TParse parse; |
|
417 parse.Set(KGlxMetadataDialogResource, &KDC_APP_RESOURCE_DIR, NULL); |
|
418 TFileName resourceFile; |
|
419 resourceFile.Append(parse.FullName()); |
|
420 CGlxResourceUtilities::GetResourceFilenameL(resourceFile); |
|
421 iResourceOffset = CCoeEnv::Static()->AddResourceFileL(resourceFile); |
|
422 } |
|
423 |
|
424 // ----------------------------------------------------------------------------- |
|
425 // CGlxMetadataDialog::HandleViewCommandL |
|
426 // ----------------------------------------------------------------------------- |
|
427 // |
|
428 TBool CGlxMetadataDialog::HandleViewCommandL( TInt /*aCommand*/ ) |
|
429 { |
|
430 TRACER("CGlxMetadataDialog::HandleViewCommandL"); |
|
431 return EFalse; |
|
432 } |
|
433 |
|
434 //----------------------------------------------------------------------------- |
|
435 // CGlxMetadataDialog::PostLayoutDynInitL |
|
436 //----------------------------------------------------------------------------- |
|
437 // |
|
438 void CGlxMetadataDialog::PostLayoutDynInitL() |
|
439 { |
|
440 TRACER("CGlxMetadataDialog::PostLayoutDynInitL"); |
|
441 if (!iUiUtility->IsPenSupported()) |
|
442 { |
|
443 iUiUtility->ScreenFurniture()->ModifySoftkeyIdL( |
|
444 CEikButtonGroupContainer::EMiddleSoftkeyPosition, |
|
445 EAknSoftkeyEdit, R_GLX_METADATA_MSK_EDIT); |
|
446 } |
|
447 } |
|
448 |
|
449 //----------------------------------------------------------------------------- |
|
450 // CGlxMetadataDialog::HandlePointerEventL |
|
451 //----------------------------------------------------------------------------- |
|
452 // |
|
453 void CGlxMetadataDialog::HandlePointerEventL( |
|
454 const TPointerEvent& aPointerEvent) |
|
455 { |
|
456 TRACER("CGlxMetadataDialog::HandlePointerEventL"); |
|
457 |
|
458 //This has to be called first, as base class implementation sets the flag |
|
459 // of settings dialog with EDisableMarquee |
|
460 CCoeControl::HandlePointerEventL(aPointerEvent); |
|
461 |
|
462 //After the above call we can call our implementation to reset the marque |
|
463 // flag and start marqueeing if needed |
|
464 if (aPointerEvent.iType == TPointerEvent::EButton1Down |
|
465 || aPointerEvent.iType == TPointerEvent::EButton2Down |
|
466 || aPointerEvent.iType == TPointerEvent::EButton3Down |
|
467 || aPointerEvent.iType == TPointerEvent::EDrag) |
|
468 { |
|
469 if (aPointerEvent.iType != TPointerEvent::EDrag) |
|
470 { |
|
471 iViewDragged = EFalse; |
|
472 } |
|
473 |
|
474 if (aPointerEvent.iType == TPointerEvent::EDrag) |
|
475 { |
|
476 TInt delta = iPrev.iY - aPointerEvent.iPosition.iY; |
|
477 //Check for physics threshold, if not more than threshold, we can |
|
478 //still continue marqueeing |
|
479 TInt deltaAbs = delta < 0 ? -delta : delta; |
|
480 if (!iViewDragged && deltaAbs >= iKineticDragThreshold) |
|
481 { |
|
482 iViewDragged = ETrue; |
|
483 } |
|
484 } |
|
485 |
|
486 //This has to done at every above mentioned event, since the |
|
487 //disable marquee flag is set by base implementation, forcing |
|
488 //us the need to reset it everytime. |
|
489 if (!iViewDragged) |
|
490 { |
|
491 iContainer->EnableMarqueingL(); |
|
492 } |
|
493 } |
|
494 |
|
495 //record positions unless it is drag event |
|
496 if (aPointerEvent.iType != TPointerEvent::EDrag) |
|
497 { |
|
498 iPrev = aPointerEvent.iPosition; |
|
499 } |
|
500 } |
|
501 |
|
502 // --------------------------------------------------------------------------- |
|
503 // CGlxMetadataDialog::OnLocationEditL |
|
504 // --------------------------------------------------------------------------- |
|
505 // |
|
506 void CGlxMetadataDialog::OnLocationEditL() |
|
507 { |
|
508 TRACER("CGlxMetadataDialog::OnLocationEditL"); |
|
509 OkToExitL( EAknSoftkeyOptions ); |
|
510 } |
|
511 |
|
512 // --------------------------------------------------------------------------- |
|
513 // CGlxMetadataDialog::AddTagL |
|
514 // --------------------------------------------------------------------------- |
|
515 // |
|
516 void CGlxMetadataDialog::AddTagL() |
|
517 { |
|
518 TRACER("CGlxMetadataDialog::AddTagL"); |
|
519 iAddToTag->ExecuteL(EGlxCmdAddTag); |
|
520 } |
|
521 |
|
522 // --------------------------------------------------------------------------- |
|
523 // CGlxMetadataDialog::AddAlbumL |
|
524 // --------------------------------------------------------------------------- |
|
525 // |
|
526 void CGlxMetadataDialog::AddAlbumL() |
|
527 { |
|
528 TRACER("CGlxMetadataDialog::AddAlbumL"); |
|
529 iAddToAlbum->ExecuteL(EGlxCmdAddToAlbum); |
|
530 } |
|
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 |
|
544 // --------------------------------------------------------------------------- |
|
545 // CGlxMetadataDialog::SetTitleL() |
|
546 // --------------------------------------------------------------------------- |
|
547 void CGlxMetadataDialog::SetTitleL(const TDesC& aTitleText) |
|
548 { |
|
549 TRACER("CGlxMetadataDialog::SetTitleL"); |
|
550 CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane(); |
|
551 CleanupStack::PushL(statusPane); |
|
552 // get pointer to the default title pane control |
|
553 CAknTitlePane* titlePane = ( CAknTitlePane* )statusPane->ControlL( |
|
554 TUid::Uid( EEikStatusPaneUidTitle )); |
|
555 CleanupStack::PushL(titlePane); |
|
556 // set the title if we got the title pane control |
|
557 if( titlePane ) |
|
558 { |
|
559 GLX_LOG_INFO("GLX_UMP::CGlxMetadataDialog::ConstructL::INSIDE titlePane"); |
|
560 iPreviousTitle = titlePane->Text()->AllocL(); |
|
561 // Set the required Title |
|
562 titlePane->SetTextL( aTitleText ); |
|
563 } |
|
564 CleanupStack::Pop(titlePane); |
|
565 CleanupStack::Pop(statusPane); |
|
566 } |
|
567 |
|
568 // --------------------------------------------------------------------------- |
|
569 // CGlxMetadataDialog::SetPreviousTitleL |
|
570 // --------------------------------------------------------------------------- |
|
571 void CGlxMetadataDialog::SetPreviousTitleL() |
|
572 { |
|
573 TRACER("CGlxMetadataDialog::SetPreviousTitleL"); |
|
574 CEikStatusPane* prevStatusPane = iEikonEnv->AppUiFactory()->StatusPane(); |
|
575 CleanupStack::PushL(prevStatusPane); |
|
576 CAknTitlePane* prevTitlePane = ( CAknTitlePane* )prevStatusPane->ControlL( |
|
577 TUid::Uid( EEikStatusPaneUidTitle )); |
|
578 CleanupStack::PushL(prevTitlePane); |
|
579 if( prevTitlePane ) |
|
580 { |
|
581 // Restore the Title back of the Calling Application |
|
582 prevTitlePane->SetTextL( *iPreviousTitle ); |
|
583 } |
|
584 CleanupStack::Pop(prevTitlePane); |
|
585 CleanupStack::Pop(prevStatusPane); |
|
586 } |
|
587 |
|
588 // ----------------------------------------------------------------------------- |
|
589 // CGlxMetadataDialog::HandleToolbarResetting |
|
590 // ----------------------------------------------------------------------------- |
|
591 // |
|
592 void CGlxMetadataDialog::HandleToolbarResetting(TBool aVisible) |
|
593 { |
|
594 TRACER("CGlxMetadataDialog::HandleToolbarResetting"); |
|
595 CAknToolbar* popupToolbar = iAvkonAppUi->PopupToolbar(); |
|
596 if(popupToolbar) |
|
597 { |
|
598 popupToolbar->SetToolbarVisibility( !aVisible ); |
|
599 popupToolbar->MakeVisible( !aVisible ); |
|
600 if(!aVisible) |
|
601 { |
|
602 popupToolbar->DrawNow(); |
|
603 } |
|
604 } |
|
605 CAknToolbar* toolbar = iAvkonAppUi->CurrentFixedToolbar(); |
|
606 if(toolbar) |
|
607 { |
|
608 toolbar->HideItemsAndDrawOnlyBackground(!aVisible); |
|
609 toolbar->SetToolbarVisibility(aVisible); |
|
610 toolbar->MakeVisible( aVisible ); |
|
611 } |
|
612 } |
|
613 |
|
614 void CGlxMetadataDialog::ViewPositionChanged(const TPoint& /*aNewPosition*/, |
|
615 TBool /*aDrawNow*/, TUint /*aFlags*/) |
|
616 { |
|
617 //Dummy implementation |
|
618 } |
|
619 |
|
620 void CGlxMetadataDialog::PhysicEmulationEnded() |
|
621 { |
|
622 //Dummy implementation |
|
623 } |
|
624 |
|
625 TPoint CGlxMetadataDialog::ViewPosition() const |
|
626 { |
|
627 //Dummy implementation |
|
628 return TPoint(0,0); |
|
629 } |
|
630 // End of File |