45 #include <glxscreenfurniture.h> |
45 #include <glxscreenfurniture.h> |
46 #include <glxuiutilities.rsg> |
46 #include <glxuiutilities.rsg> |
47 #include <glxpanic.h> // For Panics |
47 #include <glxpanic.h> // For Panics |
48 #include "glxmetadatacommandhandler.h" |
48 #include "glxmetadatacommandhandler.h" |
49 |
49 |
50 #define GetAppUi() (dynamic_cast<CAknAppUi*>(iEikonEnv->EikAppUi())) |
|
51 |
|
52 |
|
53 // ============================ MEMBER FUNCTIONS =============================== |
50 // ============================ MEMBER FUNCTIONS =============================== |
54 |
51 |
55 // ----------------------------------------------------------------------------- |
52 // ----------------------------------------------------------------------------- |
56 // NewL |
53 // NewL |
57 // ----------------------------------------------------------------------------- |
54 // ----------------------------------------------------------------------------- |
129 |
126 |
130 TRACER("CGlxImgVwrMetadataDialog::~CGlxImgVwrMetadataDialog"); |
127 TRACER("CGlxImgVwrMetadataDialog::~CGlxImgVwrMetadataDialog"); |
131 |
128 |
132 |
129 |
133 //To Disable the status pane if the dialog is launched from fullscreenview |
130 //To Disable the status pane if the dialog is launched from fullscreenview |
134 if(!iStatusPaneAvailable) |
131 if (!iStatusPaneAvailable && iAvkonAppUi) |
135 { |
132 { |
136 GetAppUi()->StatusPane()->MakeVisible(EFalse); |
133 iAvkonAppUi->StatusPane()->MakeVisible(EFalse); |
137 } |
134 } |
138 |
135 |
139 TRAP_IGNORE(SetPreviousTitleL()); |
136 TRAP_IGNORE(SetPreviousTitleL()); |
140 |
|
141 delete iPreviousTitle; |
137 delete iPreviousTitle; |
142 |
138 |
143 // Restore the Toolbar as it was in the Calling application |
139 // Restore the Toolbar as it was in the Calling application |
144 SetDetailsDlgToolbarVisibility(ETrue); |
140 SetDetailsDlgToolbarVisibility(ETrue); |
145 |
141 |
146 // If details launched from FullScreen View, while moving back, |
142 // If details launched from FullScreen View, while moving back, |
147 // all the UI components should be hidden. Hence processing this command here. |
143 // all the UI components should be hidden. Hence processing this command here. |
148 TRAP_IGNORE(GetAppUi()->ProcessCommandL(EGlxCmdResetView)); |
144 if (iAvkonAppUi) |
|
145 { |
|
146 TRAP_IGNORE(iAvkonAppUi->ProcessCommandL(EGlxCmdResetView)); |
|
147 } |
149 |
148 |
150 if( iUiUtility ) |
149 if( iUiUtility ) |
151 { |
150 { |
152 iUiUtility->Close(); |
151 iUiUtility->Close(); |
153 } |
152 } |
162 // SetDetailsDlgToolbarVisibility() |
161 // SetDetailsDlgToolbarVisibility() |
163 // --------------------------------------------------------------------------- |
162 // --------------------------------------------------------------------------- |
164 void CGlxImgVwrMetadataDialog::SetDetailsDlgToolbarVisibility(TBool aVisible) |
163 void CGlxImgVwrMetadataDialog::SetDetailsDlgToolbarVisibility(TBool aVisible) |
165 { |
164 { |
166 TRACER("CGlxImgVwrMetadataDialog::SetDetailsDlgToolbarVisibility"); |
165 TRACER("CGlxImgVwrMetadataDialog::SetDetailsDlgToolbarVisibility"); |
167 CAknAppUi* appUi = GetAppUi(); |
|
168 __ASSERT_DEBUG(appUi, Panic(EGlxPanicNullPointer)); |
|
169 |
166 |
170 HandleToolbarResetting(aVisible); |
167 HandleToolbarResetting(aVisible); |
171 CAknToolbar* currentPopupToolbar = appUi->CurrentPopupToolbar(); |
168 CAknToolbar* currentPopupToolbar = iAvkonAppUi->CurrentPopupToolbar(); |
172 if(currentPopupToolbar) |
169 if(currentPopupToolbar) |
173 { |
170 { |
174 currentPopupToolbar->SetToolbarVisibility(aVisible); |
171 currentPopupToolbar->SetToolbarVisibility(aVisible); |
175 currentPopupToolbar->MakeVisible( aVisible ); |
172 currentPopupToolbar->MakeVisible( aVisible ); |
176 } |
173 } |
233 controlInfo.iControl = NULL; |
230 controlInfo.iControl = NULL; |
234 controlInfo.iTrailerTextId = 0; |
231 controlInfo.iTrailerTextId = 0; |
235 controlInfo.iFlags = 0; |
232 controlInfo.iFlags = 0; |
236 if (aControlType == EMetaDataDialogListBox) |
233 if (aControlType == EMetaDataDialogListBox) |
237 { |
234 { |
238 iContainer = CGlxImgVwrMetadataContainer::NewL(GetAppUi()->ClientRect(),iUri); |
235 iContainer = CGlxImgVwrMetadataContainer::NewL(iAvkonAppUi->ClientRect(),iUri); |
239 controlInfo.iControl = iContainer; // giving ownership |
236 controlInfo.iControl = iContainer; // giving ownership |
240 } |
237 } |
241 return controlInfo; // returns ownership of ItemList |
238 return controlInfo; // returns ownership of ItemList |
242 } |
239 } |
243 |
240 |
244 // ----------------------------------------------------------------------------- |
241 // ----------------------------------------------------------------------------- |
245 // CGlxImgVwrMetadataDialog::DynInitMenuPaneL |
242 // CGlxImgVwrMetadataDialog::DynInitMenuPaneL |
246 // ----------------------------------------------------------------------------- |
243 // ----------------------------------------------------------------------------- |
247 // |
244 // |
248 void CGlxImgVwrMetadataDialog::DynInitMenuPaneL( TInt aMenuId, CEikMenuPane* aMenuPane ) |
245 void CGlxImgVwrMetadataDialog::DynInitMenuPaneL(TInt /*aMenuId*/, |
249 { |
246 CEikMenuPane* /*aMenuPane*/) |
250 //no implementation |
247 { |
|
248 //no implementation |
251 } |
249 } |
252 |
250 |
253 //----------------------------------------------------------------------------- |
251 //----------------------------------------------------------------------------- |
254 // CGlxImgVwrMetadataDialog::SizeChanged |
252 // CGlxImgVwrMetadataDialog::SizeChanged |
255 //----------------------------------------------------------------------------- |
253 //----------------------------------------------------------------------------- |
387 // ----------------------------------------------------------------------------- |
385 // ----------------------------------------------------------------------------- |
388 // |
386 // |
389 void CGlxImgVwrMetadataDialog::HandleToolbarResetting(TBool aVisible) |
387 void CGlxImgVwrMetadataDialog::HandleToolbarResetting(TBool aVisible) |
390 { |
388 { |
391 TRACER("CGlxImgVwrMetadataDialog::HandleToolbarResetting"); |
389 TRACER("CGlxImgVwrMetadataDialog::HandleToolbarResetting"); |
392 CAknAppUi* appUi = GetAppUi(); |
390 |
393 __ASSERT_DEBUG(appUi, Panic(EGlxPanicNullPointer)); |
391 CAknToolbar* popupToolbar = iAvkonAppUi->PopupToolbar(); |
394 |
|
395 CAknToolbar* popupToolbar = appUi->PopupToolbar(); |
|
396 if(popupToolbar) |
392 if(popupToolbar) |
397 { |
393 { |
398 popupToolbar->SetToolbarVisibility( !aVisible ); |
394 popupToolbar->SetToolbarVisibility( !aVisible ); |
399 popupToolbar->MakeVisible( !aVisible ); |
395 popupToolbar->MakeVisible( !aVisible ); |
400 if(!aVisible) |
396 if(!aVisible) |
401 { |
397 { |
402 popupToolbar->DrawNow(); |
398 popupToolbar->DrawNow(); |
403 } |
399 } |
404 } |
400 } |
405 CAknToolbar* toolbar = appUi->CurrentFixedToolbar(); |
401 CAknToolbar* toolbar = iAvkonAppUi->CurrentFixedToolbar(); |
406 if(toolbar) |
402 if(toolbar) |
407 { |
403 { |
408 toolbar->HideItemsAndDrawOnlyBackground(!aVisible); |
404 toolbar->HideItemsAndDrawOnlyBackground(!aVisible); |
409 toolbar->SetToolbarVisibility(aVisible); |
405 toolbar->SetToolbarVisibility(aVisible); |
410 toolbar->MakeVisible( aVisible ); |
406 toolbar->MakeVisible( aVisible ); |