|
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 |
|
31 //User includes |
|
32 #include <glxmetadatadialog.rsg> |
|
33 #include <glxresourceutilities.h> |
|
34 #include <glxlog.h> |
|
35 #include <glxtracer.h> |
|
36 #include <glxcollectionpluginall.hrh> |
|
37 #include <glxfilterfactory.h> // for TGlxFilterFactory |
|
38 #include <glxuiutility.h> |
|
39 #include <glxcommandhandlers.hrh> |
|
40 #include <hlplch.h> // for HlpLauncher |
|
41 #include <photos.hlp.hrh> |
|
42 #include <glxgallery.hrh> |
|
43 #include <glxdetailsboundcommand.hrh> |
|
44 #include <glxscreenfurniture.h> |
|
45 #include <glxuiutilities.rsg> |
|
46 #include <glxpanic.h> // For Panics |
|
47 #include "glxmetadatacommandhandler.h" |
|
48 |
|
49 #define GetAppUi() (dynamic_cast<CAknAppUi*>(iEikonEnv->EikAppUi())) |
|
50 |
|
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):iUri(aUri) |
|
70 { |
|
71 |
|
72 } |
|
73 // ----------------------------------------------------------------------------- |
|
74 // ConstructL |
|
75 // ----------------------------------------------------------------------------- |
|
76 // |
|
77 void CGlxMetadataDialog::ConstructL() |
|
78 { |
|
79 TRACER("CGlxMetadataDialog::ConstructL"); |
|
80 |
|
81 // Load dialog's resource file |
|
82 InitResourceL(); |
|
83 |
|
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, iEikonEnv ); |
|
105 SetTitleL( *text ); |
|
106 if( text) |
|
107 { |
|
108 delete text; |
|
109 } |
|
110 GetAppUi()->StatusPane()->MakeVisible(ETrue); |
|
111 } |
|
112 |
|
113 iUiUtility = CGlxUiUtility::UtilityL(); |
|
114 iAddToTag = CGlxCommandHandlerAddToContainer::NewL(this, EGlxCmdAddTag, EFalse); |
|
115 iAddToAlbum = CGlxCommandHandlerAddToContainer::NewL(this, EGlxCmdAddToAlbum, EFalse); |
|
116 |
|
117 // Call the base class' two-phased constructor |
|
118 CAknDialog::ConstructL( R_METADATA_MENUBAR ); |
|
119 |
|
120 // Instantiate the command handler |
|
121 iMetadataCmdHandler = CGlxMetadataCommandHandler::NewL(this); |
|
122 |
|
123 } |
|
124 |
|
125 // ----------------------------------------------------------------------------- |
|
126 // ~CGlxMetadataDialog |
|
127 // ----------------------------------------------------------------------------- |
|
128 // |
|
129 CGlxMetadataDialog::~CGlxMetadataDialog() |
|
130 { |
|
131 |
|
132 TRACER("CGlxMetadataDialog::~CGlxMetadataDialog"); |
|
133 |
|
134 //To Disable the status pane if the dialog is launched from fullscreenview |
|
135 if(!iStatusPaneAvailable) |
|
136 { |
|
137 GetAppUi()->StatusPane()->MakeVisible(EFalse); |
|
138 } |
|
139 |
|
140 TRAP_IGNORE(SetPreviousTitleL()); |
|
141 |
|
142 delete iPreviousTitle; |
|
143 delete iMetadataCmdHandler; |
|
144 |
|
145 // Restore the Toolbar as it was in the Calling application |
|
146 SetDetailsDlgToolbarVisibility(ETrue); |
|
147 |
|
148 // If details launched from FullScreen View, while moving back, |
|
149 // all the UI components should be hidden. Hence processing this command here. |
|
150 TRAP_IGNORE(GetAppUi()->ProcessCommandL(EGlxCmdResetView)); |
|
151 |
|
152 if(iAddToTag) |
|
153 { |
|
154 delete iAddToTag; |
|
155 } |
|
156 |
|
157 if(iAddToAlbum) |
|
158 { |
|
159 delete iAddToAlbum; |
|
160 } |
|
161 |
|
162 if( iUiUtility ) |
|
163 { |
|
164 iUiUtility->Close(); |
|
165 } |
|
166 |
|
167 if (iResourceOffset) |
|
168 { |
|
169 CCoeEnv::Static()->DeleteResourceFile(iResourceOffset); |
|
170 } |
|
171 } |
|
172 |
|
173 // --------------------------------------------------------------------------- |
|
174 // SetDetailsDlgToolbarVisibility() |
|
175 // --------------------------------------------------------------------------- |
|
176 void CGlxMetadataDialog::SetDetailsDlgToolbarVisibility(TBool aVisible) |
|
177 { |
|
178 TRACER("CGlxMetadataDialog::SetDetailsDlgToolbarVisibility"); |
|
179 CAknAppUi* appUi = GetAppUi(); |
|
180 __ASSERT_DEBUG(appUi, Panic(EGlxPanicNullPointer)); |
|
181 |
|
182 |
|
183 HandleToolbarResetting(aVisible); |
|
184 CAknToolbar* currentPopupToolbar = appUi->CurrentPopupToolbar(); |
|
185 if(currentPopupToolbar) |
|
186 { |
|
187 currentPopupToolbar->SetToolbarVisibility(aVisible); |
|
188 currentPopupToolbar->MakeVisible( aVisible ); |
|
189 } |
|
190 } |
|
191 |
|
192 // ----------------------------------------------------------------------------- |
|
193 // ExecuteLD |
|
194 // ----------------------------------------------------------------------------- |
|
195 // |
|
196 EXPORT_C TInt CGlxMetadataDialog::ExecuteLD() |
|
197 { |
|
198 TRACER("CGlxMetadataDialog::ExecuteLD"); |
|
199 return CAknDialog::ExecuteLD( R_METADATA_DIALOG ); |
|
200 } |
|
201 // --------------------------------------------------------------------------- |
|
202 // MediaList. |
|
203 // --------------------------------------------------------------------------- |
|
204 // |
|
205 MGlxMediaList& CGlxMetadataDialog::MediaList() |
|
206 { |
|
207 TRACER("CGlxMetadataDialog::MediaList"); |
|
208 // return the refernce of media list |
|
209 return iContainer->MediaList(); |
|
210 } |
|
211 // ----------------------------------------------------------------------------- |
|
212 // ProcessCommandL |
|
213 // ----------------------------------------------------------------------------- |
|
214 // |
|
215 void CGlxMetadataDialog::ProcessCommandL( TInt aCommandId ) |
|
216 { |
|
217 TRACER("CGlxMetadataDialog::ProcessCommandL"); |
|
218 |
|
219 // hide menu bar |
|
220 iMenuBar->StopDisplayingMenuBar(); |
|
221 |
|
222 switch( aCommandId ) |
|
223 { |
|
224 case EAknSoftkeyEdit: |
|
225 case EAknSoftkeyCancel: |
|
226 case EAknSoftkeySelect: |
|
227 case EAknSoftkeyOk: |
|
228 { |
|
229 TryExitL( aCommandId ); |
|
230 break; |
|
231 } |
|
232 |
|
233 case EAknCmdHelp: |
|
234 { |
|
235 TCoeHelpContext helpContext; |
|
236 helpContext.iMajor = TUid::Uid( KGlxGalleryApplicationUid ); |
|
237 helpContext.iContext.Copy( LGAL_HLP_DETAILS_VIEW ); |
|
238 const TInt KListSz = 1; |
|
239 CArrayFix<TCoeHelpContext>* contextList = |
|
240 new (ELeave) CArrayFixFlat<TCoeHelpContext>( KListSz ); |
|
241 CleanupStack::PushL(contextList); |
|
242 contextList->AppendL(helpContext); |
|
243 HlpLauncher::LaunchHelpApplicationL( |
|
244 iEikonEnv->WsSession(), contextList ); |
|
245 CleanupStack::Pop( contextList ); |
|
246 break; |
|
247 } |
|
248 case KGlxDeleteBoundMenuCommandId: |
|
249 { |
|
250 //Event passed on to container to handle |
|
251 //Delete the location information of the data. |
|
252 iContainer->RemoveLocationL(); |
|
253 break; |
|
254 } |
|
255 case KGlxEditBoundMenuCommandId: |
|
256 case KGlxViewBoundMenuCommandId: |
|
257 { |
|
258 //To edit the details - forward the event to container to edit |
|
259 //Both edit and view details command are handled in the same function based on the item. |
|
260 iContainer->HandleListboxChangesL(); |
|
261 break; |
|
262 } |
|
263 case EGlxCmdAiwBase: |
|
264 { |
|
265 // pass aCommandId to command handler |
|
266 iMetadataCmdHandler->DoExecuteL( aCommandId, MediaList() ); |
|
267 } |
|
268 default: |
|
269 break; |
|
270 } |
|
271 } |
|
272 //----------------------------------------------------------------------------- |
|
273 // CGlxMetadataDialog::CreateCustomControlL |
|
274 //----------------------------------------------------------------------------- |
|
275 SEikControlInfo CGlxMetadataDialog::CreateCustomControlL(TInt |
|
276 aControlType) |
|
277 { |
|
278 GLX_LOG_INFO("CShwSlideshowSettingsDialog::CreateCustomControlL"); |
|
279 |
|
280 // create control info, no flags or trailer text set |
|
281 SEikControlInfo controlInfo; |
|
282 controlInfo.iControl = NULL; |
|
283 controlInfo.iTrailerTextId = 0; |
|
284 controlInfo.iFlags = 0; |
|
285 if (aControlType == EMetaDataDialogListBox) |
|
286 { |
|
287 iContainer = CGlxMetadataContainer::NewL(GetAppUi()->ClientRect(), |
|
288 *this, iUri, *this); |
|
289 controlInfo.iControl = iContainer; // giving ownership |
|
290 } |
|
291 return controlInfo; // returns ownership of ItemList |
|
292 } |
|
293 |
|
294 |
|
295 // ----------------------------------------------------------------------------- |
|
296 // CGlxMetadataDialog::OfferKeyEventL |
|
297 // ----------------------------------------------------------------------------- |
|
298 // |
|
299 TKeyResponse CGlxMetadataDialog::OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
300 TEventCode aType ) |
|
301 { |
|
302 TRACER("CGlxMetadataDialog::OfferKeyEventL"); |
|
303 TKeyResponse response = EKeyWasNotConsumed; |
|
304 switch(aKeyEvent.iCode) |
|
305 { |
|
306 case EKeyUpArrow: |
|
307 case EKeyDownArrow: |
|
308 { |
|
309 if(!iUiUtility->IsPenSupported()) |
|
310 { |
|
311 iContainer->ChangeMskL(); |
|
312 } |
|
313 iContainer->EnableMarqueingL(); |
|
314 break; |
|
315 } |
|
316 default: |
|
317 break; |
|
318 } |
|
319 if ( response == EKeyWasNotConsumed ) |
|
320 { |
|
321 // container didn't consume the key so try the base class |
|
322 // this is crucial as platform uses a key event to dismiss dialog |
|
323 // when a view changes to another. the base class also consumes all |
|
324 // the keys we dont want to handle automatically as this is a |
|
325 // blocking dialog |
|
326 response = CAknDialog::OfferKeyEventL( aKeyEvent, aType ); |
|
327 } |
|
328 return response; |
|
329 } |
|
330 |
|
331 // ----------------------------------------------------------------------------- |
|
332 // CGlxMetadataDialog::DynInitMenuPaneL |
|
333 // ----------------------------------------------------------------------------- |
|
334 // |
|
335 void CGlxMetadataDialog::DynInitMenuPaneL( TInt aMenuId, CEikMenuPane* aMenuPane ) |
|
336 { |
|
337 TRACER("CGlxMetadataDialog::DynInitMenuPaneL"); |
|
338 iMetadataCmdHandler->PreDynInitMenuPaneL(aMenuId); |
|
339 iMetadataCmdHandler->DynInitMenuPaneL(aMenuId,aMenuPane); |
|
340 //To enable/diable the options based on the item selected. |
|
341 iContainer->ViewDynInitMenuPaneL(aMenuId, aMenuPane); |
|
342 } |
|
343 |
|
344 // ----------------------------------------------------------------------------- |
|
345 // OkToExitL |
|
346 // ----------------------------------------------------------------------------- |
|
347 // |
|
348 TBool CGlxMetadataDialog::OkToExitL( TInt aKeycode ) |
|
349 { |
|
350 TRACER("CGlxMetadataDialog::OkToExitL"); |
|
351 |
|
352 TBool retVal = EFalse; |
|
353 |
|
354 switch (aKeycode) |
|
355 { |
|
356 case EAknSoftkeySelect: |
|
357 case EAknSoftkeyOk: |
|
358 { |
|
359 break; |
|
360 } |
|
361 case EAknSoftkeyOptions: |
|
362 { |
|
363 // display menu only |
|
364 // show the option menu that can have mutiselect options |
|
365 iMenuBar->SetMenuType( CEikMenuBar::EMenuOptions ); |
|
366 retVal = CAknDialog::OkToExitL( aKeycode ); |
|
367 break; |
|
368 } |
|
369 case EAknSoftkeyBack: |
|
370 case EAknSoftkeyCancel: |
|
371 { |
|
372 retVal = ETrue; |
|
373 break; |
|
374 } |
|
375 |
|
376 case EAknSoftkeyEdit: |
|
377 { |
|
378 if(!iUiUtility->IsPenSupported()) |
|
379 { |
|
380 iContainer->HandleListboxChangesL(); |
|
381 } |
|
382 else |
|
383 { |
|
384 HandleViewCommandL(aKeycode); |
|
385 } |
|
386 break; |
|
387 } |
|
388 default : |
|
389 break; |
|
390 } |
|
391 return retVal; |
|
392 } |
|
393 |
|
394 //----------------------------------------------------------------------------- |
|
395 // CGlxMetadataDialog::SizeChanged |
|
396 //----------------------------------------------------------------------------- |
|
397 void CGlxMetadataDialog::SizeChanged() |
|
398 { |
|
399 TRACER("CGlxMetadataDialog::SizeChanged"); |
|
400 CAknDialog::SizeChanged(); |
|
401 } |
|
402 // ----------------------------------------------------------------------------- |
|
403 // CGlxMetadataDialog::InitResourceL |
|
404 // ----------------------------------------------------------------------------- |
|
405 // |
|
406 void CGlxMetadataDialog::InitResourceL() |
|
407 { |
|
408 TRACER("CGlxMetadataDialog::InitResourceL"); |
|
409 |
|
410 _LIT(KGlxMetadataDialogResource,"glxmetadatadialog.rsc"); |
|
411 //add resource file |
|
412 TParse parse; |
|
413 parse.Set(KGlxMetadataDialogResource, &KDC_APP_RESOURCE_DIR, NULL); |
|
414 TFileName resourceFile; |
|
415 resourceFile.Append(parse.FullName()); |
|
416 CGlxResourceUtilities::GetResourceFilenameL(resourceFile); |
|
417 iResourceOffset = CCoeEnv::Static()->AddResourceFileL(resourceFile); |
|
418 } |
|
419 |
|
420 |
|
421 // ----------------------------------------------------------------------------- |
|
422 // CGlxMetadataDialog::HandleViewCommandL |
|
423 // ----------------------------------------------------------------------------- |
|
424 // |
|
425 TBool CGlxMetadataDialog::HandleViewCommandL( TInt /*aCommand*/ ) |
|
426 { |
|
427 TRACER("CGlxMetadataDialog::HandleViewCommandL"); |
|
428 return EFalse; |
|
429 } |
|
430 // --------------------------------------------------------------------------- |
|
431 // CGlxMetadataDialog::PreLayoutDynInitL |
|
432 // --------------------------------------------------------------------------- |
|
433 // |
|
434 void CGlxMetadataDialog::PreLayoutDynInitL() |
|
435 { |
|
436 // No Implementation |
|
437 } |
|
438 |
|
439 //----------------------------------------------------------------------------- |
|
440 // CGlxMetadataDialog::PostLayoutDynInitL |
|
441 //----------------------------------------------------------------------------- |
|
442 // |
|
443 void CGlxMetadataDialog::PostLayoutDynInitL() |
|
444 { |
|
445 TRACER("CGlxMetadataDialog::PostLayoutDynInitL"); |
|
446 if(!iUiUtility->IsPenSupported()) |
|
447 { |
|
448 iUiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition, |
|
449 EAknSoftkeyEdit,R_GLX_METADATA_MSK_EDIT); |
|
450 } |
|
451 } |
|
452 |
|
453 //----------------------------------------------------------------------------- |
|
454 // CGlxMetadataDialog::Draw |
|
455 //----------------------------------------------------------------------------- |
|
456 // |
|
457 void CGlxMetadataDialog::Draw( const TRect& /*aRect*/ ) const |
|
458 { |
|
459 TRACER("CGlxMetadataDialog::Draw"); |
|
460 TRect rect; |
|
461 AknLayoutUtils::LayoutMetricsRect (AknLayoutUtils::EMainPane, rect); |
|
462 |
|
463 // Get the standard graphics context |
|
464 CWindowGc& gc = SystemGc(); |
|
465 gc.SetBrushColor(KRgbWhite); |
|
466 gc.DrawRect(rect); |
|
467 } |
|
468 |
|
469 //----------------------------------------------------------------------------- |
|
470 // CGlxMetadataDialog::HandlePointerEventL |
|
471 //----------------------------------------------------------------------------- |
|
472 // |
|
473 void CGlxMetadataDialog::HandlePointerEventL( |
|
474 const TPointerEvent& aPointerEvent) |
|
475 { |
|
476 TRACER("CGlxMetadataDialog::HandlePointerEventL"); |
|
477 CCoeControl::HandlePointerEventL( aPointerEvent ); |
|
478 } |
|
479 |
|
480 // --------------------------------------------------------------------------- |
|
481 // CGlxMetadataDialog::OnLocationEditL |
|
482 // --------------------------------------------------------------------------- |
|
483 // |
|
484 void CGlxMetadataDialog::OnLocationEditL() |
|
485 { |
|
486 TRACER("CGlxMetadataDialog::OnLocationEditL"); |
|
487 OkToExitL( EAknSoftkeyOptions ); |
|
488 } |
|
489 |
|
490 // --------------------------------------------------------------------------- |
|
491 // CGlxMetadataDialog::AddTag |
|
492 // --------------------------------------------------------------------------- |
|
493 // |
|
494 void CGlxMetadataDialog::AddTagL() |
|
495 { |
|
496 iAddToTag->ExecuteL(EGlxCmdAddTag); |
|
497 } |
|
498 // --------------------------------------------------------------------------- |
|
499 // CGlxMetadataDialog::AddAlbum |
|
500 // --------------------------------------------------------------------------- |
|
501 // |
|
502 void CGlxMetadataDialog::AddAlbumL() |
|
503 { |
|
504 iAddToAlbum->ExecuteL(EGlxCmdAddToAlbum); |
|
505 } |
|
506 |
|
507 // --------------------------------------------------------------------------- |
|
508 // CGlxMetadataDialog::SetTitleL() |
|
509 // --------------------------------------------------------------------------- |
|
510 void CGlxMetadataDialog::SetTitleL(const TDesC& aTitleText) |
|
511 { |
|
512 TRACER("CGlxFetcherContainer::SetTitleL"); |
|
513 CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane(); |
|
514 CleanupStack::PushL(statusPane); |
|
515 // get pointer to the default title pane control |
|
516 CAknTitlePane* titlePane = ( CAknTitlePane* )statusPane->ControlL( |
|
517 TUid::Uid( EEikStatusPaneUidTitle )); |
|
518 CleanupStack::PushL(titlePane); |
|
519 // set the title if we got the title pane control |
|
520 if( titlePane ) |
|
521 { |
|
522 GLX_LOG_INFO("GLX_UMP::CGlxMetadataDialog::ConstructL::INSIDE titlePane"); |
|
523 iPreviousTitle = titlePane->Text()->AllocL(); |
|
524 // Set the required Title |
|
525 titlePane->SetTextL( aTitleText ); |
|
526 } |
|
527 CleanupStack::Pop(titlePane); |
|
528 CleanupStack::Pop(statusPane); |
|
529 } |
|
530 |
|
531 // --------------------------------------------------------------------------- |
|
532 // CGlxMetadataDialog::SetPreviousTitleL |
|
533 // --------------------------------------------------------------------------- |
|
534 void CGlxMetadataDialog::SetPreviousTitleL() |
|
535 { |
|
536 TRACER("CGlxFetcherContainer::SetPreviousTitleL"); |
|
537 CEikStatusPane* prevStatusPane = iEikonEnv->AppUiFactory()->StatusPane(); |
|
538 CleanupStack::PushL(prevStatusPane); |
|
539 CAknTitlePane* prevTitlePane = ( CAknTitlePane* )prevStatusPane->ControlL( |
|
540 TUid::Uid( EEikStatusPaneUidTitle )); |
|
541 CleanupStack::PushL(prevTitlePane); |
|
542 if( prevTitlePane ) |
|
543 { |
|
544 // Restore the Title back of the Calling Application |
|
545 prevTitlePane->SetTextL( *iPreviousTitle ); |
|
546 } |
|
547 CleanupStack::Pop(prevTitlePane); |
|
548 CleanupStack::Pop(prevStatusPane); |
|
549 } |
|
550 // ----------------------------------------------------------------------------- |
|
551 // CGlxMetadataDialog::HandleResourceChange |
|
552 // ----------------------------------------------------------------------------- |
|
553 // |
|
554 void CGlxMetadataDialog::HandleResourceChange( TInt aType ) |
|
555 { |
|
556 TRACER("CGlxMetadataDialog::HandleResourceChange"); |
|
557 //Handle global resource changes, such as scalable UI or skin events and orientation change (override) |
|
558 CAknDialog::HandleResourceChange( aType ); |
|
559 } |
|
560 |
|
561 // ----------------------------------------------------------------------------- |
|
562 // CGlxMetadataDialog::HandleToolbarResetting |
|
563 // ----------------------------------------------------------------------------- |
|
564 // |
|
565 void CGlxMetadataDialog::HandleToolbarResetting(TBool aVisible) |
|
566 { |
|
567 TRACER("CGlxMetadataDialog::HandleToolbarResetting"); |
|
568 CAknAppUi* appUi = GetAppUi(); |
|
569 __ASSERT_DEBUG(appUi, Panic(EGlxPanicNullPointer)); |
|
570 |
|
571 CAknToolbar* popupToolbar = appUi->PopupToolbar(); |
|
572 if(popupToolbar) |
|
573 { |
|
574 popupToolbar->SetToolbarVisibility( !aVisible ); |
|
575 popupToolbar->MakeVisible( !aVisible ); |
|
576 if(!aVisible) |
|
577 { |
|
578 popupToolbar->DrawNow(); |
|
579 } |
|
580 } |
|
581 CAknToolbar* toolbar = appUi->CurrentFixedToolbar(); |
|
582 if(toolbar) |
|
583 { |
|
584 toolbar->HideItemsAndDrawOnlyBackground(!aVisible); |
|
585 toolbar->SetToolbarVisibility(aVisible); |
|
586 toolbar->MakeVisible( aVisible ); |
|
587 } |
|
588 } |
|
589 // End of File |