equal
deleted
inserted
replaced
100 User::LeaveIfError(err); |
100 User::LeaveIfError(err); |
101 |
101 |
102 SetRect( aRect ); |
102 SetRect( aRect ); |
103 ActivateL(); |
103 ActivateL(); |
104 |
104 |
105 iEikMenuBar = new ( ELeave ) CEikMenuBar(); |
|
106 iEikMenuBar->ConstructL( this, NULL, R_GS_XDM_SETTINGS_MAIN_MENUBAR ); |
|
107 |
|
108 #ifdef _DEBUG |
105 #ifdef _DEBUG |
109 RDebug::Print( _L( "[CXDMPluginContainer] Construct done" ) ); |
106 RDebug::Print( _L( "[CXDMPluginContainer] Construct done" ) ); |
110 #endif |
107 #endif |
111 |
108 |
112 } |
109 } |
121 { |
118 { |
122 if (iMainList) |
119 if (iMainList) |
123 { |
120 { |
124 delete iMainList; |
121 delete iMainList; |
125 } |
122 } |
126 |
|
127 delete iEikMenuBar; |
|
128 } |
123 } |
129 |
124 |
130 // --------------------------------------------------------------------------- |
125 // --------------------------------------------------------------------------- |
131 // CXDMPluginContainer::SizeChanged() |
126 // CXDMPluginContainer::SizeChanged() |
132 // --------------------------------------------------------------------------- |
127 // --------------------------------------------------------------------------- |
201 TEventCode aType ) |
196 TEventCode aType ) |
202 { |
197 { |
203 if (iMainList) |
198 if (iMainList) |
204 { |
199 { |
205 // if cancel key is pressed and list is not empty, invoke deletion |
200 // if cancel key is pressed and list is not empty, invoke deletion |
206 if ((aKeyEvent.iCode == EKeyBackspace ) && (aType == EEventKey) && |
201 if ((aKeyEvent.iCode == EKeyBackspace ) && (aType == EEventKey) ) |
207 iEikMenuBar->ItemSpecificCommandsEnabled() ) |
|
208 { |
202 { |
209 if(!IsListEmpty()) |
203 if(!IsListEmpty()) |
210 DeleteSetProcedureL(); |
204 DeleteSetProcedureL(); |
211 CXDMPlugin* iTempView = static_cast<CXDMPlugin*> (iView); |
205 CXDMPlugin* iTempView = static_cast<CXDMPlugin*> (iView); |
212 iTempView->UpdateMskL(); |
206 iTempView->UpdateMSK(); |
213 return EKeyWasConsumed; |
207 return EKeyWasConsumed; |
214 } |
208 } |
215 else |
209 else |
216 { |
|
217 return iMainList->OfferKeyEventL (aKeyEvent, aType); |
210 return iMainList->OfferKeyEventL (aKeyEvent, aType); |
218 } |
|
219 } |
211 } |
220 return EKeyWasNotConsumed; |
212 return EKeyWasNotConsumed; |
221 } |
213 } |
222 |
214 |
223 // --------------------------------------------------------------------------- |
215 // --------------------------------------------------------------------------- |
226 // |
218 // |
227 void CXDMPluginContainer::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aListBoxEvent) |
219 void CXDMPluginContainer::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aListBoxEvent) |
228 { |
220 { |
229 // if the Select Key has been pressed |
221 // if the Select Key has been pressed |
230 if ((aListBoxEvent == MEikListBoxObserver::EEventEnterKeyPressed) || |
222 if ((aListBoxEvent == MEikListBoxObserver::EEventEnterKeyPressed) || |
231 (aListBoxEvent == MEikListBoxObserver::EEventItemSingleClicked)) |
223 (aListBoxEvent == MEikListBoxObserver::EEventItemDoubleClicked)) |
232 { |
224 { |
233 EditCurrentItemL(); |
225 EditCurrentItemL(); |
234 } |
226 } |
235 } |
227 } |
236 |
228 |