21 #include <coemain.h> |
21 #include <coemain.h> |
22 #include <aknViewAppUi.h> |
22 #include <aknViewAppUi.h> |
23 #include <eikappui.h> |
23 #include <eikappui.h> |
24 #include <eikapp.h> |
24 #include <eikapp.h> |
25 #include <e32property.h> |
25 #include <e32property.h> |
|
26 #include <e32base.h> |
26 #include <activeidle2domainpskeys.h> |
27 #include <activeidle2domainpskeys.h> |
|
28 #include <widgetmanagerview.rsg> |
27 |
29 |
28 #include "wmcommon.h" |
30 #include "wmcommon.h" |
29 #include "widgetmanager.hrh" |
31 #include "widgetmanager.hrh" |
30 #include "wmmaincontainer.h" |
32 #include "wmmaincontainer.h" |
31 #include "wmmaincontainerview.h" |
33 #include "wmmaincontainerview.h" |
32 #include "wmresourceloader.h" |
34 #include "wmresourceloader.h" |
33 #include "wmplugin.h" |
35 #include "wmplugin.h" |
34 #include "wmeffectmanager.h" |
36 #include "wmeffectmanager.h" |
35 #include <widgetmanagerview.rsg> |
37 #include "wmwidgetdata.h" |
|
38 #include "wminstaller.h" |
|
39 |
36 |
40 |
37 // --------------------------------------------------------- |
41 // --------------------------------------------------------- |
38 // CWmPlugin::NewL |
42 // CWmPlugin::NewL |
39 // --------------------------------------------------------- |
43 // --------------------------------------------------------- |
40 // |
44 // |
41 CWmPlugin* CWmPlugin::NewL() |
45 CWmPlugin* CWmPlugin::NewL() |
42 { |
46 { |
43 CWmPlugin* self=new(ELeave) CWmPlugin(); |
47 CWmPlugin* self = new( ELeave ) CWmPlugin(); |
44 CleanupStack::PushL(self); |
48 CleanupStack::PushL( self ); |
45 self->ConstructL(); |
49 self->ConstructL(); |
46 CleanupStack::Pop(self); |
50 CleanupStack::Pop(self); |
47 return self; |
51 return self; |
48 } |
52 } |
49 |
53 |
97 // delete other members |
101 // delete other members |
98 delete iResourceLoader; |
102 delete iResourceLoader; |
99 delete iEffectManager; |
103 delete iEffectManager; |
100 delete iPostponedContent; |
104 delete iPostponedContent; |
101 delete iWait; |
105 delete iWait; |
|
106 delete iWmInstaller; |
102 } |
107 } |
103 |
108 |
104 // --------------------------------------------------------- |
109 // --------------------------------------------------------- |
105 // CWmPlugin::CWmPlugin |
110 // CWmPlugin::CWmPlugin |
106 // --------------------------------------------------------- |
111 // --------------------------------------------------------- |
115 // --------------------------------------------------------- |
120 // --------------------------------------------------------- |
116 // |
121 // |
117 void CWmPlugin::ConstructL() |
122 void CWmPlugin::ConstructL() |
118 { |
123 { |
119 iWmMainContainer = NULL; |
124 iWmMainContainer = NULL; |
120 |
125 |
121 // store static view app ui |
126 // store static view app ui |
122 CEikonEnv* eikonEnv = CEikonEnv::Static(); |
127 CEikonEnv* eikonEnv = CEikonEnv::Static(); |
123 if ( !eikonEnv ) User::Leave( KErrUnknown ); |
128 if ( !eikonEnv ) User::Leave( KErrUnknown ); |
124 iViewAppUi = (CAknViewAppUi*)eikonEnv->EikAppUi(); |
129 iViewAppUi = (CAknViewAppUi*)eikonEnv->EikAppUi(); |
125 if ( !iViewAppUi ) User::Leave( KErrUnknown ); |
130 if ( !iViewAppUi ) User::Leave( KErrUnknown ); |
136 CWmMainContainerView* mainView = |
141 CWmMainContainerView* mainView = |
137 CWmMainContainerView::NewL( *this ); |
142 CWmMainContainerView::NewL( *this ); |
138 CleanupStack::PushL( mainView ); |
143 CleanupStack::PushL( mainView ); |
139 iViewAppUi->AddViewL( mainView ); |
144 iViewAppUi->AddViewL( mainView ); |
140 CleanupStack::Pop( mainView ); |
145 CleanupStack::Pop( mainView ); |
|
146 |
|
147 iWmInstaller = CWmInstaller::NewL(); |
141 } |
148 } |
142 |
149 |
143 // --------------------------------------------------------- |
150 // --------------------------------------------------------- |
144 // CWmPlugin::Activate |
151 // CWmPlugin::Activate |
145 // --------------------------------------------------------- |
152 // --------------------------------------------------------- |
197 iEffectManager->UiRendered(); |
204 iEffectManager->UiRendered(); |
198 iWmMainContainer->SetClosingDown( EFalse ); |
205 iWmMainContainer->SetClosingDown( EFalse ); |
199 |
206 |
200 // Don't forward numeric keys to phone |
207 // Don't forward numeric keys to phone |
201 ForwardNumericKeysToPhone( EFalse ); |
208 ForwardNumericKeysToPhone( EFalse ); |
202 } |
209 } |
203 |
210 |
204 // --------------------------------------------------------- |
211 // --------------------------------------------------------- |
205 // CWmPlugin::MainViewDeactivated |
212 // CWmPlugin::MainViewDeactivated |
206 // --------------------------------------------------------- |
213 // --------------------------------------------------------- |
207 // |
214 // |
274 else if ( err == KErrNoMemory ) |
281 else if ( err == KErrNoMemory ) |
275 { |
282 { |
276 ResourceLoader().InfoPopupL( |
283 ResourceLoader().InfoPopupL( |
277 R_QTN_HS_HS_MEMORY_FULL, KNullDesC ); |
284 R_QTN_HS_HS_MEMORY_FULL, KNullDesC ); |
278 } |
285 } |
279 else if ( err != KErrNone ) |
286 else if ( ( err != KErrNone ) && ( err != KErrDiskFull ) ) |
280 { |
287 { |
281 ResourceLoader().ErrorPopup( err ); |
288 ResourceLoader().ErrorPopup( err ); |
282 } |
289 } |
283 } |
290 } |
284 iPostponedCommand = ENone; |
291 iPostponedCommand = ENone; |