idlehomescreen/xmluicontroller/src/xmluicontroller.cpp
branchRCL_3
changeset 11 ff572dfe6d86
parent 9 f966699dea19
child 26 1b758917cafc
--- a/idlehomescreen/xmluicontroller/src/xmluicontroller.cpp	Fri Feb 19 22:42:37 2010 +0200
+++ b/idlehomescreen/xmluicontroller/src/xmluicontroller.cpp	Fri Mar 12 15:41:49 2010 +0200
@@ -259,22 +259,15 @@
 // ----------------------------------------------------------------------------
 //
 void CXmlUiController::NotifyAppEnvReadyL()
-    {
+    {    
+    iCPSpublisher = CContentPublisher::NewL( *this );
+    
+    iExitTimer = CPeriodic::NewL( CActive::EPriorityStandard );    
+
     if( iFwEventHandler )
         {
-        iFwEventHandler->AppEnvReadyL();
-        iFwEventHandler->HandleUiReadyEventL( *this );
-        }
-    
-    if( !iCPSpublisher )
-        {
-        iCPSpublisher = CContentPublisher::NewL( *this );
-        }
-    
-    if( !iExitTimer )
-        {
-        iExitTimer = CPeriodic::NewL( CActive::EPriorityStandard );        
-        }
+        iFwEventHandler->AppEnvReadyL();        
+        }          
     }
 
 // ----------------------------------------------------------------------------
@@ -599,6 +592,10 @@
 //
 void CXmlUiController::ActivateUI()
     {
+    if ( iRunningAsMain && iAppUi )
+        {
+        iAppUi->ActivateUi();
+        }
     }
 
 // ----------------------------------------------------------------------------
@@ -670,10 +667,12 @@
 //
 void CXmlUiController::RunApplicationL()
     {
-    iRunningAsMain = ETrue;
+    __PRINTS( "*** CXmlUiController::RunApplicationL" );
     
+    iRunningAsMain = ETrue;
+                                                    
     User::LeaveIfError( 
-        EikStart::RunApplication( &CXmlUiController::NewApplication ) );
+        EikStart::RunApplication( &CXmlUiController::NewApplication ) );       
     }
 
 // ----------------------------------------------------------------------------
@@ -815,9 +814,18 @@
 //
 CApaApplication* CXmlUiController::NewApplication()
     {
-    CXmlUiController* self = static_cast<CXmlUiController*>(Dll::Tls());
-    __ASSERT_ALWAYS( self, Panic(ECriticalPointerNull) );
-    return CApplication::New(*self);
+    __TICK( "CXmlUiController::NewApplication" );
+    __TIME_MARK( time );
+    
+    CXmlUiController* self = static_cast< CXmlUiController* >( Dll::Tls() );
+    
+    __ASSERT_ALWAYS( self, Panic( ECriticalPointerNull ) );
+    
+    CApplication* app = CApplication::New( *self );    
+    
+    __TIME_ENDMARK( "CXmlUiController::NewApplication, done", time );
+    
+    return app;
     }
 
 const TImplementationProxy KImplementationTable[] =