43 #include <glxgallery.hrh> |
43 #include <glxgallery.hrh> |
44 #include <glxdetailsboundcommand.hrh> |
44 #include <glxdetailsboundcommand.hrh> |
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 <glxresourceutilities.h> // for CGlxResourceUtilities |
48 #include "glxmetadatacommandhandler.h" |
49 #include "glxmetadatacommandhandler.h" |
49 |
50 |
50 // ============================ MEMBER FUNCTIONS =============================== |
51 // ============================ MEMBER FUNCTIONS =============================== |
51 |
52 |
52 // ----------------------------------------------------------------------------- |
53 // ----------------------------------------------------------------------------- |
73 // ----------------------------------------------------------------------------- |
74 // ----------------------------------------------------------------------------- |
74 // |
75 // |
75 void CGlxMetadataDialog::ConstructL() |
76 void CGlxMetadataDialog::ConstructL() |
76 { |
77 { |
77 TRACER("CGlxMetadataDialog::ConstructL"); |
78 TRACER("CGlxMetadataDialog::ConstructL"); |
78 |
79 |
79 // Load dialog's resource file |
80 // Load dialog's resource file |
80 InitResourceL(); |
81 InitResourceL(); |
81 |
82 |
82 |
|
83 iStatusPaneAvailable = EFalse; |
83 iStatusPaneAvailable = EFalse; |
84 // 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 |
85 // 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 |
86 // get status pane |
86 // get status pane |
87 CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane(); |
87 CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane(); |
88 |
88 |
89 if(statusPane && statusPane->IsVisible()) |
89 if (statusPane && statusPane->IsVisible()) |
90 { |
90 { |
91 iStatusPaneAvailable = ETrue; |
91 iStatusPaneAvailable = ETrue; |
92 } |
92 } |
93 |
93 |
94 // make the toolbar disabled |
94 // make the toolbar disabled |
95 SetDetailsDlgToolbarVisibility(EFalse); |
95 SetDetailsDlgToolbarVisibility(EFalse); |
96 |
96 |
97 // do we have status pane |
97 // do we have status pane |
98 if( statusPane ) |
98 if (statusPane) |
99 { |
99 { |
100 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()); |
101 // load the title text |
101 // load the title text |
102 HBufC* text = StringLoader::LoadL(R_GLX_METADATA_VIEW_TITLE_DETAILS, iEikonEnv ); |
102 HBufC* text = StringLoader::LoadL(R_GLX_METADATA_VIEW_TITLE_DETAILS, |
103 SetTitleL( *text ); |
103 iEikonEnv ); |
104 if( text) |
104 SetTitleL(*text); |
105 { |
105 if (text) |
106 delete text; |
106 { |
107 } |
107 delete text; |
108 iAvkonAppUi->StatusPane()->MakeVisible(ETrue); |
108 } |
|
109 iAvkonAppUi->StatusPane()->MakeVisible(ETrue); |
109 } |
110 } |
110 |
111 |
111 iUiUtility = CGlxUiUtility::UtilityL(); |
112 iUiUtility = CGlxUiUtility::UtilityL(); |
112 iAddToTag = CGlxCommandHandlerAddToContainer::NewL(this, EGlxCmdAddTag, EFalse); |
113 TFileName uiutilitiesrscfile; |
113 iAddToAlbum = CGlxCommandHandlerAddToContainer::NewL(this, EGlxCmdAddToAlbum, EFalse); |
114 uiutilitiesrscfile.Append(CGlxResourceUtilities::GetUiUtilitiesResourceFilenameL()); |
114 |
115 |
|
116 iAddToTag = CGlxCommandHandlerAddToContainer::NewL(this, EGlxCmdAddTag, |
|
117 EFalse, uiutilitiesrscfile); |
|
118 iAddToAlbum = CGlxCommandHandlerAddToContainer::NewL(this, |
|
119 EGlxCmdAddToAlbum, EFalse, uiutilitiesrscfile); |
|
120 |
115 // Call the base class' two-phased constructor |
121 // Call the base class' two-phased constructor |
116 CAknDialog::ConstructL( R_METADATA_MENUBAR ); |
122 CAknDialog::ConstructL(R_METADATA_MENUBAR); |
117 |
123 |
118 // Instantiate the command handler |
124 // Instantiate the command handler |
119 iMetadataCmdHandler = CGlxMetadataCommandHandler::NewL(this); |
125 iMetadataCmdHandler = CGlxMetadataCommandHandler::NewL(this); |
120 |
126 |
121 //steps to find kinetic scroll threshold value |
127 //steps to find kinetic scroll threshold value |
122 CAknPhysics* physics = CAknPhysics::NewL(*this, NULL); |
128 CAknPhysics* physics = CAknPhysics::NewL(*this, NULL); |
123 CleanupStack::PushL(physics); |
129 CleanupStack::PushL(physics); |
124 iKineticDragThreshold = physics->DragThreshold(); |
130 iKineticDragThreshold = physics->DragThreshold(); |
125 CleanupStack::PopAndDestroy(physics); |
131 CleanupStack::PopAndDestroy(physics); |
126 physics = NULL; |
132 physics = NULL; |
127 } |
133 } |
128 |
134 |
129 // ----------------------------------------------------------------------------- |
135 // ----------------------------------------------------------------------------- |
130 // ~CGlxMetadataDialog |
136 // ~CGlxMetadataDialog |
131 // ----------------------------------------------------------------------------- |
137 // ----------------------------------------------------------------------------- |
132 // |
138 // |
337 // |
343 // |
338 void CGlxMetadataDialog::DynInitMenuPaneL( TInt aMenuId, CEikMenuPane* aMenuPane ) |
344 void CGlxMetadataDialog::DynInitMenuPaneL( TInt aMenuId, CEikMenuPane* aMenuPane ) |
339 { |
345 { |
340 TRACER("CGlxMetadataDialog::DynInitMenuPaneL"); |
346 TRACER("CGlxMetadataDialog::DynInitMenuPaneL"); |
341 iMetadataCmdHandler->PreDynInitMenuPaneL(aMenuId); |
347 iMetadataCmdHandler->PreDynInitMenuPaneL(aMenuId); |
342 iMetadataCmdHandler->DynInitMenuPaneL(aMenuId,aMenuPane); |
348 iMetadataCmdHandler->DynInitMenuPaneL(aMenuId,aMenuPane,EFalse); |
343 //To enable/diable the options based on the item selected. |
349 //To enable/diable the options based on the item selected. |
344 iContainer->ViewDynInitMenuPaneL(aMenuId, aMenuPane); |
350 iContainer->ViewDynInitMenuPaneL(aMenuId, aMenuPane); |
345 } |
351 } |
346 |
352 |
347 // ----------------------------------------------------------------------------- |
353 // ----------------------------------------------------------------------------- |