Revision: 201017 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 11 May 2010 16:02:39 +0300
branchRCL_3
changeset 23 7be2816dbabd
parent 19 79311d856354
child 24 515194ff9f15
child 25 137ebc85284b
Revision: 201017 Kit: 201019
idlehomescreen/data/qhd_tch/view_2001f48b/conf/view2001f48b.confml
idlehomescreen/data/qhd_tch/view_200286e4/conf/view200286e4.confml
idlehomescreen/data/qhd_tch/view_200286e5/conf/view200286e5.confml
idlehomescreen/inc/c_xnutils.h
idlehomescreen/inc/xnappuiadapter.h
idlehomescreen/inc/xneditmode.h
idlehomescreen/inc/xnproperty.h
idlehomescreen/inc/xnviewmanager.h
idlehomescreen/nativeuicontroller/src/nativeuicontroller.cpp
idlehomescreen/widgetmanager/data/widgetmanagerview.rss
idlehomescreen/widgetmanager/group/widgetmanager.mmp
idlehomescreen/widgetmanager/inc/wmeffectmanager.h
idlehomescreen/widgetmanager/inc/wmlistbox.h
idlehomescreen/widgetmanager/inc/wmplugin.h
idlehomescreen/widgetmanager/src/wmeffectmanager.cpp
idlehomescreen/widgetmanager/src/wmlistbox.cpp
idlehomescreen/widgetmanager/src/wmmaincontainer.cpp
idlehomescreen/widgetmanager/src/wmmaincontainerview.cpp
idlehomescreen/widgetmanager/src/wmplugin.cpp
idlehomescreen/widgetmanager/tsrc/wmunittest/group/wmunittest.mmp
idlehomescreen/xmluicontroller/inc/appui.h
idlehomescreen/xmluicontroller/src/appui.cpp
idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/group/xnclockfactory.mmp
idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/inc/xnclockadapter.h
idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/inc/xnclockcontrol.h
idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/src/xnclockadapter.cpp
idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/src/xnclockcontrol.cpp
idlehomescreen/xmluirendering/renderingplugins/xnmenufactory/src/xnmenuadapter.cpp
idlehomescreen/xmluirendering/renderingplugins/xnnewstickerfactory/src/xnnewstickeradapter.cpp
idlehomescreen/xmluirendering/renderingplugins/xntexteditorfactory/src/xntexteditoradapter.cpp
idlehomescreen/xmluirendering/uiengine/bwins/xn3layoutengineu.def
idlehomescreen/xmluirendering/uiengine/eabi/xn3layoutengineu.def
idlehomescreen/xmluirendering/uiengine/group/xnlayoutengine.mmp
idlehomescreen/xmluirendering/uiengine/inc/xnappuiadapterimpl.h
idlehomescreen/xmluirendering/uiengine/inc/xnbackgroundmanager.h
idlehomescreen/xmluirendering/uiengine/inc/xncontroladapterimpl.h
idlehomescreen/xmluirendering/uiengine/inc/xneffectmanager.h
idlehomescreen/xmluirendering/uiengine/inc/xnitemactivator.h
idlehomescreen/xmluirendering/uiengine/inc/xnplugindata.h
idlehomescreen/xmluirendering/uiengine/inc/xnpublisherdata.h
idlehomescreen/xmluirendering/uiengine/inc/xnviewadapter.h
idlehomescreen/xmluirendering/uiengine/inc/xnviewdata.h
idlehomescreen/xmluirendering/uiengine/inc/xnwallpaperview.h
idlehomescreen/xmluirendering/uiengine/src/xnappuiadapter.cpp
idlehomescreen/xmluirendering/uiengine/src/xnappuiadapterimpl.cpp
idlehomescreen/xmluirendering/uiengine/src/xnbackgroundmanager.cpp
idlehomescreen/xmluirendering/uiengine/src/xncomposer.cpp
idlehomescreen/xmluirendering/uiengine/src/xncontroladapterimpl.cpp
idlehomescreen/xmluirendering/uiengine/src/xneditmode.cpp
idlehomescreen/xmluirendering/uiengine/src/xneffectmanager.cpp
idlehomescreen/xmluirendering/uiengine/src/xnfocuscontrol.cpp
idlehomescreen/xmluirendering/uiengine/src/xnitemactivator.cpp
idlehomescreen/xmluirendering/uiengine/src/xnnodeimpl.cpp
idlehomescreen/xmluirendering/uiengine/src/xnplugindata.cpp
idlehomescreen/xmluirendering/uiengine/src/xnpublisherdata.cpp
idlehomescreen/xmluirendering/uiengine/src/xnrootdata.cpp
idlehomescreen/xmluirendering/uiengine/src/xnuiengineimpl.cpp
idlehomescreen/xmluirendering/uiengine/src/xnviewadapter.cpp
idlehomescreen/xmluirendering/uiengine/src/xnviewdata.cpp
idlehomescreen/xmluirendering/uiengine/src/xnviewmanager.cpp
idlehomescreen/xmluirendering/uiengine/src/xnwallpaperview.cpp
idlehomescreen/xmluirendering/uiengine/src/xnwallpaperview.rss
idlehomescreen/xmluirendering/uiengine/src/xnwidgetextensionadapter.cpp
menufw/group/bld.inf
menufw/hierarchynavigator/hnmetadatamodel/src/hnmdeventmapping.cpp
menufw/hierarchynavigator/hnpresentationmodel/src/hnitemsorder.cpp
menufw/hierarchynavigator/hnutilities/src/hnliwutils.cpp
menufw/menufwui/matrixmenu/src/mmappui.cpp
menufw/menufwui/mmextensions/mmfolderuiextension/src/mmmovetofoldercommand.cpp
menufw/menufwui/mmwidgets/bwins/mmwidgetsu.def
menufw/menufwui/mmwidgets/eabi/mmwidgetsu.def
menufw/menufwui/mmwidgets/inc/mmlistboxview.h
menufw/menufwui/mmwidgets/inc/mmwidgetcontainer.h
menufw/menufwui/mmwidgets/src/mmlistbox.cpp
menufw/menufwui/mmwidgets/src/mmlistboxitemdrawer.cpp
menufw/menufwui/mmwidgets/src/mmlistboxview.cpp
menufw/menufwui/mmwidgets/src/mmtemplatelibrary.cpp
menufw/menufwui/mmwidgets/src/mmwidgetcontainer.cpp
menufw/menusuites/foldersuite/data/items_touch.xml
menufw/menusuites/foldersuite/group/bld.inf
taskswitcher/contextengine/tsfswserver/engine/inc/tsfswdatalist.h
taskswitcher/contextengine/tsfswserver/engine/inc/tsfswengine.h
taskswitcher/contextengine/tsfswserver/engine/src/tsfswdatalist.cpp
taskswitcher/contextengine/tsfswserver/engine/src/tsfswengine.cpp
taskswitcher/taskswitcherui/taskswitcherapp/data/taskswitcher.rss
taskswitcher/taskswitcherui/taskswitcherapp/inc/tsappui.h
taskswitcher/taskswitcherui/taskswitcherapp/inc/tsappview.h
taskswitcher/taskswitcherui/taskswitcherapp/inc/tsfastswaparea.h
taskswitcher/taskswitcherui/taskswitcherapp/loc/taskswitcher.loc
taskswitcher/taskswitcherui/taskswitcherapp/src/tsappui.cpp
taskswitcher/taskswitcherui/taskswitcherapp/src/tsappview.cpp
taskswitcher/taskswitcherui/taskswitcherapp/src/tseventcontroler.cpp
taskswitcher/taskswitcherui/taskswitcherapp/src/tsfastswaparea.cpp
--- a/idlehomescreen/data/qhd_tch/view_2001f48b/conf/view2001f48b.confml	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/data/qhd_tch/view_2001f48b/conf/view2001f48b.confml	Tue May 11 16:02:39 2010 +0300
@@ -26,6 +26,7 @@
       <desc>Widgets in the Homescreen 1</desc>
       <setting ref="Uid" name="Widget" type="selection">
         <desc>Widget name</desc>
+        <!-- S60 Native Widgets -->
         <option name="Empty" value="0x2001f47f"/>
         <option name="PhoneSetup" value="0x20021195"/>
         <option name="ContactsBar" value="0x20022eba"/>
@@ -42,58 +43,41 @@
         <option name="EmailWidget" value="0x2001e272"/>
         <option name="Profile" value="0x2001cb7c"/>
         <option name="ServiceWidget" value="0x20021383"/>
-        <!-- S60WRT on UDA -->
-        <option name="Facebook UDA" value="0x2000dad2"/>
-        <option name="Accuweather UDA" value="0x2000dad3"/>
-        <option name="Reuter UDA" value="0x2000dad4"/>
-        <option name="Amazon UDA" value="0x2000dad5"/>
-        <option name="Ap News UDA" value="0x2000dad6"/>
-        <option name="Bloomberg UDA" value="0x2000dad7"/>
-        <option name="Hi5 UDA" value="0x2000dad8"/>
-        <option name="CNN Video UDA" value="0x2000dad9"/>
-        <option name="E! UDA" value="0x2000dada"/>
-        <option name="Movie Teasers UDA" value="0x2000dadb"/>
-        <option name="Nat Geo UDA" value="0x2000dadc"/>
-        <option name="Chat UDA" value="0x2000dadd"/>
-        <option name="Web TV Demo UDA" value="0x2000dade"/>
-        <option name="Communities UDA" value="0x2000dadf"/>
-        <option name="Ovi Files UDA" value="0x2000dae0"/>
+        <option name="SocialMixer" value="0x2002699f"/>
         <!-- S60WRT on eMMC -->
-        <option name="Facebook eMMC" value="0x2000dcc6"/>
-        <option name="Accuweather eMMC" value="0x2000dcc7"/>
-        <option name="Reuter eMMC" value="0x2000dcc8"/>
-        <option name="Amazon eMMC" value="0x2000dcc9"/>
-        <option name="Ap News eMMC" value="0x2000dcca"/>
-        <option name="Bloomberg eMMC" value="0x2000dccb"/>
-        <option name="Hi5 eMMC" value="0x2000dccc"/>
-        <option name="CNN Video eMMC" value="0x2000dccd"/>
-        <option name="E! eMMC" value="0x2000dcce"/>
-        <option name="Movie Teasers eMMC" value="0x2000dccf"/>
-        <option name="Nat Geo eMMC" value="0x2000dcd0"/>
-        <option name="Chat eMMC" value="0x2000dcd1"/>
-        <option name="Web TV Demo eMMC" value="0x2000dcd2"/>
-        <option name="Communities eMMC" value="0x2000dcd3"/>
-        <option name="Ovi Files eMMC" value="0x2000dcd4"/>
-        <!-- cWRT on UDA -->
-        <option name="SSOUI UDA" value="0x2000dbcc"/>
-        <option name="Timer.A UDA" value="0x2000dbcd"/>
-        
+        <option name="Accuweather eMMC" value="0x2000dd2a"/>
+        <option name="Ap News eMMC" value="0x2000dd2b"/>
+        <option name="Facebook eMMC" value="0x2000dd2c"/>
+        <option name="Bloomberg eMMC" value="0x2000dd2d"/>
+        <option name="Amazon eMMC" value="0x2000dd2e"/>
+        <option name="Hi5 eMMC" value="0x2000dd2f"/>
+        <option name="Reuters eMMC" value="0x2000dd30"/>
+        <option name="CNN Video eMMC" value="0x2000dd31"/>
+        <option name="E! eMMC" value="0x2000dd32"/>
+        <option name="Movie Teasers eMMC" value="0x2000dd33"/>
+        <option name="Nat Geo eMMC" value="0x2000dd34"/>
+        <option name="Chat eMMC" value="0x2000dd35"/>
+        <option name="Web TV Demo eMMC" value="0x2000dd36"/>
+        <option name="Communities eMMC" value="0x2000dd37"/>
+        <option name="Ovi Files eMMC" value="0x2000dd38"/>
+        <option name="YLE Areena eMMC" value="0x2000dd39"/>
+                
         <!-- S60WRT on eMMC -->
-        <option name="SSOUI eMMC" value="0x2000ddc0"/>
-        <option name="Timer.A eMMC" value="0x2000ddc1"/>
+        <option name="SSOUI eMMC" value="0x2000de24"/>
+        <option name="Timer.A eMMC" value="0x2000de25"/>
         
       </setting>
       <setting ref="BundleIdentifier" name="Bundle Identifier" type="selection">
         <desc>Bundle identifier for the (C)WRT widgets. None for the native widgets</desc>
         <!-- Bundle names of WRT -->
         <option name="None" value="0"/>
+        <option name="AccuWeather" value="com.accuweather.widget.touchNG"/>
+        option name="Ap News" value="com.nokia.apnews.widget"/>
         <option name="Facebook" value="com.nokia.facebook.widget.S605th"/>
-        <option name="Reuter" value="com.reuters.widget.news"/>
+        <option name="Bloomberg" value="com.bloomberg.nokia.mobile"/>
         <option name="Amazon" value="com.nokia.widget.amazon"/>
-        <option name="AccuWeather" value="com.accuweather.widget.touchNG"/>
-        <option name="Ap News" value="com.nokia.apnews.widget"/>
-        <option name="Bloomberg" value="com.bloomberg.nokia.mobile"/>
         <option name="Hi5" value="com.nokia.widget.s605.hi5"/>
+        <option name="Reuters" value="com.reuters.widget.news"/>
         <option name="CNN Video" value="com.cnn"/>
         <option name="E!" value="com.moderati.eonline"/>
         <option name="Movie Teasers" value="com.movieteasers"/>
@@ -102,6 +86,7 @@
         <option name="Web TV Demo" value="com.nokia.forum.webtv.widget"/>
         <option name="Communities" value="com.nokia.socialmixer.v1"/>
         <option name="Ovi Files" value="com.nokia.ss.sas.filesql"/> 
+        <option name="YLE Areena" value="com.tieto.yle"/> 
         <option name="SSOUI" value="ovi.serviceui.SSOUI"/>
         <option name="Timer.A" value="com.nokia.wgt.TIMER.A"/>
         
Binary file idlehomescreen/data/qhd_tch/view_200286e4/conf/view200286e4.confml has changed
Binary file idlehomescreen/data/qhd_tch/view_200286e5/conf/view200286e5.confml has changed
--- a/idlehomescreen/inc/c_xnutils.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/inc/c_xnutils.h	Tue May 11 16:02:39 2010 +0300
@@ -98,6 +98,9 @@
     IMPORT_C static TGulAlignmentValue TextAlignment( CXnNodePluginIf& aNode );
 
     /**
+    * Avoid using this method. Produces low quality bitmaps. Rather use
+    * CWindowGc::DrawBitmap and DrawBitmapMasked. These methods will scale 
+    * images on fly and they support HW acceleration.
     * Scales the source bitmap into a given rectangle of the target bitmap.
     * Source and target bitmaps must have the same display mode.
     *
--- a/idlehomescreen/inc/xnappuiadapter.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/inc/xnappuiadapter.h	Tue May 11 16:02:39 2010 +0300
@@ -22,9 +22,14 @@
 // System includes
 #include <aknViewAppUi.h>
 
+// User includes
+
 // Forward declarations
+class TAiFwPublisherInfo;
+class THsPublisherInfo;
 class TXnUiEngineAppIf;
 class CXnNodeAppIf;
+class CXnNode;
 class CXnDomNode;
 class CXnAppUiAdapterImpl;
 class CXnUiEngine;
@@ -34,6 +39,7 @@
 class MHsContentControlUi;
 class CXnEffectManager;
 class MHsContentControl;
+class CXnItemActivator;
 
 // Class declaration
 /**
@@ -100,11 +106,9 @@
      *
      * @since S60 5.0
      * @param aPublisher Publisher to load
-     * @param aReason Load reason
-     * @return KErrNone if succesful, system wide error code otherwise     
      */
-    IMPORT_C virtual TInt LoadPublisher(
-        CXnNodeAppIf& aPublisher, TInt aReason );
+    IMPORT_C virtual void LoadPublisher( 
+        const TAiFwPublisherInfo& aPublisher );         
 
     /**
      * Handles data plugin destroying.
@@ -112,11 +116,9 @@
      *
      * @since S60 5.0
      * @param aPublisher Publisher to destroy     
-     * @param aReason Destroy reason
-     * @return KErrNone if succesful, system wide error code otherwise
      */
-    IMPORT_C virtual TInt DestroyPublisher(
-        CXnNodeAppIf& aPublisher, TInt aReason );
+    IMPORT_C virtual void DestroyPublisher( 
+        const TAiFwPublisherInfo& aPublisher );         
 
     /**
      * Handles dynamic menuitem element initialisation.
@@ -159,6 +161,28 @@
     IMPORT_C virtual void HandleEventL( const TDesC& aEvent, 
         CXnNodeAppIf& aDestination );
     
+    /** 
+     * Constructs THsPublisherInfo from aNode
+     * To be overriden by subclass.
+     * 
+     * @since S60 5.2
+     * @param aNode <contentsource> elements
+     * @param aInfo Publisher info which is constructed from aNode
+     * @return KErrNone if aInfo is succesfully build
+     */
+    EXPORT_C virtual TInt PublisherInfo( CXnNodeAppIf& aNode,
+        THsPublisherInfo& aInfo );
+
+    /** 
+     * Constructs THsPublisherInfo from aNode
+     * 
+     * @since S60 5.2
+     * @param aNode <contentsource> elements
+     * @param aInfo Publisher info which is constructed from aNode
+     * @return KErrNone if aInfo is succesfully build
+     */
+    TInt PublisherInfo( CXnNode& aNode, THsPublisherInfo& aInfo );
+            
     /**
      * This is called when (initial) view is ready
      * To be overriden by subclass.
@@ -264,6 +288,14 @@
     MHsContentControl* HsContentControlSrv() const;
 
     /**
+     * Gets a Item activator
+     *
+     * @since S60 5.0
+     * @return Item activator
+     */        
+    CXnItemActivator& ItemActivator() const;
+    
+    /**
      * Queries whether the focus control is visible
      *
      * @since S60 5.0
--- a/idlehomescreen/inc/xneditmode.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/inc/xneditmode.h	Tue May 11 16:02:39 2010 +0300
@@ -24,6 +24,7 @@
 // Forward declarations
 class CXnUiEngine;
 class CXnViewManager;
+class CXnPluginData;
 class CXnNode;
 class CFbsBitGc;
 class CFbsBitmap;
@@ -134,9 +135,9 @@
      * Organizing starts using drag and drop.
      *
      * @since Series 60 5.0
-     * @param aNode Node to drag.
+     * @param aPlugin Plugin to drag.
      */
-    void StartDragL( CXnNode& aNode );
+    void StartDragL( const CXnPluginData& aPlugin );
     
     /**
      * Reset the dragging state and deletes screenshot bitmaps.
--- a/idlehomescreen/inc/xnproperty.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/inc/xnproperty.h	Tue May 11 16:02:39 2010 +0300
@@ -162,6 +162,7 @@
         _LIT8(KMaskInverted, "maskinverted");
         _LIT8(KS60AspectRatio, "_s60-aspect-ratio");
         _LIT8(KPreserve, "preserve");
+        _LIT8(KNone, "none");
         }
     namespace clock
         {
--- a/idlehomescreen/inc/xnviewmanager.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/inc/xnviewmanager.h	Tue May 11 16:02:39 2010 +0300
@@ -40,7 +40,6 @@
 class CHsContentInfo;
 class CXnViewAdapter;
 class CXnOomSysHandler;
-class CIdle;
 
 namespace hspswrapper
     {
@@ -202,9 +201,11 @@
     CXnOomSysHandler& OomSysHandler() const;
     
     void UpdatePageManagementInformationL();
-
-    void OrientationChanged();
-
+                  
+    void ShowErrorL( TInt aResource ) const;
+    
+    void PublishersReadyL( CXnViewData& aViewData, TInt aResult );
+        
 private:
     // new functions
     
@@ -235,9 +236,7 @@
     void UpdateCachesL();
           
     void ReportWidgetAmountL( const CXnViewData& aViewData );
-    
-    void ShowDiskFullMessageL() const;
-          
+                
     TInt ResolveIconIndex( TInt aPageCount, TInt aPageNum ) const;
     
     /**
@@ -252,14 +251,11 @@
      * Reset crash count
      */
     void ResetCrashCount();    
-
-    /**
-     * Show error note from resource.
-     */
-    void ShowErrorNoteL();   
     
     void DoRobustnessCheckL();
     
+    static TInt ContainerActivated( TAny* aAny );
+              
 private:
     // data
 
@@ -348,9 +344,15 @@
     CPeriodic* iStabilityTimer;
 
     /**
-     * Flag for current orientation.
-     */    
-    TBool iIsLandscapeOrientation;
+     * Flag to indicate first view activation
+     */
+    TBool iUiReady;
+    	
+    /**
+     * Async callback
+     * Own. 
+     */
+    CPeriodic* iAsyncCb;
     
 private:   
     // Friend classes
--- a/idlehomescreen/nativeuicontroller/src/nativeuicontroller.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/nativeuicontroller/src/nativeuicontroller.cpp	Tue May 11 16:02:39 2010 +0300
@@ -31,8 +31,8 @@
 
 // User includes
 #include <aifwstatehandler.h>
+#include <aifwpublisherinfo.h>
 #include <hscontentpublisher.h>
-#include <hspublisherinfo.h>
 #include "nativeuicontroller.h"
 #include "ainativeui.hrh"
 #include "application.h"
@@ -449,14 +449,20 @@
         
         iPlugins.Append( deviceStatus );
         
-        iFwStateHandler->LoadPlugin( deviceStatus, EAiFwSystemStartup );
+        TAiFwPublisherInfo devstatInfo( 
+            deviceStatus, TAiFwCallback(), EAiFwSystemStartup );
+        
+        iFwStateHandler->LoadPlugin( devstatInfo ); 
         
         THsPublisherInfo profile( KProfilePluginUid, 
             KProfilePluginName, KNativeUiNamespace );
-        
+
         iPlugins.Append( profile );
-        
-        iFwStateHandler->LoadPlugin( profile, EAiFwSystemStartup );        	        
+
+        TAiFwPublisherInfo profileInfo( 
+            profile, TAiFwCallback(), EAiFwSystemStartup );
+                
+        iFwStateHandler->LoadPlugin( profileInfo );                     	       
         }
 
     // We need to load the resource file here if we are not main controller.
--- a/idlehomescreen/widgetmanager/data/widgetmanagerview.rss	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/widgetmanager/data/widgetmanagerview.rss	Tue May 11 16:02:39 2010 +0300
@@ -41,7 +41,7 @@
 
 RESOURCE AVKON_VIEW r_wm_main_container_view
     {
-    cba = R_AVKON_SOFTKEYS_OPTIONS_BACK__SELECT;
+    cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
     menubar = r_wm_main_container_options_menu;
     toolbar = 0;
     }
--- a/idlehomescreen/widgetmanager/group/widgetmanager.mmp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/widgetmanager/group/widgetmanager.mmp	Tue May 11 16:02:39 2010 +0300
@@ -120,5 +120,6 @@
 LIBRARY     bmpanim.lib // AknBitmap animation
 LIBRARY     inetprotutil.lib 
 LIBRARY     browserlauncher.lib
+LIBRARY     alfdecoderserverclient.lib // alf observer
 
 // End of file
--- a/idlehomescreen/widgetmanager/inc/wmeffectmanager.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/widgetmanager/inc/wmeffectmanager.h	Tue May 11 16:02:39 2010 +0300
@@ -23,6 +23,8 @@
 #include <e32base.h>
 
 class CCoeEnv;
+class CAlfEffectObserver;
+
 // CONSTANTS
 // Effects
 const TInt KAppStartEffectStyle = 1007;
@@ -70,6 +72,11 @@
      */
     void UiRendered();
     
+    /**
+     * Returns true if effect is ongoing.
+     */
+    TBool IsEffectActive();
+    
 private:    
     /**
      * C++ default constructor.
@@ -85,8 +92,16 @@
     /**
      * Starts fullscreen effect.
      * @param aEffect effect data
+     * @return ETrue if effect is started, EFalse otherwise.
      */
-    void DoBeginFullscreenEffect( TWmEffect& aEffect );
+    TBool DoBeginFullscreenEffect( TWmEffect& aEffect );
+    
+    /**
+     * Waits ongoing effect to complete.
+     * @param aInterval Time to wait for complete.
+     * @return ETrue if effect completed in given time, EFalse otherwise.
+     */
+    TBool WaitActiveEffect( TInt aInterval );
     
     /**
      * Removes and destroys effect from effect list.
@@ -104,6 +119,11 @@
      * COE env
      */
     CCoeEnv& iCoeEnv;
+    
+    /**
+     * Effect observer
+     */
+    CAlfEffectObserver* iObserver;
     };
 
 #endif // WMEFFECTMANAGER_H
--- a/idlehomescreen/widgetmanager/inc/wmlistbox.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/widgetmanager/inc/wmlistbox.h	Tue May 11 16:02:39 2010 +0300
@@ -44,6 +44,7 @@
 class CWmWidgetData;
 class CAknStylusPopUpMenu;
 class MEikMenuObserver;
+class CWmListItemDrawer;
 
 // CLASS DECLARATIONS
 
@@ -129,7 +130,7 @@
 /**
  * CWmListBox
  */
-NONSHARABLE_CLASS( CWmListBox ): public CAknDouble2LargeStyleListBox,
+NONSHARABLE_CLASS( CWmListBox ): public CEikFormattedCellListBox,
                       public MWmWidgetDataObserver
 	{
 public:
@@ -291,7 +292,7 @@
      * @see CEikTextListBox::CreateItemDrawerL
      */
 	void CreateItemDrawerL();
-	
+
 protected: // from base class CCoeControl
     
     /**
--- a/idlehomescreen/widgetmanager/inc/wmplugin.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/widgetmanager/inc/wmplugin.h	Tue May 11 16:02:39 2010 +0300
@@ -156,7 +156,10 @@
     RFs& FileServer();
     
     /** prestored action to be executed. */
-    void ExecuteCommandL();
+    void DoExecuteCommand();
+    
+    /** callback function for launcher */
+    static TInt ExecuteCommand( TAny* aSelf );
     
     /**
      * reference to iWmInstaller
@@ -238,6 +241,16 @@
      */
     CWmInstaller* iWmInstaller;
     
+    /**
+     * Used for adding widgets to homescreen.
+     */
+    CPeriodic* iLauncher;
+    
+    /**
+     * Counter for execute command delay.
+     */
+    TInt iExecutionCount;
+    
 #ifdef _WM_UNIT_TEST
     friend class CWmUnitTest;
 #endif
--- a/idlehomescreen/widgetmanager/src/wmeffectmanager.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/widgetmanager/src/wmeffectmanager.cpp	Tue May 11 16:02:39 2010 +0300
@@ -21,6 +21,7 @@
 #include <aknappui.h>
 #include <gfxtranseffect/gfxtranseffect.h>  // For transition effects
 #include <akntranseffect.h>                 // For transition effects
+#include <alf/alfcompositionutility.h>
 
 // INCLUDE FILES
 #include "wmeffectmanager.h"
@@ -31,6 +32,9 @@
 const TInt KWaitForLayout = 1;
 const TInt KEffectStarted = 2;
 
+const TInt KEffectWaitInterval( 250000 ); //250ms
+const TInt KWaitInterval( 25000 ); // 25ms
+
 // ============================ MEMBER FUNCTIONS ===============================
 
 // -----------------------------------------------------------------------------
@@ -47,6 +51,7 @@
 //
 void CWmEffectManager::ConstructL()
     {
+    iObserver = CAlfEffectObserver::NewL(); 
     }
 
 // -----------------------------------------------------------------------------
@@ -68,6 +73,7 @@
 //
 CWmEffectManager::~CWmEffectManager()
     {
+    delete iObserver;
     GfxTransEffect::AbortFullScreen();
     iEffects.ResetAndDestroy();
     }
@@ -87,7 +93,10 @@
     
     CleanupStack::Pop( effect );
 
-    DoBeginFullscreenEffect( *effect );
+    if ( !DoBeginFullscreenEffect( *effect ) )
+        {
+        RemoveEffect( effect );
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -117,21 +126,20 @@
 // CWmEffectManager::DoBeginFullscreenEffect
 // -----------------------------------------------------------------------------
 //
-void CWmEffectManager::DoBeginFullscreenEffect( TWmEffect& aEffect )
+TBool CWmEffectManager::DoBeginFullscreenEffect( TWmEffect& aEffect )
     {
     if ( iCoeEnv.WsSession().GetFocusWindowGroup() != 
          iCoeEnv.RootWin().Identifier() )
         {
         // Window group is not focused
         RemoveEffect( &aEffect );
-        return;
+        return EFalse;
         }
     
-    // Must give some time before starting effect, because otherwise
-    // fullscreen effect may contain unwanted parts (dialog, note, etc.)
-    // which was shown when fullscreen effect is about to be started
-    iCoeEnv.WsSession().Finish();
-    User::After( 1 );
+    if ( !WaitActiveEffect( KEffectWaitInterval ) )
+        {
+        return EFalse;
+        }
 
     const TInt flags( AknTransEffect::TParameter::EActivateExplicitCancel );
     const TUid targetAppUid( iAvkonAppUi->Application()->AppDllUid() );
@@ -142,6 +150,34 @@
         targetAppUid, flags ) );
     
     aEffect.iState = KEffectStarted;
+    
+    return ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+// CWmEffectManager::WaitActiveEffect
+// -----------------------------------------------------------------------------
+//
+TBool CWmEffectManager::WaitActiveEffect( TInt aInterval )     
+    {
+    TBool retval( EFalse );
+    TInt loop( aInterval / KWaitInterval );
+    
+    while ( loop >= 0 )
+        {               
+        TInt count( iObserver->ActiveEffectsCount() );
+        
+        if ( count == 0 )
+            {
+            retval = ETrue;
+            break;                        
+            }
+        
+        User::After( KWaitInterval );
+        loop--;
+        }
+
+    return retval;    
     }
 
 // -----------------------------------------------------------------------------
@@ -159,5 +195,17 @@
         }
     }
 
+// -----------------------------------------------------------------------------
+// CXnEffectManager::IsEffectActive
+// -----------------------------------------------------------------------------
+//
+TBool CWmEffectManager::IsEffectActive()
+    {
+    TBool retVal( EFalse );
+    if ( iObserver->ActiveEffectsCount() )
+        retVal = ETrue;
+    return retVal;
+    }
+
 // End fo file
 
--- a/idlehomescreen/widgetmanager/src/wmlistbox.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/widgetmanager/src/wmlistbox.cpp	Tue May 11 16:02:39 2010 +0300
@@ -77,7 +77,7 @@
         CWmListBox* aListBox )
     : CFormattedCellListBoxItemDrawer( aTextListBoxModel,aFont,aFormattedCellData ),
     iWmPlugin( aWmPlugin )
-	{    
+	{
     iCellData = aFormattedCellData;
     iListBox = aListBox;
 	}
@@ -160,8 +160,9 @@
         ::listrow_wgtman_pane().LayoutLine();
     TAknLayoutRect listRowPaneRect;
     listRowPaneRect.LayoutRect( listPaneRect.Rect(), listRowPane );
-    TRAP_IGNORE( iListBox->SetItemHeightL( listRowPaneRect.Rect().Height() ); );
-    iListBox->View()->ItemDrawer()->SetItemCellSize( listRowPaneRect.Rect().Size() );
+    TRect itemRect = listRowPaneRect.Rect();
+    TRAP_IGNORE( iListBox->SetItemHeightL( itemRect.Height() ); );
+    iListBox->View()->ItemDrawer()->SetItemCellSize( itemRect.Size() );
     }
 
 // ---------------------------------------------------------
@@ -318,7 +319,7 @@
 // ---------------------------------------------------------
 //
 CWmListBox::CWmListBox( CWmPlugin& aWmPlugin ):
-    CAknDouble2LargeStyleListBox(),
+    CEikFormattedCellListBox(),
     iWmPlugin( aWmPlugin )
     {
     iFindPaneIsVisible = EFalse;
@@ -557,7 +558,7 @@
 //
 void CWmListBox::SizeChanged()
     {
-    CAknDouble2LargeStyleListBox::SizeChanged();
+    CEikFormattedCellListBox::SizeChanged();
     
     CWmListItemDrawer* itemDrawer = 
                     static_cast <CWmListItemDrawer*>( iItemDrawer );
@@ -577,7 +578,7 @@
     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
     MAknsControlContext* cc = AknsDrawUtils::ControlContext( this );
     AknsDrawUtils::Background( skin, cc, this, gc, Rect() );
-    CAknDouble2LargeStyleListBox::Draw( aRect );
+    CEikFormattedCellListBox::Draw( aRect );
     }
 
 // ---------------------------------------------------------
--- a/idlehomescreen/widgetmanager/src/wmmaincontainer.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/widgetmanager/src/wmmaincontainer.cpp	Tue May 11 16:02:39 2010 +0300
@@ -953,14 +953,15 @@
     {
     if ( iFindbox && iFindPaneIsVisible )
         {
-        iFindbox->ResetL();
-        iFindbox->SetSearchTextL( KNullDesC );
+        iFindbox->ResetL();        
         CAknFilteredTextListBoxModel* m = 
                 static_cast <CAknFilteredTextListBoxModel*> ( iWidgetsList->Model() );
         if ( m && m->Filter() )
             {
             m->Filter()->ResetFilteringL();
             }
+        iFindbox->SetSearchTextL( KNullDesC );
+        iFindbox->DrawNow();
         }
     if ( !iWidgetLoader )
         {
@@ -1009,12 +1010,12 @@
 // CWmMainContainer::Draw
 // ---------------------------------------------------------
 //
-void CWmMainContainer::Draw( const TRect& /*aRect*/ ) const
+void CWmMainContainer::Draw( const TRect& aRect ) const
 	{
 	CWindowGc& gc = SystemGc();	
     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
     MAknsControlContext* cc = AknsDrawUtils::ControlContext( this );
-    AknsDrawUtils::Background( skin, cc, this, gc, Rect() );
+    AknsDrawUtils::Background( skin, cc, this, gc, aRect );
 	}
 
 // ---------------------------------------------------------
@@ -1301,18 +1302,18 @@
         iFindPaneIsVisible = EFalse;        
         iWidgetsList->SetFindPaneIsVisible( EFalse );       
         
+
+        // set soft key set
+        CEikButtonGroupContainer* cbaGroup =
+            CEikButtonGroupContainer::Current();
+        TInt cbaResourceId = ( AknLayoutUtils::MSKEnabled() ?
+                                    R_AVKON_SOFTKEYS_OPTIONS_BACK__SELECT : 
+                                    R_AVKON_SOFTKEYS_OPTIONS_BACK );
+        cbaGroup->SetCommandSetL( cbaResourceId );
+        
         if (aLayout) //no need to draw UI if exiting list
             {
             LayoutControls();
-    
-            // set soft key set
-            CEikButtonGroupContainer* cbaGroup =
-                CEikButtonGroupContainer::Current();
-            TInt cbaResourceId = ( AknLayoutUtils::MSKEnabled() ?
-                                        R_AVKON_SOFTKEYS_OPTIONS_BACK__SELECT : 
-                                        R_AVKON_SOFTKEYS_OPTIONS_BACK );
-    
-            cbaGroup->SetCommandSetL( cbaResourceId );
             cbaGroup->DrawNow();
     
             UpdateFocusMode();
--- a/idlehomescreen/widgetmanager/src/wmmaincontainerview.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/widgetmanager/src/wmmaincontainerview.cpp	Tue May 11 16:02:39 2010 +0300
@@ -29,6 +29,7 @@
 #include <hscontentcontroller.h>
 #include <AknUtils.h>
 #include <avkon.rsg>
+#include <layoutmetadata.cdl.h>
 
 #include "wmplugin.h"
 #include "widgetmanager.hrh"
@@ -187,13 +188,11 @@
 		const TDesC8& /*aCustomMessage*/ )
 	{
     // setup status pane layout
-    StatusPane()->SwitchLayoutL( 
-            R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT );    
-    // disable transparancy 
-    StatusPane()->EnableTransparent( EFalse );
+    StatusPane()->SwitchLayoutL( R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT );    
     // apply changes 
     StatusPane()->ApplyCurrentSettingsL();
-
+    // disable transparancy
+    StatusPane()->EnableTransparent( EFalse );
     // create container
     if ( iWmSpBgCleaner == NULL )
         {
@@ -205,18 +204,15 @@
     // title in status pane
     SetTitleL();
 
+    iWmSpBgCleaner->DrawNow();
     StatusPane()->DrawNow();
 
     // update cba
-    CEikButtonGroupContainer* bgc( Cba() );
-    CEikCba* cba = static_cast< CEikCba* >( bgc->ButtonGroup() );
-    if ( cba ) 
+    if ( Layout_Meta_Data::IsMSKEnabled() )
         {
-        TInt cbaResourceId = ( AknLayoutUtils::MSKEnabled() ?
-                                R_AVKON_SOFTKEYS_OPTIONS_BACK__SELECT : 
-                                R_AVKON_SOFTKEYS_OPTIONS_BACK );
-
-        cba->SetCommandSetL( cbaResourceId );
+        CEikButtonGroupContainer* bgc( Cba() );
+        CEikCba* cba = static_cast< CEikCba* >( bgc->ButtonGroup() );
+        cba->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_BACK__SELECT );
         bgc->SetBoundingRect( TRect() );
         cba->DrawNow();
         }
@@ -227,6 +223,7 @@
         iWmMainContainer = CreateContainerL();
         iWmMainContainer->SetMopParent( this );
         AppUi()->AddToStackL( *this, iWmMainContainer );
+        iWmMainContainer->DrawNow();
         }
     
     iWmPlugin.MainViewActivated( aPrevViewId, iWmMainContainer );
@@ -274,7 +271,6 @@
             iEikonEnv->CreateResourceReaderLC( 
                     reader, R_WM_MAIN_CONTAINER_TITLE_RESOURCE );
             title->SetFromResourceL( reader );
-            title->DrawDeferred();
             CleanupStack::PopAndDestroy(); // reader internal state
 		    }
 		}
--- a/idlehomescreen/widgetmanager/src/wmplugin.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/widgetmanager/src/wmplugin.cpp	Tue May 11 16:02:39 2010 +0300
@@ -38,6 +38,9 @@
 #include "wminstaller.h"
 #include "wmlistbox.h"
 
+const TInt KExecuteCommandDelay( 50000 ); // 50ms
+const TInt KMaxCmdExecutionCount( 6 );
+
 // ---------------------------------------------------------
 // CWmPlugin::NewL
 // ---------------------------------------------------------
@@ -57,6 +60,12 @@
 //
 CWmPlugin::~CWmPlugin()
     {
+    if ( iLauncher && iLauncher->IsActive() )
+        {
+        iLauncher->Cancel();
+        }
+    delete iLauncher;
+    
     if ( iWmInstaller && 
        iWmInstaller->IsActive() )
         {
@@ -77,6 +86,7 @@
 CWmPlugin::CWmPlugin()
     {
     iPreviousViewUid.iViewUid = KNullUid;
+    iExecutionCount = 0;
     }
 
 // ---------------------------------------------------------
@@ -106,6 +116,9 @@
     CleanupStack::PushL( mainView );
 	iViewAppUi->AddViewL( mainView );	
 	CleanupStack::Pop( mainView );
+	
+	// laucher for adding widgets.
+	iLauncher = CPeriodic::NewL( CActive::EPriorityIdle );
     }
 
 // ---------------------------------------------------------
@@ -246,12 +259,23 @@
         iEffectManager->UiRendered();
         }
 
-    TRAPD( err, ExecuteCommandL(); );
-    if ( KErrNone != err )
+    if ( !iEffectManager->IsEffectActive() )
+        {
+        // launch effect without delay
+        iExecutionCount = KMaxCmdExecutionCount;
+        iLauncher->Start( 0, 0, TCallBack( ExecuteCommand, this ) );
+        }
+    else
         {
-        delete iPostponedContent;
-        iPostponedContent = NULL;
-        iPostponedCommand = ENone;
+        // maximum wait time is 300ms (6 x 50ms)
+        if ( !iLauncher->IsActive() )
+            {
+            iExecutionCount++;
+            iLauncher->Start(
+                KExecuteCommandDelay,
+                KExecuteCommandDelay,
+                TCallBack( ExecuteCommand, this ) );
+            }
         }
     }
 
@@ -285,20 +309,53 @@
     }
 
 // ---------------------------------------------------------
-// CWmPlugin::ExecuteCommandL
+// CWmPlugin::ExecuteCommand
+// ---------------------------------------------------------
+//
+TInt CWmPlugin::ExecuteCommand( TAny* aSelf )
+    {
+    CWmPlugin* plugin = static_cast<CWmPlugin*>( aSelf );
+    plugin->DoExecuteCommand();
+    return 0;
+    }
+
+// ---------------------------------------------------------
+// CWmPlugin::DoExecuteCommand
 // ---------------------------------------------------------
 //
-void CWmPlugin::ExecuteCommandL()
+void CWmPlugin::DoExecuteCommand()
     {
-    if ( iPostponedCommand == EAddToHomescreen )
+    // prevent multiple events
+    if ( iLauncher->IsActive() )
+        {
+        iLauncher->Cancel();
+        }
+    
+    if ( !iEffectManager->IsEffectActive() ||
+        iExecutionCount == KMaxCmdExecutionCount )
         {
-        TInt err = ContentController().AddWidgetL( *iPostponedContent );
-        if ( err != KErrNone )
-            ShowErrorNoteL( err );
+        if ( iPostponedCommand == EAddToHomescreen )
+            {
+            TRAP_IGNORE(
+                TInt err( KErrNone );
+                err = ContentController().AddWidgetL( *iPostponedContent );
+                if ( KErrNone != err )
+                    ShowErrorNoteL( err );
+                );
+            }
+        iPostponedCommand = ENone;
+        delete iPostponedContent;
+        iPostponedContent = NULL;
+        iExecutionCount = 0; // reset counter
         }
-    iPostponedCommand = ENone;
-    delete iPostponedContent;
-    iPostponedContent = NULL;
+    else
+        {
+        iExecutionCount++;
+        iLauncher->Start(
+            KExecuteCommandDelay,
+            KExecuteCommandDelay,
+            TCallBack( ExecuteCommand, this ) );
+        }
     }
 
 // ---------------------------------------------------------
--- a/idlehomescreen/widgetmanager/tsrc/wmunittest/group/wmunittest.mmp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/widgetmanager/tsrc/wmunittest/group/wmunittest.mmp	Tue May 11 16:02:39 2010 +0300
@@ -110,6 +110,7 @@
 LIBRARY     bitgdi.lib // CFbsBitmapDevice
 LIBRARY     charconv.lib
 LIBRARY     browserlauncher.lib
+LIBRARY     alfdecoderserverclient.lib // alf observer
 
 // libraries needed by the test framework
 LIBRARY     stiftestinterface.lib
--- a/idlehomescreen/xmluicontroller/inc/appui.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluicontroller/inc/appui.h	Tue May 11 16:02:39 2010 +0300
@@ -23,7 +23,7 @@
 #include <coeview.h>
 
 // User includes
-#include <hspublisherinfo.h>
+#include <aifwpublisherinfo.h>
 #include "xnappuiadapter.h"
 
 // Forward declarations
@@ -71,9 +71,9 @@
     void HandleWsEventL( const TWsEvent& aEvent, 
             CCoeControl* aDestination );
 
-    TInt LoadPublisher( CXnNodeAppIf& aPublisher, TInt aReason );
-                      
-    TInt DestroyPublisher( CXnNodeAppIf& aPublisher, TInt aReason );
+    void LoadPublisher( const TAiFwPublisherInfo& aPublisher ); 
+                             
+    void DestroyPublisher( const TAiFwPublisherInfo& aPublisher );        
                            
     TBool DynInitMenuItemL( const TDesC& aItemType, 
         RPointerArray< CXnNodeAppIf >* aList = NULL );
@@ -82,6 +82,9 @@
        
     void HandleUiReadyEventL();
     
+    TInt PublisherInfo( CXnNodeAppIf& aNode, 
+        THsPublisherInfo& aInfo ); 
+
 private:
     // new functions
     
--- a/idlehomescreen/xmluicontroller/src/appui.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluicontroller/src/appui.cpp	Tue May 11 16:02:39 2010 +0300
@@ -83,6 +83,10 @@
     {
     __TICK( "CAppUi::ConstructL" );
     
+    iUiCtl.SetAppUi( *this );
+    
+    iUiCtl.NotifyAppEnvReadyL();
+           
     // Always reset the phoneforward P&S key on startup just in case
     RProperty::Set( KPSUidAiInformation,
       KActiveIdleForwardNumericKeysToPhone, EPSAiForwardNumericKeysToPhone );
@@ -116,17 +120,13 @@
     iUiCtl.SetObserver( *iContentRenderer );
     
     iContentRenderer->SetEventHandler( *iUiCtl.FwEventHandler() );
-    
-    iUiCtl.SetAppUi( *this );
-    
+           
     iEventHandler = iUiCtl.CreateXuikonEventHandlerL( *iContentRenderer );
     
     TAiIdleKeySoundConfig keySoundConfig;
     keySoundConfig.iKeySounds = KeySounds();
     keySoundConfig.iContextResId = R_XUI_DEFAULT_SKEY_LIST;
-    
-    iUiCtl.NotifyAppEnvReadyL();
-    
+           
     iHelper = COnlineOfflineHelper::NewL( iUiCtl );
     
     iIdleIntegration = CAiUiIdleIntegration::NewL
@@ -180,8 +180,10 @@
         iDeviceStatusInfo = THsPublisherInfo( KDeviceStatusPluginUid, 
             KDeviceStatusPluginName, KNs ); 
                            
-        iUiCtl.FwStateHandler()->LoadPlugin( 
-            iDeviceStatusInfo, EAiFwSystemStartup );                                           
+        TAiFwPublisherInfo info( iDeviceStatusInfo,
+            TAiFwCallback(), EAiFwSystemStartup );
+        
+        iUiCtl.FwStateHandler()->LoadPlugin( info );
         }        
     
     __PRINTS( "*** CAppUi::ActivateUi - done" );
@@ -201,6 +203,17 @@
     }
 
 // ----------------------------------------------------------------------------
+// CAppUi::PublisherInfo()
+// ----------------------------------------------------------------------------
+//
+TInt CAppUi::PublisherInfo( CXnNodeAppIf& aNode, THsPublisherInfo& aInfo )
+    {
+    TRAPD( err, iUiCtl.PublisherInfoL( aNode, aInfo ) );
+    
+    return err;
+    }
+     
+// ----------------------------------------------------------------------------
 // CAppUi::PrepareToExit()
 // ----------------------------------------------------------------------------
 //
@@ -334,45 +347,36 @@
     {
     THsPublisherInfo info;
     
-    iUiCtl.PublisherInfoL( aDestination, info );
-    
-    iUiCtl.FwEventHandler()->HandlePluginEventL( info, aEvent );
+    TInt ret( PublisherInfo( aDestination, info ) );
+        
+    if ( ret == KErrNone )
+        {
+        iUiCtl.FwEventHandler()->HandlePluginEventL( info, aEvent );
+        }    
     }
 
 // ----------------------------------------------------------------------------
-// CAppUi::LoadDataPluginsL()
+// CAppUi::LoadPublisher()
 // ----------------------------------------------------------------------------
 //
-TInt CAppUi::LoadPublisher( CXnNodeAppIf& aPublisher, TInt aReason )
-    {
-    THsPublisherInfo info;
-    
-    TRAP_IGNORE( iUiCtl.PublisherInfoL( aPublisher, info ) );
-
-    if ( info.Uid() == KDeviceStatusPluginUid )
+void CAppUi::LoadPublisher( const TAiFwPublisherInfo& aPublisher )         
+    {          
+    if ( aPublisher.Info().Uid() == KDeviceStatusPluginUid )
         {
         // Update device status info
-        iDeviceStatusInfo = info;
+        iDeviceStatusInfo = aPublisher.Info();
         }
     
-    return iUiCtl.FwStateHandler()->LoadPlugin( 
-        info, (TAiFwLoadReason) aReason );        
+    iUiCtl.FwStateHandler()->LoadPlugin( aPublisher );                
     }
 
 // ----------------------------------------------------------------------------
 // CAppUi::DestroyPublisher()
 // ----------------------------------------------------------------------------
 //
-TInt CAppUi::DestroyPublisher( CXnNodeAppIf& aPublisher, TInt aReason )
-    {
-    THsPublisherInfo info;
-           
-    TRAP_IGNORE( iUiCtl.PublisherInfoL( aPublisher, info ) );
-            
-    iUiCtl.FwStateHandler()->DestroyPlugin( 
-        info, (TAiFwDestroyReason) aReason );
-    
-    return KErrNone;
+void CAppUi::DestroyPublisher( const TAiFwPublisherInfo& aPublisher )        
+    {                           
+    iUiCtl.FwStateHandler()->DestroyPlugin( aPublisher );                
     }
 
 // ----------------------------------------------------------------------------
@@ -512,7 +516,7 @@
         {
         if ( iInEditMode )
             {
-            TRAP_IGNORE( SetTitlePaneTextL( KNullDesC ) );
+            //TRAP_IGNORE( SetTitlePaneTextL( KNullDesC ) );
             }
         else
             {
@@ -620,7 +624,7 @@
     if ( !sp ) { return; }
     
     // make sure status pane is transparent.
-    sp->EnableTransparent( ETrue );
+    //sp->EnableTransparent( ETrue );
     
     TUid titlePaneUid( TUid::Uid( EEikStatusPaneUidTitle ) );
            
@@ -640,7 +644,7 @@
         }
     
     // redraw statuspane
-    sp->DrawNow();
+    //sp->DrawNow();
     }
 
 // -----------------------------------------------------------------------------
--- a/idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/group/xnclockfactory.mmp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/group/xnclockfactory.mmp	Tue May 11 16:02:39 2010 +0300
@@ -46,11 +46,11 @@
 LIBRARY	        xn3utils.lib
 LIBRARY         xn3domdocument.lib
 LIBRARY         avkon.lib
-LIBRARY         cenrepnotifhandler.lib
 LIBRARY         aknskins.lib
 LIBRARY         aknicon.lib
 LIBRARY         fbscli.lib
 LIBRARY         gdi.lib
+LIBRARY         hwrmlightclient.lib
 
 LANG            SC
 
--- a/idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/inc/xnclockadapter.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/inc/xnclockadapter.h	Tue May 11 16:02:39 2010 +0300
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:  Wrapper class for CAknSkinnableClock
+* Description:  Clock rendering plugin
 *
 */
 
@@ -20,25 +20,28 @@
 #ifndef _XNCLOCKADAPTER_H
 #define _XNCLOCKADAPTER_H
 
-//  INCLUDES
-#include "xncontroladapter.h"
+// System includes
 #include <e32base.h>
+#include <hwrmlight.h>
 
-// FORWARD DECLARATIONS
+// User includes
+#include "xncontroladapter.h"
+
+// Forward declarations
 class CXnNodePluginIf;
 class CXnClockControl;
 class CAknLayoutFont;
 class CFont;
 class TRgb;
 
-// CLASS DECLARATION
+// Class declaration
 /**
 *  @ingroup group_xnclockfactory
 *  @lib xnclockfactory.lib
-*  @since S60
+*  @since S60 5.0
 */
-class CXnClockAdapter : public CXnControlAdapter, 
-                        public MCoeMessageMonitorObserver
+NONSHARABLE_CLASS( CXnClockAdapter ) : public CXnControlAdapter, 
+    public MCoeMessageMonitorObserver, public MHWRMLightObserver
     {
 public:
     enum TClockFont
@@ -48,7 +51,9 @@
         EDateFont
         };
     
-public: // constructor and destructor
+public: 
+    // constructor and destructor
+    
 	/**
 	 * 2 phase construction.
 	 */
@@ -59,7 +64,8 @@
 	 */
 	~CXnClockAdapter();
 
-public: // New functions
+public: 
+	// New functions
 
     /** 
     * Gets font based on type
@@ -94,7 +100,8 @@
     */        
     void UpdateDisplay() const;
 
-public: // from base classes
+public: 
+    // from base classes
 
     /**
     * @see CXnControlAdapter documentation
@@ -126,13 +133,25 @@
     */    	            
     void MakeVisible( TBool aVisible );
 
-private: // from MCoeMessageMonitorObserver
+private: 
+    // from MCoeMessageMonitorObserver
+    
     /**
     * @see MCoeMessageMonitorObserver documentation
     */
     void MonitorWsMessage( const TWsEvent& aEvent );
     
-private: // constructors
+private:
+    // from MHWRMLightObserver
+    
+    /**
+     * @see MHWRMLightObserver     
+     */    
+    void LightStatusChanged( TInt aTarget, 
+        CHWRMLight::TLightStatus aStatus );
+    
+private: 
+    // constructors
 
     /**
     * C++ default constructor.
@@ -156,6 +175,16 @@
      */        
     void CreateColorL();
         
+    /**
+     * Starts clock
+     */
+    void StartClock();
+    
+    /**
+     * Stops clock
+     */
+    void StopClock();
+    
 private:
     // Parent control, not owned
     CXnControlAdapter*  		iParent;        
@@ -165,6 +194,8 @@
     CXnNodePluginIf*            iDate;
     // Analog clock day information, not owned
     CXnNodePluginIf*            iDay;
+    // Light observer, owned
+    CHWRMLight*                 iLightObserver;
     // Clock control, owned    
     CXnClockControl*            iClockControl;  
     // Digital clock font, not owned
@@ -179,6 +210,8 @@
     TBool                       iColorSet;
     // Flag indicating foreground state
     TBool                       iForeground;
+    // Flag indicating lights status
+    TBool                       iLightsOn;
     };
 
 #endif      // _XNCLOCKADAPTER_H
--- a/idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/inc/xnclockcontrol.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/inc/xnclockcontrol.h	Tue May 11 16:02:39 2010 +0300
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:  Control for xuikon's skinnable clock.
+* Description:  Clock control
 *
 */
 
@@ -19,21 +19,23 @@
 #ifndef _XNCLOCKCONTROL_H
 #define _XNCLOCKCONTROL_H
 
-// INCLUDES
+// System includes
+#include <e32base.h>
 
-// FORWARD DECLARATIONS
+// User includes
+
+// Forward declarations
 class CWindowGc;
 class CXnClockAdapter;
-class CXnClockChangeHandler;
 class CXnClockFace;
 
-// CLASS DECLARATION
+// Class declaration
 /**
 *  @ingroup group_xnclockfactory
 *  @lib xnclockfactory.lib
-*  @since S60
+*  @since S60 5.0
 */
-class CXnClockControl : public CBase
+NONSHARABLE_CLASS( CXnClockControl ) : public CBase
     {
 public: // Constructors and destructor
 
@@ -84,19 +86,14 @@
     * @return Clock format.
     */    
     TClockFormat Format() const;
-    
-    /**
-    * Updates time and locale state of the clock.
-    */
-    void TimeOrLocaleChanged();
-    
+        
     /**
     * Draws the clock
     *
     * @param aGc Context where to draw
     * @param aRect Rect Clock rect 
     */
-    void Draw( CWindowGc& aGc, const TRect& aRect ) const;
+    void Draw( CWindowGc& aGc, const TRect& aRect );
     
     /**
     * Starts the clock timer.
@@ -141,8 +138,6 @@
     CPeriodic*              iTimer;
     // Clock face, owned
     CXnClockFace*           iFace;
-    // Clock change handler, owned
-    CXnClockChangeHandler*  iHandler;
     // Clock adapter, not owned
     CXnClockAdapter*        iAdapter;            
     // Clock format
--- a/idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/src/xnclockadapter.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/src/xnclockadapter.cpp	Tue May 11 16:02:39 2010 +0300
@@ -11,17 +11,17 @@
 *
 * Contributors:
 *
-* Description:  Implementation wrapper for CAknSkinnableClock
+* Description:  Clock rendering plugin
 *
 */
 
-// SYSTEM INCLUDE FILES
+// System includes
 #include <e32base.h>
 #include <e32const.h>
 #include <AknLayoutFont.h>
 #include <AknsUtils.h>
 
-// USER INCLUDE FILES
+// User includes
 #include "xndomproperty.h"
 #include "xndomlist.h"
 #include "xnproperty.h"
@@ -33,7 +33,7 @@
 #include "xnclockadapter.h"
 #include "c_xnutils.h"
 
-// CONSTANTS
+// Constants
 _LIT8( KDateInformation, "Clock/DateInformation" );
 _LIT8( KDayInformation, "Clock/DayInformation" );
 
@@ -117,7 +117,8 @@
 CXnClockAdapter::~CXnClockAdapter()
     {    
     iCoeEnv->RemoveMessageMonitorObserver( *this );    
-    
+
+    delete iLightObserver;    
     delete iClockControl;
     }
 
@@ -127,9 +128,13 @@
 // -----------------------------------------------------------------------------
 //
 void CXnClockAdapter::ConstructL()
-    {
-    CXnControlAdapter::ConstructL( iNode );     
-            
+    {          
+    CXnControlAdapter::ConstructL( iNode );   
+    
+    iForeground = iAvkonAppUi->IsForeground();
+    
+    iLightObserver = CHWRMLight::NewL( this );
+    
     RPointerArray< CXnNodePluginIf > children( iNode.ChildrenL() );
     CleanupClosePushL( children );
     
@@ -168,6 +173,7 @@
  
 // -----------------------------------------------------------------------------
 // CXnClockAdapter::DoHandlePropertyChangeL
+//
 // -----------------------------------------------------------------------------
 //
 void CXnClockAdapter::DoHandlePropertyChangeL( CXnProperty* aProperty )
@@ -239,14 +245,19 @@
     {
     TBool visible( IsVisible() );
     
-    if ( aVisible != visible )
+    if ( visible != aVisible )
         {
         CCoeControl::MakeVisible( aVisible );
-
-        if ( !aVisible )
+        
+        if ( aVisible )
             {
-            iClockControl->StopTimer();
+            // Start clock ensures UI state
+            StartClock();
             }
+        else
+            {
+            StopClock();        
+            }    
         }
     }
 
@@ -270,21 +281,55 @@
         iForeground = EFalse;        
         }
 
-    if( foreground != iForeground && IsVisible() )            
+    if( foreground != iForeground )            
         {
         if( iForeground )
-            {
-            UpdateDisplay(); // starts timer after update
-            iClockControl->StartTimer();
+            {   
+            UpdateDisplay();
+            
+            // Start clock ensures UI state
+            StartClock();
             }
         else
             {
-            iClockControl->StopTimer();
+            StopClock();
             }            
         }
     }
 
 // -----------------------------------------------------------------------------
+// CXnClockAdapter::LightStatusChanged
+// 
+// -----------------------------------------------------------------------------
+//    
+void CXnClockAdapter::LightStatusChanged( TInt aTarget, 
+    CHWRMLight::TLightStatus aStatus )
+    {
+    if ( aTarget == CHWRMLight::EPrimaryDisplay )
+        {
+        if ( aStatus == CHWRMLight::ELightOn )
+            {
+            iLightsOn = ETrue;
+            
+            if ( iForeground )
+                {
+                UpdateDisplay();
+                }
+                        
+            // Start clock ensures UI state
+            StartClock();
+            }
+        else if ( aStatus == CHWRMLight::ELightOff )
+            {
+            iLightsOn = EFalse;
+        
+            StopClock();
+            }        
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
 // CXnClockAdapter::FontL
 // 
 // -----------------------------------------------------------------------------
@@ -553,4 +598,37 @@
     CXnControlAdapter::SizeChanged();    
     }
 
+// -----------------------------------------------------------------------------
+// CXnClockAdapter::StartClock
+// 
+// -----------------------------------------------------------------------------
+// 
+void CXnClockAdapter::StartClock()
+    {    
+    if ( iClockControl )
+        {        
+        if ( iForeground && iLightsOn && IsVisible() )
+            {
+            iClockControl->StartTimer();
+            }
+        else
+            {
+            StopClock();
+            }    
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CXnClockAdapter::StopClock
+// 
+// -----------------------------------------------------------------------------
+// 
+void CXnClockAdapter::StopClock()
+    {
+    if ( iClockControl )
+        {
+        iClockControl->StopTimer();
+        }    
+    }
+
 // End of file
--- a/idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/src/xnclockcontrol.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/renderingplugins/xnclockfactory/src/xnclockcontrol.cpp	Tue May 11 16:02:39 2010 +0300
@@ -11,86 +11,26 @@
 *
 * Contributors:
 *
-* Description:  Implementation for xuikon clock.
+* Description:  Clock control
 *
 */
 
 
-// SYSTEM INCLUDE FILES
-#include <e32std.h>         // for RChangeNotifier
+// System includes
+#include <e32std.h>         
+
+// User includes
 #include <debug.h>
-
-// USER INCLUDE FILES
 #include "xncontroladapter.h"
 #include "xnclockadapter.h"
 #include "xnclockface.h"
 
 #include "xnclockcontrol.h"
 
-
-// LOCAL CONSTANTS AND MACROS
+// Constants
 static const TInt KIntervalTime( 60000000 ); // in microseconds
 
 
-// MODULE DATA STRUCTURES
-class CXnClockChangeHandler : public CActive
-    {
-    public: // Constructor and destructor
-        static CXnClockChangeHandler* NewL(
-            CXnClockControl& aClient )
-            {
-            CXnClockChangeHandler* self =
-                new (ELeave) CXnClockChangeHandler( aClient );
-            CleanupStack::PushL( self );
-            self->ConstructL();
-            CleanupStack::Pop( self );
-            return self;
-            }
-
-        virtual ~CXnClockChangeHandler()
-            {
-            Cancel();
-            iChangeNotifier.Close();
-            }
-
-    private: // From CActive
-        void DoCancel()
-            {
-            iChangeNotifier.LogonCancel();
-            // Return value is ignored.
-            }
-
-        void RunL()
-            {
-            __PRINTS( "CXnClockChangeHandler::RunL, timer runs" );            
-            if( iStatus.Int() & ( EChangesLocale | EChangesSystemTime ) )
-                {
-                iClient.TimeOrLocaleChanged();
-                }
-
-            User::LeaveIfError( iChangeNotifier.Logon( iStatus ) );
-            SetActive();
-            }
-
-    private: // Private constructors
-        void ConstructL()
-            {
-            User::LeaveIfError( iChangeNotifier.Create() );
-            User::LeaveIfError( iChangeNotifier.Logon( iStatus ) );
-            SetActive();
-            }
-
-        CXnClockChangeHandler( CXnClockControl& aClient )
-            : CActive( EPriorityStandard ), iClient( aClient )
-            {
-            CActiveScheduler::Add( this );
-            }
-
-    private: // Data
-        RChangeNotifier  iChangeNotifier;
-        CXnClockControl& iClient;
-    };
-
 // ============================ MEMBER FUNCTIONS ===============================
 
 // -----------------------------------------------------------------------------
@@ -117,9 +57,7 @@
     {           
     iTimer = CPeriodic::NewL( CActive::EPriorityHigh );
             
-    SetFormatL( iFormatFromLocale, iClockFormat );
-
-    iHandler = CXnClockChangeHandler::NewL( *this );
+    SetFormatL( iFormatFromLocale, iClockFormat );   
     }
 
 // -----------------------------------------------------------------------------
@@ -144,11 +82,11 @@
 
 // -----------------------------------------------------------------------------
 // Destructor
+//
 // -----------------------------------------------------------------------------
 //
 CXnClockControl::~CXnClockControl()
-    {
-    delete iHandler;
+    {    
     delete iTimer;
     delete iFace;
     }
@@ -169,23 +107,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CXnClockControl::TimeOrLocaleChanged
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CXnClockControl::TimeOrLocaleChanged()
-    {
-    TLocale locale;
-
-    if( iFormatFromLocale && ( locale.ClockFormat() != iClockFormat ) )
-        {
-        TRAP_IGNORE( SetFormatL( iFormatFromLocale, locale.ClockFormat() ) );        
-        }
-        
-    UpdateDisplay();        
-    }
-
-// -----------------------------------------------------------------------------
 // CXnClockControl::SetFormatL
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
@@ -220,7 +141,7 @@
     else if( format == EClockDigital )
         {
         iFace = CXnClockFaceDigital::NewL();
-        }                
+        }       
     }
 
 // -----------------------------------------------------------------------------
@@ -238,10 +159,15 @@
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //       
-void CXnClockControl::Draw( CWindowGc& aGc, const TRect& aRect ) const
+void CXnClockControl::Draw( CWindowGc& aGc, const TRect& aRect )
     {
+    // Ensure correct appearance
+    TRAP_IGNORE( SetFormatL( iFormatFromLocale, iClockFormat ) );
+    
     if( iFace && !aRect.IsEmpty() )
         {
+        __PRINT( __DBG_FORMAT( "CXnClockControl::Draw: 0x%X" ), this );
+                
         TTime homeTime;
         homeTime.HomeTime();
 
@@ -256,7 +182,8 @@
 //
 TInt CXnClockControl::TimerCallback( TAny* aThis )
     {
-    __PRINTS( "CXnClockControl::TimerCallback, timer runs" );
+    __PRINT( __DBG_FORMAT( "CXnClockControl::TimerCallback: 0x%X" ), aThis );    
+        
     CXnClockControl* self = static_cast< CXnClockControl* >( aThis );
 
     // Update the clock display
@@ -286,6 +213,8 @@
     {
     if ( iTimer && !iTimer->IsActive() )
         {
+        __PRINT( __DBG_FORMAT( "CXnClockControl::StartTimer: 0x%X" ), this );
+        
         TTime time;
         time.HomeTime();
         TDateTime dateTime( time.DateTime() );
@@ -308,6 +237,8 @@
     {
     if ( iTimer && iTimer->IsActive() )
         {
+        __PRINT( __DBG_FORMAT( "CXnClockControl::StopTimer: 0x%X" ), this );
+                       
         iTimer->Cancel();
         }
     }
--- a/idlehomescreen/xmluirendering/renderingplugins/xnmenufactory/src/xnmenuadapter.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/renderingplugins/xnmenufactory/src/xnmenuadapter.cpp	Tue May 11 16:02:39 2010 +0300
@@ -1763,12 +1763,7 @@
     CEikCba* cba( static_cast< CEikCba* >( aContainer.ButtonGroup() ) );
     cba->SetButtonGroupFlags( cba->ButtonGroupFlags() | EEikCbaFlagSemiTransparent );
 
-    UpdateSoftkeyAppearancesL();
-	    
-	if (iContainer)
-	    {
-        iContainer->DrawNow();        
-	    }
+    UpdateSoftkeyAppearancesL();	    
     }
 
 //--------------------------------------------------------------
@@ -2432,7 +2427,6 @@
                 aSoftkey.iBmp,
                 aSoftkey.iBmpM,
                 ETrue );
-        cba->DrawNow();
         }
     }
 
--- a/idlehomescreen/xmluirendering/renderingplugins/xnnewstickerfactory/src/xnnewstickeradapter.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/renderingplugins/xnnewstickerfactory/src/xnnewstickeradapter.cpp	Tue May 11 16:02:39 2010 +0300
@@ -698,6 +698,8 @@
 //
 void CXnNewstickerAdapter::MakeVisible( TBool aVisible )
     {
+    CCoeControl::MakeVisible( aVisible );
+
     if( aVisible )
         {
         Start();
@@ -706,8 +708,6 @@
         {
         Stop();
         }
-    
-    CCoeControl::MakeVisible( aVisible );
     }
 
 // -----------------------------------------------------------------------------
--- a/idlehomescreen/xmluirendering/renderingplugins/xntexteditorfactory/src/xntexteditoradapter.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/renderingplugins/xntexteditorfactory/src/xntexteditoradapter.cpp	Tue May 11 16:02:39 2010 +0300
@@ -230,8 +230,8 @@
     // for RTL languages
     iEditor->SetAknEditorLocalLanguage( User::Language() );
     ( AknLayoutUtils::LayoutMirrored() ? 
-                        iEditor->SetAlignment( EHRightVCenter ) : 
-                        iEditor->SetAlignment( EHLeftVCenter ) );
+                        iEditor->SetAlignment( EAknEditorAlignRight ) : 
+                        iEditor->SetAlignment( EAknEditorAlignLeft ) );
 
     iEditor->SetObserver( this );
                                         
--- a/idlehomescreen/xmluirendering/uiengine/bwins/xn3layoutengineu.def	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/bwins/xn3layoutengineu.def	Tue May 11 16:02:39 2010 +0300
@@ -31,30 +31,30 @@
 	?ContentBitmaps@CXnControlAdapter@@QAEXAAPAVCFbsBitmap@@0@Z @ 30 NONAME ; void CXnControlAdapter::ContentBitmaps(class CFbsBitmap * &, class CFbsBitmap * &)
 	?HandlePropertyChangeL@CXnControlAdapter@@QAEXPAVCXnProperty@@@Z @ 31 NONAME ; void CXnControlAdapter::HandlePropertyChangeL(class CXnProperty *)
 	?Control@CXnNodePluginIf@@QBEPAVCXnControlAdapter@@XZ @ 32 NONAME ; class CXnControlAdapter * CXnNodePluginIf::Control(void) const
-	?DestroyPublisher@CXnAppUiAdapter@@UAEHAAVCXnNodeAppIf@@H@Z @ 33 NONAME ; int CXnAppUiAdapter::DestroyPublisher(class CXnNodeAppIf &, int)
-	?GetPropertyL@CXnNodeAppIf@@QBEPAVCXnProperty@@AAV2@@Z @ 34 NONAME ; class CXnProperty * CXnNodeAppIf::GetPropertyL(class CXnProperty &) const
-	?MakeInterfaceL@CXnComponentNodeImpl@@UAEPAVMXnComponentInterface@XnComponentInterface@@ABVTDesC8@@@Z @ 35 NONAME ; class XnComponentInterface::MXnComponentInterface * CXnComponentNodeImpl::MakeInterfaceL(class TDesC8 const &)
-	?SkinChanged@CXnControlAdapter@@UAEXXZ @ 36 NONAME ; void CXnControlAdapter::SkinChanged(void)
-	?SetContentBitmaps@CXnControlAdapter@@QAEXPAVCFbsBitmap@@0@Z @ 37 NONAME ; void CXnControlAdapter::SetContentBitmaps(class CFbsBitmap *, class CFbsBitmap *)
-	?FindNodeByClassL@TXnUiEngineAppIf@@QAE?AV?$RPointerArray@VCXnNodeAppIf@@@@ABVTDesC16@@0@Z @ 38 NONAME ; class RPointerArray<class CXnNodeAppIf> TXnUiEngineAppIf::FindNodeByClassL(class TDesC16 const &, class TDesC16 const &)
-	?SetDataL@CXnControlAdapter@@UAEXABVTDesC8@@ABVTDesC16@@H@Z @ 39 NONAME ; void CXnControlAdapter::SetDataL(class TDesC8 const &, class TDesC16 const &, int)
-	?ComponentNodeImpl@CXnNodePluginIf@@QAEPAVCXnComponentNodeImpl@@XZ @ 40 NONAME ; class CXnComponentNodeImpl * CXnNodePluginIf::ComponentNodeImpl(void)
-	??0CXnViewsNodeImpl@@IAE@XZ @ 41 NONAME ; CXnViewsNodeImpl::CXnViewsNodeImpl(void)
-	?IsTextEditorActive@TXnUiEnginePluginIf@@QAEHXZ @ 42 NONAME ; int TXnUiEnginePluginIf::IsTextEditorActive(void)
-	?HandlePointerEventL@CXnControlAdapter@@UAEXABUTPointerEvent@@@Z @ 43 NONAME ; void CXnControlAdapter::HandlePointerEventL(struct TPointerEvent const &)
-	??1CXnDocument@@UAE@XZ @ 44 NONAME ; CXnDocument::~CXnDocument(void)
-	?HandleResourceChangeL@CXnAppUiAdapter@@MAEXH@Z @ 45 NONAME ; void CXnAppUiAdapter::HandleResourceChangeL(int)
-	?DoEnterPowerSaveModeL@CXnControlAdapter@@UAEXW4TModeEvent@1@@Z @ 46 NONAME ; void CXnControlAdapter::DoEnterPowerSaveModeL(enum CXnControlAdapter::TModeEvent)
-	?CloneL@CXnProperty@@QAEPAV1@XZ @ 47 NONAME ; class CXnProperty * CXnProperty::CloneL(void)
-	?ReportTriggerEventL@CXnNodePluginIf@@QAEXABVTDesC8@@00@Z @ 48 NONAME ; void CXnNodePluginIf::ReportTriggerEventL(class TDesC8 const &, class TDesC8 const &, class TDesC8 const &)
-	?FocusedNodeL@TXnUiEnginePluginIf@@QAEPAVCXnNodePluginIf@@XZ @ 49 NONAME ; class CXnNodePluginIf * TXnUiEnginePluginIf::FocusedNodeL(void)
-	?FindContentSourceNodesL@TXnUiEngineAppIf@@QAE?AV?$RPointerArray@VCXnNodeAppIf@@@@ABVTDesC8@@@Z @ 50 NONAME ; class RPointerArray<class CXnNodeAppIf> TXnUiEngineAppIf::FindContentSourceNodesL(class TDesC8 const &)
-	?EqualsL@CXnProperty@@QBEHAAV1@@Z @ 51 NONAME ; int CXnProperty::EqualsL(class CXnProperty &) const
-	?ScreenDeviceSize@TXnUiEnginePluginIf@@QAE?AVTSize@@XZ @ 52 NONAME ; class TSize TXnUiEnginePluginIf::ScreenDeviceSize(void)
-	??0CXnControlAdapter@@IAE@XZ @ 53 NONAME ; CXnControlAdapter::CXnControlAdapter(void)
-	?UiEngineL@CXnNodeAppIf@@QAEPAVTXnUiEngineAppIf@@XZ @ 54 NONAME ; class TXnUiEngineAppIf * CXnNodeAppIf::UiEngineL(void)
-	?LongTapDetector@CXnControlAdapter@@QBEPAVCAknLongTapDetector@@XZ @ 55 NONAME ; class CAknLongTapDetector * CXnControlAdapter::LongTapDetector(void) const
-	??0CXnAppUiAdapter@@QAE@VTUid@@@Z @ 56 NONAME ; CXnAppUiAdapter::CXnAppUiAdapter(class TUid)
+	?GetPropertyL@CXnNodeAppIf@@QBEPAVCXnProperty@@AAV2@@Z @ 33 NONAME ; class CXnProperty * CXnNodeAppIf::GetPropertyL(class CXnProperty &) const
+	?MakeInterfaceL@CXnComponentNodeImpl@@UAEPAVMXnComponentInterface@XnComponentInterface@@ABVTDesC8@@@Z @ 34 NONAME ; class XnComponentInterface::MXnComponentInterface * CXnComponentNodeImpl::MakeInterfaceL(class TDesC8 const &)
+	?SkinChanged@CXnControlAdapter@@UAEXXZ @ 35 NONAME ; void CXnControlAdapter::SkinChanged(void)
+	?SetContentBitmaps@CXnControlAdapter@@QAEXPAVCFbsBitmap@@0@Z @ 36 NONAME ; void CXnControlAdapter::SetContentBitmaps(class CFbsBitmap *, class CFbsBitmap *)
+	?FindNodeByClassL@TXnUiEngineAppIf@@QAE?AV?$RPointerArray@VCXnNodeAppIf@@@@ABVTDesC16@@0@Z @ 37 NONAME ; class RPointerArray<class CXnNodeAppIf> TXnUiEngineAppIf::FindNodeByClassL(class TDesC16 const &, class TDesC16 const &)
+	?SetDataL@CXnControlAdapter@@UAEXABVTDesC8@@ABVTDesC16@@H@Z @ 38 NONAME ; void CXnControlAdapter::SetDataL(class TDesC8 const &, class TDesC16 const &, int)
+	?ComponentNodeImpl@CXnNodePluginIf@@QAEPAVCXnComponentNodeImpl@@XZ @ 39 NONAME ; class CXnComponentNodeImpl * CXnNodePluginIf::ComponentNodeImpl(void)
+	??0CXnViewsNodeImpl@@IAE@XZ @ 40 NONAME ; CXnViewsNodeImpl::CXnViewsNodeImpl(void)
+	?IsTextEditorActive@TXnUiEnginePluginIf@@QAEHXZ @ 41 NONAME ; int TXnUiEnginePluginIf::IsTextEditorActive(void)
+	?HandlePointerEventL@CXnControlAdapter@@UAEXABUTPointerEvent@@@Z @ 42 NONAME ; void CXnControlAdapter::HandlePointerEventL(struct TPointerEvent const &)
+	??1CXnDocument@@UAE@XZ @ 43 NONAME ; CXnDocument::~CXnDocument(void)
+	?HandleResourceChangeL@CXnAppUiAdapter@@MAEXH@Z @ 44 NONAME ; void CXnAppUiAdapter::HandleResourceChangeL(int)
+	?DoEnterPowerSaveModeL@CXnControlAdapter@@UAEXW4TModeEvent@1@@Z @ 45 NONAME ; void CXnControlAdapter::DoEnterPowerSaveModeL(enum CXnControlAdapter::TModeEvent)
+	?CloneL@CXnProperty@@QAEPAV1@XZ @ 46 NONAME ; class CXnProperty * CXnProperty::CloneL(void)
+	?ReportTriggerEventL@CXnNodePluginIf@@QAEXABVTDesC8@@00@Z @ 47 NONAME ; void CXnNodePluginIf::ReportTriggerEventL(class TDesC8 const &, class TDesC8 const &, class TDesC8 const &)
+	?FocusedNodeL@TXnUiEnginePluginIf@@QAEPAVCXnNodePluginIf@@XZ @ 48 NONAME ; class CXnNodePluginIf * TXnUiEnginePluginIf::FocusedNodeL(void)
+	?FindContentSourceNodesL@TXnUiEngineAppIf@@QAE?AV?$RPointerArray@VCXnNodeAppIf@@@@ABVTDesC8@@@Z @ 49 NONAME ; class RPointerArray<class CXnNodeAppIf> TXnUiEngineAppIf::FindContentSourceNodesL(class TDesC8 const &)
+	?EqualsL@CXnProperty@@QBEHAAV1@@Z @ 50 NONAME ; int CXnProperty::EqualsL(class CXnProperty &) const
+	?ScreenDeviceSize@TXnUiEnginePluginIf@@QAE?AVTSize@@XZ @ 51 NONAME ; class TSize TXnUiEnginePluginIf::ScreenDeviceSize(void)
+	??0CXnControlAdapter@@IAE@XZ @ 52 NONAME ; CXnControlAdapter::CXnControlAdapter(void)
+	?UiEngineL@CXnNodeAppIf@@QAEPAVTXnUiEngineAppIf@@XZ @ 53 NONAME ; class TXnUiEngineAppIf * CXnNodeAppIf::UiEngineL(void)
+	?LongTapDetector@CXnControlAdapter@@QBEPAVCAknLongTapDetector@@XZ @ 54 NONAME ; class CAknLongTapDetector * CXnControlAdapter::LongTapDetector(void) const
+	??0CXnAppUiAdapter@@QAE@VTUid@@@Z @ 55 NONAME ; CXnAppUiAdapter::CXnAppUiAdapter(class TUid)
+	?DestroyPublisher@CXnAppUiAdapter@@UAEXABVTAiFwPublisherInfo@@@Z @ 56 NONAME ; void CXnAppUiAdapter::DestroyPublisher(class TAiFwPublisherInfo const &)
 	?Rect@CXnNodePluginIf@@QAE?AVTRect@@XZ @ 57 NONAME ; class TRect CXnNodePluginIf::Rect(void)
 	?AddChildL@CXnNodePluginIf@@QAEXPAV1@@Z @ 58 NONAME ; void CXnNodePluginIf::AddChildL(class CXnNodePluginIf *)
 	?SetNode@CXnComponent@@QAEXAAVCXnNodePluginIf@@@Z @ 59 NONAME ; void CXnComponent::SetNode(class CXnNodePluginIf &)
@@ -62,166 +62,167 @@
 	?SetComponent@CXnComponentNodeImpl@@QAEXPAVCXnComponent@@@Z @ 61 NONAME ; void CXnComponentNodeImpl::SetComponent(class CXnComponent *)
 	?LayoutUIL@TXnUiEnginePluginIf@@QAEXPAVCXnNodePluginIf@@@Z @ 62 NONAME ; void TXnUiEnginePluginIf::LayoutUIL(class CXnNodePluginIf *)
 	?ExitPowerSaveModeL@CXnControlAdapter@@QAEXW4TModeEvent@1@@Z @ 63 NONAME ; void CXnControlAdapter::ExitPowerSaveModeL(enum CXnControlAdapter::TModeEvent)
-	?GetThemeResource@TXnUiEngineAppIf@@QAEHABVTDesC16@@AAVRFile@@@Z @ 64 NONAME ; int TXnUiEngineAppIf::GetThemeResource(class TDesC16 const &, class RFile &)
-	?ConstructL@CXnComponent@@IAEXXZ @ 65 NONAME ; void CXnComponent::ConstructL(void)
-	?FindResource@CXnUtils@@SAPAVCXnResource@@AAV?$CArrayPtrSeg@VCXnResource@@@@ABVTDesC16@@AAH@Z @ 66 NONAME ; class CXnResource * CXnUtils::FindResource(class CArrayPtrSeg<class CXnResource> &, class TDesC16 const &, int &)
-	?UnsetStateL@CXnNodeAppIf@@QAEXABVTDesC8@@@Z @ 67 NONAME ; void CXnNodeAppIf::UnsetStateL(class TDesC8 const &)
-	?Uid@CXnDocument@@QAE?AVTUid@@XZ @ 68 NONAME ; class TUid CXnDocument::Uid(void)
-	?FocusChanged@CXnControlAdapter@@UAEXW4TDrawNow@@@Z @ 69 NONAME ; void CXnControlAdapter::FocusChanged(enum TDrawNow)
-	?SetBlank@CXnControlAdapter@@QAEXH@Z @ 70 NONAME ; void CXnControlAdapter::SetBlank(int)
-	?ProcessMessageL@CXnAppUiAdapter@@UAEXVTUid@@ABVTDesC8@@@Z @ 71 NONAME ; void CXnAppUiAdapter::ProcessMessageL(class TUid, class TDesC8 const &)
-	?Component@CXnNodeAppIf@@QAEAAVCXnComponent@@XZ @ 72 NONAME ; class CXnComponent & CXnNodeAppIf::Component(void)
-	?SetLayoutCapable@CXnNodePluginIf@@QAEXH@Z @ 73 NONAME ; void CXnNodePluginIf::SetLayoutCapable(int)
-	?MarginRect@CXnNodePluginIf@@QAE?AVTRect@@XZ @ 74 NONAME ; class TRect CXnNodePluginIf::MarginRect(void)
-	?UiEngineL@CXnAppUiAdapter@@QAEPAVTXnUiEngineAppIf@@XZ @ 75 NONAME ; class TXnUiEngineAppIf * CXnAppUiAdapter::UiEngineL(void)
-	?ActiveView@TXnUiEngineAppIf@@QAEPAVCXnNodeAppIf@@XZ @ 76 NONAME ; class CXnNodeAppIf * TXnUiEngineAppIf::ActiveView(void)
-	?HandleXuikonEventL@CXnAppUiAdapter@@UAEXAAVCXnNodeAppIf@@0AAVCXnDomNode@@1@Z @ 77 NONAME ; void CXnAppUiAdapter::HandleXuikonEventL(class CXnNodeAppIf &, class CXnNodeAppIf &, class CXnDomNode &, class CXnDomNode &)
-	?RenderUIL@TXnUiEngineAppIf@@QAEXPAVCXnNodeAppIf@@@Z @ 78 NONAME ; void TXnUiEngineAppIf::RenderUIL(class CXnNodeAppIf *)
-	?PrepareToExit@CXnAppUiAdapter@@MAEXXZ @ 79 NONAME ; void CXnAppUiAdapter::PrepareToExit(void)
-	?DoHandlePropertyChangeL@CXnControlAdapter@@UAEXPAVCXnProperty@@@Z @ 80 NONAME ; void CXnControlAdapter::DoHandlePropertyChangeL(class CXnProperty *)
-	?ConstructL@CXnControlAdapter@@IAEXAAVCXnNodePluginIf@@@Z @ 81 NONAME ; void CXnControlAdapter::ConstructL(class CXnNodePluginIf &)
-	?FocusedNode@TXnUiEngineAppIf@@QAEPAVCXnNodeAppIf@@XZ @ 82 NONAME ; class CXnNodeAppIf * TXnUiEngineAppIf::FocusedNode(void)
-	?SetDataL@CXnComponent@@QAEXABVTDesC8@@ABVTDesC16@@H@Z @ 83 NONAME ; void CXnComponent::SetDataL(class TDesC8 const &, class TDesC16 const &, int)
-	?OfferKeyEventL@CXnControlAdapter@@UAE?AW4TKeyResponse@@ABUTKeyEvent@@W4TEventCode@@@Z @ 84 NONAME ; enum TKeyResponse CXnControlAdapter::OfferKeyEventL(struct TKeyEvent const &, enum TEventCode)
-	?IsDrawingAllowed@CXnControlAdapter@@QBEHXZ @ 85 NONAME ; int CXnControlAdapter::IsDrawingAllowed(void) const
-	?DisplayL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 86 NONAME ; class CXnProperty * CXnNodePluginIf::DisplayL(void)
-	?NewL@CXnProperty@@SAPAV1@ABVTDesC8@@PAVCXnDomPropertyValue@@AAVCXnDomStringPool@@@Z @ 87 NONAME ; class CXnProperty * CXnProperty::NewL(class TDesC8 const &, class CXnDomPropertyValue *, class CXnDomStringPool &)
-	?Rect@CXnNodeAppIf@@QAE?AVTRect@@XZ @ 88 NONAME ; class TRect CXnNodeAppIf::Rect(void)
-	?NewL@CXnComponentNodeImpl@@SAPAV1@PAVCXnType@@@Z @ 89 NONAME ; class CXnComponentNodeImpl * CXnComponentNodeImpl::NewL(class CXnType *)
-	?WidgetsVisible@TXnUiEngineAppIf@@QBEHXZ @ 90 NONAME ; int TXnUiEngineAppIf::WidgetsVisible(void) const
-	?Type@CXnNodePluginIf@@QAEPAVCXnType@@XZ @ 91 NONAME ; class CXnType * CXnNodePluginIf::Type(void)
-	?MakeXnComponentL@MXnComponentFactory@@EAE?AW4TXnComponentFactoryResponse@1@AAVCXnNodePluginIf@@AAPAVCXnComponent@@@Z @ 92 NONAME ; enum MXnComponentFactory::TXnComponentFactoryResponse MXnComponentFactory::MakeXnComponentL(class CXnNodePluginIf &, class CXnComponent * &)
-	?UnsetStateL@CXnNodePluginIf@@QAEXABVTDesC8@@@Z @ 93 NONAME ; void CXnNodePluginIf::UnsetStateL(class TDesC8 const &)
-	?StringValueL@CXnProperty@@QAEPAVHBufC16@@XZ @ 94 NONAME ; class HBufC16 * CXnProperty::StringValueL(void)
-	?DisableRenderUiLC@TXnUiEnginePluginIf@@QAEXXZ @ 95 NONAME ; void TXnUiEnginePluginIf::DisableRenderUiLC(void)
-	?SetPropertyL@CXnNodeAppIf@@QAEXPAVCXnProperty@@@Z @ 96 NONAME ; void CXnNodeAppIf::SetPropertyL(class CXnProperty *)
-	?View@CXnAppUiAdapter@@QBEAAVCAknView@@XZ @ 97 NONAME ; class CAknView & CXnAppUiAdapter::View(void) const
-	?ViewNodeImpl@CXnNodePluginIf@@QAEPAVCXnViewNodeImpl@@XZ @ 98 NONAME ; class CXnViewNodeImpl * CXnNodePluginIf::ViewNodeImpl(void)
-	?StripQuotes@CXnUtils@@SAXAAPAVHBufC16@@@Z @ 99 NONAME ; void CXnUtils::StripQuotes(class HBufC16 * &)
-	?SetPCDataL@CXnNodePluginIf@@QAEXABVTDesC8@@@Z @ 100 NONAME ; void CXnNodePluginIf::SetPCDataL(class TDesC8 const &)
-	?VisibilityL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 101 NONAME ; class CXnProperty * CXnNodePluginIf::VisibilityL(void)
-	?Draw@CXnControlAdapter@@MBEXABVTRect@@@Z @ 102 NONAME ; void CXnControlAdapter::Draw(class TRect const &) const
-	??1CXnApplication@@UAE@XZ @ 103 NONAME ; CXnApplication::~CXnApplication(void)
-	?DoesNodeNeedComponentImplL@MXnComponentFactory@@QAEHABVTDesC8@@@Z @ 104 NONAME ; int MXnComponentFactory::DoesNodeNeedComponentImplL(class TDesC8 const &)
-	?ConstructL@CXnViewsNodeImpl@@IAEXPAVCXnType@@@Z @ 105 NONAME ; void CXnViewsNodeImpl::ConstructL(class CXnType *)
-	?StringPool@TXnUiEngineAppIf@@QAEAAVCXnDomStringPool@@XZ @ 106 NONAME ; class CXnDomStringPool & TXnUiEngineAppIf::StringPool(void)
-	?UiEngineL@CXnNodePluginIf@@QAEPAVTXnUiEnginePluginIf@@XZ @ 107 NONAME ; class TXnUiEnginePluginIf * CXnNodePluginIf::UiEngineL(void)
-	?ResolveSkinItemIDL@CXnUtils@@SAHABVTDesC16@@AAVTAknsItemID@@@Z @ 108 NONAME ; int CXnUtils::ResolveSkinItemIDL(class TDesC16 const &, class TAknsItemID &)
-	?PluginNodeL@TXnUiEnginePluginIf@@QAEAAVCXnNodePluginIf@@PAV2@@Z @ 109 NONAME ; class CXnNodePluginIf & TXnUiEnginePluginIf::PluginNodeL(class CXnNodePluginIf *)
-	?VerticalPixelValueL@TXnUiEnginePluginIf@@QAEHPAVCXnProperty@@H@Z @ 110 NONAME ; int TXnUiEnginePluginIf::VerticalPixelValueL(class CXnProperty *, int)
-	?SetComponent@CXnControlAdapter@@QAEXPAVCXnComponent@@@Z @ 111 NONAME ; void CXnControlAdapter::SetComponent(class CXnComponent *)
-	??0MXnNodePredicate@@QAE@XZ @ 112 NONAME ; MXnNodePredicate::MXnNodePredicate(void)
-	??1CXnViewsNodeImpl@@UAE@XZ @ 113 NONAME ; CXnViewsNodeImpl::~CXnViewsNodeImpl(void)
-	?HandleControlEventL@CXnControlAdapter@@UAEXPAVCCoeControl@@W4TCoeEvent@MCoeControlObserver@@@Z @ 114 NONAME ; void CXnControlAdapter::HandleControlEventL(class CCoeControl *, enum MCoeControlObserver::TCoeEvent)
-	?HandleScreenDeviceChangedL@CXnControlAdapter@@UAEXXZ @ 115 NONAME ; void CXnControlAdapter::HandleScreenDeviceChangedL(void)
-	?SizeChanged@CXnControlAdapter@@MAEXXZ @ 116 NONAME ; void CXnControlAdapter::SizeChanged(void)
-	?CountComponentControls@CXnControlAdapter@@MBEHXZ @ 117 NONAME ; int CXnControlAdapter::CountComponentControls(void) const
-	?HideTooltipsL@CXnNodeAppIf@@QAEXXZ @ 118 NONAME ; void CXnNodeAppIf::HideTooltipsL(void)
-	?GetPropertyL@CXnNodeAppIf@@QBEPAVCXnProperty@@ABVTDesC8@@@Z @ 119 NONAME ; class CXnProperty * CXnNodeAppIf::GetPropertyL(class TDesC8 const &) const
-	?FindNodeByClassL@TXnUiEngineAppIf@@QAE?AV?$RPointerArray@VCXnNodeAppIf@@@@ABVTDesC8@@0@Z @ 120 NONAME ; class RPointerArray<class CXnNodeAppIf> TXnUiEngineAppIf::FindNodeByClassL(class TDesC8 const &, class TDesC8 const &)
-	?Match@MXnNodePredicate@@UAEHAAVCXnNode@@@Z @ 121 NONAME ; int MXnNodePredicate::Match(class CXnNode &)
-	?GetBitmapAndMask@CXnControlAdapter@@QAEXABVTDesC16@@0AAPAVCFbsBitmap@@1@Z @ 122 NONAME ; void CXnControlAdapter::GetBitmapAndMask(class TDesC16 const &, class TDesC16 const &, class CFbsBitmap * &, class CFbsBitmap * &)
-	?NewL@CXnViewsNodeImpl@@SAPAV1@PAVCXnType@@@Z @ 123 NONAME ; class CXnViewsNodeImpl * CXnViewsNodeImpl::NewL(class CXnType *)
-	?PaddingRect@CXnNodeAppIf@@QAE?AVTRect@@XZ @ 124 NONAME ; class TRect CXnNodeAppIf::PaddingRect(void)
-	?SetMarginRect@CXnNodePluginIf@@QAEXABVTRect@@@Z @ 125 NONAME ; void CXnNodePluginIf::SetMarginRect(class TRect const &)
-	?IsDialogDisplaying@TXnUiEnginePluginIf@@QAEHXZ @ 126 NONAME ; int TXnUiEnginePluginIf::IsDialogDisplaying(void)
-	?HandleEventL@CXnAppUiAdapter@@UAEXABVTDesC16@@AAVCXnNodeAppIf@@@Z @ 127 NONAME ; void CXnAppUiAdapter::HandleEventL(class TDesC16 const &, class CXnNodeAppIf &)
-	?GetPropertyL@CXnNodePluginIf@@QBEPAVCXnProperty@@ABVTDesC8@@@Z @ 128 NONAME ; class CXnProperty * CXnNodePluginIf::GetPropertyL(class TDesC8 const &) const
-	?SetPropertyArrayL@CXnNodeAppIf@@QAEXPAV?$RPointerArray@VCXnProperty@@@@@Z @ 129 NONAME ; void CXnNodeAppIf::SetPropertyArrayL(class RPointerArray<class CXnProperty> *)
-	?RemoveViewL@CXnAppUiAdapter@@QAEXAAVCAknView@@@Z @ 130 NONAME ; void CXnAppUiAdapter::RemoveViewL(class CAknView &)
-	?EnterPowerSaveModeL@CXnComponent@@UAEXXZ @ 131 NONAME ; void CXnComponent::EnterPowerSaveModeL(void)
-	?SetRect@CXnNodePluginIf@@QAEXABVTRect@@@Z @ 132 NONAME ; void CXnNodePluginIf::SetRect(class TRect const &)
-	??0CXnComponent@@IAE@XZ @ 133 NONAME ; CXnComponent::CXnComponent(void)
-	?CollapseWhiteSpace@CXnUtils@@SAXAAVCXnNodePluginIf@@AAVTDes16@@@Z @ 134 NONAME ; void CXnUtils::CollapseWhiteSpace(class CXnNodePluginIf &, class TDes16 &)
-	?SetHandleTooltip@CXnNodePluginIf@@QAEXH@Z @ 135 NONAME ; void CXnNodePluginIf::SetHandleTooltip(int)
-	??1CXnAppUiAdapter@@UAE@XZ @ 136 NONAME ; CXnAppUiAdapter::~CXnAppUiAdapter(void)
-	?NewL@CXnControlAdapter@@SAPAV1@AAVCXnNodePluginIf@@@Z @ 137 NONAME ; class CXnControlAdapter * CXnControlAdapter::NewL(class CXnNodePluginIf &)
-	?EnableLongTapAnimation@CXnControlAdapter@@QAEXH@Z @ 138 NONAME ; void CXnControlAdapter::EnableLongTapAnimation(int)
-	?SetPaddingRect@CXnNodePluginIf@@QAEXABVTRect@@@Z @ 139 NONAME ; void CXnNodePluginIf::SetPaddingRect(class TRect const &)
-	?SetFocusedNode@TXnUiEnginePluginIf@@QAEXPAVCXnNodePluginIf@@@Z @ 140 NONAME ; void TXnUiEnginePluginIf::SetFocusedNode(class CXnNodePluginIf *)
-	?ExitPowerSaveModeL@CXnComponent@@UAEXXZ @ 141 NONAME ; void CXnComponent::ExitPowerSaveModeL(void)
-	?GetPCData@CXnNodeAppIf@@QBEABVTDesC8@@XZ @ 142 NONAME ; class TDesC8 const & CXnNodeAppIf::GetPCData(void) const
-	?Namespace@CXnNodeAppIf@@QAEABVTDesC8@@XZ @ 143 NONAME ; class TDesC8 const & CXnNodeAppIf::Namespace(void)
-	??1CXnComponentNodeImpl@@UAE@XZ @ 144 NONAME ; CXnComponentNodeImpl::~CXnComponentNodeImpl(void)
-	?SetPropertyWithoutNotificationL@CXnNodePluginIf@@QAEXPAVCXnProperty@@@Z @ 145 NONAME ; void CXnNodePluginIf::SetPropertyWithoutNotificationL(class CXnProperty *)
-	?GetPCData@CXnNodePluginIf@@QBEABVTDesC8@@XZ @ 146 NONAME ; class TDesC8 const & CXnNodePluginIf::GetPCData(void) const
-	?SetPCDataL@CXnNodeAppIf@@QAEXABVTDesC8@@@Z @ 147 NONAME ; void CXnNodeAppIf::SetPCDataL(class TDesC8 const &)
-	?Resources@TXnUiEnginePluginIf@@QAEAAV?$CArrayPtrSeg@VCXnResource@@@@XZ @ 148 NONAME ; class CArrayPtrSeg<class CXnResource> & TXnUiEnginePluginIf::Resources(void)
-	?SetContentBitmaps@CXnControlAdapter@@QAEXABVTDesC16@@0@Z @ 149 NONAME ; void CXnControlAdapter::SetContentBitmaps(class TDesC16 const &, class TDesC16 const &)
-	??1CXnControlAdapter@@UAE@XZ @ 150 NONAME ; CXnControlAdapter::~CXnControlAdapter(void)
-	??1MXnNodePredicate@@UAE@XZ @ 151 NONAME ; MXnNodePredicate::~MXnNodePredicate(void)
-	?HorizontalTwipValueL@TXnUiEnginePluginIf@@QAEHPAVCXnProperty@@H@Z @ 152 NONAME ; int TXnUiEnginePluginIf::HorizontalTwipValueL(class CXnProperty *, int)
-	?ConstructL@CXnAppUiAdapter@@UAEXXZ @ 153 NONAME ; void CXnAppUiAdapter::ConstructL(void)
-	?CreateFontL@CXnUtils@@SAXAAVCXnNodePluginIf@@AAPAVCFont@@AAH@Z @ 154 NONAME ; void CXnUtils::CreateFontL(class CXnNodePluginIf &, class CFont * &, int &)
-	??0CXnApplication@@QAE@VTUid@@@Z @ 155 NONAME ; CXnApplication::CXnApplication(class TUid)
-	?ComponentControl@CXnControlAdapter@@MBEPAVCCoeControl@@H@Z @ 156 NONAME ; class CCoeControl * CXnControlAdapter::ComponentControl(int) const
-	?HandleLongTapEventL@CXnControlAdapter@@UAEXABVTPoint@@0@Z @ 157 NONAME ; void CXnControlAdapter::HandleLongTapEventL(class TPoint const &, class TPoint const &)
-	?ParentL@CXnNodeAppIf@@QBEPAV1@XZ @ 158 NONAME ; class CXnNodeAppIf * CXnNodeAppIf::ParentL(void) const
-	??1CXnComponent@@UAE@XZ @ 159 NONAME ; CXnComponent::~CXnComponent(void)
-	?ControlAdapter@CXnComponent@@QAEPAVCXnControlAdapter@@XZ @ 160 NONAME ; class CXnControlAdapter * CXnComponent::ControlAdapter(void)
-	?DrawContentImage@CXnControlAdapter@@IBEXXZ @ 161 NONAME ; void CXnControlAdapter::DrawContentImage(void) const
-	?Component@CXnComponentNodeImpl@@QAEPAVCXnComponent@@XZ @ 162 NONAME ; class CXnComponent * CXnComponentNodeImpl::Component(void)
-	?WidgetsVisible@TXnUiEnginePluginIf@@QBEHXZ @ 163 NONAME ; int TXnUiEnginePluginIf::WidgetsVisible(void) const
-	?SetControlAdapter@CXnComponent@@QAEXPAVCXnControlAdapter@@@Z @ 164 NONAME ; void CXnComponent::SetControlAdapter(class CXnControlAdapter *)
-	?SetStateL@CXnNodePluginIf@@QAEXABVTDesC8@@@Z @ 165 NONAME ; void CXnNodePluginIf::SetStateL(class TDesC8 const &)
-	?DoesComponentNeedCreation@CXnComponentNodeImpl@@QBEHXZ @ 166 NONAME ; int CXnComponentNodeImpl::DoesComponentNeedCreation(void) const
-	??0CXnDocument@@QAE@AAVCEikApplication@@VTUid@@@Z @ 167 NONAME ; CXnDocument::CXnDocument(class CEikApplication &, class TUid)
-	?FindNodeByClassL@TXnUiEnginePluginIf@@QAE?AV?$RPointerArray@VCXnNodePluginIf@@@@ABVTDesC16@@@Z @ 168 NONAME ; class RPointerArray<class CXnNodePluginIf> TXnUiEnginePluginIf::FindNodeByClassL(class TDesC16 const &)
-	?InternalDomNodeType@CXnNodeAppIf@@QBEABVTDesC8@@XZ @ 169 NONAME ; class TDesC8 const & CXnNodeAppIf::InternalDomNodeType(void) const
-	?StringPool@TXnUiEnginePluginIf@@QAEAAVCXnDomStringPool@@XZ @ 170 NONAME ; class CXnDomStringPool & TXnUiEnginePluginIf::StringPool(void)
-	?SetStateL@CXnNodeAppIf@@QAEXABVTDesC8@@@Z @ 171 NONAME ; void CXnNodeAppIf::SetStateL(class TDesC8 const &)
-	?Type@CXnNodeAppIf@@QAEPAVCXnType@@XZ @ 172 NONAME ; class CXnType * CXnNodeAppIf::Type(void)
-	?BorderRect@CXnNodeAppIf@@QAE?AVTRect@@XZ @ 173 NONAME ; class TRect CXnNodeAppIf::BorderRect(void)
-	?IdL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 174 NONAME ; class CXnProperty * CXnNodePluginIf::IdL(void)
-	?RootNodeL@TXnUiEngineAppIf@@QAEAAVCXnNodeAppIf@@XZ @ 175 NONAME ; class CXnNodeAppIf & TXnUiEngineAppIf::RootNodeL(void)
-	?CreateXnComponentL@MXnComponentFactory@@QAE?AW4TXnComponentFactoryResponse@1@AAVCXnNodePluginIf@@AAPAVCXnComponent@@@Z @ 176 NONAME ; enum MXnComponentFactory::TXnComponentFactoryResponse MXnComponentFactory::CreateXnComponentL(class CXnNodePluginIf &, class CXnComponent * &)
-	?RefreshMenuL@TXnUiEngineAppIf@@QAEXXZ @ 177 NONAME ; void TXnUiEngineAppIf::RefreshMenuL(void)
-	?PaddingRect@CXnNodePluginIf@@QAE?AVTRect@@XZ @ 178 NONAME ; class TRect CXnNodePluginIf::PaddingRect(void)
-	?MeasureAdaptiveContentL@CXnControlAdapter@@UAE?AVTSize@@ABV2@@Z @ 179 NONAME ; class TSize CXnControlAdapter::MeasureAdaptiveContentL(class TSize const &)
-	?NewL@CXnProperty@@SAPAV1@ABVTDesC8@@0W4TPrimitiveValueType@CXnDomPropertyValue@@AAVCXnDomStringPool@@@Z @ 180 NONAME ; class CXnProperty * CXnProperty::NewL(class TDesC8 const &, class TDesC8 const &, enum CXnDomPropertyValue::TPrimitiveValueType, class CXnDomStringPool &)
-	?GetPropertyL@CXnNodePluginIf@@QBEPAVCXnProperty@@AAV2@@Z @ 181 NONAME ; class CXnProperty * CXnNodePluginIf::GetPropertyL(class CXnProperty &) const
-	?MarginRect@CXnNodeAppIf@@QAE?AVTRect@@XZ @ 182 NONAME ; class TRect CXnNodeAppIf::MarginRect(void)
-	?EditMode@TXnUiEnginePluginIf@@QAEHXZ @ 183 NONAME ; int TXnUiEnginePluginIf::EditMode(void)
-	?FindNodeByIdL@TXnUiEnginePluginIf@@QAEPAVCXnNodePluginIf@@ABVTDesC8@@0@Z @ 184 NONAME ; class CXnNodePluginIf * TXnUiEnginePluginIf::FindNodeByIdL(class TDesC8 const &, class TDesC8 const &)
-	?MakeInterfaceL@CXnComponent@@UAEPAVMXnComponentInterface@XnComponentInterface@@ABVTDesC8@@@Z @ 185 NONAME ; class XnComponentInterface::MXnComponentInterface * CXnComponent::MakeInterfaceL(class TDesC8 const &)
-	?EnableRenderUi@CXnUiEngineImpl@@CAXPAX@Z @ 186 NONAME ; void CXnUiEngineImpl::EnableRenderUi(void *)
-	?IsMenuDisplaying@TXnUiEnginePluginIf@@QAEHXZ @ 187 NONAME ; int TXnUiEnginePluginIf::IsMenuDisplaying(void)
-	?IsMenuDisplaying@TXnUiEngineAppIf@@QAEHXZ @ 188 NONAME ; int TXnUiEngineAppIf::IsMenuDisplaying(void)
-	?NewL@CXnProperty@@SAPAV1@PAVCXnDomProperty@@@Z @ 189 NONAME ; class CXnProperty * CXnProperty::NewL(class CXnDomProperty *)
-	?ConstructL@CXnComponentNodeImpl@@IAEXPAVCXnType@@@Z @ 190 NONAME ; void CXnComponentNodeImpl::ConstructL(class CXnType *)
-	?ChildrenL@CXnNodeAppIf@@QAE?AV?$RPointerArray@VCXnNodeAppIf@@@@XZ @ 191 NONAME ; class RPointerArray<class CXnNodeAppIf> CXnNodeAppIf::ChildrenL(void)
-	?ConvertHslToRgb@CXnUtils@@SA?AVTRgb@@HHH@Z @ 192 NONAME ; class TRgb CXnUtils::ConvertHslToRgb(int, int, int)
-	?LoadPublisher@CXnAppUiAdapter@@UAEHAAVCXnNodeAppIf@@H@Z @ 193 NONAME ; int CXnAppUiAdapter::LoadPublisher(class CXnNodeAppIf &, int)
-	?LoadBitmap@CXnControlAdapter@@QAEPAVCFbsBitmap@@ABVTDesC16@@@Z @ 194 NONAME ; class CFbsBitmap * CXnControlAdapter::LoadBitmap(class TDesC16 const &)
-	??0MXnComponentFactory@@IAE@XZ @ 195 NONAME ; MXnComponentFactory::MXnComponentFactory(void)
-	?SetComponent@CXnViewsNodeImpl@@QAEXPAVCXnComponent@@@Z @ 196 NONAME ; void CXnViewsNodeImpl::SetComponent(class CXnComponent *)
-	?BorderRect@CXnNodePluginIf@@QAE?AVTRect@@XZ @ 197 NONAME ; class TRect CXnNodePluginIf::BorderRect(void)
-	?CreateDocumentL@CXnApplication@@MAEPAVCApaDocument@@XZ @ 198 NONAME ; class CApaDocument * CXnApplication::CreateDocumentL(void)
-	?HandleUiReadyEventL@CXnAppUiAdapter@@UAEXXZ @ 199 NONAME ; void CXnAppUiAdapter::HandleUiReadyEventL(void)
-	?CreateFontL@CXnUtils@@SAXABVTDesC16@@HVTFontStyle@@AAPAVCFont@@AAH@Z @ 200 NONAME ; void CXnUtils::CreateFontL(class TDesC16 const &, int, class TFontStyle, class CFont * &, int &)
-	?GetPluginNodeArrayL@TXnUiEngineAppIf@@QAEHAAV?$RPointerArray@VCXnNodeAppIf@@@@@Z @ 201 NONAME ; int TXnUiEngineAppIf::GetPluginNodeArrayL(class RPointerArray<class CXnNodeAppIf> &)
-	?MakeXnControlAdapterL@MXnComponentFactory@@EAEPAVCXnControlAdapter@@AAVCXnNodePluginIf@@PAV2@@Z @ 202 NONAME ; class CXnControlAdapter * MXnComponentFactory::MakeXnControlAdapterL(class CXnNodePluginIf &, class CXnControlAdapter *)
-	?IsDrawingAllowed@CXnNodePluginIf@@QBEHXZ @ 203 NONAME ; int CXnNodePluginIf::IsDrawingAllowed(void) const
-	?MakeInterfaceL@CXnNodeAppIf@@QAEPAVMXnComponentInterface@XnComponentInterface@@ABVTDesC8@@@Z @ 204 NONAME ; class XnComponentInterface::MXnComponentInterface * CXnNodeAppIf::MakeInterfaceL(class TDesC8 const &)
-	?VerticalTwipValueL@TXnUiEnginePluginIf@@QAEHPAVCXnProperty@@H@Z @ 205 NONAME ; int TXnUiEnginePluginIf::VerticalTwipValueL(class CXnProperty *, int)
-	?Component@CXnControlAdapter@@QAEPAVCXnComponent@@XZ @ 206 NONAME ; class CXnComponent * CXnControlAdapter::Component(void)
-	?FloatValueL@CXnProperty@@QAENXZ @ 207 NONAME ; double CXnProperty::FloatValueL(void)
-	?SetUiEngine@TXnUiEngineAppIf@@QAEXPAVCXnUiEngine@@@Z @ 208 NONAME ; void TXnUiEngineAppIf::SetUiEngine(class CXnUiEngine *)
-	?FindNodeByIdL@TXnUiEngineAppIf@@QAEPAVCXnNodeAppIf@@ABVTDesC16@@0@Z @ 209 NONAME ; class CXnNodeAppIf * TXnUiEngineAppIf::FindNodeByIdL(class TDesC16 const &, class TDesC16 const &)
-	?IsEditMode@TXnUiEngineAppIf@@QAEHXZ @ 210 NONAME ; int TXnUiEngineAppIf::IsEditMode(void)
-	?ResolveSkinItemIDL@CXnUtils@@SAHABVTDesC16@@AAVTAknsItemID@@AAH@Z @ 211 NONAME ; int CXnUtils::ResolveSkinItemIDL(class TDesC16 const &, class TAknsItemID &, int &)
-	?EnablePartialTouchInput@TXnUiEnginePluginIf@@QAEXAAVCXnNodePluginIf@@H@Z @ 212 NONAME ; void TXnUiEnginePluginIf::EnablePartialTouchInput(class CXnNodePluginIf &, int)
-	?RootNodeL@TXnUiEnginePluginIf@@QAEAAVCXnNodePluginIf@@XZ @ 213 NONAME ; class CXnNodePluginIf & TXnUiEnginePluginIf::RootNodeL(void)
-	?CreateAppUiL@CXnDocument@@UAEPAVCEikAppUi@@XZ @ 214 NONAME ; class CEikAppUi * CXnDocument::CreateAppUiL(void)
-	?PathL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 215 NONAME ; class CXnProperty * CXnNodePluginIf::PathL(void)
-	?NewL@CXnProperty@@SAPAV1@ABVTDesC8@@NW4TPrimitiveValueType@CXnDomPropertyValue@@AAVCXnDomStringPool@@@Z @ 216 NONAME ; class CXnProperty * CXnProperty::NewL(class TDesC8 const &, double, enum CXnDomPropertyValue::TPrimitiveValueType, class CXnDomStringPool &)
-	?MaskPathL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 217 NONAME ; class CXnProperty * CXnNodePluginIf::MaskPathL(void)
-	?AppDllUid@CXnApplication@@MBE?AVTUid@@XZ @ 218 NONAME ; class TUid CXnApplication::AppDllUid(void) const
-	?DoExitPowerSaveModeL@CXnControlAdapter@@UAEXW4TModeEvent@1@@Z @ 219 NONAME ; void CXnControlAdapter::DoExitPowerSaveModeL(enum CXnControlAdapter::TModeEvent)
-	?LabelL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 220 NONAME ; class CXnProperty * CXnNodePluginIf::LabelL(void)
-	?Component@CXnViewsNodeImpl@@QAEPAVCXnComponent@@XZ @ 221 NONAME ; class CXnComponent * CXnViewsNodeImpl::Component(void)
-	?GetRgbValue@CXnUtils@@SAHAAVTRgb@@ABVTDesC8@@@Z @ 222 NONAME ; int CXnUtils::GetRgbValue(class TRgb &, class TDesC8 const &)
-	?StringValue@CXnProperty@@QAEABVTDesC8@@XZ @ 223 NONAME ; class TDesC8 const & CXnProperty::StringValue(void)
-	?SetVisible@CXnControlAdapter@@QAEXH@Z @ 224 NONAME ; void CXnControlAdapter::SetVisible(int)
-	?Node@CXnComponent@@QAEPAVCXnNodePluginIf@@XZ @ 225 NONAME ; class CXnNodePluginIf * CXnComponent::Node(void)
+	?PublisherInfo@CXnAppUiAdapter@@UAEHAAVCXnNodeAppIf@@AAVTHsPublisherInfo@@@Z @ 64 NONAME ; int CXnAppUiAdapter::PublisherInfo(class CXnNodeAppIf &, class THsPublisherInfo &)
+	?GetThemeResource@TXnUiEngineAppIf@@QAEHABVTDesC16@@AAVRFile@@@Z @ 65 NONAME ; int TXnUiEngineAppIf::GetThemeResource(class TDesC16 const &, class RFile &)
+	?ConstructL@CXnComponent@@IAEXXZ @ 66 NONAME ; void CXnComponent::ConstructL(void)
+	?FindResource@CXnUtils@@SAPAVCXnResource@@AAV?$CArrayPtrSeg@VCXnResource@@@@ABVTDesC16@@AAH@Z @ 67 NONAME ; class CXnResource * CXnUtils::FindResource(class CArrayPtrSeg<class CXnResource> &, class TDesC16 const &, int &)
+	?UnsetStateL@CXnNodeAppIf@@QAEXABVTDesC8@@@Z @ 68 NONAME ; void CXnNodeAppIf::UnsetStateL(class TDesC8 const &)
+	?Uid@CXnDocument@@QAE?AVTUid@@XZ @ 69 NONAME ; class TUid CXnDocument::Uid(void)
+	?FocusChanged@CXnControlAdapter@@UAEXW4TDrawNow@@@Z @ 70 NONAME ; void CXnControlAdapter::FocusChanged(enum TDrawNow)
+	?SetBlank@CXnControlAdapter@@QAEXH@Z @ 71 NONAME ; void CXnControlAdapter::SetBlank(int)
+	?ProcessMessageL@CXnAppUiAdapter@@UAEXVTUid@@ABVTDesC8@@@Z @ 72 NONAME ; void CXnAppUiAdapter::ProcessMessageL(class TUid, class TDesC8 const &)
+	?Component@CXnNodeAppIf@@QAEAAVCXnComponent@@XZ @ 73 NONAME ; class CXnComponent & CXnNodeAppIf::Component(void)
+	?SetLayoutCapable@CXnNodePluginIf@@QAEXH@Z @ 74 NONAME ; void CXnNodePluginIf::SetLayoutCapable(int)
+	?MarginRect@CXnNodePluginIf@@QAE?AVTRect@@XZ @ 75 NONAME ; class TRect CXnNodePluginIf::MarginRect(void)
+	?UiEngineL@CXnAppUiAdapter@@QAEPAVTXnUiEngineAppIf@@XZ @ 76 NONAME ; class TXnUiEngineAppIf * CXnAppUiAdapter::UiEngineL(void)
+	?ActiveView@TXnUiEngineAppIf@@QAEPAVCXnNodeAppIf@@XZ @ 77 NONAME ; class CXnNodeAppIf * TXnUiEngineAppIf::ActiveView(void)
+	?HandleXuikonEventL@CXnAppUiAdapter@@UAEXAAVCXnNodeAppIf@@0AAVCXnDomNode@@1@Z @ 78 NONAME ; void CXnAppUiAdapter::HandleXuikonEventL(class CXnNodeAppIf &, class CXnNodeAppIf &, class CXnDomNode &, class CXnDomNode &)
+	?RenderUIL@TXnUiEngineAppIf@@QAEXPAVCXnNodeAppIf@@@Z @ 79 NONAME ; void TXnUiEngineAppIf::RenderUIL(class CXnNodeAppIf *)
+	?PrepareToExit@CXnAppUiAdapter@@MAEXXZ @ 80 NONAME ; void CXnAppUiAdapter::PrepareToExit(void)
+	?DoHandlePropertyChangeL@CXnControlAdapter@@UAEXPAVCXnProperty@@@Z @ 81 NONAME ; void CXnControlAdapter::DoHandlePropertyChangeL(class CXnProperty *)
+	?ConstructL@CXnControlAdapter@@IAEXAAVCXnNodePluginIf@@@Z @ 82 NONAME ; void CXnControlAdapter::ConstructL(class CXnNodePluginIf &)
+	?FocusedNode@TXnUiEngineAppIf@@QAEPAVCXnNodeAppIf@@XZ @ 83 NONAME ; class CXnNodeAppIf * TXnUiEngineAppIf::FocusedNode(void)
+	?SetDataL@CXnComponent@@QAEXABVTDesC8@@ABVTDesC16@@H@Z @ 84 NONAME ; void CXnComponent::SetDataL(class TDesC8 const &, class TDesC16 const &, int)
+	?OfferKeyEventL@CXnControlAdapter@@UAE?AW4TKeyResponse@@ABUTKeyEvent@@W4TEventCode@@@Z @ 85 NONAME ; enum TKeyResponse CXnControlAdapter::OfferKeyEventL(struct TKeyEvent const &, enum TEventCode)
+	?IsDrawingAllowed@CXnControlAdapter@@QBEHXZ @ 86 NONAME ; int CXnControlAdapter::IsDrawingAllowed(void) const
+	?DisplayL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 87 NONAME ; class CXnProperty * CXnNodePluginIf::DisplayL(void)
+	?NewL@CXnProperty@@SAPAV1@ABVTDesC8@@PAVCXnDomPropertyValue@@AAVCXnDomStringPool@@@Z @ 88 NONAME ; class CXnProperty * CXnProperty::NewL(class TDesC8 const &, class CXnDomPropertyValue *, class CXnDomStringPool &)
+	?Rect@CXnNodeAppIf@@QAE?AVTRect@@XZ @ 89 NONAME ; class TRect CXnNodeAppIf::Rect(void)
+	?NewL@CXnComponentNodeImpl@@SAPAV1@PAVCXnType@@@Z @ 90 NONAME ; class CXnComponentNodeImpl * CXnComponentNodeImpl::NewL(class CXnType *)
+	?WidgetsVisible@TXnUiEngineAppIf@@QBEHXZ @ 91 NONAME ; int TXnUiEngineAppIf::WidgetsVisible(void) const
+	?Type@CXnNodePluginIf@@QAEPAVCXnType@@XZ @ 92 NONAME ; class CXnType * CXnNodePluginIf::Type(void)
+	?MakeXnComponentL@MXnComponentFactory@@EAE?AW4TXnComponentFactoryResponse@1@AAVCXnNodePluginIf@@AAPAVCXnComponent@@@Z @ 93 NONAME ; enum MXnComponentFactory::TXnComponentFactoryResponse MXnComponentFactory::MakeXnComponentL(class CXnNodePluginIf &, class CXnComponent * &)
+	?UnsetStateL@CXnNodePluginIf@@QAEXABVTDesC8@@@Z @ 94 NONAME ; void CXnNodePluginIf::UnsetStateL(class TDesC8 const &)
+	?StringValueL@CXnProperty@@QAEPAVHBufC16@@XZ @ 95 NONAME ; class HBufC16 * CXnProperty::StringValueL(void)
+	?DisableRenderUiLC@TXnUiEnginePluginIf@@QAEXXZ @ 96 NONAME ; void TXnUiEnginePluginIf::DisableRenderUiLC(void)
+	?SetPropertyL@CXnNodeAppIf@@QAEXPAVCXnProperty@@@Z @ 97 NONAME ; void CXnNodeAppIf::SetPropertyL(class CXnProperty *)
+	?View@CXnAppUiAdapter@@QBEAAVCAknView@@XZ @ 98 NONAME ; class CAknView & CXnAppUiAdapter::View(void) const
+	?ViewNodeImpl@CXnNodePluginIf@@QAEPAVCXnViewNodeImpl@@XZ @ 99 NONAME ; class CXnViewNodeImpl * CXnNodePluginIf::ViewNodeImpl(void)
+	?StripQuotes@CXnUtils@@SAXAAPAVHBufC16@@@Z @ 100 NONAME ; void CXnUtils::StripQuotes(class HBufC16 * &)
+	?SetPCDataL@CXnNodePluginIf@@QAEXABVTDesC8@@@Z @ 101 NONAME ; void CXnNodePluginIf::SetPCDataL(class TDesC8 const &)
+	?VisibilityL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 102 NONAME ; class CXnProperty * CXnNodePluginIf::VisibilityL(void)
+	?Draw@CXnControlAdapter@@MBEXABVTRect@@@Z @ 103 NONAME ; void CXnControlAdapter::Draw(class TRect const &) const
+	??1CXnApplication@@UAE@XZ @ 104 NONAME ; CXnApplication::~CXnApplication(void)
+	?DoesNodeNeedComponentImplL@MXnComponentFactory@@QAEHABVTDesC8@@@Z @ 105 NONAME ; int MXnComponentFactory::DoesNodeNeedComponentImplL(class TDesC8 const &)
+	?ConstructL@CXnViewsNodeImpl@@IAEXPAVCXnType@@@Z @ 106 NONAME ; void CXnViewsNodeImpl::ConstructL(class CXnType *)
+	?StringPool@TXnUiEngineAppIf@@QAEAAVCXnDomStringPool@@XZ @ 107 NONAME ; class CXnDomStringPool & TXnUiEngineAppIf::StringPool(void)
+	?UiEngineL@CXnNodePluginIf@@QAEPAVTXnUiEnginePluginIf@@XZ @ 108 NONAME ; class TXnUiEnginePluginIf * CXnNodePluginIf::UiEngineL(void)
+	?ResolveSkinItemIDL@CXnUtils@@SAHABVTDesC16@@AAVTAknsItemID@@@Z @ 109 NONAME ; int CXnUtils::ResolveSkinItemIDL(class TDesC16 const &, class TAknsItemID &)
+	?PluginNodeL@TXnUiEnginePluginIf@@QAEAAVCXnNodePluginIf@@PAV2@@Z @ 110 NONAME ; class CXnNodePluginIf & TXnUiEnginePluginIf::PluginNodeL(class CXnNodePluginIf *)
+	?VerticalPixelValueL@TXnUiEnginePluginIf@@QAEHPAVCXnProperty@@H@Z @ 111 NONAME ; int TXnUiEnginePluginIf::VerticalPixelValueL(class CXnProperty *, int)
+	?SetComponent@CXnControlAdapter@@QAEXPAVCXnComponent@@@Z @ 112 NONAME ; void CXnControlAdapter::SetComponent(class CXnComponent *)
+	??0MXnNodePredicate@@QAE@XZ @ 113 NONAME ; MXnNodePredicate::MXnNodePredicate(void)
+	??1CXnViewsNodeImpl@@UAE@XZ @ 114 NONAME ; CXnViewsNodeImpl::~CXnViewsNodeImpl(void)
+	?HandleControlEventL@CXnControlAdapter@@UAEXPAVCCoeControl@@W4TCoeEvent@MCoeControlObserver@@@Z @ 115 NONAME ; void CXnControlAdapter::HandleControlEventL(class CCoeControl *, enum MCoeControlObserver::TCoeEvent)
+	?HandleScreenDeviceChangedL@CXnControlAdapter@@UAEXXZ @ 116 NONAME ; void CXnControlAdapter::HandleScreenDeviceChangedL(void)
+	?SizeChanged@CXnControlAdapter@@MAEXXZ @ 117 NONAME ; void CXnControlAdapter::SizeChanged(void)
+	?CountComponentControls@CXnControlAdapter@@MBEHXZ @ 118 NONAME ; int CXnControlAdapter::CountComponentControls(void) const
+	?HideTooltipsL@CXnNodeAppIf@@QAEXXZ @ 119 NONAME ; void CXnNodeAppIf::HideTooltipsL(void)
+	?GetPropertyL@CXnNodeAppIf@@QBEPAVCXnProperty@@ABVTDesC8@@@Z @ 120 NONAME ; class CXnProperty * CXnNodeAppIf::GetPropertyL(class TDesC8 const &) const
+	?FindNodeByClassL@TXnUiEngineAppIf@@QAE?AV?$RPointerArray@VCXnNodeAppIf@@@@ABVTDesC8@@0@Z @ 121 NONAME ; class RPointerArray<class CXnNodeAppIf> TXnUiEngineAppIf::FindNodeByClassL(class TDesC8 const &, class TDesC8 const &)
+	?Match@MXnNodePredicate@@UAEHAAVCXnNode@@@Z @ 122 NONAME ; int MXnNodePredicate::Match(class CXnNode &)
+	?GetBitmapAndMask@CXnControlAdapter@@QAEXABVTDesC16@@0AAPAVCFbsBitmap@@1@Z @ 123 NONAME ; void CXnControlAdapter::GetBitmapAndMask(class TDesC16 const &, class TDesC16 const &, class CFbsBitmap * &, class CFbsBitmap * &)
+	?NewL@CXnViewsNodeImpl@@SAPAV1@PAVCXnType@@@Z @ 124 NONAME ; class CXnViewsNodeImpl * CXnViewsNodeImpl::NewL(class CXnType *)
+	?PaddingRect@CXnNodeAppIf@@QAE?AVTRect@@XZ @ 125 NONAME ; class TRect CXnNodeAppIf::PaddingRect(void)
+	?SetMarginRect@CXnNodePluginIf@@QAEXABVTRect@@@Z @ 126 NONAME ; void CXnNodePluginIf::SetMarginRect(class TRect const &)
+	?IsDialogDisplaying@TXnUiEnginePluginIf@@QAEHXZ @ 127 NONAME ; int TXnUiEnginePluginIf::IsDialogDisplaying(void)
+	?HandleEventL@CXnAppUiAdapter@@UAEXABVTDesC16@@AAVCXnNodeAppIf@@@Z @ 128 NONAME ; void CXnAppUiAdapter::HandleEventL(class TDesC16 const &, class CXnNodeAppIf &)
+	?GetPropertyL@CXnNodePluginIf@@QBEPAVCXnProperty@@ABVTDesC8@@@Z @ 129 NONAME ; class CXnProperty * CXnNodePluginIf::GetPropertyL(class TDesC8 const &) const
+	?SetPropertyArrayL@CXnNodeAppIf@@QAEXPAV?$RPointerArray@VCXnProperty@@@@@Z @ 130 NONAME ; void CXnNodeAppIf::SetPropertyArrayL(class RPointerArray<class CXnProperty> *)
+	?RemoveViewL@CXnAppUiAdapter@@QAEXAAVCAknView@@@Z @ 131 NONAME ; void CXnAppUiAdapter::RemoveViewL(class CAknView &)
+	?EnterPowerSaveModeL@CXnComponent@@UAEXXZ @ 132 NONAME ; void CXnComponent::EnterPowerSaveModeL(void)
+	?SetRect@CXnNodePluginIf@@QAEXABVTRect@@@Z @ 133 NONAME ; void CXnNodePluginIf::SetRect(class TRect const &)
+	??0CXnComponent@@IAE@XZ @ 134 NONAME ; CXnComponent::CXnComponent(void)
+	?CollapseWhiteSpace@CXnUtils@@SAXAAVCXnNodePluginIf@@AAVTDes16@@@Z @ 135 NONAME ; void CXnUtils::CollapseWhiteSpace(class CXnNodePluginIf &, class TDes16 &)
+	?SetHandleTooltip@CXnNodePluginIf@@QAEXH@Z @ 136 NONAME ; void CXnNodePluginIf::SetHandleTooltip(int)
+	??1CXnAppUiAdapter@@UAE@XZ @ 137 NONAME ; CXnAppUiAdapter::~CXnAppUiAdapter(void)
+	?NewL@CXnControlAdapter@@SAPAV1@AAVCXnNodePluginIf@@@Z @ 138 NONAME ; class CXnControlAdapter * CXnControlAdapter::NewL(class CXnNodePluginIf &)
+	?EnableLongTapAnimation@CXnControlAdapter@@QAEXH@Z @ 139 NONAME ; void CXnControlAdapter::EnableLongTapAnimation(int)
+	?SetPaddingRect@CXnNodePluginIf@@QAEXABVTRect@@@Z @ 140 NONAME ; void CXnNodePluginIf::SetPaddingRect(class TRect const &)
+	?SetFocusedNode@TXnUiEnginePluginIf@@QAEXPAVCXnNodePluginIf@@@Z @ 141 NONAME ; void TXnUiEnginePluginIf::SetFocusedNode(class CXnNodePluginIf *)
+	?ExitPowerSaveModeL@CXnComponent@@UAEXXZ @ 142 NONAME ; void CXnComponent::ExitPowerSaveModeL(void)
+	?GetPCData@CXnNodeAppIf@@QBEABVTDesC8@@XZ @ 143 NONAME ; class TDesC8 const & CXnNodeAppIf::GetPCData(void) const
+	?Namespace@CXnNodeAppIf@@QAEABVTDesC8@@XZ @ 144 NONAME ; class TDesC8 const & CXnNodeAppIf::Namespace(void)
+	?LoadPublisher@CXnAppUiAdapter@@UAEXABVTAiFwPublisherInfo@@@Z @ 145 NONAME ; void CXnAppUiAdapter::LoadPublisher(class TAiFwPublisherInfo const &)
+	??1CXnComponentNodeImpl@@UAE@XZ @ 146 NONAME ; CXnComponentNodeImpl::~CXnComponentNodeImpl(void)
+	?SetPropertyWithoutNotificationL@CXnNodePluginIf@@QAEXPAVCXnProperty@@@Z @ 147 NONAME ; void CXnNodePluginIf::SetPropertyWithoutNotificationL(class CXnProperty *)
+	?GetPCData@CXnNodePluginIf@@QBEABVTDesC8@@XZ @ 148 NONAME ; class TDesC8 const & CXnNodePluginIf::GetPCData(void) const
+	?SetPCDataL@CXnNodeAppIf@@QAEXABVTDesC8@@@Z @ 149 NONAME ; void CXnNodeAppIf::SetPCDataL(class TDesC8 const &)
+	?Resources@TXnUiEnginePluginIf@@QAEAAV?$CArrayPtrSeg@VCXnResource@@@@XZ @ 150 NONAME ; class CArrayPtrSeg<class CXnResource> & TXnUiEnginePluginIf::Resources(void)
+	?SetContentBitmaps@CXnControlAdapter@@QAEXABVTDesC16@@0@Z @ 151 NONAME ; void CXnControlAdapter::SetContentBitmaps(class TDesC16 const &, class TDesC16 const &)
+	??1CXnControlAdapter@@UAE@XZ @ 152 NONAME ; CXnControlAdapter::~CXnControlAdapter(void)
+	??1MXnNodePredicate@@UAE@XZ @ 153 NONAME ; MXnNodePredicate::~MXnNodePredicate(void)
+	?HorizontalTwipValueL@TXnUiEnginePluginIf@@QAEHPAVCXnProperty@@H@Z @ 154 NONAME ; int TXnUiEnginePluginIf::HorizontalTwipValueL(class CXnProperty *, int)
+	?ConstructL@CXnAppUiAdapter@@UAEXXZ @ 155 NONAME ; void CXnAppUiAdapter::ConstructL(void)
+	?CreateFontL@CXnUtils@@SAXAAVCXnNodePluginIf@@AAPAVCFont@@AAH@Z @ 156 NONAME ; void CXnUtils::CreateFontL(class CXnNodePluginIf &, class CFont * &, int &)
+	??0CXnApplication@@QAE@VTUid@@@Z @ 157 NONAME ; CXnApplication::CXnApplication(class TUid)
+	?ComponentControl@CXnControlAdapter@@MBEPAVCCoeControl@@H@Z @ 158 NONAME ; class CCoeControl * CXnControlAdapter::ComponentControl(int) const
+	?HandleLongTapEventL@CXnControlAdapter@@UAEXABVTPoint@@0@Z @ 159 NONAME ; void CXnControlAdapter::HandleLongTapEventL(class TPoint const &, class TPoint const &)
+	?ParentL@CXnNodeAppIf@@QBEPAV1@XZ @ 160 NONAME ; class CXnNodeAppIf * CXnNodeAppIf::ParentL(void) const
+	??1CXnComponent@@UAE@XZ @ 161 NONAME ; CXnComponent::~CXnComponent(void)
+	?ControlAdapter@CXnComponent@@QAEPAVCXnControlAdapter@@XZ @ 162 NONAME ; class CXnControlAdapter * CXnComponent::ControlAdapter(void)
+	?DrawContentImage@CXnControlAdapter@@IBEXXZ @ 163 NONAME ; void CXnControlAdapter::DrawContentImage(void) const
+	?Component@CXnComponentNodeImpl@@QAEPAVCXnComponent@@XZ @ 164 NONAME ; class CXnComponent * CXnComponentNodeImpl::Component(void)
+	?WidgetsVisible@TXnUiEnginePluginIf@@QBEHXZ @ 165 NONAME ; int TXnUiEnginePluginIf::WidgetsVisible(void) const
+	?SetControlAdapter@CXnComponent@@QAEXPAVCXnControlAdapter@@@Z @ 166 NONAME ; void CXnComponent::SetControlAdapter(class CXnControlAdapter *)
+	?SetStateL@CXnNodePluginIf@@QAEXABVTDesC8@@@Z @ 167 NONAME ; void CXnNodePluginIf::SetStateL(class TDesC8 const &)
+	?DoesComponentNeedCreation@CXnComponentNodeImpl@@QBEHXZ @ 168 NONAME ; int CXnComponentNodeImpl::DoesComponentNeedCreation(void) const
+	??0CXnDocument@@QAE@AAVCEikApplication@@VTUid@@@Z @ 169 NONAME ; CXnDocument::CXnDocument(class CEikApplication &, class TUid)
+	?FindNodeByClassL@TXnUiEnginePluginIf@@QAE?AV?$RPointerArray@VCXnNodePluginIf@@@@ABVTDesC16@@@Z @ 170 NONAME ; class RPointerArray<class CXnNodePluginIf> TXnUiEnginePluginIf::FindNodeByClassL(class TDesC16 const &)
+	?InternalDomNodeType@CXnNodeAppIf@@QBEABVTDesC8@@XZ @ 171 NONAME ; class TDesC8 const & CXnNodeAppIf::InternalDomNodeType(void) const
+	?StringPool@TXnUiEnginePluginIf@@QAEAAVCXnDomStringPool@@XZ @ 172 NONAME ; class CXnDomStringPool & TXnUiEnginePluginIf::StringPool(void)
+	?SetStateL@CXnNodeAppIf@@QAEXABVTDesC8@@@Z @ 173 NONAME ; void CXnNodeAppIf::SetStateL(class TDesC8 const &)
+	?Type@CXnNodeAppIf@@QAEPAVCXnType@@XZ @ 174 NONAME ; class CXnType * CXnNodeAppIf::Type(void)
+	?BorderRect@CXnNodeAppIf@@QAE?AVTRect@@XZ @ 175 NONAME ; class TRect CXnNodeAppIf::BorderRect(void)
+	?IdL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 176 NONAME ; class CXnProperty * CXnNodePluginIf::IdL(void)
+	?RootNodeL@TXnUiEngineAppIf@@QAEAAVCXnNodeAppIf@@XZ @ 177 NONAME ; class CXnNodeAppIf & TXnUiEngineAppIf::RootNodeL(void)
+	?CreateXnComponentL@MXnComponentFactory@@QAE?AW4TXnComponentFactoryResponse@1@AAVCXnNodePluginIf@@AAPAVCXnComponent@@@Z @ 178 NONAME ; enum MXnComponentFactory::TXnComponentFactoryResponse MXnComponentFactory::CreateXnComponentL(class CXnNodePluginIf &, class CXnComponent * &)
+	?RefreshMenuL@TXnUiEngineAppIf@@QAEXXZ @ 179 NONAME ; void TXnUiEngineAppIf::RefreshMenuL(void)
+	?PaddingRect@CXnNodePluginIf@@QAE?AVTRect@@XZ @ 180 NONAME ; class TRect CXnNodePluginIf::PaddingRect(void)
+	?MeasureAdaptiveContentL@CXnControlAdapter@@UAE?AVTSize@@ABV2@@Z @ 181 NONAME ; class TSize CXnControlAdapter::MeasureAdaptiveContentL(class TSize const &)
+	?NewL@CXnProperty@@SAPAV1@ABVTDesC8@@0W4TPrimitiveValueType@CXnDomPropertyValue@@AAVCXnDomStringPool@@@Z @ 182 NONAME ; class CXnProperty * CXnProperty::NewL(class TDesC8 const &, class TDesC8 const &, enum CXnDomPropertyValue::TPrimitiveValueType, class CXnDomStringPool &)
+	?GetPropertyL@CXnNodePluginIf@@QBEPAVCXnProperty@@AAV2@@Z @ 183 NONAME ; class CXnProperty * CXnNodePluginIf::GetPropertyL(class CXnProperty &) const
+	?MarginRect@CXnNodeAppIf@@QAE?AVTRect@@XZ @ 184 NONAME ; class TRect CXnNodeAppIf::MarginRect(void)
+	?EditMode@TXnUiEnginePluginIf@@QAEHXZ @ 185 NONAME ; int TXnUiEnginePluginIf::EditMode(void)
+	?FindNodeByIdL@TXnUiEnginePluginIf@@QAEPAVCXnNodePluginIf@@ABVTDesC8@@0@Z @ 186 NONAME ; class CXnNodePluginIf * TXnUiEnginePluginIf::FindNodeByIdL(class TDesC8 const &, class TDesC8 const &)
+	?MakeInterfaceL@CXnComponent@@UAEPAVMXnComponentInterface@XnComponentInterface@@ABVTDesC8@@@Z @ 187 NONAME ; class XnComponentInterface::MXnComponentInterface * CXnComponent::MakeInterfaceL(class TDesC8 const &)
+	?EnableRenderUi@CXnUiEngineImpl@@CAXPAX@Z @ 188 NONAME ; void CXnUiEngineImpl::EnableRenderUi(void *)
+	?IsMenuDisplaying@TXnUiEnginePluginIf@@QAEHXZ @ 189 NONAME ; int TXnUiEnginePluginIf::IsMenuDisplaying(void)
+	?IsMenuDisplaying@TXnUiEngineAppIf@@QAEHXZ @ 190 NONAME ; int TXnUiEngineAppIf::IsMenuDisplaying(void)
+	?NewL@CXnProperty@@SAPAV1@PAVCXnDomProperty@@@Z @ 191 NONAME ; class CXnProperty * CXnProperty::NewL(class CXnDomProperty *)
+	?ConstructL@CXnComponentNodeImpl@@IAEXPAVCXnType@@@Z @ 192 NONAME ; void CXnComponentNodeImpl::ConstructL(class CXnType *)
+	?ChildrenL@CXnNodeAppIf@@QAE?AV?$RPointerArray@VCXnNodeAppIf@@@@XZ @ 193 NONAME ; class RPointerArray<class CXnNodeAppIf> CXnNodeAppIf::ChildrenL(void)
+	?ConvertHslToRgb@CXnUtils@@SA?AVTRgb@@HHH@Z @ 194 NONAME ; class TRgb CXnUtils::ConvertHslToRgb(int, int, int)
+	?LoadBitmap@CXnControlAdapter@@QAEPAVCFbsBitmap@@ABVTDesC16@@@Z @ 195 NONAME ; class CFbsBitmap * CXnControlAdapter::LoadBitmap(class TDesC16 const &)
+	??0MXnComponentFactory@@IAE@XZ @ 196 NONAME ; MXnComponentFactory::MXnComponentFactory(void)
+	?SetComponent@CXnViewsNodeImpl@@QAEXPAVCXnComponent@@@Z @ 197 NONAME ; void CXnViewsNodeImpl::SetComponent(class CXnComponent *)
+	?BorderRect@CXnNodePluginIf@@QAE?AVTRect@@XZ @ 198 NONAME ; class TRect CXnNodePluginIf::BorderRect(void)
+	?CreateDocumentL@CXnApplication@@MAEPAVCApaDocument@@XZ @ 199 NONAME ; class CApaDocument * CXnApplication::CreateDocumentL(void)
+	?HandleUiReadyEventL@CXnAppUiAdapter@@UAEXXZ @ 200 NONAME ; void CXnAppUiAdapter::HandleUiReadyEventL(void)
+	?CreateFontL@CXnUtils@@SAXABVTDesC16@@HVTFontStyle@@AAPAVCFont@@AAH@Z @ 201 NONAME ; void CXnUtils::CreateFontL(class TDesC16 const &, int, class TFontStyle, class CFont * &, int &)
+	?GetPluginNodeArrayL@TXnUiEngineAppIf@@QAEHAAV?$RPointerArray@VCXnNodeAppIf@@@@@Z @ 202 NONAME ; int TXnUiEngineAppIf::GetPluginNodeArrayL(class RPointerArray<class CXnNodeAppIf> &)
+	?MakeXnControlAdapterL@MXnComponentFactory@@EAEPAVCXnControlAdapter@@AAVCXnNodePluginIf@@PAV2@@Z @ 203 NONAME ; class CXnControlAdapter * MXnComponentFactory::MakeXnControlAdapterL(class CXnNodePluginIf &, class CXnControlAdapter *)
+	?IsDrawingAllowed@CXnNodePluginIf@@QBEHXZ @ 204 NONAME ; int CXnNodePluginIf::IsDrawingAllowed(void) const
+	?MakeInterfaceL@CXnNodeAppIf@@QAEPAVMXnComponentInterface@XnComponentInterface@@ABVTDesC8@@@Z @ 205 NONAME ; class XnComponentInterface::MXnComponentInterface * CXnNodeAppIf::MakeInterfaceL(class TDesC8 const &)
+	?VerticalTwipValueL@TXnUiEnginePluginIf@@QAEHPAVCXnProperty@@H@Z @ 206 NONAME ; int TXnUiEnginePluginIf::VerticalTwipValueL(class CXnProperty *, int)
+	?Component@CXnControlAdapter@@QAEPAVCXnComponent@@XZ @ 207 NONAME ; class CXnComponent * CXnControlAdapter::Component(void)
+	?FloatValueL@CXnProperty@@QAENXZ @ 208 NONAME ; double CXnProperty::FloatValueL(void)
+	?SetUiEngine@TXnUiEngineAppIf@@QAEXPAVCXnUiEngine@@@Z @ 209 NONAME ; void TXnUiEngineAppIf::SetUiEngine(class CXnUiEngine *)
+	?FindNodeByIdL@TXnUiEngineAppIf@@QAEPAVCXnNodeAppIf@@ABVTDesC16@@0@Z @ 210 NONAME ; class CXnNodeAppIf * TXnUiEngineAppIf::FindNodeByIdL(class TDesC16 const &, class TDesC16 const &)
+	?IsEditMode@TXnUiEngineAppIf@@QAEHXZ @ 211 NONAME ; int TXnUiEngineAppIf::IsEditMode(void)
+	?ResolveSkinItemIDL@CXnUtils@@SAHABVTDesC16@@AAVTAknsItemID@@AAH@Z @ 212 NONAME ; int CXnUtils::ResolveSkinItemIDL(class TDesC16 const &, class TAknsItemID &, int &)
+	?EnablePartialTouchInput@TXnUiEnginePluginIf@@QAEXAAVCXnNodePluginIf@@H@Z @ 213 NONAME ; void TXnUiEnginePluginIf::EnablePartialTouchInput(class CXnNodePluginIf &, int)
+	?RootNodeL@TXnUiEnginePluginIf@@QAEAAVCXnNodePluginIf@@XZ @ 214 NONAME ; class CXnNodePluginIf & TXnUiEnginePluginIf::RootNodeL(void)
+	?CreateAppUiL@CXnDocument@@UAEPAVCEikAppUi@@XZ @ 215 NONAME ; class CEikAppUi * CXnDocument::CreateAppUiL(void)
+	?PathL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 216 NONAME ; class CXnProperty * CXnNodePluginIf::PathL(void)
+	?NewL@CXnProperty@@SAPAV1@ABVTDesC8@@NW4TPrimitiveValueType@CXnDomPropertyValue@@AAVCXnDomStringPool@@@Z @ 217 NONAME ; class CXnProperty * CXnProperty::NewL(class TDesC8 const &, double, enum CXnDomPropertyValue::TPrimitiveValueType, class CXnDomStringPool &)
+	?MaskPathL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 218 NONAME ; class CXnProperty * CXnNodePluginIf::MaskPathL(void)
+	?AppDllUid@CXnApplication@@MBE?AVTUid@@XZ @ 219 NONAME ; class TUid CXnApplication::AppDllUid(void) const
+	?DoExitPowerSaveModeL@CXnControlAdapter@@UAEXW4TModeEvent@1@@Z @ 220 NONAME ; void CXnControlAdapter::DoExitPowerSaveModeL(enum CXnControlAdapter::TModeEvent)
+	?LabelL@CXnNodePluginIf@@QAEPAVCXnProperty@@XZ @ 221 NONAME ; class CXnProperty * CXnNodePluginIf::LabelL(void)
+	?Component@CXnViewsNodeImpl@@QAEPAVCXnComponent@@XZ @ 222 NONAME ; class CXnComponent * CXnViewsNodeImpl::Component(void)
+	?GetRgbValue@CXnUtils@@SAHAAVTRgb@@ABVTDesC8@@@Z @ 223 NONAME ; int CXnUtils::GetRgbValue(class TRgb &, class TDesC8 const &)
+	?StringValue@CXnProperty@@QAEABVTDesC8@@XZ @ 224 NONAME ; class TDesC8 const & CXnProperty::StringValue(void)
+	?SetVisible@CXnControlAdapter@@QAEXH@Z @ 225 NONAME ; void CXnControlAdapter::SetVisible(int)
+	?Node@CXnComponent@@QAEPAVCXnNodePluginIf@@XZ @ 226 NONAME ; class CXnNodePluginIf * CXnComponent::Node(void)
 
--- a/idlehomescreen/xmluirendering/uiengine/eabi/xn3layoutengineu.def	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/eabi/xn3layoutengineu.def	Tue May 11 16:02:39 2010 +0300
@@ -57,223 +57,224 @@
 	_ZN15CXnAppUiAdapter10ConstructLEv @ 56 NONAME
 	_ZN15CXnAppUiAdapter11RemoveViewLER8CAknView @ 57 NONAME
 	_ZN15CXnAppUiAdapter12HandleEventLERK7TDesC16R12CXnNodeAppIf @ 58 NONAME
-	_ZN15CXnAppUiAdapter13LoadPublisherER12CXnNodeAppIfi @ 59 NONAME
+	_ZN15CXnAppUiAdapter13LoadPublisherERK18TAiFwPublisherInfo @ 59 NONAME
 	_ZN15CXnAppUiAdapter13PrepareToExitEv @ 60 NONAME
-	_ZN15CXnAppUiAdapter15ProcessMessageLE4TUidRK6TDesC8 @ 61 NONAME
-	_ZN15CXnAppUiAdapter16DestroyPublisherER12CXnNodeAppIfi @ 62 NONAME
-	_ZN15CXnAppUiAdapter16DynInitMenuItemLERK7TDesC16P13RPointerArrayI12CXnNodeAppIfE @ 63 NONAME
-	_ZN15CXnAppUiAdapter18HandleXuikonEventLER12CXnNodeAppIfS1_R10CXnDomNodeS3_ @ 64 NONAME
-	_ZN15CXnAppUiAdapter19HandleUiReadyEventLEv @ 65 NONAME
-	_ZN15CXnAppUiAdapter20HandleEnterEditModeLEi @ 66 NONAME
-	_ZN15CXnAppUiAdapter21HandleResourceChangeLEi @ 67 NONAME
-	_ZN15CXnAppUiAdapter9UiEngineLEv @ 68 NONAME
-	_ZN15CXnAppUiAdapterC1E4TUid @ 69 NONAME
-	_ZN15CXnAppUiAdapterC2E4TUid @ 70 NONAME
-	_ZN15CXnAppUiAdapterD0Ev @ 71 NONAME
-	_ZN15CXnAppUiAdapterD1Ev @ 72 NONAME
-	_ZN15CXnAppUiAdapterD2Ev @ 73 NONAME
-	_ZN15CXnNodePluginIf10BorderRectEv @ 74 NONAME
-	_ZN15CXnNodePluginIf10MarginRectEv @ 75 NONAME
-	_ZN15CXnNodePluginIf10SetPCDataLERK6TDesC8 @ 76 NONAME
-	_ZN15CXnNodePluginIf11PaddingRectEv @ 77 NONAME
-	_ZN15CXnNodePluginIf11UnsetStateLERK6TDesC8 @ 78 NONAME
-	_ZN15CXnNodePluginIf11VisibilityLEv @ 79 NONAME
-	_ZN15CXnNodePluginIf12SetPropertyLEP11CXnProperty @ 80 NONAME
-	_ZN15CXnNodePluginIf12ViewNodeImplEv @ 81 NONAME
-	_ZN15CXnNodePluginIf13SetBorderRectERK5TRect @ 82 NONAME
-	_ZN15CXnNodePluginIf13SetMarginRectERK5TRect @ 83 NONAME
-	_ZN15CXnNodePluginIf14IsFocusedStateEv @ 84 NONAME
-	_ZN15CXnNodePluginIf14MakeInterfaceLERK6TDesC8 @ 85 NONAME
-	_ZN15CXnNodePluginIf14SetPaddingRectERK5TRect @ 86 NONAME
-	_ZN15CXnNodePluginIf16SetHandleTooltipEi @ 87 NONAME
-	_ZN15CXnNodePluginIf16SetLayoutCapableEi @ 88 NONAME
-	_ZN15CXnNodePluginIf17ComponentNodeImplEv @ 89 NONAME
-	_ZN15CXnNodePluginIf19ReportTriggerEventLERK6TDesC8S2_S2_ @ 90 NONAME
-	_ZN15CXnNodePluginIf31SetPropertyWithoutNotificationLEP11CXnProperty @ 91 NONAME
-	_ZN15CXnNodePluginIf3IdLEv @ 92 NONAME
-	_ZN15CXnNodePluginIf4RectEv @ 93 NONAME
-	_ZN15CXnNodePluginIf4TypeEv @ 94 NONAME
-	_ZN15CXnNodePluginIf5PathLEv @ 95 NONAME
-	_ZN15CXnNodePluginIf6AppIfLEv @ 96 NONAME
-	_ZN15CXnNodePluginIf6LabelLEv @ 97 NONAME
-	_ZN15CXnNodePluginIf7SetRectERK5TRect @ 98 NONAME
-	_ZN15CXnNodePluginIf8DisplayLEv @ 99 NONAME
-	_ZN15CXnNodePluginIf9AddChildLEPS_ @ 100 NONAME
-	_ZN15CXnNodePluginIf9ChildrenLEv @ 101 NONAME
-	_ZN15CXnNodePluginIf9MaskPathLEv @ 102 NONAME
-	_ZN15CXnNodePluginIf9NamespaceEv @ 103 NONAME
-	_ZN15CXnNodePluginIf9SetDirtyLEv @ 104 NONAME
-	_ZN15CXnNodePluginIf9SetStateLERK6TDesC8 @ 105 NONAME
-	_ZN15CXnNodePluginIf9UiEngineLEv @ 106 NONAME
-	_ZN15CXnUiEngineImpl14EnableRenderUiEPv @ 107 NONAME
-	_ZN16CXnViewsNodeImpl10ConstructLEP7CXnType @ 108 NONAME
-	_ZN16CXnViewsNodeImpl12SetComponentEP12CXnComponent @ 109 NONAME
-	_ZN16CXnViewsNodeImpl4NewLEP7CXnType @ 110 NONAME
-	_ZN16CXnViewsNodeImpl9ComponentEv @ 111 NONAME
-	_ZN16CXnViewsNodeImplC1Ev @ 112 NONAME
-	_ZN16CXnViewsNodeImplC2Ev @ 113 NONAME
-	_ZN16CXnViewsNodeImplD0Ev @ 114 NONAME
-	_ZN16CXnViewsNodeImplD1Ev @ 115 NONAME
-	_ZN16CXnViewsNodeImplD2Ev @ 116 NONAME
-	_ZN16MXnNodePredicate5MatchER7CXnNode @ 117 NONAME
-	_ZN16MXnNodePredicateC1Ev @ 118 NONAME
-	_ZN16MXnNodePredicateC2Ev @ 119 NONAME
-	_ZN16MXnNodePredicateD0Ev @ 120 NONAME
-	_ZN16MXnNodePredicateD1Ev @ 121 NONAME
-	_ZN16MXnNodePredicateD2Ev @ 122 NONAME
-	_ZN16TXnUiEngineAppIf10ActiveViewEv @ 123 NONAME
-	_ZN16TXnUiEngineAppIf10IsEditModeEv @ 124 NONAME
-	_ZN16TXnUiEngineAppIf10StringPoolEv @ 125 NONAME
-	_ZN16TXnUiEngineAppIf11FocusedNodeEv @ 126 NONAME
-	_ZN16TXnUiEngineAppIf11SetUiEngineEP11CXnUiEngine @ 127 NONAME
-	_ZN16TXnUiEngineAppIf12RefreshMenuLEv @ 128 NONAME
-	_ZN16TXnUiEngineAppIf13FindNodeByIdLERK6TDesC8S2_ @ 129 NONAME
-	_ZN16TXnUiEngineAppIf13FindNodeByIdLERK7TDesC16S2_ @ 130 NONAME
-	_ZN16TXnUiEngineAppIf16FindNodeByClassLERK6TDesC8S2_ @ 131 NONAME
-	_ZN16TXnUiEngineAppIf16FindNodeByClassLERK7TDesC16S2_ @ 132 NONAME
-	_ZN16TXnUiEngineAppIf16GetThemeResourceERK7TDesC16R5RFile @ 133 NONAME
-	_ZN16TXnUiEngineAppIf16IsMenuDisplayingEv @ 134 NONAME
-	_ZN16TXnUiEngineAppIf19GetPluginNodeArrayLER13RPointerArrayI12CXnNodeAppIfE @ 135 NONAME
-	_ZN16TXnUiEngineAppIf23FindContentSourceNodesLERK6TDesC8 @ 136 NONAME
-	_ZN16TXnUiEngineAppIf9RenderUILEP12CXnNodeAppIf @ 137 NONAME
-	_ZN16TXnUiEngineAppIf9RootNodeLEv @ 138 NONAME
-	_ZN17CXnControlAdapter10ConstructLER15CXnNodePluginIf @ 139 NONAME
-	_ZN17CXnControlAdapter10LoadBitmapERK7TDesC16 @ 140 NONAME
-	_ZN17CXnControlAdapter10SetVisibleEi @ 141 NONAME
-	_ZN17CXnControlAdapter11SizeChangedEv @ 142 NONAME
-	_ZN17CXnControlAdapter11SkinChangedEv @ 143 NONAME
-	_ZN17CXnControlAdapter12FocusChangedE8TDrawNow @ 144 NONAME
-	_ZN17CXnControlAdapter12SetComponentEP12CXnComponent @ 145 NONAME
-	_ZN17CXnControlAdapter14ContentBitmapsERP10CFbsBitmapS2_ @ 146 NONAME
-	_ZN17CXnControlAdapter14OfferKeyEventLERK9TKeyEvent10TEventCode @ 147 NONAME
-	_ZN17CXnControlAdapter15SetLocalUiZoomLE10TAknUiZoom @ 148 NONAME
-	_ZN17CXnControlAdapter16GetBitmapAndMaskERK7TDesC16S2_RP10CFbsBitmapS5_ @ 149 NONAME
-	_ZN17CXnControlAdapter17SetContentBitmapsEP10CFbsBitmapS1_ @ 150 NONAME
-	_ZN17CXnControlAdapter17SetContentBitmapsERK7TDesC16S2_ @ 151 NONAME
-	_ZN17CXnControlAdapter18ExitPowerSaveModeLENS_10TModeEventE @ 152 NONAME
-	_ZN17CXnControlAdapter18ResetStylusCounterEv @ 153 NONAME
-	_ZN17CXnControlAdapter19EnterPowerSaveModeLENS_10TModeEventE @ 154 NONAME
-	_ZN17CXnControlAdapter19HandleControlEventLEP11CCoeControlN19MCoeControlObserver9TCoeEventE @ 155 NONAME
-	_ZN17CXnControlAdapter19HandleLongTapEventLERK6TPointS2_ @ 156 NONAME
-	_ZN17CXnControlAdapter19HandlePointerEventLERK13TPointerEvent @ 157 NONAME
-	_ZN17CXnControlAdapter20DoExitPowerSaveModeLENS_10TModeEventE @ 158 NONAME
-	_ZN17CXnControlAdapter21DoEnterPowerSaveModeLENS_10TModeEventE @ 159 NONAME
-	_ZN17CXnControlAdapter21HandlePropertyChangeLEP11CXnProperty @ 160 NONAME
-	_ZN17CXnControlAdapter22EnableLongTapAnimationEi @ 161 NONAME
-	_ZN17CXnControlAdapter23DoHandlePropertyChangeLEP11CXnProperty @ 162 NONAME
-	_ZN17CXnControlAdapter23MeasureAdaptiveContentLERK5TSize @ 163 NONAME
-	_ZN17CXnControlAdapter26HandleScreenDeviceChangedLEv @ 164 NONAME
-	_ZN17CXnControlAdapter4NewLER15CXnNodePluginIf @ 165 NONAME
-	_ZN17CXnControlAdapter8SetBlankEi @ 166 NONAME
-	_ZN17CXnControlAdapter8SetDataLERK6TDesC8RK7TDesC16i @ 167 NONAME
-	_ZN17CXnControlAdapter9ComponentEv @ 168 NONAME
-	_ZN17CXnControlAdapterC1Ev @ 169 NONAME
-	_ZN17CXnControlAdapterC2Ev @ 170 NONAME
-	_ZN17CXnControlAdapterD0Ev @ 171 NONAME
-	_ZN17CXnControlAdapterD1Ev @ 172 NONAME
-	_ZN17CXnControlAdapterD2Ev @ 173 NONAME
-	_ZN19MXnComponentFactory16MakeXnComponentLER15CXnNodePluginIfRP12CXnComponent @ 174 NONAME
-	_ZN19MXnComponentFactory18CreateXnComponentLER15CXnNodePluginIfRP12CXnComponent @ 175 NONAME
-	_ZN19MXnComponentFactory21MakeXnControlAdapterLER15CXnNodePluginIfP17CXnControlAdapter @ 176 NONAME
-	_ZN19MXnComponentFactory26DoesNodeNeedComponentImplLERK6TDesC8 @ 177 NONAME
-	_ZN19MXnComponentFactoryC2Ev @ 178 NONAME
-	_ZN19MXnComponentFactoryD0Ev @ 179 NONAME
-	_ZN19MXnComponentFactoryD1Ev @ 180 NONAME
-	_ZN19MXnComponentFactoryD2Ev @ 181 NONAME
-	_ZN19TXnUiEnginePluginIf10StringPoolEv @ 182 NONAME
-	_ZN19TXnUiEnginePluginIf11PluginNodeLEP15CXnNodePluginIf @ 183 NONAME
-	_ZN19TXnUiEnginePluginIf12FocusedNodeLEv @ 184 NONAME
-	_ZN19TXnUiEnginePluginIf13AddDirtyNodeLER15CXnNodePluginIf @ 185 NONAME
-	_ZN19TXnUiEnginePluginIf13FindNodeByIdLERK6TDesC8S2_ @ 186 NONAME
-	_ZN19TXnUiEnginePluginIf13FindNodeByIdLERK7TDesC16S2_ @ 187 NONAME
-	_ZN19TXnUiEnginePluginIf14SetFocusedNodeEP15CXnNodePluginIf @ 188 NONAME
-	_ZN19TXnUiEnginePluginIf16FindNodeByClassLERK7TDesC16 @ 189 NONAME
-	_ZN19TXnUiEnginePluginIf16IsMenuDisplayingEv @ 190 NONAME
-	_ZN19TXnUiEnginePluginIf16ScreenDeviceSizeEv @ 191 NONAME
-	_ZN19TXnUiEnginePluginIf17DisableRenderUiLCEv @ 192 NONAME
-	_ZN19TXnUiEnginePluginIf18IsDialogDisplayingEv @ 193 NONAME
-	_ZN19TXnUiEnginePluginIf18IsTextEditorActiveEv @ 194 NONAME
-	_ZN19TXnUiEnginePluginIf18VerticalTwipValueLEP11CXnPropertyi @ 195 NONAME
-	_ZN19TXnUiEnginePluginIf19VerticalPixelValueLEP11CXnPropertyi @ 196 NONAME
-	_ZN19TXnUiEnginePluginIf20HorizontalTwipValueLEP11CXnPropertyi @ 197 NONAME
-	_ZN19TXnUiEnginePluginIf21HorizontalPixelValueLEP11CXnPropertyi @ 198 NONAME
-	_ZN19TXnUiEnginePluginIf23EnablePartialTouchInputER15CXnNodePluginIfi @ 199 NONAME
-	_ZN19TXnUiEnginePluginIf8EditModeEv @ 200 NONAME
-	_ZN19TXnUiEnginePluginIf9LayoutUILEP15CXnNodePluginIf @ 201 NONAME
-	_ZN19TXnUiEnginePluginIf9RenderUILEP15CXnNodePluginIf @ 202 NONAME
-	_ZN19TXnUiEnginePluginIf9ResourcesEv @ 203 NONAME
-	_ZN19TXnUiEnginePluginIf9RootNodeLEv @ 204 NONAME
-	_ZN20CXnComponentNodeImpl10ConstructLEP7CXnType @ 205 NONAME
-	_ZN20CXnComponentNodeImpl12SetComponentEP12CXnComponent @ 206 NONAME
-	_ZN20CXnComponentNodeImpl14MakeInterfaceLERK6TDesC8 @ 207 NONAME
-	_ZN20CXnComponentNodeImpl25SetComponentNeedsCreationEi @ 208 NONAME
-	_ZN20CXnComponentNodeImpl4NewLEP7CXnType @ 209 NONAME
-	_ZN20CXnComponentNodeImpl9ComponentEv @ 210 NONAME
-	_ZN20CXnComponentNodeImplC1Ev @ 211 NONAME
-	_ZN20CXnComponentNodeImplC2Ev @ 212 NONAME
-	_ZN20CXnComponentNodeImplD0Ev @ 213 NONAME
-	_ZN20CXnComponentNodeImplD1Ev @ 214 NONAME
-	_ZN20CXnComponentNodeImplD2Ev @ 215 NONAME
-	_ZN8CXnUtils11CreateFontLER15CXnNodePluginIfRP5CFontRi @ 216 NONAME
-	_ZN8CXnUtils11CreateFontLERK7TDesC16i10TFontStyleRP5CFontRi @ 217 NONAME
-	_ZN8CXnUtils11GetRgbValueER4TRgbRK6TDesC8 @ 218 NONAME
-	_ZN8CXnUtils11StripQuotesERP7HBufC16 @ 219 NONAME
-	_ZN8CXnUtils12FindResourceER12CArrayPtrSegI11CXnResourceERK7TDesC16Ri @ 220 NONAME
-	_ZN8CXnUtils12ScaleBitmapLERK5TRectP10CFbsBitmapS4_ @ 221 NONAME
-	_ZN8CXnUtils13TextAlignmentER15CXnNodePluginIf @ 222 NONAME
-	_ZN8CXnUtils15ConvertHslToRgbEiii @ 223 NONAME
-	_ZN8CXnUtils18CollapseWhiteSpaceER15CXnNodePluginIfR6TDes16 @ 224 NONAME
-	_ZN8CXnUtils18ResolveSkinItemIDLERK7TDesC16R11TAknsItemIDRi @ 225 NONAME
-	_ZN8CXnUtils20HandlePowerSaveModeLEP7CXnNodeii @ 226 NONAME
-	_ZNK11CXnProperty7EqualsLERS_ @ 227 NONAME
-	_ZNK12CXnNodeAppIf12GetPropertyLER11CXnProperty @ 228 NONAME
-	_ZNK12CXnNodeAppIf12GetPropertyLERK6TDesC8 @ 229 NONAME
-	_ZNK12CXnNodeAppIf19InternalDomNodeTypeEv @ 230 NONAME
-	_ZNK12CXnNodeAppIf7ParentLEv @ 231 NONAME
-	_ZNK12CXnNodeAppIf9GetPCDataEv @ 232 NONAME
-	_ZNK14CXnApplication9AppDllUidEv @ 233 NONAME
-	_ZNK15CXnAppUiAdapter4ViewEv @ 234 NONAME
-	_ZNK15CXnNodePluginIf12GetPropertyLER11CXnProperty @ 235 NONAME
-	_ZNK15CXnNodePluginIf12GetPropertyLERK6TDesC8 @ 236 NONAME
-	_ZNK15CXnNodePluginIf7ControlEv @ 237 NONAME
-	_ZNK15CXnNodePluginIf7ParentLEv @ 238 NONAME
-	_ZNK15CXnNodePluginIf9GetPCDataEv @ 239 NONAME
-	_ZNK16TXnUiEngineAppIf14WidgetsVisibleEv @ 240 NONAME
-	_ZNK17CXnControlAdapter15LongTapDetectorEv @ 241 NONAME
-	_ZNK17CXnControlAdapter16ComponentControlEi @ 242 NONAME
-	_ZNK17CXnControlAdapter16DrawContentImageEv @ 243 NONAME
-	_ZNK17CXnControlAdapter16IsDrawingAllowedEv @ 244 NONAME
-	_ZNK17CXnControlAdapter22CountComponentControlsEv @ 245 NONAME
-	_ZNK17CXnControlAdapter4DrawERK5TRect @ 246 NONAME
-	_ZNK17CXnControlAdapter4DrawERK5TRectR9CWindowGc @ 247 NONAME
-	_ZNK19TXnUiEnginePluginIf14WidgetsVisibleEv @ 248 NONAME
-	_ZNK20CXnComponentNodeImpl25DoesComponentNeedCreationEv @ 249 NONAME
-	_ZTI11CXnDocument @ 250 NONAME
-	_ZTI11CXnProperty @ 251 NONAME
-	_ZTI12CXnComponent @ 252 NONAME
-	_ZTI14CXnApplication @ 253 NONAME
-	_ZTI15CXnAppUiAdapter @ 254 NONAME
-	_ZTI16CXnViewsNodeImpl @ 255 NONAME
-	_ZTI16MXnNodePredicate @ 256 NONAME
-	_ZTI17CXnControlAdapter @ 257 NONAME
-	_ZTI18CXnListQueryDialog @ 258 NONAME
-	_ZTI19MXnComponentFactory @ 259 NONAME
-	_ZTI20CXnComponentNodeImpl @ 260 NONAME
-	_ZTI27CXnNodeBreadthFirstIteratorI7CXnNodeE @ 261 NONAME
-	_ZTIN21CXnControlAdapterImpl13TIconProviderE @ 262 NONAME
-	_ZTV11CXnDocument @ 263 NONAME
-	_ZTV11CXnProperty @ 264 NONAME
-	_ZTV12CXnComponent @ 265 NONAME
-	_ZTV14CXnApplication @ 266 NONAME
-	_ZTV15CXnAppUiAdapter @ 267 NONAME
-	_ZTV16CXnViewsNodeImpl @ 268 NONAME
-	_ZTV16MXnNodePredicate @ 269 NONAME
-	_ZTV17CXnControlAdapter @ 270 NONAME
-	_ZTV18CXnListQueryDialog @ 271 NONAME
-	_ZTV19MXnComponentFactory @ 272 NONAME
-	_ZTV20CXnComponentNodeImpl @ 273 NONAME
-	_ZTV27CXnNodeBreadthFirstIteratorI7CXnNodeE @ 274 NONAME
-	_ZTVN21CXnControlAdapterImpl13TIconProviderE @ 275 NONAME
-	_ZThn52_N17CXnControlAdapter19HandleControlEventLEP11CCoeControlN19MCoeControlObserver9TCoeEventE @ 276 NONAME
-	_ZThn60_N17CXnControlAdapter19HandleLongTapEventLERK6TPointS2_ @ 277 NONAME
+	_ZN15CXnAppUiAdapter13PublisherInfoER12CXnNodeAppIfR16THsPublisherInfo @ 61 NONAME
+	_ZN15CXnAppUiAdapter15ProcessMessageLE4TUidRK6TDesC8 @ 62 NONAME
+	_ZN15CXnAppUiAdapter16DestroyPublisherERK18TAiFwPublisherInfo @ 63 NONAME
+	_ZN15CXnAppUiAdapter16DynInitMenuItemLERK7TDesC16P13RPointerArrayI12CXnNodeAppIfE @ 64 NONAME
+	_ZN15CXnAppUiAdapter18HandleXuikonEventLER12CXnNodeAppIfS1_R10CXnDomNodeS3_ @ 65 NONAME
+	_ZN15CXnAppUiAdapter19HandleUiReadyEventLEv @ 66 NONAME
+	_ZN15CXnAppUiAdapter20HandleEnterEditModeLEi @ 67 NONAME
+	_ZN15CXnAppUiAdapter21HandleResourceChangeLEi @ 68 NONAME
+	_ZN15CXnAppUiAdapter9UiEngineLEv @ 69 NONAME
+	_ZN15CXnAppUiAdapterC1E4TUid @ 70 NONAME
+	_ZN15CXnAppUiAdapterC2E4TUid @ 71 NONAME
+	_ZN15CXnAppUiAdapterD0Ev @ 72 NONAME
+	_ZN15CXnAppUiAdapterD1Ev @ 73 NONAME
+	_ZN15CXnAppUiAdapterD2Ev @ 74 NONAME
+	_ZN15CXnNodePluginIf10BorderRectEv @ 75 NONAME
+	_ZN15CXnNodePluginIf10MarginRectEv @ 76 NONAME
+	_ZN15CXnNodePluginIf10SetPCDataLERK6TDesC8 @ 77 NONAME
+	_ZN15CXnNodePluginIf11PaddingRectEv @ 78 NONAME
+	_ZN15CXnNodePluginIf11UnsetStateLERK6TDesC8 @ 79 NONAME
+	_ZN15CXnNodePluginIf11VisibilityLEv @ 80 NONAME
+	_ZN15CXnNodePluginIf12SetPropertyLEP11CXnProperty @ 81 NONAME
+	_ZN15CXnNodePluginIf12ViewNodeImplEv @ 82 NONAME
+	_ZN15CXnNodePluginIf13SetBorderRectERK5TRect @ 83 NONAME
+	_ZN15CXnNodePluginIf13SetMarginRectERK5TRect @ 84 NONAME
+	_ZN15CXnNodePluginIf14IsFocusedStateEv @ 85 NONAME
+	_ZN15CXnNodePluginIf14MakeInterfaceLERK6TDesC8 @ 86 NONAME
+	_ZN15CXnNodePluginIf14SetPaddingRectERK5TRect @ 87 NONAME
+	_ZN15CXnNodePluginIf16SetHandleTooltipEi @ 88 NONAME
+	_ZN15CXnNodePluginIf16SetLayoutCapableEi @ 89 NONAME
+	_ZN15CXnNodePluginIf17ComponentNodeImplEv @ 90 NONAME
+	_ZN15CXnNodePluginIf19ReportTriggerEventLERK6TDesC8S2_S2_ @ 91 NONAME
+	_ZN15CXnNodePluginIf31SetPropertyWithoutNotificationLEP11CXnProperty @ 92 NONAME
+	_ZN15CXnNodePluginIf3IdLEv @ 93 NONAME
+	_ZN15CXnNodePluginIf4RectEv @ 94 NONAME
+	_ZN15CXnNodePluginIf4TypeEv @ 95 NONAME
+	_ZN15CXnNodePluginIf5PathLEv @ 96 NONAME
+	_ZN15CXnNodePluginIf6AppIfLEv @ 97 NONAME
+	_ZN15CXnNodePluginIf6LabelLEv @ 98 NONAME
+	_ZN15CXnNodePluginIf7SetRectERK5TRect @ 99 NONAME
+	_ZN15CXnNodePluginIf8DisplayLEv @ 100 NONAME
+	_ZN15CXnNodePluginIf9AddChildLEPS_ @ 101 NONAME
+	_ZN15CXnNodePluginIf9ChildrenLEv @ 102 NONAME
+	_ZN15CXnNodePluginIf9MaskPathLEv @ 103 NONAME
+	_ZN15CXnNodePluginIf9NamespaceEv @ 104 NONAME
+	_ZN15CXnNodePluginIf9SetDirtyLEv @ 105 NONAME
+	_ZN15CXnNodePluginIf9SetStateLERK6TDesC8 @ 106 NONAME
+	_ZN15CXnNodePluginIf9UiEngineLEv @ 107 NONAME
+	_ZN15CXnUiEngineImpl14EnableRenderUiEPv @ 108 NONAME
+	_ZN16CXnViewsNodeImpl10ConstructLEP7CXnType @ 109 NONAME
+	_ZN16CXnViewsNodeImpl12SetComponentEP12CXnComponent @ 110 NONAME
+	_ZN16CXnViewsNodeImpl4NewLEP7CXnType @ 111 NONAME
+	_ZN16CXnViewsNodeImpl9ComponentEv @ 112 NONAME
+	_ZN16CXnViewsNodeImplC1Ev @ 113 NONAME
+	_ZN16CXnViewsNodeImplC2Ev @ 114 NONAME
+	_ZN16CXnViewsNodeImplD0Ev @ 115 NONAME
+	_ZN16CXnViewsNodeImplD1Ev @ 116 NONAME
+	_ZN16CXnViewsNodeImplD2Ev @ 117 NONAME
+	_ZN16MXnNodePredicate5MatchER7CXnNode @ 118 NONAME
+	_ZN16MXnNodePredicateC1Ev @ 119 NONAME
+	_ZN16MXnNodePredicateC2Ev @ 120 NONAME
+	_ZN16MXnNodePredicateD0Ev @ 121 NONAME
+	_ZN16MXnNodePredicateD1Ev @ 122 NONAME
+	_ZN16MXnNodePredicateD2Ev @ 123 NONAME
+	_ZN16TXnUiEngineAppIf10ActiveViewEv @ 124 NONAME
+	_ZN16TXnUiEngineAppIf10IsEditModeEv @ 125 NONAME
+	_ZN16TXnUiEngineAppIf10StringPoolEv @ 126 NONAME
+	_ZN16TXnUiEngineAppIf11FocusedNodeEv @ 127 NONAME
+	_ZN16TXnUiEngineAppIf11SetUiEngineEP11CXnUiEngine @ 128 NONAME
+	_ZN16TXnUiEngineAppIf12RefreshMenuLEv @ 129 NONAME
+	_ZN16TXnUiEngineAppIf13FindNodeByIdLERK6TDesC8S2_ @ 130 NONAME
+	_ZN16TXnUiEngineAppIf13FindNodeByIdLERK7TDesC16S2_ @ 131 NONAME
+	_ZN16TXnUiEngineAppIf16FindNodeByClassLERK6TDesC8S2_ @ 132 NONAME
+	_ZN16TXnUiEngineAppIf16FindNodeByClassLERK7TDesC16S2_ @ 133 NONAME
+	_ZN16TXnUiEngineAppIf16GetThemeResourceERK7TDesC16R5RFile @ 134 NONAME
+	_ZN16TXnUiEngineAppIf16IsMenuDisplayingEv @ 135 NONAME
+	_ZN16TXnUiEngineAppIf19GetPluginNodeArrayLER13RPointerArrayI12CXnNodeAppIfE @ 136 NONAME
+	_ZN16TXnUiEngineAppIf23FindContentSourceNodesLERK6TDesC8 @ 137 NONAME
+	_ZN16TXnUiEngineAppIf9RenderUILEP12CXnNodeAppIf @ 138 NONAME
+	_ZN16TXnUiEngineAppIf9RootNodeLEv @ 139 NONAME
+	_ZN17CXnControlAdapter10ConstructLER15CXnNodePluginIf @ 140 NONAME
+	_ZN17CXnControlAdapter10LoadBitmapERK7TDesC16 @ 141 NONAME
+	_ZN17CXnControlAdapter10SetVisibleEi @ 142 NONAME
+	_ZN17CXnControlAdapter11SizeChangedEv @ 143 NONAME
+	_ZN17CXnControlAdapter11SkinChangedEv @ 144 NONAME
+	_ZN17CXnControlAdapter12FocusChangedE8TDrawNow @ 145 NONAME
+	_ZN17CXnControlAdapter12SetComponentEP12CXnComponent @ 146 NONAME
+	_ZN17CXnControlAdapter14ContentBitmapsERP10CFbsBitmapS2_ @ 147 NONAME
+	_ZN17CXnControlAdapter14OfferKeyEventLERK9TKeyEvent10TEventCode @ 148 NONAME
+	_ZN17CXnControlAdapter15SetLocalUiZoomLE10TAknUiZoom @ 149 NONAME
+	_ZN17CXnControlAdapter16GetBitmapAndMaskERK7TDesC16S2_RP10CFbsBitmapS5_ @ 150 NONAME
+	_ZN17CXnControlAdapter17SetContentBitmapsEP10CFbsBitmapS1_ @ 151 NONAME
+	_ZN17CXnControlAdapter17SetContentBitmapsERK7TDesC16S2_ @ 152 NONAME
+	_ZN17CXnControlAdapter18ExitPowerSaveModeLENS_10TModeEventE @ 153 NONAME
+	_ZN17CXnControlAdapter18ResetStylusCounterEv @ 154 NONAME
+	_ZN17CXnControlAdapter19EnterPowerSaveModeLENS_10TModeEventE @ 155 NONAME
+	_ZN17CXnControlAdapter19HandleControlEventLEP11CCoeControlN19MCoeControlObserver9TCoeEventE @ 156 NONAME
+	_ZN17CXnControlAdapter19HandleLongTapEventLERK6TPointS2_ @ 157 NONAME
+	_ZN17CXnControlAdapter19HandlePointerEventLERK13TPointerEvent @ 158 NONAME
+	_ZN17CXnControlAdapter20DoExitPowerSaveModeLENS_10TModeEventE @ 159 NONAME
+	_ZN17CXnControlAdapter21DoEnterPowerSaveModeLENS_10TModeEventE @ 160 NONAME
+	_ZN17CXnControlAdapter21HandlePropertyChangeLEP11CXnProperty @ 161 NONAME
+	_ZN17CXnControlAdapter22EnableLongTapAnimationEi @ 162 NONAME
+	_ZN17CXnControlAdapter23DoHandlePropertyChangeLEP11CXnProperty @ 163 NONAME
+	_ZN17CXnControlAdapter23MeasureAdaptiveContentLERK5TSize @ 164 NONAME
+	_ZN17CXnControlAdapter26HandleScreenDeviceChangedLEv @ 165 NONAME
+	_ZN17CXnControlAdapter4NewLER15CXnNodePluginIf @ 166 NONAME
+	_ZN17CXnControlAdapter8SetBlankEi @ 167 NONAME
+	_ZN17CXnControlAdapter8SetDataLERK6TDesC8RK7TDesC16i @ 168 NONAME
+	_ZN17CXnControlAdapter9ComponentEv @ 169 NONAME
+	_ZN17CXnControlAdapterC1Ev @ 170 NONAME
+	_ZN17CXnControlAdapterC2Ev @ 171 NONAME
+	_ZN17CXnControlAdapterD0Ev @ 172 NONAME
+	_ZN17CXnControlAdapterD1Ev @ 173 NONAME
+	_ZN17CXnControlAdapterD2Ev @ 174 NONAME
+	_ZN19MXnComponentFactory16MakeXnComponentLER15CXnNodePluginIfRP12CXnComponent @ 175 NONAME
+	_ZN19MXnComponentFactory18CreateXnComponentLER15CXnNodePluginIfRP12CXnComponent @ 176 NONAME
+	_ZN19MXnComponentFactory21MakeXnControlAdapterLER15CXnNodePluginIfP17CXnControlAdapter @ 177 NONAME
+	_ZN19MXnComponentFactory26DoesNodeNeedComponentImplLERK6TDesC8 @ 178 NONAME
+	_ZN19MXnComponentFactoryC2Ev @ 179 NONAME
+	_ZN19MXnComponentFactoryD0Ev @ 180 NONAME
+	_ZN19MXnComponentFactoryD1Ev @ 181 NONAME
+	_ZN19MXnComponentFactoryD2Ev @ 182 NONAME
+	_ZN19TXnUiEnginePluginIf10StringPoolEv @ 183 NONAME
+	_ZN19TXnUiEnginePluginIf11PluginNodeLEP15CXnNodePluginIf @ 184 NONAME
+	_ZN19TXnUiEnginePluginIf12FocusedNodeLEv @ 185 NONAME
+	_ZN19TXnUiEnginePluginIf13AddDirtyNodeLER15CXnNodePluginIf @ 186 NONAME
+	_ZN19TXnUiEnginePluginIf13FindNodeByIdLERK6TDesC8S2_ @ 187 NONAME
+	_ZN19TXnUiEnginePluginIf13FindNodeByIdLERK7TDesC16S2_ @ 188 NONAME
+	_ZN19TXnUiEnginePluginIf14SetFocusedNodeEP15CXnNodePluginIf @ 189 NONAME
+	_ZN19TXnUiEnginePluginIf16FindNodeByClassLERK7TDesC16 @ 190 NONAME
+	_ZN19TXnUiEnginePluginIf16IsMenuDisplayingEv @ 191 NONAME
+	_ZN19TXnUiEnginePluginIf16ScreenDeviceSizeEv @ 192 NONAME
+	_ZN19TXnUiEnginePluginIf17DisableRenderUiLCEv @ 193 NONAME
+	_ZN19TXnUiEnginePluginIf18IsDialogDisplayingEv @ 194 NONAME
+	_ZN19TXnUiEnginePluginIf18IsTextEditorActiveEv @ 195 NONAME
+	_ZN19TXnUiEnginePluginIf18VerticalTwipValueLEP11CXnPropertyi @ 196 NONAME
+	_ZN19TXnUiEnginePluginIf19VerticalPixelValueLEP11CXnPropertyi @ 197 NONAME
+	_ZN19TXnUiEnginePluginIf20HorizontalTwipValueLEP11CXnPropertyi @ 198 NONAME
+	_ZN19TXnUiEnginePluginIf21HorizontalPixelValueLEP11CXnPropertyi @ 199 NONAME
+	_ZN19TXnUiEnginePluginIf23EnablePartialTouchInputER15CXnNodePluginIfi @ 200 NONAME
+	_ZN19TXnUiEnginePluginIf8EditModeEv @ 201 NONAME
+	_ZN19TXnUiEnginePluginIf9LayoutUILEP15CXnNodePluginIf @ 202 NONAME
+	_ZN19TXnUiEnginePluginIf9RenderUILEP15CXnNodePluginIf @ 203 NONAME
+	_ZN19TXnUiEnginePluginIf9ResourcesEv @ 204 NONAME
+	_ZN19TXnUiEnginePluginIf9RootNodeLEv @ 205 NONAME
+	_ZN20CXnComponentNodeImpl10ConstructLEP7CXnType @ 206 NONAME
+	_ZN20CXnComponentNodeImpl12SetComponentEP12CXnComponent @ 207 NONAME
+	_ZN20CXnComponentNodeImpl14MakeInterfaceLERK6TDesC8 @ 208 NONAME
+	_ZN20CXnComponentNodeImpl25SetComponentNeedsCreationEi @ 209 NONAME
+	_ZN20CXnComponentNodeImpl4NewLEP7CXnType @ 210 NONAME
+	_ZN20CXnComponentNodeImpl9ComponentEv @ 211 NONAME
+	_ZN20CXnComponentNodeImplC1Ev @ 212 NONAME
+	_ZN20CXnComponentNodeImplC2Ev @ 213 NONAME
+	_ZN20CXnComponentNodeImplD0Ev @ 214 NONAME
+	_ZN20CXnComponentNodeImplD1Ev @ 215 NONAME
+	_ZN20CXnComponentNodeImplD2Ev @ 216 NONAME
+	_ZN8CXnUtils11CreateFontLER15CXnNodePluginIfRP5CFontRi @ 217 NONAME
+	_ZN8CXnUtils11CreateFontLERK7TDesC16i10TFontStyleRP5CFontRi @ 218 NONAME
+	_ZN8CXnUtils11GetRgbValueER4TRgbRK6TDesC8 @ 219 NONAME
+	_ZN8CXnUtils11StripQuotesERP7HBufC16 @ 220 NONAME
+	_ZN8CXnUtils12FindResourceER12CArrayPtrSegI11CXnResourceERK7TDesC16Ri @ 221 NONAME
+	_ZN8CXnUtils12ScaleBitmapLERK5TRectP10CFbsBitmapS4_ @ 222 NONAME
+	_ZN8CXnUtils13TextAlignmentER15CXnNodePluginIf @ 223 NONAME
+	_ZN8CXnUtils15ConvertHslToRgbEiii @ 224 NONAME
+	_ZN8CXnUtils18CollapseWhiteSpaceER15CXnNodePluginIfR6TDes16 @ 225 NONAME
+	_ZN8CXnUtils18ResolveSkinItemIDLERK7TDesC16R11TAknsItemIDRi @ 226 NONAME
+	_ZN8CXnUtils20HandlePowerSaveModeLEP7CXnNodeii @ 227 NONAME
+	_ZNK11CXnProperty7EqualsLERS_ @ 228 NONAME
+	_ZNK12CXnNodeAppIf12GetPropertyLER11CXnProperty @ 229 NONAME
+	_ZNK12CXnNodeAppIf12GetPropertyLERK6TDesC8 @ 230 NONAME
+	_ZNK12CXnNodeAppIf19InternalDomNodeTypeEv @ 231 NONAME
+	_ZNK12CXnNodeAppIf7ParentLEv @ 232 NONAME
+	_ZNK12CXnNodeAppIf9GetPCDataEv @ 233 NONAME
+	_ZNK14CXnApplication9AppDllUidEv @ 234 NONAME
+	_ZNK15CXnAppUiAdapter4ViewEv @ 235 NONAME
+	_ZNK15CXnNodePluginIf12GetPropertyLER11CXnProperty @ 236 NONAME
+	_ZNK15CXnNodePluginIf12GetPropertyLERK6TDesC8 @ 237 NONAME
+	_ZNK15CXnNodePluginIf7ControlEv @ 238 NONAME
+	_ZNK15CXnNodePluginIf7ParentLEv @ 239 NONAME
+	_ZNK15CXnNodePluginIf9GetPCDataEv @ 240 NONAME
+	_ZNK16TXnUiEngineAppIf14WidgetsVisibleEv @ 241 NONAME
+	_ZNK17CXnControlAdapter15LongTapDetectorEv @ 242 NONAME
+	_ZNK17CXnControlAdapter16ComponentControlEi @ 243 NONAME
+	_ZNK17CXnControlAdapter16DrawContentImageEv @ 244 NONAME
+	_ZNK17CXnControlAdapter16IsDrawingAllowedEv @ 245 NONAME
+	_ZNK17CXnControlAdapter22CountComponentControlsEv @ 246 NONAME
+	_ZNK17CXnControlAdapter4DrawERK5TRect @ 247 NONAME
+	_ZNK17CXnControlAdapter4DrawERK5TRectR9CWindowGc @ 248 NONAME
+	_ZNK19TXnUiEnginePluginIf14WidgetsVisibleEv @ 249 NONAME
+	_ZNK20CXnComponentNodeImpl25DoesComponentNeedCreationEv @ 250 NONAME
+	_ZTI11CXnDocument @ 251 NONAME
+	_ZTI11CXnProperty @ 252 NONAME
+	_ZTI12CXnComponent @ 253 NONAME
+	_ZTI14CXnApplication @ 254 NONAME
+	_ZTI15CXnAppUiAdapter @ 255 NONAME
+	_ZTI16CXnViewsNodeImpl @ 256 NONAME
+	_ZTI16MXnNodePredicate @ 257 NONAME
+	_ZTI17CXnControlAdapter @ 258 NONAME
+	_ZTI18CXnListQueryDialog @ 259 NONAME
+	_ZTI19MXnComponentFactory @ 260 NONAME
+	_ZTI20CXnComponentNodeImpl @ 261 NONAME
+	_ZTI27CXnNodeBreadthFirstIteratorI7CXnNodeE @ 262 NONAME
+	_ZTIN21CXnControlAdapterImpl13TIconProviderE @ 263 NONAME
+	_ZTV11CXnDocument @ 264 NONAME
+	_ZTV11CXnProperty @ 265 NONAME
+	_ZTV12CXnComponent @ 266 NONAME
+	_ZTV14CXnApplication @ 267 NONAME
+	_ZTV15CXnAppUiAdapter @ 268 NONAME
+	_ZTV16CXnViewsNodeImpl @ 269 NONAME
+	_ZTV16MXnNodePredicate @ 270 NONAME
+	_ZTV17CXnControlAdapter @ 271 NONAME
+	_ZTV18CXnListQueryDialog @ 272 NONAME
+	_ZTV19MXnComponentFactory @ 273 NONAME
+	_ZTV20CXnComponentNodeImpl @ 274 NONAME
+	_ZTV27CXnNodeBreadthFirstIteratorI7CXnNodeE @ 275 NONAME
+	_ZTVN21CXnControlAdapterImpl13TIconProviderE @ 276 NONAME
+	_ZThn52_N17CXnControlAdapter19HandleControlEventLEP11CCoeControlN19MCoeControlObserver9TCoeEventE @ 277 NONAME
+	_ZThn60_N17CXnControlAdapter19HandleLongTapEventLERK6TPointS2_ @ 278 NONAME
 
--- a/idlehomescreen/xmluirendering/uiengine/group/xnlayoutengine.mmp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/group/xnlayoutengine.mmp	Tue May 11 16:02:39 2010 +0300
@@ -83,6 +83,8 @@
 SOURCE    xnviewcontroladapter.cpp
 SOURCE    xnspbgcleaner.cpp
 SOURCE    xnwaitdialog.cpp
+SOURCE    xnpublisherdata.cpp
+SOURCE    xnitemactivator.cpp
 
 START RESOURCE  xnuiengine.rss
 HEADER
@@ -155,6 +157,7 @@
 LIBRARY	   platformenv.lib
 LIBRARY    hspluginsettings.lib
 LIBRARY    akntouchgesturefw.lib
+LIBRARY    alfdecoderserverclient
 
 #if defined(_XN3_DEBUG_) || defined(AI3_DEBUG_PERFORMANCE)
 LIBRARY    flogger.lib
--- a/idlehomescreen/xmluirendering/uiengine/inc/xnappuiadapterimpl.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/inc/xnappuiadapterimpl.h	Tue May 11 16:02:39 2010 +0300
@@ -36,6 +36,7 @@
 class CXnEffectManager;
 class MHsContentControl;
 class CXnWaitDialog;
+class CXnItemActivator;
 
 // Constants
 
@@ -49,8 +50,7 @@
 *  @since Series 60 3.1
 */
 NONSHARABLE_CLASS( CXnAppUiAdapterImpl ) : public CBase,
-                                           public MXnPropertyChangeObserver,
-                                           public MProgressDialogCallback    
+    public MXnPropertyChangeObserver, public MProgressDialogCallback                                               
     {
 public:
     // Constructors and destructor
@@ -146,6 +146,14 @@
     MHsContentControl* HsContentControlSrv() const;
 
     /**
+     * Gets the Item activator
+     *
+     * @since S60 5.0
+     * @return Item activator
+     */    
+    CXnItemActivator& ItemActivator() const;
+    
+    /**
      * Reload the UI after application root configuration is changed
      * 
      * @since S60 5.0     
@@ -191,6 +199,7 @@
     
 private:
     // Data
+    
     /** AppUi, Not owned. */
     CXnAppUiAdapter& iAdapter;    
     /** Application uid */
@@ -209,13 +218,16 @@
     CHsCcProviderClient* iCcProviderClient;
     /** Effect manager, Owned */
     CXnEffectManager* iEffectManager;
+    /** Backup restore wait dialog, Owned */
+    CXnWaitDialog* iBURWaitDialog;
+    /** Publish&Subscribe observer for Backup & Restore, Owned */
+    CXnPropertySubscriber* iBackupRestoreObserver;  
+    /** Item activator, Owned */
+    CXnItemActivator* iActivator;
     /** Resource offset */
     TInt iResourceOffset;
-    /** Wait dialog, Owned */
-    CXnWaitDialog* iXnWaitDialog;
-    /** Publish&Subscribe observer for Backup & Restore, Owned */
-    CXnPropertySubscriber* iBackupRestoreObserver;  
     };
 
-#endif      // XNAPPUIADAPTERIMPL_H
-            
+#endif // XNAPPUIADAPTERIMPL_H
+
+// End of file
--- a/idlehomescreen/xmluirendering/uiengine/inc/xnbackgroundmanager.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/inc/xnbackgroundmanager.h	Tue May 11 16:02:39 2010 +0300
@@ -28,7 +28,6 @@
 class CXnViewManager;
 class CXnViewData;
 class CAknsLayeredBackgroundControlContext;
-class CXnOomSysHandler;
 
 namespace hspswrapper
     {
@@ -74,16 +73,23 @@
      * @param aViewData Page that owns the given wallpaper.
      * @return Error code.
      */            
-    TInt CacheWallpaperL( const TDesC& aFileName, CXnViewData& aViewData );
+    TInt ConstructWallpaper( const TDesC& aFileName, CXnViewData& aViewData );
+
+    /**
+     * Shows wallpaper change dialog
+     * 
+     * @since S60 5.0
+     */
+    void SetWallpaperL();
 
     /**
      * Changes wallpaper image of the current page.
      * 
      * @since S60 5.0
      * @param aFileName WallpaperImage image path and filename
-     * @return Error code.
+     * @return Whether wallpaper is succesfully set or not.
      */
-    TInt AddWallpaperL( const TDesC& aFileName );
+    TBool SetWallpaper( const TDesC& aFileName );
 
     /**
      * Deletes wallpaper from the given page as well as from the cache.
@@ -94,35 +100,28 @@
     void DeleteWallpaper( CXnViewData& aViewData );
 
     /**
+     * Handles wallpaper changing in page change
+     * 
+     * @since S60 5.0
+     * @param aOldView Old view
+     * @param aNewView New view 
+     * @param aDrawNow ETrue if appearance should be updated
+     */
+    void ChangeWallpaper( const CXnViewData& aOldView, 
+        const CXnViewData& aNewView, TBool aDrawNow );
+
+    /**
      * Returns wallpaper type.
      *  
      * @since S60 5.0
      */
     CXnBackgroundManager::WppType WallpaperType();
-
-    /**
-     * Shows wallpaper change dialog
-     * 
-     * @since S60 5.0
+            
+    /** 
+     * Store current wallpaper if needed by using
+     * AknsWallpaperUtils::SetIdleWallpaper
      */
-    void SetWallpaperL();
-
-    /**
-     * Handles wallpaper changing in page change
-     * 
-     * @since S60 5.0
-     * @param aOldView         Old view
-     * @param aNewView         New view 
-     */
-    void WallpaperChanged( const CXnViewData& aOldView, 
-        const CXnViewData& aNewView );
-        
-    /**
-     * Draws wallpaper immediately, or once the window comes visible.
-     * 
-     * @since S60 5.0
-     */
-    void UpdateScreen();
+    void StoreWallpaperL();
 
 public: // Functions from base classes    
 
@@ -177,26 +176,70 @@
      */
     void ConstructL();
 
+    /**
+     * Gets dublicate bitmap from AknsSrv cache and stores ot to view data.
+     */
+    void UpdateViewData( const TDesC& aFileName, CXnViewData& aViewData );
+
+    /**
+     * Stores current wallpaper to HSPS.
+     */
     void SaveWallpaperL();
     TInt SetSettingPropertyL( const TDesC8& aPluginId, const TDesC8& aItemId,
         const TDesC8& aPropertyName, const TDesC8& aPropertyValue );
+
+    /**
+     * Goes through all the views and updates wallpapers to the correct size.
+     */
     void UpdateWallpapersL();
-    void CleanCache();
-    void RemoveWallpaperL( CXnViewData& aViewData );
-    void RemoveWallpaperFromCache( const TDesC& aFileName, CXnViewData* aViewData = NULL );
-    void RemovableDiskInsertedL();
-    void CheckFeatureTypeL();
-    TInt AddPageSpecificWallpaperL( const TDesC& aFileName );
-    TInt AddCommonWallpaperL( const TDesC& aFileName, TBool aSave = ETrue );
-    void ReadWallpaperFromCenrepL();    
-    void DrawEditModeBackgroundSkin() const;
-    CXnOomSysHandler& OomSysHandler() const;
-    void DrawStatusPaneMask() const;    
+    
+    /**
+     * Removes wallpaper from AknsSrv cache, 
+     * if it is not used in other pages than the given (or active page).
+     */
+    void RemoveWallpaperFromCache( const TDesC& aFileName, 
+        CXnViewData* aViewData = NULL );
+    
+    /**
+     * Removes wallpapers that were loaded from MMC.
+     */
+    void RemovableDiskRemovedL();
 
     /**
-     * Callback function to be used with CPeriodic.
+     * Tries to restore wallpapers from MMC.
+     */
+    void RemovableDiskInsertedL();
+    
+    /**
+     * Reads from cenrep wheteher page specific or common wallpaper is enabled 
+     * and acts accordingly.
+     */
+    void CheckFeatureTypeL();
+    
+    /**
+     * Set the given wallpaper to the active page.
      */
-    static TInt TimerCallback( TAny *aPtr );
+    void SetPageSpecificWallpaperL( const TDesC& aFileName );
+
+    /**
+     * Set the given wallpaper. 
+     * aSave states whether to save change to HSPS or not.
+     */
+    void SetCommonWallpaperL( const TDesC& aFileName, TBool aSave = ETrue, 
+        TBool aShowProgressBar = ETrue );
+
+    /**
+     * Called when wallpaper has been changed outside of Homescreen. 
+     * aSave states whether to save change to HSPS or not.
+     */
+    void ReadWallpaperFromCenrepL();    
+
+    /**
+     * Helper functions for drawing
+     */
+    void DrawEditModeBackgroundSkin() const;    
+    void DrawStatusPaneMask() const;    
+    void UpdateStatuspaneMaskL();
 
 private: // data
 
@@ -249,18 +292,13 @@
      */
     TInt iIntUpdate;
 
-    /** 
-     * True if screen needs to be drawn when view becomes visible.
+    /**
+     * Status pane bitmap. Drawn on top of a wallpaper in 
+     * the status pane area.
+     * Own.
      */
-    TBool iScreenUpdateNeeded;
+    CFbsBitmap* iSpBitmap;
 
-    /** 
-     * Pointer to wallpaper image. This is used only if same wallpaper 
-     * is shared among all HS pages.
-     * Own. 
-     */   
-    CFbsBitmap* iBgImage;
-    
     /**
      * Pointer to status pane mask. Drawn on top of a wallpaper in 
      * the status pane area.
@@ -274,20 +312,20 @@
      * is shared among all HS pages.
      * Own. 
      */  
-    HBufC* iBgImagePath;
+    HBufC* iBgImagePath;    
 
-    /**
-     * Periodic timer.
-     * Own.
+    /** 
+     * Pointer to wallpaper image. This is used only if same wallpaper 
+     * is shared among all HS pages.
+     * Own. 
+     */   
+    CFbsBitmap* iBgImage;
+
+    /*
+     * Flag to indicate wheter wallpaper information needs
+     * to be stored to AknsWallpaperUtils
      */
-    CPeriodic* iTimer;
-    
-    /**
-     * OOM system handler. 
-     * Own.
-     */
-    CXnOomSysHandler* iOomSysHandler;
-    
+    TBool iStoreWallpaper;
     };
 
 #endif      // CXNBACKGROUNDMANAGER_H
--- a/idlehomescreen/xmluirendering/uiengine/inc/xncontroladapterimpl.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/inc/xncontroladapterimpl.h	Tue May 11 16:02:39 2010 +0300
@@ -327,7 +327,7 @@
      * Initialize or refresh background and border bitmaps
      * This is called when for example the skin or control size is changed
      */
-    void InitializeBackgroundAndBorderBitmapsL();
+    void InitializeBackgroundAndBorderBitmapsL( TBool aForceRecreate = EFalse );
 
     /** 
      * This is called to measure adaptive content dimensions.
@@ -530,16 +530,7 @@
     mutable CXnControlAdapter* iAdapter;
     /** icon provider, for AknIconUtils */
     mutable TIconProvider* iIconProvider;
-    /** scaled content image */
-    mutable CFbsBitmap* iScaledContentBitmap;
-    /** scaled content mask */
-    mutable CFbsBitmap* iScaledContentMask;
-    /** scaled transparent color */
-    mutable CGulIcon* iScaledTransparentColor;
-    /** scaled background skin */
-    mutable CGulIcon* iScaledBackgroundSkin;
-    /** scaled background image */
-    mutable CFbsBitmap* iScaledBackgroundImage;
+    
     /** skin animation object for skin highlight animation */
     CAknsEffectAnim* iAnimation;
     /** skin animation identifier */
@@ -556,6 +547,10 @@
     CXnNode* iGestureDestination;
     /** Starting point of button down event. */        
     TPoint iButtonDownStartPoint;
+    /** Tells is background images are allready created*/
+    TBool iBackgrondInitialized;
+    /** Tells is border images are allready created*/
+    TBool iBorderInitialized;
     };
 
 #endif //__XNCONTROLADAPTERIMPL_H__
--- a/idlehomescreen/xmluirendering/uiengine/inc/xneffectmanager.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/inc/xneffectmanager.h	Tue May 11 16:02:39 2010 +0300
@@ -26,6 +26,8 @@
 // User includes
 
 // Forward declarations
+class CAlfEffectObserver;
+class CXnAppUiAdapter;
 class CXnPluginData;
 class CXnViewData;
 class CXnNode;
@@ -33,27 +35,27 @@
 // Constants
 
 // Control effect context ids
-#define KGfxContextAddWidget            TUid::Uid( 0x102750F4 )
-#define KGfxContextRemoveWidget         TUid::Uid( 0x102750F4 )
-#define KGfxContextActivateNextView     TUid::Uid( 0x102750F1 )
-#define KGfxContextActivatePrevView     TUid::Uid( 0x102750F2 )
-#define KGfxContextBgAppear             TUid::Uid( 0x102750F3 )
+#define KGfxContextAddWidget                TUid::Uid( 0x102750F4 )
+#define KGfxContextRemoveWidget             TUid::Uid( 0x102750F4 )
+#define KGfxContextActivateNextView         TUid::Uid( 0x102750F1 )
+#define KGfxContextActivatePrevView         TUid::Uid( 0x102750F2 )
+#define KGfxContextBgAppear                 TUid::Uid( 0x102750F3 )
 
 // Control effect action ids
-#define KGfxControlActionAppear         3
-#define KGfxControlActionDisappear      4
+#define KGfxControlActionAppear             3
+#define KGfxControlActionDisappear          4
 
-#define KGfxControlActionAppearPrt         3
-#define KGfxControlActionDisappearPrt      5
-#define KGfxControlActionAppearLsc         6
-#define KGfxControlActionDisappearLsc      7
+#define KGfxControlActionAppearPrt          3
+#define KGfxControlActionDisappearPrt       5
+#define KGfxControlActionAppearLsc          6
+#define KGfxControlActionDisappearLsc       7
 
 #define KGfxControlActionBgImgToImgAppear   3
 #define KGfxControlActionBgAnimToImgAppear  5
 
 // Full screen effect ids
-#define KGfxContextOpenWallpaperView    1007
-#define KGfxContextCloseWallpaperView   1008
+#define KGfxContextOpenWallpaperView        1007
+#define KGfxContextCloseWallpaperView       1008
 
 // Class declaration
 /**
@@ -61,7 +63,13 @@
  */
 NONSHARABLE_STRUCT( TXnEffect )
     {
+    TXnEffect() 
+        : iNode( NULL ), iState( 0 ), iId( 0 ), iExplicitEnd( EFalse )
+        {        
+        }
+        
     CXnNode* iNode;
+    TBool iExplicitEnd;
     TInt iState;
     TInt iId;
     };
@@ -72,7 +80,7 @@
  *
  *  @since S60 v5.0
  */
-NONSHARABLE_CLASS( CXnEffectManager ) : public CBase
+NONSHARABLE_CLASS( CXnEffectManager ) : public CTimer    
     {
 public:
     // constructor and destructor
@@ -81,13 +89,21 @@
      * Two-phased constructor.
      * @return new instance of CXnEffectManager.
      */
-    static CXnEffectManager* NewL();
+    static CXnEffectManager* NewL( CXnAppUiAdapter& aAppUiAdapter );
 
     /**
      * Destructor.
      */
     ~CXnEffectManager();
 
+private:
+    // from CTimer
+    
+    /**
+     * @see CTimer
+     */
+    void RunL();
+        
 public:
     // new functions
     
@@ -99,6 +115,54 @@
      * @aView view data
      */
     void BeginFullscreenEffectL( TInt aId, CXnViewData& aView );
+
+    /**
+     * Begin handling of fullscreen effect.
+     * 
+     * @since S60 5.2 
+     * @param aId effect id
+     */
+    void BeginFullscreenEffectL( TInt aId );
+
+    /**
+     * Ends fullscreen effect.
+     * 
+     * @since S60 5.2 
+     * @param aId effect id
+     */
+    void EndFullscreenEffect( TInt aId );
+    
+    /**
+     * Begin view change effect
+     * 
+     * @since S60 5.2
+     * @param aThis Active view
+     * @param aOther View to activate
+     * @param aEffect Effect uid 
+     * @return ETrue of effect is started, EFalse otherwise
+     */    
+    TBool BeginActivateViewEffect( const CXnViewData& aThis, 
+        const CXnViewData& aOther, TUid aEffect );
+
+    /**
+     * End view change effect
+     * 
+     * @since S60 5.2
+     * @param aThis Active view
+     * @param aOther View to activate
+     * @param aEffect Effect uid 
+     */        
+    void EndActivateViewEffect( const CXnViewData& aThis, 
+        const CXnViewData& aOther, TUid aEffect );
+       
+    /**
+     * Begins background appear effect
+     * 
+     * @since S60 5.2
+     * @param aBg Background control
+     * @param aWaitActiveEffect ETrue if active effect is checked, EFalse otherwise
+     */
+    void BgAppearEffect( CCoeControl* aBg, TBool aWaitActiveEffect = EFalse );
     
     /**
      * When UiRendered is called effect is ended and will be drawn
@@ -114,6 +178,29 @@
      */
     void UiLayouted();
 
+    /**
+     * Checks if effect is active for control
+     * 
+     * @since S60 5.2
+     * @param aControl Control to check
+     * @return ETrue if active, EFalse otherwise
+     */
+    TBool ControlEffectActive( const CCoeControl* aControl ) const;
+    
+    /** 
+     * Updates iLandscape flag
+     * 
+     * @since S60 5.2
+     */
+    void OrientationChanged();
+
+    /** 
+     * Cleanup control effect
+     * 
+     * @since S60 5.2
+     */    
+    void CleanupControlEffect();
+    
 private:
     // new functions
     
@@ -127,12 +214,13 @@
     TBool DoBeginFullscreenEffect( TXnEffect& aEffect );
     
     /**
-     * Removes and destroys effect from effect list.
+     * Waits active effects to complete
      * 
      * @since S60 5.2
-     * @param aEffect effect data
+     * @param aInterval Interval in micro seconds to wait active effects to complete     
+     * @return ETrue if no active effects ongoing when function returns, EFalse otherwise 
      */
-    void RemoveEffect( TXnEffect* aEffect );
+    TBool WaitActiveEffect( TInt aInterval );
     
 private:
     // constructors
@@ -140,7 +228,7 @@
     /**
      * C++ default constructor
      */
-    CXnEffectManager();
+    CXnEffectManager( CXnAppUiAdapter& aAppUiAdapter );
 
     /**
      * 2nd phase constructor 
@@ -150,8 +238,20 @@
 private: 
     // data
     
+    /** Effect observer, owned */
+    CAlfEffectObserver* iObserver;
+    /** AppUi, not owned */
+    CXnAppUiAdapter& iAppUiAdapter;
     /** List of started effects, owned */
-    RPointerArray<TXnEffect> iEffects;    
+    RArray< TXnEffect > iEffects;
+    /** List of controls in current effect, not owned */
+    RPointerArray< CCoeControl > iControls;
+    /** Effect group id */
+    TInt iGroupId;    
+    /** Flag to indicate whether background effect is started */
+    TBool iBgEffect;
+    /** Orientation */
+    TBool iLandscape;
     };
 
 #endif      // CXNEFFECTMANAGER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/idlehomescreen/xmluirendering/uiengine/inc/xnitemactivator.h	Tue May 11 16:02:39 2010 +0300
@@ -0,0 +1,114 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Item activator
+*
+*/
+
+
+#ifndef _XNITEMACTIVATOR_H
+#define _XNITEMACTIVATOR_H
+
+// System includes
+#include <e32base.h>
+
+// User includes
+
+// Forward declarations
+class CXnAppUiAdapter;
+class CXnNode;
+
+/**
+ * Item activator
+ * 
+ * @ingroup group_xnlayoutengine
+ * @lib xn3layoutengine.lib
+ * @since S60 5.2
+ */
+NONSHARABLE_CLASS( CXnItemActivator ) : public CTimer
+    {
+public:    
+    // Constructors and destructor
+    
+    /**
+     * Two-phased constructor.
+     */
+    static CXnItemActivator* NewL( CXnAppUiAdapter& aAppUiAdapter );        
+
+    /**
+     * Two-phased constructor. Leaving on stack
+     */
+    static CXnItemActivator* NewLC( CXnAppUiAdapter& aAppUiAdapter );         
+
+    /**
+     * Destructor
+     */
+    ~CXnItemActivator();
+
+private:
+    // private constructors
+
+    /**
+     * Leaving constructor
+     */
+    void ConstructL();
+    
+    /**
+     * C++ default constructor
+     */
+    CXnItemActivator( CXnAppUiAdapter& aAppUiAdapter );         
+    
+private:
+    // from CTimer
+    
+    /**
+     * @see CTimer
+     */
+    void RunL();
+
+    /**
+     * @see CTimer
+     */    
+    TInt RunError( TInt aError );
+    
+    /**
+     * @see CTimer
+     */    
+    void DoCancel();
+    
+public: 
+    // new functions
+    
+    /**
+     * Schedules item activation. 
+     * Outstanding activation is cancelled.
+     * 
+     * @since S60 5.2
+     * @param aItemToActivate Item to activate
+     */
+    void Activate( CXnNode* aItemToActivate );
+            
+private:
+    // data
+
+    /** AppUiAdapter, not owned */
+    CXnAppUiAdapter& iAppUiAdapter;
+    /** Activate trigger, owned */
+    CXnNode* iTrigger;
+    /** Item to activate, not owned */
+    CXnNode* iItemToActivate;
+    };
+
+#endif // _XNITEMACTIVATOR_H
+
+// End of file
--- a/idlehomescreen/xmluirendering/uiengine/inc/xnplugindata.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/inc/xnplugindata.h	Tue May 11 16:02:39 2010 +0300
@@ -23,6 +23,8 @@
 #include <e32base.h>
 #include <babitflags.h>
 
+// User includes
+
 // Forward declarations
 class CXnNode;
 class CXnDomNode;
@@ -31,7 +33,7 @@
 class CXnViewData;
 class CXnODT;
 class CXnViewManager;
-class CPeriodic;
+class CXnPublisherData;
 
 // Constants
 
@@ -310,6 +312,13 @@
     virtual void ContentSourceNodesL( RPointerArray< CXnNode >& aList ) const;
 
     /**
+     * Returns all publishers
+     * 
+     * @param aList List publishers
+     */
+    virtual void PublishersL( RPointerArray< CXnPublisherData >& aList ) const;    
+    
+    /**
      * Adds appearance nodes
      * 
      * @param aNode Node to be added
@@ -402,19 +411,24 @@
     inline RPointerArray< CXnPluginData >& PluginData() const;
 
     /**
-     * Loads publishers, called by CXnViewData
+     * Loads publishers
      * 
      * @param aReason Load reason
      */    
-    TInt LoadPublishers( TInt aReason );
-        
+    void LoadPublishers( TInt aReason );
+
     /**
-     * Queries whether this plugins publishers are virgin
+     * Destroy publishers
      * 
-     * @return ETrue if virgin, EFalse otherwise
-     */
-    TBool VirginPublishers() const;
-        
+     * @param aReason Destroy reason
+     */    
+    void DestroyPublishers( TInt aReason );
+            
+    /**
+     * Notifies a publisher is ready
+     */        
+    virtual void NotifyPublisherReadyL();        
+
     /**
      * Show content removed error note
      */
@@ -432,32 +446,17 @@
      */
     void SetLockingStatus( const TDesC8& aStatus );    
         
-private:
-    // New functions
-            
-    void LoadPublishers();
-    
-    void DestroyPublishers();
-    
-    void DoDestroyPublishersL();
-    
-    void DoShowContentRemovedErrorL();
-    
-    static TInt PeriodicEventL( TAny* aAny );
-    
 protected:
     // data
         
-    /** Data publisher loader, Owned */
-    CPeriodic* iLoader;
     /** Plugins data */
     mutable RPointerArray< CXnPluginData > iPluginsData;
     /** List of plugin resources, Owned */
     CArrayPtrSeg< CXnResource >* iResources;
     /** List of controls, Not owned */
     RPointerArray< CXnControlAdapter > iControls;
-    /** List of content source nodes, Not owned */
-    RPointerArray< CXnNode > iContentSourceNodes;       
+    /** List of publishers, Owned */
+    RPointerArray< CXnPublisherData > iPublishers;
     /** List of appearance nodes, Not owned */
     RPointerArray< CXnNode > iAppearanceNodes;
     /** List of initial focus nodes, Not owned */
@@ -486,8 +485,6 @@
     HBufC* iPublisherName;
     /** Flags to define this plugin's state */
     TBitFlags32 iFlags;
-    /** Flag to indicate whether this data's publishers are virgins */
-    TBool iVirginPublishers;    
     };
 
 // Inline functions
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/idlehomescreen/xmluirendering/uiengine/inc/xnpublisherdata.h	Tue May 11 16:02:39 2010 +0300
@@ -0,0 +1,174 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Publisher data
+*
+*/
+
+
+#ifndef _XNPUBLISHERDATA_H
+#define _XNPUBLISHERDATA_H
+
+// System includes
+#include <e32base.h>
+#include <babitflags.h>
+
+// User includes
+#include <hspublisherinfo.h>
+
+// Forward declarations
+class CXnAppUiAdapter;
+class CXnPluginData;
+class CXnNode;
+
+/**
+ * Publisher data
+ * 
+ * @ingroup group_xnlayoutengine
+ * @lib xn3layoutengine.lib
+ * @since S60 5.2
+ */
+NONSHARABLE_CLASS( CXnPublisherData ) : public CBase
+    {
+public:    
+    // Constructors and destructor
+    
+    /**
+     * Two-phased constructor.
+     */
+    static CXnPublisherData* NewL( CXnPluginData& aOwner, CXnNode& aNode );        
+
+    /**
+     * Two-phased constructor. Leaving on stack
+     */
+    static CXnPublisherData* NewLC( CXnPluginData& aOwner, CXnNode& aNode );         
+
+    /**
+     * Destructor
+     */
+    ~CXnPublisherData();
+
+private:
+    // private constructors
+
+    /**
+     * Leaving constructor
+     */
+    void ConstructL();
+    
+    /**
+     * C++ default constructor
+     */
+    CXnPublisherData( CXnPluginData& aOwner, CXnNode& aNode );         
+    
+public: 
+    // new functions
+    
+    /**
+     * Equals operator
+     *
+     * @since S60 5.2 
+     * @param aNode Node
+     * @return ETrue if this equals to aNode, EFalse otherwise     
+     */
+    TBool operator==( CXnNode& aNode ) const;
+
+    /**
+     * Equals operator
+     *
+     * @since S60 5.2 
+     * @param aInfo Publisher info
+     * @return ETrue if this equals to aInfo, EFalse otherwise     
+     */    
+    TBool operator==( const THsPublisherInfo& aInfo ) const;
+    
+    /**
+     * Returns publisher info
+     * 
+     * @since S60 5.2
+     * @return Publisher info
+     */
+    const THsPublisherInfo& Info() const;
+    
+    /** 
+     * Returns the <contentsource> element
+     * 
+     * @since S60 5.2
+     * @return Node defining <contentsource> element
+     */
+    CXnNode* ContentSource() const;
+
+    /**
+     * Schedules publisher load with given reason
+     * 
+     * @since S60 5.2
+     * @param aReason Load reason
+     */    
+    void Load( TInt aReason );
+    
+    /**
+     * Schedules publisher destroy with given reason
+     * 
+     * @since S60 5.2
+     * @param aReason Destroy reason
+     */
+    void Destroy( TInt aReason );
+    
+    /**
+     * Queries wheter this publisher loading is failed
+     * 
+     * @since S60 5.2
+     * @return ETrue if failed, EFalse otherwise
+     */
+    TBool IsFailed() const;
+    
+    /**
+     * Queries wheter this publisher loading is ongoing
+     * 
+     * @since S60 5.2
+     * @return ETrue if ongoing, EFalse otherwise
+     */    
+    TBool IsLoading() const;
+
+    /**
+     * Gets publisher owner
+     * 
+     * @since S60 5.2
+     * @return Owner
+     */        
+    CXnPluginData* Owner() const;
+    
+private:
+    // new functions
+    
+    static void NotifyLoaded( TAny* aAny, TInt aResult );        
+    static void NotifyDestroyed( TAny* aAny, TInt aResult );
+        
+private:
+    // data
+    
+    /** CXnPluginData, Not owned */
+    CXnPluginData& iOwner;
+    /** <contentsource> element, Not owned */
+    CXnNode& iNode;
+    /** AppUiAdapter, Not owned */
+    CXnAppUiAdapter* iAppUi;
+    /** Publisher info built from <contentsource> element */
+    mutable THsPublisherInfo iInfo;
+    /** Flags to define this plugin's state */
+    TBitFlags32 iFlags;    
+    };
+
+#endif // _XNPUBLISHERDATA_H
+
+// End of file
--- a/idlehomescreen/xmluirendering/uiengine/inc/xnviewadapter.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/inc/xnviewadapter.h	Tue May 11 16:02:39 2010 +0300
@@ -45,11 +45,7 @@
  */
 NONSHARABLE_CLASS( CXnViewAdapter ) : public CAknView,  
     public MXnUiStateObserver
-    {
-private:
-    // friend classes
-    friend class CXnViewManager;
-    
+    {    
 public:
     /**
      * Two-phase constructor
@@ -171,29 +167,30 @@
      */
     void ChangeControlsStateL( TBool aAwake );
     
-private:
-    // new functions
-    
     /**
      * Activates new container ro view. 
      * Deactivates internally previous container if it exists.
-     * This is always called from DoActivateL or from CXnViewManager.
+     * This is always called from DoActivateL or from CXnViewManager when 
+     * active view data is changed.
      * 
      * @since S60 5.0
      * @param aContainer Container to activate
      * @param aEnterEditState ETrue if activated container should be set to edit state.
-     * @param aForceActivation if ETrue forces deactivation and then activation even if
-     *        the conntainer remains the same 
+     * @param aEffect Effect uid, default no effect
      */
     void ActivateContainerL( CXnViewData& aContainer, 
-        TBool aEnterEditState = EFalse, TBool aForceActivation = EFalse );
-
+        TBool aEnterEditState = EFalse, TUid aEffect = TUid::Null() );
+    
+private:
+    // new functions
+    
     /**
      * Deactivates the current container from view.      
      * 
      * @since S60 5.0               
+     * @param aHide ETrue if old container is hidden, EFalse otherwise
      */    
-    void DeactivateContainerL();
+    void DeactivateContainerL( TBool aHide = ETrue );
 
     /**
      * Activates default container to view. 
@@ -253,6 +250,8 @@
     TBitFlags32 iFlags;
     /** Timer to set window group order after default view is activated, owned */
     CPeriodic* iTimer;
+    /** Action to handle in timer callback */
+    TInt iAction;
     };
 
 #endif // XNVIEWADAPTER_H
--- a/idlehomescreen/xmluirendering/uiengine/inc/xnviewdata.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/inc/xnviewdata.h	Tue May 11 16:02:39 2010 +0300
@@ -98,16 +98,22 @@
      * @see CXnPluginData           
      */    
     void PopupNodesL( RPointerArray< CXnNode >& aList ) const;
-            
+
+    /**
+     * @see CXnPluginData           
+     */        
+    void NotifyPublisherReadyL();
+    
 public:   
     // New functions
     
     /**
      * Sets viewdata to active/ not active
      * 
-     * @param aActive ETrue active, EFalse not active    
+     * @param aActive ETrue active, EFalse not active
+     * @return Activation Error code    
      */
-    void SetActive( TBool aActive );
+    TInt SetActive( TBool aActive );
     
     /**
      * Returns if active or not
@@ -205,7 +211,7 @@
     /**
      * Loads publishers to this view           
      */
-    void LoadPublishers();    
+    void LoadPublishers( TInt aReason );    
                    
     /**
      * Destroys all publishers in this view
@@ -213,25 +219,16 @@
      * @param aReason Destroy reason
      */
     void DestroyPublishers( TInt aReason );
-    
-private:
-    // new functions
-    
-    static TInt DoLoadPublishersL( TAny* aAny );
-    
-    void DoDestroyPublishersL( TInt aReason );
-    
+            
 private:
     // data                              
     
     /** Pointer to wallpaper image, Owned */    
     CFbsBitmap* iBgImage;    
     /** Path of the wallpaper image, including filename */    
-    HBufC* iBgImagePath;            
-    /** Publisher load index */
-    TInt iLoadIndex;    
-    /** Flag to indicate whether content removed error should be shown */
-    TBool iShowContentRemoved;    
+    HBufC* iBgImagePath;    
+    /** Load error code */
+    TInt iLoadError;
     };
 
 #include "xnviewdata.inl"
--- a/idlehomescreen/xmluirendering/uiengine/inc/xnwallpaperview.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/inc/xnwallpaperview.h	Tue May 11 16:02:39 2010 +0300
@@ -22,6 +22,7 @@
 #define CXNWALLPAPERVIEW_H
 
 // System includes
+#include <e32base.h>
 #include <aknview.h>
 
 // User includes
@@ -30,10 +31,7 @@
 class CXnWallpaperContainer;
 class CXnAppUiAdapter;
 class CXnUiEngine;
-class TVwsViewId;
-class CPeriodic;
 class CXnSpBgCleaner;
-class CAknWaitDialog;
 
 // Constants
 const TUid KWallpaperViewUid = { 0x200286DB };
@@ -42,20 +40,14 @@
 
 /**
 *  Wallpaper view.
-*  Possible to define current Idle background image.
+*  Possible to select background image.
 *
 *  @since S60 v5.0
 */
 NONSHARABLE_CLASS( CXnWallpaperView ) : public CAknView 
     {
-    /** View states */
-    enum TViewState 
-        {
-        EIdle,
-        EImageSelection,
-        EViewDeactivation
-        };
 public:
+    // constructor and destructor
 
     /**
      * Two-phased constructor.
@@ -68,23 +60,30 @@
      */
     ~CXnWallpaperView();
 
+public:
+    // from CAknView
+    
     /**
-     * From CAknView.
-     * Returns view id.
-     * @return An unsigned integer (view id).
-     */
+     * @see CAknView
+     */      
     TUid Id() const;
 
 private:
+    // from CAknView
+    
+    /**
+     * @see CAknView
+     */      
+    void DoActivateL( const TVwsViewId& aPrevViewId,        
+        TUid aCustomMessageId, const TDesC8& aCustomMessage );
+            
+    /**
+     * @see CAknView
+     */      
+    void DoDeactivate();
 
-    /* From CAknView. */
-    void DoActivateL(
-        const TVwsViewId& aPrevViewId,
-        TUid aCustomMessageId,
-        const TDesC8& aCustomMessage );
-    
-    /* From CAknView. */
-    void DoDeactivate();
+private:
+    // private constructors
     
     /**
      * C++ default constructor.
@@ -96,27 +95,39 @@
      */
     void ConstructL();
 
-    /**
-     * Callback function to be used with CPeriodic.
-     */
-    static TInt TimerCallback( TAny *aPtr );
-    void DoHandleCallBackL();
-
+public:
+    // new functions
+    
     /**
-     * Show error dialog
+     * Returns selected wallpaper filename as parameter
      * 
-     * @param aResourceId Resource id to string to be displayed.
+     * @since S60 5.2
+     * @param aFileName Selected wallpaper filename
      */
-    static void ShowErrorDialogL( const TInt aResourceId );
+    void SelectedWallpaper( TFileName& aFileName ) const;
+    
+private:
+    // new functions
     
-private: // data
+    static TInt HandleCallback( TAny* aAny );
+    
+    void DoHandleCallbackL();
+         
+private: 
+    // data
 
     /**
      * Wallpaper container.
      * Own.
      */
     CXnWallpaperContainer* iContainer;
-        
+    
+    /**
+     * Image files
+     * Own.
+     */
+    CDesCArrayFlat* iFiles;
+    
     /**
      * UiEngine
      * Not owned.
@@ -133,22 +144,12 @@
      * Switch for multiple image selection.
      */
     TBool iMultiple;
-    
-    /**
-     * Previous view id
-     */
-    TVwsViewId iPreviousViewUid;
-
+        
     /**
-     * States of wallpaperview
-     */
-    TViewState iViewState;
-    
-    /**
-     * Periodic timer.
+     * Async callback.
      * Own.
      */
-    CPeriodic* iTimer;
+    CAsyncCallBack* iAsyncCb;
     
     /**
      * Resource file offset
@@ -159,13 +160,12 @@
      * Statuspane background cleaner. 
      * Own.
      */
-	CXnSpBgCleaner* iXnSpBgCleaner;
-    
-    /** 
-     * Wait dialog. 
-     * Own.
-     */
-	CAknWaitDialog* iWaitDialog;    
+	CXnSpBgCleaner* iSpBgCleaner;
+	
+	/**
+	 * Selected image filename
+	 */
+	TFileName iFileName;
     };
 
 #endif      // CXNWALLPAPERVIEW_H
--- a/idlehomescreen/xmluirendering/uiengine/src/xnappuiadapter.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/src/xnappuiadapter.cpp	Tue May 11 16:02:39 2010 +0300
@@ -21,6 +21,7 @@
 #include <avkon.rsg>
 
 // User includes
+#include <hspublisherinfo.h>
 #include "xnappuiadapter.h"
 #include "xnappuiadapterimpl.h"
 #include "xnviewadapter.h"
@@ -28,12 +29,15 @@
 #include "xnfocuscontrol.h"
 #include "hscontentcontrolfactory.h"
 #include "xnviewadapter.h"
+#include "xnnode.h"
 
 #include "xuikon_builds_cfg.hrh"
 #include "debug.h"
 
 _LIT8( KActivateDefaultView, "activatedefault" );
 
+// ============================ LOCAL FUNCTIONS ================================
+
 // ============================ MEMBER FUNCTIONS ===============================
 
 // -----------------------------------------------------------------------------
@@ -145,6 +149,7 @@
     CXnDomNode& /*aTriggerDefinition*/,
     CXnDomNode& /*aEvent*/ )
     {
+    // Default empty implementation
     }
 
 // -----------------------------------------------------------------------------
@@ -152,23 +157,21 @@
 //
 // -----------------------------------------------------------------------------
 //
-EXPORT_C TInt CXnAppUiAdapter::LoadPublisher( CXnNodeAppIf& /*aPublisher*/, 
-    TInt /*aReason*/ )
+EXPORT_C void CXnAppUiAdapter::LoadPublisher( 
+    const TAiFwPublisherInfo& /*aPublisher*/ )     
     {
-    // Default empty implementation
-    return KErrNone;
+    // Default empty implementation    
     }
 
 // -----------------------------------------------------------------------------
-// CXnAppUiAdapter::DestroyDataPluginsL
+// CXnAppUiAdapter::DestroyPublisher
 //
 // -----------------------------------------------------------------------------
 //
-EXPORT_C TInt CXnAppUiAdapter::DestroyPublisher( CXnNodeAppIf& /*aPublisher*/, 
-    TInt /*aReason*/ )
+EXPORT_C void CXnAppUiAdapter::DestroyPublisher( 
+    const TAiFwPublisherInfo& /*aPublisher*/ )     
     {
-    // Default empty implementation
-    return KErrNone;
+    // Default empty implementation    
     }
 
 // -----------------------------------------------------------------------------
@@ -215,6 +218,38 @@
     }
 
 // -----------------------------------------------------------------------------
+// CXnAppUiAdapter::PublisherInfo
+//
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CXnAppUiAdapter::PublisherInfo( CXnNodeAppIf& /*aNode*/, 
+    THsPublisherInfo& /*aInfo*/ )
+    {
+    // Default empty implementation    
+    return KErrNotSupported;
+    }
+
+// -----------------------------------------------------------------------------
+// CXnAppUiAdapter::PublisherInfo
+//
+// -----------------------------------------------------------------------------
+//
+TInt CXnAppUiAdapter::PublisherInfo( CXnNode& aNode, 
+    THsPublisherInfo& aInfo )
+    {
+    CXnNodeAppIf* node( NULL );
+    
+    TRAPD( err, node = &aNode.AppIfL() );
+    
+    if ( node )
+        {
+        err = PublisherInfo( *node, aInfo );    
+        }
+           
+    return err;
+    }
+
+// -----------------------------------------------------------------------------
 // CXnAppUiAdapter::RemoveViewL
 //
 // -----------------------------------------------------------------------------
@@ -302,7 +337,7 @@
 // -----------------------------------------------------------------------------
 //
 EXPORT_C void CXnAppUiAdapter::ProcessMessageL( TUid aUid,
-        const TDesC8& /*aParams*/ )
+    const TDesC8& /*aParams*/ )
     {
     if ( aUid.iUid == KUidApaMessageSwitchOpenFileValue )
         {
@@ -397,6 +432,16 @@
     }
 
 // -----------------------------------------------------------------------------
+// CXnAppUiAdapter::ItemActivator
+// 
+// -----------------------------------------------------------------------------
+//
+CXnItemActivator& CXnAppUiAdapter::ItemActivator() const
+    {
+    return iImpl->ItemActivator();
+    }
+
+// -----------------------------------------------------------------------------
 // CXnAppUiAdapter::FocusShown
 //
 // -----------------------------------------------------------------------------
--- a/idlehomescreen/xmluirendering/uiengine/src/xnappuiadapterimpl.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/src/xnappuiadapterimpl.cpp	Tue May 11 16:02:39 2010 +0300
@@ -38,6 +38,7 @@
 #include "xnwallpaperview.h"
 #include "xneffectmanager.h"
 #include "xnwaitdialog.h"
+#include "xnitemactivator.h"
 
 #include "xnappuiadapterimpl.h"
 
@@ -123,11 +124,13 @@
     iAdapter.AddViewL( wallpaper );
     CleanupStack::Pop( wallpaper );
     
-    iEffectManager = CXnEffectManager::NewL();   
+    iEffectManager = CXnEffectManager::NewL( iAdapter );   
     
     iBackupRestoreObserver = CXnPropertySubscriber::NewL( 
             KUidSystemCategory, conn::KUidBackupRestoreKey, *this );
 
+    iActivator = CXnItemActivator::NewL( iAdapter );
+    
     __TIME_ENDMARK( "CXnAppUiAdapterImpl::ConstructL, done", time );    
     }
 
@@ -141,10 +144,15 @@
     __PRINTS( "*** CXnAppUiAdapterImpl::ReloadUiL" );
     __TIME_MARK( time );
 
+    delete iActivator;
+    iActivator = NULL;
+           
     iViewAdapter->ReloadUiL();
            
     iViewManager->ReloadUiL();
-        
+    
+    iActivator = CXnItemActivator::NewL( iAdapter );
+    
     __TIME_ENDMARK( "CXnAppUiAdapterImpl::ReloadUiL, done", time );
     }
 
@@ -155,11 +163,13 @@
 //
 CXnAppUiAdapterImpl::~CXnAppUiAdapterImpl()
     {
-    if ( iXnWaitDialog )
+    if ( iBURWaitDialog )
         {
-        TRAP_IGNORE( iXnWaitDialog->ProcessFinishedL(); );
+        TRAP_IGNORE( iBURWaitDialog->ProcessFinishedL(); );
         }
     
+    delete iActivator;
+    
     delete iBackupRestoreObserver;
     
     delete iUiEngine;
@@ -261,6 +271,16 @@
     }
 
 // -----------------------------------------------------------------------------
+// CXnAppUiAdapterImpl::ItemActivator
+// Gets Item activator
+// -----------------------------------------------------------------------------
+//
+CXnItemActivator& CXnAppUiAdapterImpl::ItemActivator() const
+    {
+    return *iActivator;
+    }
+
+// -----------------------------------------------------------------------------
 // CXnAppUiAdapterImpl::HandleResourceChangeL
 // Handles resource changes
 // -----------------------------------------------------------------------------
@@ -277,12 +297,12 @@
 //
 void CXnAppUiAdapterImpl::DisplayWaitDialogL()
     {
-    if ( !iXnWaitDialog )
+    if ( !iBURWaitDialog )
        {
-       iXnWaitDialog = new( ELeave ) CXnWaitDialog(
-               reinterpret_cast<CEikDialog**>( &iXnWaitDialog ), ETrue );       
-       iXnWaitDialog->SetCallback( this );
-       iXnWaitDialog->ExecuteLD( R_BACKUP_RESTORE_WAIT_DIALOG );
+       iBURWaitDialog = new( ELeave ) CXnWaitDialog(
+               reinterpret_cast<CEikDialog**>( &iBURWaitDialog ), ETrue );       
+       iBURWaitDialog->SetCallback( this );
+       iBURWaitDialog->ExecuteLD( R_BACKUP_RESTORE_WAIT_DIALOG );
        }
     }
 
@@ -291,7 +311,8 @@
 // Property changed notification callback
 // -----------------------------------------------------------------------------
 //
-void CXnAppUiAdapterImpl::PropertyChangedL( const TUint32 aKey, const TInt aValue )
+void CXnAppUiAdapterImpl::PropertyChangedL( const TUint32 aKey, 
+    const TInt aValue )
     {
     const TUint mask( conn::KBURPartTypeMask ^ conn::EBURNormal );
     if ( aKey == conn::KUidBackupRestoreKey )
@@ -301,11 +322,11 @@
             // Any type of backup or restore operation started
             DisplayWaitDialogL();
             }
-        else if ( iXnWaitDialog )
+        else if ( iBURWaitDialog )
             {
             // Any type of backup or restore operation ended
-            iXnWaitDialog->ProcessFinishedL();
-            // ProcessFinishedL() will NULL iXnWaitDialog
+            iBURWaitDialog->ProcessFinishedL();
+            // ProcessFinishedL() will NULL iBURWaitDialog
             }
         }
     }
--- a/idlehomescreen/xmluirendering/uiengine/src/xnbackgroundmanager.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/src/xnbackgroundmanager.cpp	Tue May 11 16:02:39 2010 +0300
@@ -35,11 +35,15 @@
 #include <akntransitionutils.h>
 #include <aknlistquerydialog.h> 
 #include <xnuiengine.rsg>
+#include <xnwallpaperview.rsg>
 #include <AknSkinsInternalCRKeys.h>
 #include <activeidle2domaincrkeys.h>
 #include <AknsWallpaperUtils.h>
 #include <imageconversion.h>
 #include <bitmaptransforms.h>
+#include <StringLoader.h>
+#include <aknnotewrappers.h>
+#include <bautils.h>
 
 #include <AknsUtils.h>
 #include <AknsDrawUtils.h>
@@ -54,7 +58,78 @@
 _LIT8( KSingle, "single" );
 const TUid KDummyUid = { 0x0000000 };
 const TInt KSkinGfxInnerRectShrink( 5 );
-const TInt KCallbackDelay( 500000 ); // 500ms
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// ShowInfoNoteL
+// -----------------------------------------------------------------------------
+//
+void ShowInfoNoteL( TInt aResourceId )
+    {
+    HBufC* msg( StringLoader::LoadLC( aResourceId ) ); 
+
+    CAknInformationNote* note = new ( ELeave ) CAknInformationNote;    
+    note->ExecuteLD( *msg );
+                   
+    CleanupStack::PopAndDestroy( msg );                 
+    }
+
+// -----------------------------------------------------------------------------
+// HandleErrorL
+// -----------------------------------------------------------------------------
+//
+void HandleErrorL( TInt aErr )
+    {
+    TInt resourceId( NULL );
+    if ( aErr == KErrTooBig || aErr == KErrNoMemory )
+        {
+        resourceId = R_QTN_HS_TOO_BIG_IMAGE_NOTE;
+        }
+    else if ( aErr == KErrCancel || aErr == KErrCouldNotConnect || 
+        aErr == KErrCANoRights )
+        {
+        // Ignore these
+        }
+    else if ( aErr != KErrNone )
+        {
+        resourceId = R_QTN_HS_CORRUPTED_IMAGE_NOTE;
+        }
+
+    if( resourceId )
+        {
+        ShowInfoNoteL( resourceId );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CreateSkinBitmapL
+// -----------------------------------------------------------------------------
+//
+CFbsBitmap* CreateSkinBitmapL( TAknsItemID aId, TRect aRect )
+    {
+    CFbsBitmap* newBitmap = new ( ELeave ) CFbsBitmap;
+    User::LeaveIfError( newBitmap->Create( aRect.Size(), EColor16M ) );
+    CleanupStack::PushL( newBitmap );
+            
+    CFbsBitmapDevice* bitmapDev = CFbsBitmapDevice::NewL( newBitmap );
+    CleanupStack::PushL( bitmapDev );
+
+    CBitmapContext* bc( NULL );
+    User::LeaveIfError( bitmapDev->CreateBitmapContext( bc ) );
+    CleanupStack::PushL( bc );
+
+    CAknsBasicBackgroundControlContext* context = 
+        CAknsBasicBackgroundControlContext::NewL( aId, aRect, EFalse );
+    CleanupStack::PushL( context );
+
+    AknsDrawUtils::Background( AknsUtils::SkinInstance(),
+        context, static_cast< CWindowGc& >( *bc ), aRect );
+
+    CleanupStack::PopAndDestroy( 3, bitmapDev );
+    CleanupStack::Pop( newBitmap );
+    return newBitmap;
+    }
 
 // ============================ MEMBER FUNCTIONS ===============================
 
@@ -64,7 +139,8 @@
 //
 CXnBackgroundManager::CXnBackgroundManager( CXnViewManager& aViewManager, CHspsWrapper& aWrapper )
     : iViewManager( aViewManager ), 
-      iHspsWrapper( aWrapper )
+      iHspsWrapper( aWrapper ),
+      iStoreWallpaper( ETrue )
     {
     }
 
@@ -89,9 +165,9 @@
     MakeVisible( ETrue );
     ActivateL();
     iIntUpdate = 0;
+    
     User::LeaveIfError( iSkinSrv.Connect( this ) );
-    iSkinSrv.EnableSkinChangeNotify();  
-    
+          
     // Start listening for drive events.
     User::LeaveIfError( iFsSession.Connect() );
     
@@ -101,12 +177,8 @@
     
     // Reads from cenrep wheteher page specific wallpaper is enabled or not
     CheckFeatureTypeL();   
-
-    iTimer = CPeriodic::NewL( CActive::EPriorityIdle );
-
-    GfxTransEffect::Register( this, KGfxContextBgAppear );    
-
-    iOomSysHandler = CXnOomSysHandler::NewL();
+    
+    GfxTransEffect::Register( this, KGfxContextBgAppear );       
     }
 
 // -----------------------------------------------------------------------------
@@ -131,16 +203,15 @@
 CXnBackgroundManager::~CXnBackgroundManager()
     {
     GfxTransEffect::Deregister( this );
-    
-    delete iTimer;
-    CleanCache();
+        
+    iSkinSrv.RemoveAllWallpapers();
     iSkinSrv.Close();
     delete iDiskNotifier;
     iFsSession.Close();
     delete iBgContext;
     delete iBgImage;
-    delete iBgImagePath;
-    delete iOomSysHandler;
+    delete iBgImagePath;    
+    delete iSpBitmap;
     delete iSpMask;   
     }
 
@@ -151,6 +222,7 @@
 void CXnBackgroundManager::Draw(const TRect& aRect) const
     {
     CFbsBitmap* wallpaper( NULL );
+    
     if( iType == EPageSpecific )
         {
         CXnViewData& viewData( iViewManager.ActiveViewData() );
@@ -167,7 +239,8 @@
         TSize bitmapSize = wallpaper->SizeInPixels();
         
         // If image is smaller that screen size it needs to be centralized
-        if( iRect.Height() > bitmapSize.iHeight && iRect.Width() > bitmapSize.iWidth )
+        if( iRect.Height() > bitmapSize.iHeight && 
+            iRect.Width() > bitmapSize.iWidth )
             {
             TInt width = bitmapSize.iWidth / 2;
             TInt height = bitmapSize.iHeight / 2;
@@ -183,6 +256,7 @@
             {
             SystemGc().DrawBitmap( iRect, wallpaper );
             }
+        
         DrawStatusPaneMask();
         }
     
@@ -207,11 +281,12 @@
 void CXnBackgroundManager::SizeChanged()
     {
     iRect = Rect();
-    if( iType == EPageSpecific )
+    
+    if ( iType == EPageSpecific )
         {
         TRAP_IGNORE( UpdateWallpapersL() );
         }
-    else if( iType == ECommon ) 
+    else if ( iType == ECommon ) 
         {
         if( iBgImagePath )
             {
@@ -220,35 +295,17 @@
             TRAP_IGNORE( iBgImage = iSkinSrv.WallpaperImageL( *iBgImagePath ) );
             }
         }
+    
     iBgContext->SetRect( iRect );
     
-    // create status pane mask image and set size
-    if( iSpMask )
+    TRAPD( err, UpdateStatuspaneMaskL() );
+    if( err )
         {
+        delete iSpBitmap;
+        iSpBitmap = NULL;
         delete iSpMask;
         iSpMask = NULL;
         }
-    
-    TRect spRect;
-    AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EStatusPane, spRect );
-    
-    TInt err( KErrNone );    
-    
-    if( Layout_Meta_Data::IsLandscapeOrientation() )
-        {
-        TRAP( err, iSpMask = AknsUtils::CreateBitmapL( AknsUtils::SkinInstance(),
-                KAknsIIDQgnGrafBgLscTopMaskIcon ) );
-        }
-    else
-        {
-        TRAP( err, iSpMask = AknsUtils::CreateBitmapL( AknsUtils::SkinInstance(),
-                KAknsIIDQgnGrafBgPrtTopMaskIcon ) );        
-        }
-    
-    if( iSpMask )
-        {
-        AknIconUtils::SetSize( iSpMask, spRect.Size(), EAspectRatioNotPreserved );
-        }
     }
 
 // -----------------------------------------------------------------------------
@@ -257,32 +314,30 @@
 // 
 void CXnBackgroundManager::MakeVisible( TBool aVisible )
     {    
-    CCoeControl::MakeVisible( aVisible );
-    if ( aVisible && iScreenUpdateNeeded )
+    CCoeControl::MakeVisible( aVisible );      
+    
+    if ( aVisible )
         {
-        iScreenUpdateNeeded = EFalse;
         DrawNow();
         }
     }
 
-
 // -----------------------------------------------------------------------------
 // Handle disk drive notifications.
 // -----------------------------------------------------------------------------
 //
-void CXnBackgroundManager::HandleNotifyDisk(
-        TInt /*aError*/,
-        const TDiskEvent& aEvent )
+void CXnBackgroundManager::HandleNotifyDisk( TInt /*aError*/, 
+    const TDiskEvent& aEvent )              
     {
     if( aEvent.iType == MDiskNotifyHandlerCallback::EDiskStatusChanged )
         {
         if( !( aEvent.iInfo.iDriveAtt & KDriveAttInternal ) ) 
             {        
             TBool diskRemoved( aEvent.iInfo.iType == EMediaNotPresent );
+            
             if( diskRemoved )
                 {
-                // TODO:
-                //TRAP_IGNORE( RemovableDiskRemovedL() );
+                TRAP_IGNORE( RemovableDiskRemovedL() );        
                 }
             else
                 {
@@ -293,62 +348,91 @@
     }
 
 // -----------------------------------------------------------------------------
-// CXnBackgroundManager::CacheWallpaperL
+// CXnBackgroundManager::ConstructWallpaper
 // -----------------------------------------------------------------------------
 //
-TInt CXnBackgroundManager::CacheWallpaperL( const TDesC& aFileName, CXnViewData& aViewData )
+TInt CXnBackgroundManager::ConstructWallpaper( const TDesC& aFileName, 
+    CXnViewData& aViewData )
     {
-    if( aFileName == KNullDesC )
-        {
-        return KErrArgument;
-        }
-
-    aViewData.SetWallpaperImagePathL( aFileName );
+    TRAP_IGNORE( aViewData.SetWallpaperImagePathL( aFileName ) );
     aViewData.SetWallpaperImage( NULL );
 
-    TBool err( KErrNone );
-    TRAP( err, iSkinSrv.AddWallpaperL( aFileName, iRect.Size() ) );
+    TRAPD( err, iSkinSrv.AddWallpaperL( aFileName, iRect.Size() ) );
     if( err == KErrNone )
-        {    
-        CFbsBitmap* bitmap( NULL );
-        CleanupStack::PushL( bitmap );
-        TRAP( err, bitmap = iSkinSrv.WallpaperImageL( aFileName ) );
-        if( err == KErrNone && bitmap )
-            {
-            aViewData.SetWallpaperImage( bitmap ); // Ownership tranferred
-            }        
-        else
-            {
-            iSkinSrv.RemoveWallpaper( aFileName );
-            }
-        CleanupStack::Pop();
-        }
+        {
+        UpdateViewData( aFileName, aViewData );
+        }  
+    
     return err;
     }
 
 // ---------------------------------------------------------------------------
-// CXnBackgroundManager::AddWallpaperL
+// CXnBackgroundManager::SetWallpaperL
 // ---------------------------------------------------------------------------
 //
-TInt CXnBackgroundManager::AddWallpaperL( const TDesC& aFileName )
+void CXnBackgroundManager::SetWallpaperL()
     {
-    TInt retVal( KErrNone );
+    TInt selectedIndex( 0 );
+
+    CAknListQueryDialog* query =
+        new ( ELeave ) CAknListQueryDialog( &selectedIndex );   
+    query->PrepareLC( R_LISTQUERY_CHANGE_WALLPAPER );
+
+    if ( !query->RunLD() )
+        {
+        // Query canceled
+        return;
+        }
+           
+    CXnAppUiAdapter& appui( iViewManager.AppUiAdapter() );
     
-    GfxTransEffect::Begin( this, KGfxControlActionAppear );
-                   
+    if ( selectedIndex == 0 )
+        {
+        // Set wallpaper to default skin
+        SetWallpaper( KNullDesC );
+        
+        appui.EffectManager()->BgAppearEffect( this, ETrue );        
+        }
+    else if ( selectedIndex == 1 )
+        {
+        if ( CXnOomSysHandler::HeapAvailable( CXnOomSysHandler::EMem6MB ) )
+            {                                      
+            appui.ActivateLocalViewL( KWallpaperViewUid, KDummyUid, KSingle );
+            
+            appui.EffectManager()->BeginFullscreenEffectL( KGfxContextOpenWallpaperView );            
+            }
+        else
+            {
+            // Potentially not enough memory
+            iViewManager.OomSysHandler().HandlePotentialOomL();        
+            }
+        }        
+    }
+    
+// ---------------------------------------------------------------------------
+// CXnBackgroundManager::SetWallpaper
+// ---------------------------------------------------------------------------
+//
+TBool CXnBackgroundManager::SetWallpaper( const TDesC& aFileName )
+    {
+    TInt err( KErrNone );
+                         
     if ( iType == EPageSpecific )
         {
-        retVal = AddPageSpecificWallpaperL( aFileName );
+        TRAP( err, SetPageSpecificWallpaperL( aFileName ) );
         }
     else if ( iType == ECommon )
         {
-        retVal = AddCommonWallpaperL( aFileName );
+        TRAP( err, SetCommonWallpaperL( aFileName ) );
         }
     
-    GfxTransEffect::SetDemarcation( this, Position() );    
-    GfxTransEffect::End( this );
-    
-    return retVal;
+    if( err )
+        {
+        TRAP_IGNORE( HandleErrorL( err ) );
+        return EFalse;
+        }
+        
+    return ETrue;
     }
 
 // ---------------------------------------------------------------------------
@@ -379,7 +463,31 @@
         iBgImage = NULL;
         }
     }
-    
+
+// -----------------------------------------------------------------------------
+// CXnBackgroundManager::ChangeWallpaper
+// -----------------------------------------------------------------------------
+//
+void CXnBackgroundManager::ChangeWallpaper( const CXnViewData& aOldView, 
+    const CXnViewData& aNewView, TBool aDrawNow )
+    {
+    if( iType == EPageSpecific )
+        {
+        const TDesC& oldwp( aOldView.WallpaperImagePath() );
+        const TDesC& newwp( aNewView.WallpaperImagePath() ); 
+            
+        if ( oldwp.Compare( newwp ) ) 
+            {
+            iStoreWallpaper = ETrue;                    
+            
+            if ( aDrawNow )
+                {
+                DrawNow();
+                }
+            }
+        }
+    }
+
 // ---------------------------------------------------------------------------
 // CXnBackgroundManager::WallpaperType
 // ---------------------------------------------------------------------------
@@ -388,26 +496,28 @@
     {
     return iType;
     }
-
-// -----------------------------------------------------------------------------
-// CXnBackgroundManager::WallpaperChanged
-// -----------------------------------------------------------------------------
+	
+// ---------------------------------------------------------------------------
+// CXnBackgroundManager::UpdateViewData
+// ---------------------------------------------------------------------------
 //
-void CXnBackgroundManager::WallpaperChanged( const CXnViewData& aOldView, 
-    const CXnViewData& aNewView )
+void CXnBackgroundManager::UpdateViewData( const TDesC& aFileName,
+    CXnViewData& aViewData )
     {
-    if( iType == EPageSpecific && 
-        aOldView.WallpaperImagePath().Compare( aNewView.WallpaperImagePath() ) )
+    TRAP_IGNORE( aViewData.SetWallpaperImagePathL( aFileName ) );
+    
+    if( aFileName == KNullDesC )
         {
-        UpdateScreen();
-
-        // Since AknsWallpaperUtils::SetIdleWallpaper() call is slow, it is called
-        // asynchronously. In that way we can avoid it slowing down page switching.
-        if ( iTimer->IsActive() )
+        aViewData.SetWallpaperImage( NULL );
+        }
+    else
+        {
+        CFbsBitmap* bitmap( NULL );
+        TRAPD( err, bitmap = iSkinSrv.WallpaperImageL( aFileName ) );
+        if( err == KErrNone && bitmap )
             {
-            iTimer->Cancel();
-            }
-        iTimer->Start(KCallbackDelay, KCallbackDelay, TCallBack( TimerCallback, this ) );
+            aViewData.SetWallpaperImage( bitmap ); // Ownership tranferred
+            }        
         }
     }
 
@@ -518,52 +628,21 @@
     
     return ret;
     }
-
-// ---------------------------------------------------------------------------
-// CXnBackgroundManager::SetWallpaperL
-// ---------------------------------------------------------------------------
-//
-void CXnBackgroundManager::SetWallpaperL()
-    {
-    TInt selectedIndex( 0 );
-
-    CAknListQueryDialog* query =
-        new ( ELeave ) CAknListQueryDialog( &selectedIndex );
-    CleanupStack::PushL( query );
-    query->PrepareLC( R_LISTQUERY_CHANGE_WALLPAPER );
-
-    if ( query->RunLD() )
-        {
-        if ( selectedIndex == 0 )
-            {
-            AddWallpaperL( KNullDesC );
-            }
-        else if ( selectedIndex == 1 )
-            {
-            if ( CXnOomSysHandler::HeapAvailable( CXnOomSysHandler::EMem6MB ) )
-                {
-            CXnAppUiAdapter& appui( iViewManager.AppUiAdapter() );
-            
-            appui.EffectManager()->BeginFullscreenEffectL(
-                KGfxContextOpenWallpaperView, iViewManager.ActiveViewData() );        
-            
-            appui.ActivateLocalViewL( KWallpaperViewUid, KDummyUid, KSingle );                                 
-                }
-            else
-            	{
-            	OomSysHandler().HandlePotentialOomL();
-            	}
-            }
-        }
-    CleanupStack::Pop( query );
-    }
     
 // ---------------------------------------------------------------------------
 // CXnBackgroundManager::SkinContentChanged
 // ---------------------------------------------------------------------------
 //
 void CXnBackgroundManager::SkinContentChanged()
-    {    
+    {   
+    TRAPD( err, UpdateStatuspaneMaskL() );
+    if( err )
+        {
+        delete iSpBitmap;
+        iSpBitmap = NULL;
+        delete iSpMask;
+        iSpMask = NULL;
+        }
     }
     
 // ---------------------------------------------------------------------------
@@ -586,7 +665,7 @@
         }
     else if ( aReason == EAknsSkinStatusConfigurationDeployed )
         {
-        UpdateScreen();
+        DrawNow();
         }
     }
     
@@ -600,21 +679,17 @@
     }
 
 // -----------------------------------------------------------------------------
-// CXnBackgroundManager::CleanCache
-// -----------------------------------------------------------------------------
-//
-void CXnBackgroundManager::CleanCache()
-    {
-    iSkinSrv.RemoveAllWallpapers();
-    }
-
-// -----------------------------------------------------------------------------
 // CXnBackgroundManager::RemoveWallpaper
 // -----------------------------------------------------------------------------
 //
 void CXnBackgroundManager::RemoveWallpaperFromCache( const TDesC& aFileName,
     CXnViewData* aViewData )
     {
+    if( aFileName == KNullDesC )
+        {
+        return;
+        }
+    
     CXnViewData* currentViewData( aViewData );
     if( !currentViewData )
         {
@@ -642,17 +717,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CXnBackgroundManager::RemoveWallpaper
-// -----------------------------------------------------------------------------
-//
-void CXnBackgroundManager::RemoveWallpaperL( CXnViewData& aViewData )
-    {
-    aViewData.SetWallpaperImagePathL( KNullDesC );
-    aViewData.SetWallpaperImage( NULL );
-    SetSettingPropertyL( aViewData.PluginId(), KWallpaper, KPath, KNullDesC8 );
-    }
-
-// -----------------------------------------------------------------------------
 // CXnBackgroundManager::UpdateWallpapersL
 // -----------------------------------------------------------------------------
 //
@@ -681,11 +745,74 @@
     }
 
 // -----------------------------------------------------------------------------
+// CXnBackgroundManager::RemovableDiskRemovedL
+// -----------------------------------------------------------------------------
+//
+void CXnBackgroundManager::RemovableDiskRemovedL()
+    {
+    TInt drawingNeeded( EFalse );
+    RFs& fs( CEikonEnv::Static()->FsSession() );
+
+    if( iType == EPageSpecific )
+        {
+        CXnRootData& rootData = iViewManager.ActiveAppData();
+        if( !&rootData )
+            {
+            return;
+            }
+        RPointerArray<CXnPluginData>& rootDataArr = rootData.PluginData();
+        for( TInt i = 0; i < rootDataArr.Count(); i++ )
+            {
+            CXnViewData* viewData = static_cast<CXnViewData*>( rootDataArr[i] );
+            const TDesC& path = viewData->WallpaperImagePath();
+            CFbsBitmap* bitmap = viewData->WallpaperImage();
+            if( path != KNullDesC && bitmap )
+                {
+                if ( !BaflUtils::FileExists( fs, path ) )
+                    {
+                    viewData->SetWallpaperImage( NULL );
+                    if( viewData == &iViewManager.ActiveViewData() )
+                        {
+                        drawingNeeded = ETrue;
+                        }
+                    }
+                }
+            }
+        }
+    else
+        {
+        if( iBgImagePath && iBgImage )
+            {
+            if ( !BaflUtils::FileExists( fs, *iBgImagePath ) )
+                {
+                delete iBgImage;
+                iBgImage = NULL;
+                drawingNeeded = ETrue;
+                }
+            }
+        }
+
+    if( drawingNeeded )
+        {
+        DrawNow();
+        
+        iIntUpdate++;
+        TInt err = AknsWallpaperUtils::SetIdleWallpaper( KNullDesC , NULL );
+        if( err )
+            {
+            iIntUpdate--;
+            }  
+        }    
+    }
+
+// -----------------------------------------------------------------------------
 // CXnBackgroundManager::RemovableDiskInsertedL
 // -----------------------------------------------------------------------------
 //
 void CXnBackgroundManager::RemovableDiskInsertedL()
     {
+    RFs& fs( CEikonEnv::Static()->FsSession() );
+
     if( iType == EPageSpecific )
         {
         CXnRootData& rootData = iViewManager.ActiveAppData();
@@ -702,30 +829,38 @@
             CFbsBitmap* bitmap = viewData->WallpaperImage();
             if( path != KNullDesC && !bitmap )
                 {
-                TInt err = CacheWallpaperL( path, *viewData );
-                if( err == KErrNone && viewData == &iViewManager.ActiveViewData() )
+                if ( BaflUtils::FileExists( fs, path ) )
                     {
-                    drawingNeeded = ETrue;
+                    TInt err = ConstructWallpaper( path, *viewData );
+                    if( err == KErrNone && viewData == &iViewManager.ActiveViewData() )
+                        {
+                        drawingNeeded = ETrue;
+                        }
                     }
                 }
             }
         if( drawingNeeded )
             {
-            UpdateScreen();
-            
-            TInt err = AknsWallpaperUtils::SetIdleWallpaper( 
-                iViewManager.ActiveViewData().WallpaperImagePath(), NULL );
-            if( err == KErrNone )
-                {
-                iIntUpdate++;
-                }   
+            DrawNow();
+            iStoreWallpaper = ETrue;
+            StoreWallpaperL();
             }    
         }
     else
         {
-        if( iBgImagePath )
+        if( iBgImagePath && !iBgImage )
             {
-            AddCommonWallpaperL( *iBgImagePath, EFalse );
+            if ( BaflUtils::FileExists( fs, *iBgImagePath ) )
+                {
+                TRAPD( err, SetCommonWallpaperL( *iBgImagePath, EFalse ) );
+                if( err == KErrCANoRights )
+                    {
+                    ShowInfoNoteL( R_QTN_HS_DRM_PROTECTED_IMAGE_NOTE );
+                    delete iBgImagePath;
+                    iBgImagePath = NULL;
+                    SaveWallpaperL();
+                    }
+                }
             }
         }
     }
@@ -750,11 +885,13 @@
             }
         else
             {
+            iStoreWallpaper = EFalse;
+
             TFileName path;
             err = repository->Get( KAIWallpaperPath, path );
             if ( !err && path.Length())
                 {
-                AddCommonWallpaperL( path, EFalse );
+                TRAP_IGNORE( SetCommonWallpaperL( path, EFalse, EFalse ) );
                 }
             }
         }
@@ -762,111 +899,105 @@
     }
 
 // ---------------------------------------------------------------------------
-// CXnBackgroundManager::AddPageSpecificWallpaperL
+// CXnBackgroundManager::SetPageSpecificWallpaperL
 // ---------------------------------------------------------------------------
 //
-TInt CXnBackgroundManager::AddPageSpecificWallpaperL( const TDesC& aFileName )
+void CXnBackgroundManager::SetPageSpecificWallpaperL( const TDesC& aFileName )
     {
-    TInt err = KErrNone;
     CXnViewData& viewData( iViewManager.ActiveViewData() );
-    const TDesC& old = viewData.WallpaperImagePath();
-
-    // Remove old from the cache
-    if( old != KNullDesC )
-        {
-        RemoveWallpaperFromCache( old );
-        }
 
-    // Add new to the cache
-    if( aFileName != KNullDesC )
+    TInt err( KErrNone );
+    iIntUpdate++;
+
+    if(  aFileName == KNullDesC )
         {
-        err = CacheWallpaperL( aFileName, viewData ); 
-    
-        if( err == KErrNone )
-            {
-            SaveWallpaperL(); // to HSPS
-            }
-        else
-            {
-            return err;
-            }
+        err = AknsWallpaperUtils::SetIdleWallpaper( aFileName, NULL );
         }
-    // WallpaperImage changed back to default. Update view data.
     else
         {
-        viewData.SetWallpaperImagePathL( KNullDesC );
-        viewData.SetWallpaperImage( NULL ); 
+        // Wallpaper is also added into the cache if it is not there already.
+        err = AknsWallpaperUtils::SetIdleWallpaper( aFileName, CCoeEnv::Static(),
+            R_QTN_HS_PROCESSING_NOTE, R_CHANGE_WALLPAPER_WAIT_DIALOG );    
+        }
+    if( err == KErrNone )
+        {
+        // Remove old wallpaper from the cache
+        const TDesC& oldPath = viewData.WallpaperImagePath();
+        RemoveWallpaperFromCache( oldPath );
+
+        UpdateViewData( aFileName, viewData );
+
         SaveWallpaperL(); // to HSPS
         }
-
-    // Update screen
-    UpdateScreen();
-    
-    err = AknsWallpaperUtils::SetIdleWallpaper( aFileName, NULL );
-    if( err == KErrNone )
+    else
         {
-        iIntUpdate++;
+        iIntUpdate--;
+        User::Leave( err );
         }
-        
-    return err;
     }
         
 // ---------------------------------------------------------------------------
-// CXnBackgroundManager::AddCommonWallpaperL
+// CXnBackgroundManager::SetCommonWallpaperL
 // ---------------------------------------------------------------------------
 //
-TInt CXnBackgroundManager::AddCommonWallpaperL( const TDesC& aFileName, 
-    TBool aSave )
+void CXnBackgroundManager::SetCommonWallpaperL( const TDesC& aFileName, 
+    TBool aSave, TBool aShowProgressBar )
     {
-    TInt err = KErrNone;      
-    // Remove old from the cache
-    if( iBgImagePath )
+    TInt err( KErrNone );
+    iIntUpdate++;
+
+    if(  aFileName == KNullDesC || !aShowProgressBar )
         {
-        iSkinSrv.RemoveWallpaper( *iBgImagePath );          
-        delete iBgImagePath;
-        iBgImagePath = NULL;
+        err = AknsWallpaperUtils::SetIdleWallpaper( aFileName, NULL );
         }
-    delete iBgImage;
-    iBgImage = NULL;
+    else
+        {
+        // Wallpaper is also added into the cache if it is not there already.
+        err = AknsWallpaperUtils::SetIdleWallpaper( aFileName, CCoeEnv::Static(),
+            R_QTN_HS_PROCESSING_NOTE, R_CHANGE_WALLPAPER_WAIT_DIALOG );    
+        }
 
-    if( aFileName != KNullDesC )
+    if( !err )
         {
-        iBgImagePath = aFileName.AllocL();
-    
-        err = KErrNone;
-        TRAP( err, iSkinSrv.AddWallpaperL( aFileName, iRect.Size() ) );
-        if( err != KErrNone )
+        // Remove old from the cache
+        if( iBgImagePath && iBgImagePath->Compare( aFileName ) )
             {
-            return err;
+            iSkinSrv.RemoveWallpaper( *iBgImagePath );          
+            delete iBgImagePath;
+            iBgImagePath = NULL;
             }
-        
-        TRAP( err, iBgImage = iSkinSrv.WallpaperImageL( aFileName ) );
-        if( err )
+        delete iBgImage;
+        iBgImage = NULL;
+
+        if( aFileName != KNullDesC )
             {
-            iSkinSrv.RemoveWallpaper( aFileName );
-            delete iBgImage;
-            iBgImage = NULL;
-            // image is corrupted or format is not supported
-            return KErrCACorruptContent;
-            }
+            iBgImagePath = aFileName.AllocL();
+
+            TRAPD( err, iBgImage = iSkinSrv.WallpaperImageL( aFileName ) );
+            if( err )
+                {
+                delete iBgImage;
+                iBgImage = NULL;
+                delete iBgImagePath;
+                iBgImagePath = NULL;
+                User::Leave( err );
+                }
+            }    
+        }
+    else
+        {
+        iIntUpdate--;
+        User::Leave( err );
         }
     
     // Update screen
-    UpdateScreen();        
+    DrawNow();        
 
     // Save path to cenrep
     if( aSave )
         {
         SaveWallpaperL();
         }
-
-    err = AknsWallpaperUtils::SetIdleWallpaper( aFileName, NULL );
-    if( err == KErrNone )
-        {
-        iIntUpdate++;
-        }
-
-    return err;
     }
 
 // ---------------------------------------------------------------------------
@@ -883,66 +1014,52 @@
         TInt err = repository->Get( KPslnWallpaperType, wallpaperType );
         if ( err == KErrNone )
             {
-            if ( wallpaperType == 0 )
+            TFileName wallpaper;            
+            
+            // WallpaperImage is image
+            // Get wallpaper image path from cenrep
+            if ( wallpaperType == 1 )
                 {
-                if( iType == EPageSpecific )
-                    {
-                    CXnViewData& viewData( iViewManager.ActiveViewData() );
-                    RemoveWallpaperFromCache( viewData.WallpaperImagePath() );
-                    RemoveWallpaperL( viewData );                        
-                    } 
-                else if( iType == ECommon )
+                err = repository->Get( KPslnIdleBackgroundImagePath, wallpaper );
+                if ( err != KErrNone )
                     {
-                    if( iBgImagePath )
-                        {
-                        iSkinSrv.RemoveWallpaper( *iBgImagePath );
-                        delete iBgImagePath;
-                        iBgImagePath = NULL;
-                        }
-                    delete iBgImage;
-                    iBgImage = NULL;
-                    SaveWallpaperL();
+                    return;
                     }
                 }
-            else if ( wallpaperType == 1 )
+                
+            if( iType == EPageSpecific )
                 {
-                // WallpaperImage is image
-                // Get wallpaper image path from cenrep and save it
-                TFileName wallpaper;            
-                err = repository->Get( KPslnIdleBackgroundImagePath, wallpaper );
-                if ( err == KErrNone )
+                CXnViewData& viewData( iViewManager.ActiveViewData() );
+                RemoveWallpaperFromCache( viewData.WallpaperImagePath() );
+                viewData.SetWallpaperImagePathL( KNullDesC );
+                viewData.SetWallpaperImage( NULL );
+                if( wallpaperType == 1 )
                     {
-                    if( iType == EPageSpecific )
-                        {
-                        AddPageSpecificWallpaperL( wallpaper );
-                        }
-                    else if( iType == ECommon )
-                        {
-                        AddCommonWallpaperL( wallpaper, EFalse );
-                        }
-                    }                
+                    UpdateViewData( wallpaper, viewData );
+                    }
+                } 
+            else if( iType == ECommon )
+                {
+                if( iBgImagePath )
+                    {
+                    iSkinSrv.RemoveWallpaper( *iBgImagePath );
+                    delete iBgImagePath;
+                    iBgImagePath = NULL;
+                    }
+                delete iBgImage;
+                iBgImage = NULL;
+                if( wallpaperType == 1 )
+                    {
+                    iBgImagePath = wallpaper.AllocL();                
+                    iBgImage = iSkinSrv.WallpaperImageL( wallpaper );
+                    }
                 }
-            UpdateScreen();
             }
 
-        CleanupStack::PopAndDestroy( repository );
+        SaveWallpaperL();
+        DrawNow();
         }    
-    }
-
-// ---------------------------------------------------------------------------
-// CXnBackgroundManager::UpdateScreen
-// ---------------------------------------------------------------------------
-//
-void CXnBackgroundManager::UpdateScreen()
-    {
-    if( !IsVisible() )
-        {
-        iScreenUpdateNeeded = ETrue;
-        }
-    else
-        {
-        DrawNow();  
-        }
+    CleanupStack::PopAndDestroy( repository );
     }
 
 // -----------------------------------------------------------------------------
@@ -962,46 +1079,101 @@
     }
 
 // -----------------------------------------------------------------------------
-// CXnBackgroundManager::TimerCallback
-// -----------------------------------------------------------------------------
-//
-TInt CXnBackgroundManager::TimerCallback(TAny *aPtr)
-    {
-    CXnBackgroundManager* bgManager = reinterpret_cast<CXnBackgroundManager*>( aPtr );    
-    bgManager->iTimer->Cancel();
-    
-    TInt err = AknsWallpaperUtils::SetIdleWallpaper( bgManager->
-        iViewManager.ActiveViewData().WallpaperImagePath(), NULL );
-    if( err == KErrNone )
-        {
-        bgManager->iIntUpdate++;
-        }   
-    return EFalse;
-    }
-
-// -----------------------------------------------------------------------------
 // CXnBackgroundManager::DrawStatusPaneMask
 // -----------------------------------------------------------------------------
 //
 void CXnBackgroundManager::DrawStatusPaneMask() const
     {
-    if( iSpMask )
+    if( iSpBitmap && iSpMask )
         {
         TSize bmpSize = iSpMask->SizeInPixels();
         TRect spRect( 0, 0, bmpSize.iWidth, bmpSize.iHeight );
-        SystemGc().DrawBitmap( spRect, iSpMask );
+        SystemGc().DrawBitmapMasked( spRect, iSpBitmap, spRect, iSpMask, ETrue );
         }
     }
 
 // -----------------------------------------------------------------------------
-// CXnBackgroundManager::OOMSysHandler
+// CXnBackgroundManager::StoreWallpaperL
 // -----------------------------------------------------------------------------
 //
-CXnOomSysHandler& CXnBackgroundManager::OomSysHandler() const
+void CXnBackgroundManager::StoreWallpaperL()
     {
-    __ASSERT_DEBUG( iOomSysHandler , User::Panic( _L("xnbackgroundmanager"), 0 ) );
+    if ( iStoreWallpaper )
+        {   
+        iStoreWallpaper = EFalse;
+
+        CXnViewData& activeView = iViewManager.ActiveViewData();
+        const TDesC& path( activeView.WallpaperImagePath() );
+        if( path != KNullDesC && activeView.WallpaperImage() )
+            {
+            iIntUpdate++;
+            TInt err( AknsWallpaperUtils::SetIdleWallpaper( path, NULL ) ); 
+                  
+            if( err )
+                {
+                iIntUpdate--;
+                
+                if ( err == KErrCANoRights )
+                    {
+                    ShowInfoNoteL( R_QTN_HS_DRM_PROTECTED_IMAGE_NOTE );
+
+                    // Change wpp to default
+                    UpdateViewData( KNullDesC, iViewManager.ActiveViewData() );
+                    SaveWallpaperL();
+                    DrawNow();
+                    }            
+                }        
+            }
+        else
+            {
+            iIntUpdate++;
+            TInt err( AknsWallpaperUtils::SetIdleWallpaper( KNullDesC, NULL ) ); 
+            if( err )
+                {
+                iIntUpdate--;
+                }       
+            }
+        }       
+    }
 
-    return *iOomSysHandler;
+// -----------------------------------------------------------------------------
+// CXnBackgroundManager::UpdateStatuspaneMaskL
+// -----------------------------------------------------------------------------
+//
+void CXnBackgroundManager::UpdateStatuspaneMaskL()
+    {
+    if ( iSpBitmap )
+        {
+        delete iSpBitmap;
+        iSpBitmap = NULL;
+        }
+    if ( iSpMask )
+        {
+        delete iSpMask;
+        iSpMask = NULL;
+        }
+    
+    TRect spRect;
+    AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EStatusPane, spRect );
+    
+    iSpBitmap = CreateSkinBitmapL( KAknsIIDQsnBgScreenIdle, spRect );
+    
+    if ( Layout_Meta_Data::IsLandscapeOrientation() )
+        {
+        iSpMask = AknsUtils::CreateBitmapL( AknsUtils::SkinInstance(),
+            KAknsIIDQgnGrafBgLscTopMaskIcon );
+        }
+    else
+        {
+        iSpMask = AknsUtils::CreateBitmapL( AknsUtils::SkinInstance(),
+            KAknsIIDQgnGrafBgPrtTopMaskIcon );        
+        }
+    
+    if ( iSpMask )
+        {
+        User::LeaveIfError( AknIconUtils::SetSize( 
+            iSpMask, spRect.Size(), EAspectRatioNotPreserved ) );
+        }
     }
 
 //  End of File
--- a/idlehomescreen/xmluirendering/uiengine/src/xncomposer.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/src/xncomposer.cpp	Tue May 11 16:02:39 2010 +0300
@@ -646,7 +646,7 @@
                 bgImage->Des().Trim();
                 if( bgImage && bgImage->Length() > 0 )
                     {                
-                    bgManager.CacheWallpaperL( bgImage->Des(), aViewData );
+                    bgManager.ConstructWallpaper( bgImage->Des(), aViewData );
                     }
                 CleanupStack::PopAndDestroy( bgImage );
                 }
--- a/idlehomescreen/xmluirendering/uiengine/src/xncontroladapterimpl.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/src/xncontroladapterimpl.cpp	Tue May 11 16:02:39 2010 +0300
@@ -3295,64 +3295,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// Create scaled bitmap from source bitmap.
-// -----------------------------------------------------------------------------
-//
-void CreateScaledBitmapL(
-    const TRect& aRect,
-    CFbsBitmap*& aTrgBitmap,
-    CFbsBitmap* aSrcBitmap,
-    TBool aPreserveAspectRatio,
-    TBool aForceFallBack )
-    {
-    TRect destRect = aRect;
-
-    if ( aPreserveAspectRatio )
-        {
-        // Calculate the bitmap image dimensions so that it uses maximum space
-        // of the given rectangle and maintains aspect ratio.
-        TInt srcHeight = aSrcBitmap->SizeInPixels().iHeight;
-        TInt srcWidth = aSrcBitmap->SizeInPixels().iWidth;
-        TReal scaleRatio( 1 ); //no scale as defaul
-
-        //If any dimension is 0, then we do not bother to scale
-        if ( aRect.Width() > 0 && aRect.Height() > 0 )
-            {
-            TReal xRatio = ( ( TReal )srcWidth / ( TReal )aRect.Width() );
-            TReal yRatio = ( ( TReal )srcHeight / ( TReal )aRect.Height() );
-            //Find out appropriate scaling factor
-            xRatio > yRatio ? ( scaleRatio = xRatio ) : ( scaleRatio = yRatio );
-            }
-
-        //Scale the size for target bitmap
-        destRect.SetHeight( srcHeight / scaleRatio );
-        destRect.SetWidth( srcWidth / scaleRatio );
-        }
-
-    // see if there's a need to scale. If source and destination size are the same,
-    // then we don't need to duplicate the bitmap. aTrgBitmap will be null.
-    TSize srcSize = aSrcBitmap->SizeInPixels();
-    TSize destSize = destRect.Size();
-    if ( srcSize == destSize )
-        {
-        return;
-        }
-
-    aTrgBitmap = new ( ELeave ) CFbsBitmap;
-    CleanupStack::PushL( aTrgBitmap );
-    //It is allowed to create zero height or width bitmap.
-    TInt err( aTrgBitmap->Create( destRect.Size(), aSrcBitmap->DisplayMode() ) );
-
-    if ( err == KErrNone )
-        {
-        CXnUtils::ScaleBitmapExtL( destRect, aTrgBitmap, aSrcBitmap, aForceFallBack );
-        }
-
-    //we do not own the bitmap so just Pop.
-    CleanupStack::Pop( aTrgBitmap );
-    }
-
-// -----------------------------------------------------------------------------
 // SoftkeyNode
 // Gets the node of softkey according to pointer location
 // -----------------------------------------------------------------------------
@@ -3600,13 +3542,6 @@
     delete iContentBitmap;
     delete iContentMask;
 
-    delete iScaledContentBitmap;
-    delete iScaledContentMask;
-
-    delete iScaledTransparentColor;
-    delete iScaledBackgroundSkin;
-    delete iScaledBackgroundImage;
-
     iChildren.Reset();
 
     if ( iAnimation )
@@ -3624,7 +3559,9 @@
 // -----------------------------------------------------------------------------
 //
 CXnControlAdapterImpl::CXnControlAdapterImpl( CXnNodePluginIf& aNode )
-    : iNode( aNode )
+    : iNode( aNode ), 
+      iBackgrondInitialized ( EFalse ),
+      iBorderInitialized ( EFalse )
     {
     }
 
@@ -3705,14 +3642,15 @@
 
     if ( aKeyEvent.iScanCode == EStdKeyDevice0 || // RSK
          aKeyEvent.iScanCode == EStdKeyDevice1 || // LSK
-         aKeyEvent.iScanCode == EStdKeyDevice3 )  // MSK
+         aKeyEvent.iScanCode == EStdKeyDevice3 || // MSK
+         aKeyEvent.iCode == EKeyEnter )
         {
         if ( aType == EEventKeyDown )
             {            
             iLongtap = EFalse;
             
             if ( aKeyEvent.iScanCode == EStdKeyDevice3 ||
-                aKeyEvent.iScanCode == EStdKeyEnter )
+                 aKeyEvent.iCode == EKeyEnter )
                 {
                 if ( node->IsStateSet( XnPropertyNames::style::common::KFocus ) )
                     {
@@ -3787,7 +3725,7 @@
                 }
             
             if ( aKeyEvent.iScanCode == EStdKeyDevice3 ||
-                aKeyEvent.iScanCode == EStdKeyEnter )
+                 aKeyEvent.iCode == EKeyEnter )
                 {
                 // Reset "pressed down"
                 node->UnsetStateL( 
@@ -4198,52 +4136,25 @@
                 colorProperty->Property()->PropertyValueList().Item( 0 ) );
 
         if ( value->PrimitiveValueType() == CXnDomPropertyValue::ERgbColor )
-            {
-	        TRect paddingRect = aNode.PaddingRect();    
-            aMask->SetDisplayMode( EGray256 );
-
-            aGc.SetBrushColor( NULL );
-            aGc.SetBrushStyle( CGraphicsContext::ENullBrush );
-
-            if ( !iScaledTransparentColor )
-                {
-                CFbsBitmap* bitmap( NULL );
-                CFbsBitmap* mask( NULL );
-
-                mask = new ( ELeave ) CFbsBitmap;
-                CleanupStack::PushL( mask );
-
-                mask->Create( paddingRect.Size(), EGray256 );
-
-                CXnUtils::ScaleBitmapL(
-                    TRect( 0, 0, paddingRect.Width(), paddingRect.Height() ),
-                    mask, aMask );
-
-                CXnDomPropertyValue* value =
-                    static_cast< CXnDomPropertyValue* >(
-                        colorProperty->Property()->PropertyValueList().Item( 0 ) );
-
-                TRgb rgb( value->RgbColorValueL() );
-
-                bitmap = CreateBitmapFromColorL( paddingRect.Size(), rgb );
-                CleanupStack::PushL( bitmap );
-
-                iScaledTransparentColor = CGulIcon::NewL( bitmap, mask );
-
-                CleanupStack::Pop( 2 );
-                }
-
-            aGc.DrawBitmapMasked( paddingRect,
-                iScaledTransparentColor->Bitmap(),
-                TRect( TPoint( 0, 0 ), paddingRect.Size() ),
-                iScaledTransparentColor->Mask(),
+            {            
+            CFbsBitmap* bitmap( NULL );
+            TRgb rgb( value->RgbColorValueL() );
+            bitmap = CreateBitmapFromColorL( aMask->SizeInPixels(), rgb );
+            
+            aGc.DrawBitmapMasked( 
+                aNode.PaddingRect(),
+                bitmap,
+                TRect( TPoint( 0, 0 ), bitmap->SizeInPixels() ),
+                aMask,
                 EFalse );
+            
+            delete bitmap;
             }
         }
     }
 
 // -----------------------------------------------------------------------------
-// CXnControlAdapterImpl::DrawBackgroundSkinL
+// CXnControlAdapterImpl::DrawBackgroundSkin
 // Draws a skin item to the given rect
 // -----------------------------------------------------------------------------
 //
@@ -4295,18 +4206,15 @@
                     innerRect.Shrink(
                         KSkinGfxInnerRectShrink,
                         KSkinGfxInnerRectShrink );
-
-                    if ( !iScaledBackgroundSkin )
+                    
+                    if ( !iBackgroundBitmap )
                         {
-                        CFbsBitmap* bitmap = new ( ELeave ) CFbsBitmap;
-                        CleanupStack::PushL( bitmap );
-
-                        CFbsBitmap* mask = new ( ELeave ) CFbsBitmap;
-                        CleanupStack::PushL( mask );
-
-                        bitmap->Create( outerRect.Size(), aGc.Device()->DisplayMode() );
-
-                        CFbsBitmapDevice* device = CFbsBitmapDevice::NewL( bitmap );
+                        iBackgroundBitmap = new ( ELeave ) CFbsBitmap;
+                        iBackgroundBitmap->Create( aMask->SizeInPixels(), 
+                                aGc.Device()->DisplayMode() );
+                        
+                        CFbsBitmapDevice* device = 
+                                CFbsBitmapDevice::NewL( iBackgroundBitmap );
                         CleanupStack::PushL( device );
 
                         CBitmapContext* bc( NULL );
@@ -4323,27 +4231,15 @@
                             frameContext, NULL,
                             static_cast< CWindowGc& >( *bc ),
                             outerRect, KAknsDrawParamNoClearUnderImage );
-
-                        aMask->SetDisplayMode( EGray256 );
-
-                        aGc.SetBrushColor( NULL );
-                        aGc.SetBrushStyle( CGraphicsContext::ENullBrush );
-
-                        mask->Create( paddingRect.Size(), EGray256 );
-
-                        CXnUtils::ScaleBitmapL( outerRect, mask, aMask );
-
-                        CleanupStack::PopAndDestroy( 3 );
-
-                        iScaledBackgroundSkin = CGulIcon::NewL( bitmap, mask );
-
-                        CleanupStack::Pop( 2 );
+                        
+                        CleanupStack::PopAndDestroy( 3, device );
                         }
 
-                    CFbsBitmap* bitmap( iScaledBackgroundSkin->Bitmap() );
-                    CFbsBitmap* mask( iScaledBackgroundSkin->Mask() );
-
-                    aGc.BitBltMasked( paddingRect.iTl, bitmap, outerRect, mask, ETrue );
+                    aGc.DrawBitmapMasked( paddingRect, 
+                        iBackgroundBitmap, 
+                        TRect(TPoint(0, 0), iBackgroundBitmap->SizeInPixels()), 
+                        aMask, 
+                        ETrue );
                     }
                 else // draw background skin graphics without mask
                     {
@@ -4476,37 +4372,12 @@
         aGc.SetClippingRect( aRect );
 
         if ( aMask )
-            {
-            aMask->SetDisplayMode( EGray256 );
-
-            aGc.SetBrushColor( NULL );
-            aGc.SetBrushStyle( CGraphicsContext::ENullBrush );
-
-            if ( !iScaledBackgroundImage )
-                {
-                CFbsBitmap* mask( NULL );
-
-                mask = new ( ELeave ) CFbsBitmap;
-                CleanupStack::PushL( mask );
-
-                mask->Create( bitmapRect.Size(), EGray256 );
-
-                CXnUtils::ScaleBitmapL(
-                    TRect(
-                        0,
-                        0,
-                        bitmapRect.Width(),
-                        bitmapRect.Height() ),
-                    mask,
-                    aMask );
-
-                iScaledBackgroundImage = mask;
-
-                CleanupStack::Pop( mask );
-                }
-
-            aGc.DrawBitmapMasked( newRect, aBitmap, bitmapRect,
-                iScaledBackgroundImage, EFalse );
+            {           
+            aGc.DrawBitmapMasked( newRect, 
+                aBitmap, 
+                TRect(TPoint(0, 0), aBitmap->SizeInPixels()), 
+                aMask, 
+                EFalse );
             }
         else
             {
@@ -4984,12 +4855,6 @@
     delete iContentMask;
     iContentMask = NULL;
 
-    delete iScaledContentBitmap;
-    iScaledContentBitmap = NULL;
-
-    delete iScaledContentMask;
-    iScaledContentMask = NULL;
-
     iContentBitmap = aBitmap;
     iContentMask = aMask;
     }
@@ -5008,12 +4873,6 @@
     delete iContentMask;
     iContentMask = NULL;
 
-    delete iScaledContentBitmap;
-    iScaledContentBitmap = NULL;
-
-    delete iScaledContentMask;
-    iScaledContentMask = NULL;
-
     CXnNode& node( iNode.Node() );
     CXnUiEngine* engine( node.UiEngine() );
 
@@ -5083,7 +4942,7 @@
     TRect rect = iComponent->Node()->Node().Rect();
 
     // Check if the node has a property "preserve image aspect ratio".
-    TBool preserveAspectRatio = EFalse;
+    TBool preserveAspectRatio = ETrue;
     CXnNode& currentNode = iComponent->Node()->Node();
 
     CXnProperty* aspectProperty = currentNode.GetPropertyL(
@@ -5092,130 +4951,52 @@
         {
         const TDesC8& value = aspectProperty->StringValue();
 
-        if ( value.CompareF( XnPropertyNames::image::KPreserve ) == 0 )
+        if ( value.CompareF( XnPropertyNames::image::KNone ) == 0 )
             {
-            preserveAspectRatio = ETrue;
+            preserveAspectRatio = EFalse;
             }
         }
 
     TRect bitmapRect = rect;
     bitmapRect.Move( -rect.iTl.iX, -rect.iTl.iY );
-
     if ( AknIconUtils::IsMifIcon( iContentBitmap ) )
         {
         if ( preserveAspectRatio )
             {
             AknIconUtils::SetSize(
                 iContentBitmap, bitmapRect.Size(), EAspectRatioPreserved );
+            AknIconUtils::SetSize(
+                iContentMask, bitmapRect.Size(), EAspectRatioPreserved );
             }
         else
             {
             AknIconUtils::SetSize(
                 iContentBitmap, bitmapRect.Size(), EAspectRatioNotPreserved );
-            }
-        //Calculate new point to start draw in order to center bitmap to drawing area
-        rect.iTl.iY +=
-            ( rect.Height() - iContentBitmap->SizeInPixels().iHeight ) / 2;
-        rect.iTl.iX +=
-            ( rect.Width() - iContentBitmap->SizeInPixels().iWidth ) / 2;
-
-        if ( iContentMask )
-            {
-            // Based on the avkon's assumtion that mask is always inverted, the
-            // value of aInvertMask parameter is set to 'ETrue'
-            aGc.BitBltMasked( rect.iTl, iContentBitmap, bitmapRect, iContentMask,
-                ETrue );
-            }
-        else
-            {
-            aGc.BitBlt( rect.iTl, iContentBitmap, bitmapRect );
-            }
-        }
-    else
-        {
-        if ( !iScaledContentBitmap )
-            {
-            TBool forceFallBack = CXnUtils::DoesScaleBitmapUseFallBack(
-                iContentBitmap );
-
-            TRAPD( err, CreateScaledBitmapL( bitmapRect,
-                iScaledContentBitmap,
-                iContentBitmap,
-                preserveAspectRatio,
-                forceFallBack ) );
-            if ( err )
-                {
-                // return if CreateScaledBitmapL() leaves. This prevents the
-                // drawing of the original content bitmap which is wrong size.
-                return;
-                }
+            AknIconUtils::SetSize(
+                iContentMask, bitmapRect.Size(), EAspectRatioNotPreserved );
             }
-        if ( iContentMask && !iScaledContentMask )
-            {
-            TBool forceFallBack = CXnUtils::DoesScaleBitmapUseFallBack(
-                iContentMask );
-
-            TRAPD( err, CreateScaledBitmapL( bitmapRect,
-                iScaledContentMask,
-                iContentMask,
-                preserveAspectRatio,
-                forceFallBack ) );
-            if ( err )
-                {
-                // return if CreateScaledBitmapL() leaves. This prevents the
-                // drawing of the original content mask which is wrong size
-                // (and may distort the image).
-                return;
-                }
-            }
-
-        CFbsBitmap* bitmap( 0 );
-        CFbsBitmap* mask( 0 );
-
-        if ( iScaledContentBitmap )
-            {
-            bitmap = iScaledContentBitmap;
-            }
-        else
-            {
-            bitmap = iContentBitmap;
-            }
-
-        if ( iScaledContentMask )
-            {
-            mask = iScaledContentMask;
-            }
-        else
-            {
-            mask = iContentMask;
-            }
-
-        if ( bitmap && mask )
-            {
-            //Calculate new point to start draw in order to center bitmap to
-            // drawing area
-            rect.iTl.iY +=
-                ( rect.Height() - bitmap->SizeInPixels().iHeight ) / 2;
-            rect.iTl.iX +=
-                ( rect.Width() - bitmap->SizeInPixels().iWidth ) / 2;
-
-            // Based on the avkon's assumtion that mask is always inverted, the
-            // value of aInvertMask parameter is set to 'ETrue'
-            aGc.BitBltMasked( rect.iTl, bitmap, bitmapRect, mask, ETrue );
-            }
-        else if ( bitmap )
-            {
-            //Calculate new point to start draw in order to center bitmap to
-            // drawing area
-            rect.iTl.iY +=
-                ( rect.Height() - bitmap->SizeInPixels().iHeight ) / 2;
-            rect.iTl.iX +=
-                ( rect.Width() - bitmap->SizeInPixels().iWidth ) / 2;
-
-            aGc.BitBlt( rect.iTl, bitmap );
-            }
-        }
-   }
+        }
+    
+    // Calculate new point to start draw 
+    // in order to center bitmap to drawing area
+    rect.iTl.iY +=
+        ( rect.Height() - bitmapRect.Height() ) / 2;
+    rect.iTl.iX +=
+        ( rect.Width() - bitmapRect.Width() ) / 2;
+    
+    if ( iContentBitmap && iContentMask )
+        {
+        aGc.DrawBitmapMasked( rect, 
+            iContentBitmap, 
+            TRect(TPoint(0, 0), iContentBitmap->SizeInPixels()), 
+            iContentMask, 
+            ETrue );
+        }
+    else if ( iContentBitmap )
+        {
+        aGc.DrawBitmap( rect, iContentBitmap );
+        }
+    }
 
 // -----------------------------------------------------------------------------
 // CXnControlAdapterImpl::SizeChanged
@@ -5223,21 +5004,6 @@
 //
 void CXnControlAdapterImpl::SizeChanged()
     {
-    delete iScaledContentBitmap;
-    iScaledContentBitmap = NULL;
-
-    delete iScaledContentMask;
-    iScaledContentMask = NULL;
-
-    delete iScaledTransparentColor;
-    iScaledTransparentColor = NULL;
-
-    delete iScaledBackgroundSkin;
-    iScaledBackgroundSkin = NULL;
-
-    delete iScaledBackgroundImage;
-    iScaledBackgroundImage = NULL;
-
     TRAP_IGNORE( InitializeBackgroundAndBorderBitmapsL() );
     }
 
@@ -5247,22 +5013,7 @@
 //
 void CXnControlAdapterImpl::SkinChanged()
     {
-    delete iScaledContentBitmap;
-    iScaledContentBitmap = NULL;
-
-    delete iScaledContentMask;
-    iScaledContentMask = NULL;
-
-    delete iScaledTransparentColor;
-    iScaledTransparentColor = NULL;
-
-    delete iScaledBackgroundSkin;
-    iScaledBackgroundSkin = NULL;
-
-    delete iScaledBackgroundImage;
-    iScaledBackgroundImage = NULL;
-
-    TRAP_IGNORE( InitializeBackgroundAndBorderBitmapsL() );
+    TRAP_IGNORE( InitializeBackgroundAndBorderBitmapsL( ETrue ) );
     }
 
 // -----------------------------------------------------------------------------
@@ -5398,14 +5149,21 @@
 // CXnControlAdapterImpl::InitializeBackgroundandBorderBitmapsL
 // -----------------------------------------------------------------------------
 //
-void CXnControlAdapterImpl::InitializeBackgroundAndBorderBitmapsL()
+void CXnControlAdapterImpl::InitializeBackgroundAndBorderBitmapsL(
+        TBool aForceRecreate )
     {
     CXnNode& node( iNode.Node() );
     CXnUiEngine* engine( node.UiEngine() );
 
     CXnProperty* backgroundImageProperty( node.BackgroundImageL() );
 
-    if ( backgroundImageProperty )
+    // if skin changed we need recreate icons
+    if ( backgroundImageProperty && aForceRecreate )
+        {
+        iBackgrondInitialized = EFalse;
+        }
+    
+    if ( backgroundImageProperty && !iBackgrondInitialized )
         {
         delete iBackgroundBitmap;
         iBackgroundBitmap = NULL;
@@ -5413,15 +5171,6 @@
         delete iBackgroundMask;
         iBackgroundMask = NULL;
 
-        delete iScaledTransparentColor;
-        iScaledTransparentColor = NULL;
-
-        delete iScaledBackgroundSkin;
-        iScaledBackgroundSkin = NULL;
-
-        delete iScaledBackgroundImage;
-        iScaledBackgroundImage = NULL;
-
         InitializeBackgroundBitmapL( *engine, node, iBackgroundBitmapIndex,
             iBackgroundBitmap, iBackgroundMask, iIconProvider, FsSession() );
 
@@ -5431,13 +5180,19 @@
             {
             iAnimIDResolved = CXnUtils::ResolveSkinItemIDL( *bgPath, iAnimIID );
             }
-
         CleanupStack::PopAndDestroy( bgPath );
+        iBackgrondInitialized = ETrue;
         }
 
     CXnProperty* borderImageProperty( node.BorderImageL() );
 
-    if ( borderImageProperty )
+    // if skin changed we need recreate icons
+    if ( borderImageProperty && aForceRecreate )
+        {
+        iBorderInitialized = EFalse;
+        }
+    
+    if ( borderImageProperty && !iBorderInitialized )
         {
         delete iBorderBitmap;
         iBorderBitmap = NULL;
@@ -5448,6 +5203,8 @@
             iBorderBitmapDividerRight,
             iBorderBitmapDividerBottom, iBorderBitmapDividerLeft,
             iIconProvider, FsSession() );
+        
+        iBorderInitialized = ETrue;
         }
     }
 
@@ -5752,15 +5509,6 @@
             delete iBackgroundMask;
             iBackgroundMask = NULL;
 
-            delete iScaledTransparentColor;
-            iScaledTransparentColor = NULL;
-
-            delete iScaledBackgroundSkin;
-            iScaledBackgroundSkin = NULL;
-
-            delete iScaledBackgroundImage;
-            iScaledBackgroundImage = NULL;
-
             InitializeBackgroundBitmapL( *( iNode.Node().UiEngine() ), iNode.Node(),
                 iBackgroundBitmapIndex, iBackgroundBitmap, iBackgroundMask,
                 iIconProvider, FsSession());
--- a/idlehomescreen/xmluirendering/uiengine/src/xneditmode.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/src/xneditmode.cpp	Tue May 11 16:02:39 2010 +0300
@@ -383,7 +383,7 @@
         }
     
     // Update background
-    appui.ViewAdapter().BgManager().UpdateScreen();
+    appui.ViewAdapter().BgManager().DrawNow();
     }
 
 // -----------------------------------------------------------------------------
@@ -506,7 +506,7 @@
             
             if ( plugin && plugin->Occupied() )
                 {
-                StartDragL( *node );
+                StartDragL( *plugin );
                                   
                 iDrawPos = iDraggingNode->BorderRect().iTl;
                 
@@ -550,12 +550,12 @@
             TPoint dp( iPreviousPos - aPointerEvent.iPosition );
                                 
             iDrawPos -= dp;
-                    
-            // Update previous position
-            iPreviousPos = aPointerEvent.iPosition;
-            
+                                
             UpdateScreen();
             }
+
+        // Update previous position
+        iPreviousPos = aPointerEvent.iPosition;        
         }
     else if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
         {
@@ -724,10 +724,15 @@
 //
 // -----------------------------------------------------------------------------
 //
-void CXnEditMode::StartDragL( CXnNode& aNode )
+void CXnEditMode::StartDragL( const CXnPluginData& aPlugin  )
     {  
-    CXnControlAdapter* control( aNode.Control() );
-        
+    CXnNode* node( aPlugin.Owner()->LayoutNode() );
+    
+    CXnControlAdapter* control( node->Control() ); 
+            
+    CXnControlAdapter* parent( 
+        aPlugin.Parent()->Node()->LayoutNode()->Control() );
+    
     TRect rect( control->Rect() );
     
     // Clear first with alpha 
@@ -739,42 +744,28 @@
     iMapGc->SetBrushStyle( CGraphicsContext::ESolidBrush );
     iMapGc->SetBrushColor( rgb );
     
-    iMapGc->Clear( rect );
+    iMapGc->Clear();
                          
     iState = CXnEditMode::EShootContent;
         
     CWindowGc* gc( control->CustomGc() );
             
-    control->SetCustomGc( iMapGc );
-
-    TBool focusStateChanged( EFalse );
+    parent->SetCustomGc( iMapGc );
     
-    if( aNode.IsStateSet( XnPropertyNames::style::common::KFocus ) )
-        {        
-        aNode.UnsetStateL( XnPropertyNames::style::common::KFocus );
-        focusStateChanged = ETrue;
-        }
-
     control->DrawNow( rect );
 
-    control->SetCustomGc( gc );
-
-    if( focusStateChanged )
-        {
-        aNode.SetStateL( XnPropertyNames::style::common::KFocus );
-        iUiEngine.RenderUIL( &aNode );
-        }
-
+    parent->SetCustomGc( gc );
+       
     if ( iWidget->SizeInPixels() != rect.Size() )
         {
         iWidget->Resize( rect.Size() );
         }
     
-    User::LeaveIfError( CopyBitmap( *iWidget, *iMainpane, rect.iTl ) );
-
     iState = CXnEditMode::EDragging;
-        
-    iDraggingNode = &aNode;       
+    
+    iDraggingNode = node;
+    
+    User::LeaveIfError( CopyBitmap( *iWidget, *iMainpane, rect.iTl ) );                   
     }
 
 // -----------------------------------------------------------------------------
--- a/idlehomescreen/xmluirendering/uiengine/src/xneffectmanager.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/src/xneffectmanager.cpp	Tue May 11 16:02:39 2010 +0300
@@ -20,29 +20,47 @@
 #include <eikapp.h>
 #include <aknappui.h>
 #include <gfxtranseffect/gfxtranseffect.h>  
-#include <akntranseffect.h>                 
+#include <akntranseffect.h>
+#include <alf/alfcompositionutility.h>
+#include <layoutmetadata.cdl.h>
 
 // User includes
+#include "xnappuiadapter.h"
+#include "xnbackgroundmanager.h"
 #include "xneffectmanager.h"
 #include "xnplugindata.h"
 #include "xnviewdata.h"
+#include "xnviewadapter.h"
 #include "xnnode.h"
 #include "xndomnode.h"
 #include "xncontroladapter.h"
 
 // Constants
-const TInt KWaitForLayout = 1;
-const TInt KEffectStarted = 2;
+const TInt KWaitForLayout( 1 );
+const TInt KEffectStarted( 2 );
+
+const TInt KControlEffectWaitInterval( 100000 ); // 100ms
+const TInt KFullScreenEffectWaitInterval( 300000 ); // 300ms
+const TInt KWaitInterval( 25000 ); // 25ms
+const TInt KInterval( 500000 );
+
+#define IS_VALID( e ) \
+    ( e == KGfxContextActivateNextView || \
+    e == KGfxContextActivatePrevView )
+
+// ============================ LOCAL FUNCTIONS ================================
 
 // ============================ MEMBER FUNCTIONS ===============================
-
 // -----------------------------------------------------------------------------
 // CXnEffectManager::CXnEffectManager
 //
 // -----------------------------------------------------------------------------
 //
-CXnEffectManager::CXnEffectManager()
+CXnEffectManager::CXnEffectManager( CXnAppUiAdapter& aAppUiAdapter )
+    : CTimer( CActive::EPriorityIdle ), iAppUiAdapter( aAppUiAdapter ), 
+      iGroupId( -1 )
     {
+    CActiveScheduler::Add( this );
     }
 
 // -----------------------------------------------------------------------------
@@ -52,6 +70,11 @@
 //
 void CXnEffectManager::ConstructL()
     {
+    CTimer::ConstructL();
+    
+    OrientationChanged();
+    
+    iObserver = CAlfEffectObserver::NewL();
     }
 
 // -----------------------------------------------------------------------------
@@ -59,9 +82,9 @@
 //
 // -----------------------------------------------------------------------------
 //
-CXnEffectManager* CXnEffectManager::NewL()
+CXnEffectManager* CXnEffectManager::NewL( CXnAppUiAdapter& aAppUiAdapter )
     {
-    CXnEffectManager* self = new ( ELeave ) CXnEffectManager();
+    CXnEffectManager* self = new ( ELeave ) CXnEffectManager( aAppUiAdapter );
     CleanupStack::PushL( self );
     self->ConstructL();
     CleanupStack::Pop( self );
@@ -75,8 +98,23 @@
 //
 CXnEffectManager::~CXnEffectManager()
     {
-    GfxTransEffect::AbortFullScreen();
-    iEffects.ResetAndDestroy();
+    Cancel();
+           
+    delete iObserver;
+           
+    iControls.Reset();
+    
+    iEffects.Reset();
+    }
+
+// -----------------------------------------------------------------------------
+// CXnEffectManager::RunL
+//
+// -----------------------------------------------------------------------------
+//
+void CXnEffectManager::RunL() 
+    {
+    // No implementation required
     }
 
 // -----------------------------------------------------------------------------
@@ -85,31 +123,69 @@
 // -----------------------------------------------------------------------------
 //
 void CXnEffectManager::BeginFullscreenEffectL( TInt aId, CXnViewData& aView )
-    {
-    // Only one fullscreen effect at time
-    if ( iEffects.Count() != 0 )
-        {
-        return;
-        }
+    {    
+    TXnEffect effect;
     
-    TXnEffect* effect = new (ELeave) TXnEffect;
-    CleanupStack::PushL( effect );
-    effect->iId = aId;
-    effect->iNode = aView.ViewNode();
-    iEffects.AppendL( effect );
-    CleanupStack::Pop( effect );
+    effect.iId = aId;    
+    effect.iNode = aView.ViewNode();
     
     if ( !aView.ViewNode()->IsLaidOut() )
         {
-        effect->iState = KWaitForLayout;
+        effect.iState = KWaitForLayout;
+        
+        iEffects.AppendL( effect );               
         }
     else
         {
-        DoBeginFullscreenEffect( *effect );
+        if ( DoBeginFullscreenEffect( effect ) )
+            {
+            iEffects.AppendL( effect );                               
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CXnEffectManager::BeginFullscreenEffectL
+//
+// -----------------------------------------------------------------------------
+//
+void CXnEffectManager::BeginFullscreenEffectL( TInt aId )
+    {
+    TXnEffect effect;
+    
+    effect.iId = aId;
+    effect.iExplicitEnd = ETrue;
+    
+    if ( DoBeginFullscreenEffect( effect ) )
+        {
+        iEffects.AppendL( effect );
         }
     }
 
 // -----------------------------------------------------------------------------
+// CXnEffectManager::EndFullscreenEffect
+//
+// -----------------------------------------------------------------------------
+//
+void CXnEffectManager::EndFullscreenEffect( TInt aId )
+    {
+    for ( TInt i = 0; i < iEffects.Count(); i++ )
+        {
+        TXnEffect& effect( iEffects[i] );
+        
+        if ( effect.iId == aId && 
+            effect.iExplicitEnd && 
+            effect.iState == KEffectStarted )
+            {
+            GfxTransEffect::EndFullScreen();
+            
+            iEffects.Remove( i );
+            break;
+            }
+        }        
+    }
+
+// -----------------------------------------------------------------------------
 // CXnEffectManager::UiRendered
 //
 // -----------------------------------------------------------------------------
@@ -118,12 +194,13 @@
     {
     for ( TInt i = 0; i < iEffects.Count(); )
         {
-        TXnEffect* effect( iEffects[i] );
+        TXnEffect& effect( iEffects[i] );
         
-        if ( effect && effect->iState == KEffectStarted )            
+        if ( effect.iState == KEffectStarted && !effect.iExplicitEnd )            
             {
             GfxTransEffect::EndFullScreen();
-            RemoveEffect( effect );
+                        
+            iEffects.Remove( i );            
             }
         else
             {
@@ -141,25 +218,23 @@
     {
     for ( TInt i = 0; i < iEffects.Count(); )
         {
-        TBool effectStarted( ETrue );
+        TBool started( ETrue );
         
-        TXnEffect* effect( iEffects[i] );
+        TXnEffect& effect( iEffects[i] );
         
-        if ( effect && effect->iNode &&
-             effect->iState == KWaitForLayout &&
-             effect->iNode->IsLaidOut() )
+        if ( effect.iNode && effect.iState == KWaitForLayout &&             
+             effect.iNode->IsLaidOut() )
             {
-            effectStarted = DoBeginFullscreenEffect( *effect );
+            started = DoBeginFullscreenEffect( effect );                       
             }
         
-        if ( effectStarted )
+        if ( !started )
             {
-            i++;
+            iEffects.Remove( i );            
             }
         else
             {
-            // effect cannot be started, remove it
-            RemoveEffect( effect );
+            i++;
             }
         }
     }
@@ -170,28 +245,23 @@
 // -----------------------------------------------------------------------------
 //
 TBool CXnEffectManager::DoBeginFullscreenEffect( TXnEffect& aEffect )
-    {
-    CCoeEnv* env( CCoeEnv::Static() );
-           
-    RWsSession& session( env->WsSession() );
+    {   
+    if ( !iAppUiAdapter.IsForeground() )          
+        {
+        // Not in foreground
+        return EFalse;
+        }
     
-    if ( session.GetFocusWindowGroup() != env->RootWin().Identifier() )          
+    if ( !WaitActiveEffect( KFullScreenEffectWaitInterval ) )
         {
-        // Window group is not focused
         return EFalse;
         }
 
     const TInt flags( AknTransEffect::TParameter::EActivateExplicitCancel );
-    const TUid targetAppUid( iAvkonAppUi->Application()->AppDllUid() );
+    const TUid targetAppUid( iAppUiAdapter.Application()->AppDllUid() );
     
-    // Must give some time before starting effect, because otherwise
-    // fullscreen effect may contain unwanted parts (dialog, note, etc.)
-    // which was shown when fullscreen effect is about to be started
-    session.Finish();
-    User::After( 1000 );
-        
     // Set effect begin point
-    GfxTransEffect::BeginFullScreen( aEffect.iId , iAvkonAppUi->ClientRect(),
+    GfxTransEffect::BeginFullScreen( aEffect.iId , iAppUiAdapter.ClientRect(),
         AknTransEffect::EParameterType, AknTransEffect::GfxTransParam(
         targetAppUid, flags ) );
     
@@ -201,22 +271,204 @@
     }
 
 // -----------------------------------------------------------------------------
-// CXnEffectManager::RemoveEffect
+// CXnEffectManager::WaitActiveEffect
+//
+// -----------------------------------------------------------------------------
+//
+TBool CXnEffectManager::WaitActiveEffect( TInt aInterval )     
+    {
+    TBool retval( EFalse );
+    
+    TInt loop( aInterval / KWaitInterval );
+    
+    while ( loop >= 0 )
+        {               
+        TInt count( iObserver->ActiveEffectsCount() );
+        
+        if ( count == 0 )
+            {
+            retval = ETrue;
+            break;                        
+            }
+        
+        User::After( KWaitInterval );
+        loop--;
+        }
+
+    return retval;    
+    }
+
+// -----------------------------------------------------------------------------
+// CXnEffectManager::BeginActivateViewEffect
 //
 // -----------------------------------------------------------------------------
 //
-void CXnEffectManager::RemoveEffect( TXnEffect* aEffect )
+TBool CXnEffectManager::BeginActivateViewEffect( const CXnViewData& aThis, 
+    const CXnViewData& aOther, TUid aEffect )
     {
-    TInt index( iEffects.Find( aEffect ) );
+    CleanupControlEffect();
+    
+    if ( !IS_VALID( aEffect ) )
+        {
+        // Not a valid view switch effect uid
+        return EFalse;
+        }
+            
+    CXnControlAdapter* thisView( aThis.ViewNode()->Control() );                             
+    CXnControlAdapter* otherView( aOther.ViewNode()->Control() ); 
+    
+    if ( thisView == otherView )
+        {
+        // Same controls
+        return EFalse;
+        }
+    
+    if ( IsActive() )
+        {
+        Cancel();
+        After( KInterval );
+        
+        return EFalse;
+        }
+    
+    if ( !WaitActiveEffect( KControlEffectWaitInterval ) )
+        {               
+        After( KInterval );
+        
+        return EFalse;
+        }
     
-    if ( index != KErrNotFound )
+    iControls.Append( thisView );
+    iControls.Append( otherView );
+               
+    GfxTransEffect::Register( thisView, aEffect );    
+    GfxTransEffect::Register( otherView, aEffect );
+
+    iGroupId = GfxTransEffect::BeginGroup();
+    
+    CFbsBitmap* currentBg( aThis.WallpaperImage() );
+    CFbsBitmap* nextBg( aOther.WallpaperImage() );
+           
+    if ( currentBg || nextBg )
+        {
+        CCoeControl* bg( &iAppUiAdapter.ViewAdapter().BgManager() );
+             
+        iControls.Append( bg );
+        
+        if ( !currentBg && nextBg )
+            {           
+            GfxTransEffect::Begin( bg, KGfxControlActionBgAnimToImgAppear );
+            }
+        else
+            {
+            GfxTransEffect::Begin( bg, KGfxControlActionBgImgToImgAppear );
+            }
+        
+        iBgEffect = ETrue;
+        }
+                  
+    if ( iLandscape )
+        {
+        GfxTransEffect::Begin( thisView, KGfxControlActionDisappearLsc );
+        GfxTransEffect::Begin( otherView, KGfxControlActionAppearLsc );
+        }
+    else
         {
-        TXnEffect* temp( iEffects[index] ); 
-        delete temp;
-        temp = NULL;
+        GfxTransEffect::Begin( thisView, KGfxControlActionDisappearPrt );
+        GfxTransEffect::Begin( otherView, KGfxControlActionAppearPrt );
+        }    
+    
+    return ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+// CXnEffectManager::EndActivateViewEffect
+//
+// -----------------------------------------------------------------------------
+//
+void CXnEffectManager::EndActivateViewEffect( const CXnViewData& aThis, 
+    const CXnViewData& aOther, TUid aEffect )
+    {
+    if ( !IS_VALID( aEffect ) || iGroupId == -1 )
+        {
+        // Not a valid view switch effect uid or group effect is not started
+        return;
+        }
+    
+    CXnControlAdapter* thisView( aThis.ViewNode()->Control() );                             
+    CXnControlAdapter* otherView( aOther.ViewNode()->Control() ); 
+    
+    if ( iBgEffect )
+        {    
+        CCoeControl* bg( &iAppUiAdapter.ViewAdapter().BgManager() );
+        
+        GfxTransEffect::SetDemarcation( bg, bg->Position() );
+        GfxTransEffect::End( bg );        
+        }
         
-        iEffects.Remove( index );        
+    GfxTransEffect::SetDemarcation( thisView, thisView->Position() );
+    GfxTransEffect::End( thisView );
+    
+    GfxTransEffect::SetDemarcation( otherView, otherView->Position() );
+    GfxTransEffect::End( otherView );                     
+                            
+    GfxTransEffect::EndGroup( iGroupId );
+    
+    GfxTransEffect::Deregister( thisView );
+    GfxTransEffect::Deregister( otherView );    
+    }
+
+// -----------------------------------------------------------------------------
+// CXnEffectManager::BgAppearEffect
+//
+// -----------------------------------------------------------------------------
+//
+void CXnEffectManager::BgAppearEffect( CCoeControl* aBg, TBool aWaitActiveEffect )
+    {
+    if ( aWaitActiveEffect )
+        {
+        WaitActiveEffect( KFullScreenEffectWaitInterval );               
         }
+    
+    GfxTransEffect::Begin( aBg, KGfxControlActionBgImgToImgAppear );
+    
+    GfxTransEffect::SetDemarcation( aBg, aBg->Position() );
+    GfxTransEffect::End( aBg );                         
+    }
+
+// -----------------------------------------------------------------------------
+// CXnEffectManager::Cleanup
+//
+// -----------------------------------------------------------------------------
+//
+void CXnEffectManager::CleanupControlEffect()
+    {
+    iBgEffect = EFalse;
+    iGroupId = -1;       
+    
+    iControls.Reset();        
+    }
+
+// -----------------------------------------------------------------------------
+// CXnEffectManager::ControlEffectActive
+//
+// -----------------------------------------------------------------------------
+//
+TBool CXnEffectManager::ControlEffectActive( const CCoeControl* aControl ) const
+    {
+    TInt index( iControls.Find( aControl ) );
+    
+    return index != KErrNotFound;
+    }
+
+// -----------------------------------------------------------------------------
+// CXnEffectManager::OrientationChanged
+//
+// -----------------------------------------------------------------------------
+//
+void CXnEffectManager::OrientationChanged()
+    {
+    iLandscape = Layout_Meta_Data::IsLandscapeOrientation();
     }
 
 //  End of File
--- a/idlehomescreen/xmluirendering/uiengine/src/xnfocuscontrol.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/src/xnfocuscontrol.cpp	Tue May 11 16:02:39 2010 +0300
@@ -25,6 +25,7 @@
 #include "xnproperty.h"
 #include "xnappuiadapter.h"
 #include "xnuiengine.h"
+#include "xneditmode.h"
 #include "xnnode.h"
 #include "xninactivitymonitor.h"
 
@@ -165,6 +166,14 @@
 //
 void CXnFocusControl::Draw( const TRect& aRect, CWindowGc& aGc ) const
     {
+    TInt state( iAppUiAdapter.UiEngine().EditMode()->EditState() );
+            
+    // Don't draw focus appearance when shooting dragging widget in edit mode
+    if ( state == CXnEditMode::EShootContent )
+        {
+        return;
+        }
+    
     if ( IsVisible() || iRefused ) 
         {                                       
         CXnNode* node( iAppUiAdapter.UiEngine().FocusedNode() );
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/idlehomescreen/xmluirendering/uiengine/src/xnitemactivator.cpp	Tue May 11 16:02:39 2010 +0300
@@ -0,0 +1,213 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Item activator
+*
+*/
+
+// System includes
+
+// User includes
+#include "xnappuiadapter.h"
+#include "xnuiengine.h"
+#include "xneditor.h"
+#include "xndomstringpool.h"
+#include "xndomdocument.h"
+#include "xnproperty.h"
+#include "xnnodeimpl.h"
+#include "xnnode.h"
+#include "xntype.h"
+#include "xnodt.h"
+
+#include "xnitemactivator.h"
+
+// Constants
+_LIT8( KMenuItem, "menuitem" );
+_LIT8( KDynMenuItem, "dynmenuitem" );
+_LIT8( KWidgetMenuItem, "widgetmenuitem" );
+    
+// ============================ LOCAL FUNCTIONS ================================
+// -----------------------------------------------------------------------------
+// BuildActivateTriggerNodeL
+//
+// -----------------------------------------------------------------------------
+//
+static CXnNode* BuildActivateTriggerNodeL( CXnUiEngine& aUiEngine )
+    {
+    CXnNode* node = CXnNode::NewL();
+    CleanupStack::PushL( node );
+    CXnType* type = CXnType::NewL( XnPropertyNames::action::KTrigger );
+    CleanupStack::PushL( type );
+    CXnNodeImpl* impl = CXnNodeImpl::NewL( type );
+    CleanupStack::Pop( type );
+    node->SetImpl( impl );
+    node->SetUiEngine( aUiEngine );
+    CXnDomPropertyValue* nameValue = CXnDomPropertyValue::NewL(
+        aUiEngine.ODT()->DomDocument().StringPool() );
+    CleanupStack::PushL( nameValue );
+    nameValue->SetStringValueL( CXnDomPropertyValue::EString,
+        XnPropertyNames::action::trigger::name::KActivate );
+    CXnProperty* name = CXnProperty::NewL(
+        XnPropertyNames::action::trigger::KName,
+        nameValue,
+        *aUiEngine.ODT()->DomDocument().StringPool() );
+    CleanupStack::Pop( nameValue );
+    CleanupStack::PushL( name );
+    node->SetPropertyL( name );
+    CleanupStack::Pop( name );
+    CleanupStack::Pop( node );
+    return node;
+    }
+
+// -----------------------------------------------------------------------------
+// IsMenuItem
+// 
+// -----------------------------------------------------------------------------
+//
+static TBool IsMenuItem( CXnNode& aItem )
+    {
+    const TDesC8& type( aItem.Type()->Type() );
+    
+    return ( type == KMenuItem || 
+             type == KDynMenuItem || 
+             type == KWidgetMenuItem );
+    }
+
+// ============================ MEMBER FUNCTIONS ===============================
+// -----------------------------------------------------------------------------
+// CXnItemActivator::NewL()
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CXnItemActivator* CXnItemActivator::NewL( CXnAppUiAdapter& aAppUiAdapter ) 
+    {
+    CXnItemActivator* self = CXnItemActivator::NewLC( aAppUiAdapter );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CXnItemActivator::NewLC()
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CXnItemActivator* CXnItemActivator::NewLC( CXnAppUiAdapter& aAppUiAdapter )
+    {
+    CXnItemActivator* self = new ( ELeave ) CXnItemActivator( aAppUiAdapter );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CXnItemActivator::~CXnItemActivator()
+// C++ default destructor.
+// -----------------------------------------------------------------------------
+//
+CXnItemActivator::~CXnItemActivator()
+    {    
+    Cancel();
+    
+    delete iTrigger;
+    }
+
+// -----------------------------------------------------------------------------
+// CXnItemActivator::CXnItemActivator()
+// C++ default constructor.
+// -----------------------------------------------------------------------------
+//
+CXnItemActivator::CXnItemActivator( CXnAppUiAdapter& aAppUiAdapter )
+    : CTimer( CActive::EPriorityUserInput + 1 ), iAppUiAdapter( aAppUiAdapter )
+    {
+    CActiveScheduler::Add( this );
+    }
+
+// -----------------------------------------------------------------------------
+// CXnItemActivator::ConstructL()
+// 2nd phase constructor.
+// -----------------------------------------------------------------------------
+//
+void CXnItemActivator::ConstructL()
+    {             
+    CTimer::ConstructL();
+
+    iTrigger = BuildActivateTriggerNodeL( iAppUiAdapter.UiEngine() );
+    }
+
+// -----------------------------------------------------------------------------
+// CXnItemActivator::RunL()
+// 
+// -----------------------------------------------------------------------------
+//
+void CXnItemActivator::RunL()
+    {   
+    CXnNode* item( iItemToActivate );
+    
+    iItemToActivate = NULL;
+    
+    if ( item && iAppUiAdapter.IsForeground() )
+        {       
+        iAppUiAdapter.UiEngine().DisableRenderUiLC();
+        
+        item->ReportXuikonEventL( *iTrigger );
+                       
+        CleanupStack::PopAndDestroy(); // DisableRenderUiLC
+        }          
+    }
+
+// -----------------------------------------------------------------------------
+// CXnItemActivator::RunError()
+// 
+// -----------------------------------------------------------------------------
+//
+TInt CXnItemActivator::RunError( TInt /*aError*/ )
+    {
+    // Ignore
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CXnItemActivator::DoCancel()
+// 
+// -----------------------------------------------------------------------------
+//
+void CXnItemActivator::DoCancel()
+    {
+    iItemToActivate = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CXnItemActivator::Activate()
+// 
+// -----------------------------------------------------------------------------
+//
+void CXnItemActivator::Activate( CXnNode* aItemToActivate )
+    {
+    if ( aItemToActivate )
+        {
+        Cancel();
+        
+        iItemToActivate = aItemToActivate;
+        
+        if ( IsMenuItem( *aItemToActivate ) )
+            {
+            TRAP_IGNORE( RunL() );
+            }
+        else
+            {                              
+            After( 0 );            
+            }               
+        }
+    }
+
+// End of file
--- a/idlehomescreen/xmluirendering/uiengine/src/xnnodeimpl.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/src/xnnodeimpl.cpp	Tue May 11 16:02:39 2010 +0300
@@ -52,6 +52,7 @@
 #include "xnviewadapter.h"
 #include "xnbackgroundmanager.h"
 #include "xntexteditor.h"
+#include "xnitemactivator.h"
 
 // Local constants
 _LIT8( KId, "id" );
@@ -348,8 +349,6 @@
     CXnNodeImpl* aThis, CXnUiEngine& aEngine, CXnNode& aNode,
     CXnNode& aActionsParent, CXnNode& aEventData, TInt aSource );
 static TBool DoReceiveFocusL( CXnNode& aNode, CXnUiEngine& aEngine );
-static CXnNode* BuildActivateTriggerNodeL( CXnUiEngine& aUiEngine );
-static void DoSetActiveL( CXnNode& aNode, CXnUiEngine& aUiEngine );
 static void InformPropertyChangeL( CXnNode& aNode, CXnProperty* aProperty = NULL );
 static CXnNode* BuildEventTypeNodeL( TEventCode aType, CXnUiEngine& aUiEngine );
 static CXnNode* BuildModifiersNodeL(
@@ -2001,37 +2000,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// BuildActivateTriggerNodeL
-// -----------------------------------------------------------------------------
-//
-static CXnNode* BuildActivateTriggerNodeL( CXnUiEngine& aUiEngine )
-    {
-    CXnNode* node = CXnNode::NewL();
-    CleanupStack::PushL( node );
-    CXnType* type = CXnType::NewL( XnPropertyNames::action::KTrigger );
-    CleanupStack::PushL( type );
-    CXnNodeImpl* impl = CXnNodeImpl::NewL( type );
-    CleanupStack::Pop( type );
-    node->SetImpl( impl );
-    node->SetUiEngine( aUiEngine );
-    CXnDomPropertyValue* nameValue = CXnDomPropertyValue::NewL(
-        aUiEngine.ODT()->DomDocument().StringPool() );
-    CleanupStack::PushL( nameValue );
-    nameValue->SetStringValueL( CXnDomPropertyValue::EString,
-        XnPropertyNames::action::trigger::name::KActivate );
-    CXnProperty* name = CXnProperty::NewL(
-        XnPropertyNames::action::trigger::KName,
-        nameValue,
-        *aUiEngine.ODT()->DomDocument().StringPool() );
-    CleanupStack::Pop( nameValue );
-    CleanupStack::PushL( name );
-    node->SetPropertyL( name );
-    CleanupStack::Pop( name );
-    CleanupStack::Pop( node );
-    return node;
-    }
-
-// -----------------------------------------------------------------------------
 // BuildPropertyNodesL
 // -----------------------------------------------------------------------------
 //
@@ -3919,15 +3887,14 @@
         }
     else if ( nameString == XnPropertyNames::action::event::KActivateSelectedItem )
         {
-        CXnNode* focusedNode = aEngine.FocusedNode();
+        CXnNode* focusedNode( aEngine.FocusedNode() );
+        
         if ( focusedNode )
             {
-            CXnNode* activate = BuildActivateTriggerNodeL( aEngine );
-            CleanupStack::PushL( activate );
-            focusedNode->ReportXuikonEventL( *activate );
-            CleanupStack::PopAndDestroy( activate );
-            }
-        return EFalse;
+            aEngine.AppUiAdapter().ItemActivator().Activate( focusedNode );            
+            }
+        
+        return ETrue;
         }
     else if ( nameString == XnPropertyNames::action::event::KDeactivate )
         {
@@ -6267,19 +6234,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// DoSetActiveL
-// -----------------------------------------------------------------------------
-//
-static void DoSetActiveL( CXnNode& aNode, CXnUiEngine& aUiEngine )
-    {
-    CXnNode* activate = BuildActivateTriggerNodeL( aUiEngine );
-    activate->SetUiEngine( aUiEngine );
-    CleanupStack::PushL( activate );
-    aNode.ReportXuikonEventL( *activate );
-    CleanupStack::PopAndDestroy( activate );
-    }
-
-// -----------------------------------------------------------------------------
 // Informs the component about the property change.
 // -----------------------------------------------------------------------------
 //
@@ -7590,7 +7544,7 @@
 
     if ( activated )
         {
-        DoSetActiveL( *iNode, *iUiEngine );
+        iUiEngine->AppUiAdapter().ItemActivator().Activate( iNode );
         }
 
     if ( stateChanged )
--- a/idlehomescreen/xmluirendering/uiengine/src/xnplugindata.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/src/xnplugindata.cpp	Tue May 11 16:02:39 2010 +0300
@@ -17,12 +17,9 @@
 
 // System includes
 #include <utf.h>
-#include <aifwdefs.h>
-#include <StringLoader.h>
-#include <aknnotewrappers.h>
 
 // User includes
-#include <xnuiengine.rsg>
+#include <aifwdefs.h>
 #include "xnappuiadapter.h"
 #include "xncomposer.h"
 #include "xnodtparser.h"
@@ -31,6 +28,7 @@
 #include "xnnode.h"
 #include "xnplugindata.h"
 #include "xnviewdata.h"
+#include "xnpublisherdata.h"
 #include "xnviewmanager.h"
 #include "xnoomsyshandler.h"
 #include "xnpanic.h"
@@ -98,13 +96,6 @@
 //
 CXnPluginData::~CXnPluginData()
     {
-    if ( iLoader )
-        {
-        iLoader->Cancel();
-        }
-
-    delete iLoader;
-               
     Flush();
     }
 
@@ -115,11 +106,11 @@
 //
 void CXnPluginData::ConstructL()
     {    
-    iLoader = CPeriodic::NewL( CActive::EPriorityStandard );    
     }
 
 // -----------------------------------------------------------------------------
 // CXnPluginData::Load()
+//
 // -----------------------------------------------------------------------------
 //
 TInt CXnPluginData::Load()
@@ -146,12 +137,9 @@
         }
     
     if ( err == KErrNone )
-        {
-        // Mark publishers as virgin
-        iVirginPublishers = ETrue;
-        
+        {                     
         // Succesfully composed, try schedule publishers' loading
-        LoadPublishers();                  
+        LoadPublishers( EAiFwPluginStartup );                  
         }    
     else if ( err == KXnErrPluginFailure )
         {
@@ -164,13 +152,14 @@
 
 // -----------------------------------------------------------------------------
 // CXnPluginData::Destroy()
+//
 // -----------------------------------------------------------------------------
 //
 void CXnPluginData::Destroy()
     {       
     if ( Occupied() )
         {
-        DestroyPublishers();
+        DestroyPublishers( EAiFwPluginShutdown );
         
         TRAP_IGNORE( iManager.Parser().DestroyWidgetL( *this ) );                                       
         }
@@ -179,141 +168,79 @@
     }
 
 // -----------------------------------------------------------------------------
-// CXnPluginData::LoadPublishers
-// Loads data plugins associated to the plugin
-// -----------------------------------------------------------------------------
-//
-void CXnPluginData::LoadPublishers()
-    {                     
-    if ( !Active() || !Occupied() || iContentSourceNodes.Count() == 0 )
-        {               
-        return;
-        }
-                         
-    iLoader->Cancel();
-                  
-    iLoader->Start( TTimeIntervalMicroSeconds32( 50 ),
-                    TTimeIntervalMicroSeconds32( 50 ),
-                    TCallBack( PeriodicEventL, this ) );
-    }
-
-// -----------------------------------------------------------------------------
-// CXnPluginData::PeriodicEventL()
-// 
-// -----------------------------------------------------------------------------
-//
-/* static */ TInt CXnPluginData::PeriodicEventL( TAny* aAny )
-    {
-    CXnPluginData* self = static_cast< CXnPluginData* >( aAny );
-    
-    self->iLoader->Cancel();
-    
-    TInt reason( EAiFwPluginStartup );
-    
-    if ( self->LoadPublishers( reason ) != KErrNone )
-        {
-        self->iManager.UnloadWidgetFromPluginL( *self, ETrue );
-        
-        self->ShowContentRemovedError();
-        }
-    
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
 // CXnPluginData::LoadPublishers()
 // 
 // -----------------------------------------------------------------------------
 //
-TInt CXnPluginData::LoadPublishers( TInt aReason )
+void CXnPluginData::LoadPublishers( TInt aReason )
     {           
     __PRINTS( "*** CXnPluginData::LoadPublishers" );
+
+    if ( !Active() || !Occupied() )
+        {
+        __PRINTS( "*** CXnPluginData::LoadPublishers - done, !Active() || !Occupied()" );
+        
+        return;
+        }
     
-    TInt err( KErrNone );
-
-    TRAP( err,
-        for ( TInt i = 0; i < iContentSourceNodes.Count(); i++ )
-            {            
-            CXnNodeAppIf& plugin( iContentSourceNodes[i]->AppIfL() );
-                        
-            TInt retval(
-                iManager.AppUiAdapter().LoadPublisher( plugin, aReason ) );
-                            
-            if ( !err )
-                {
-                err = retval;
-                }
-            }
-        );
-
-    iVirginPublishers = EFalse;
+    TInt count( iPublishers.Count() );
     
-    if ( !Removable() )
+    if ( count == 0 )
         {
-        // Not allowed to remove even it fails
-        return KErrNone;
+        TRAP_IGNORE( NotifyPublisherReadyL() );
+        }
+    else
+        {
+        for ( TInt i = 0; i < count; i++ )
+            {
+            iPublishers[i]->Load( aReason );        
+            }    
         }
     
     __PRINTS( "*** CXnPluginData::LoadPublishers - done" );
-    
-    return err;        
+    }
+
+// -----------------------------------------------------------------------------
+// CXnPluginData::NotifyPublisherReadyL()
+//
+// -----------------------------------------------------------------------------
+//
+void CXnPluginData::NotifyPublisherReadyL()          
+    {       
+    if ( iParent )
+        {
+        // Forward to parent
+        iParent->NotifyPublisherReadyL();
+        }
     }
 
 // -----------------------------------------------------------------------------
 // CXnPluginData::DestroyPublishers
-// Remove data plugins associated to the plugin
+// 
 // -----------------------------------------------------------------------------
 //
-void CXnPluginData::DestroyPublishers()
+void CXnPluginData::DestroyPublishers( TInt aReason )
     {    
     __PRINTS( "*** CXnPluginData::DestroyPublishers" );
     
-    if ( Occupied() )
+    if ( !Occupied() )
         {
-        // If not all plugins loaded yet               
-        iLoader->Cancel();                                  
+        __PRINTS( "*** CXnPluginData::DestroyPublishers - done, !Occupied()" );
         
-        TRAP_IGNORE( DoDestroyPublishersL() );
-        
-        User::Heap().Compress();
+        return;
         }    
     
+    for ( TInt i = 0; i < iPublishers.Count(); i++ )
+        {
+        iPublishers[i]->Destroy( aReason );        
+        }
+                     
     __PRINTS( "*** CXnPluginData::DestroyPublishers - done" );
     }
 
 // -----------------------------------------------------------------------------
-// CXnPluginData::VirginPublishers
-// 
-// -----------------------------------------------------------------------------
-//
-TBool CXnPluginData::VirginPublishers() const
-    {
-    return iVirginPublishers;
-    }
-
-// -----------------------------------------------------------------------------
-// CXnPluginData::DoDestroyPublishersL
-// Remove data plugins associated to the plugin
-// -----------------------------------------------------------------------------
+// CXnPluginData::SetConfigurationIdL()
 //
-void CXnPluginData::DoDestroyPublishersL()
-    {
-    __TIME_MARK( time );
-    
-    for ( TInt i = 0; i < iContentSourceNodes.Count(); i++ )
-        {
-        CXnNodeAppIf& plugin( iContentSourceNodes[i]->AppIfL() );
-        
-        // Destruction is synchronous
-        iManager.AppUiAdapter().DestroyPublisher( 
-            plugin, EAiFwPluginShutdown );        
-        }
-    
-    __TIME_ENDMARK( "CXnPluginData::DoDestroyPublishersL, done", time );
-    }
-
-// -----------------------------------------------------------------------------
-// CXnPluginData::SetConfigurationIdL()
 // -----------------------------------------------------------------------------
 //
 void CXnPluginData::SetConfigurationIdL( const TDesC8& aConfigurationId )
@@ -326,6 +253,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnPluginData::SetPluginIdL()
+//
 // -----------------------------------------------------------------------------
 //
 void CXnPluginData::SetPluginIdL( const TDesC8& aPluginId )
@@ -338,6 +266,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnPluginData::SetPluginUidL()
+//
 // -----------------------------------------------------------------------------
 //
 void CXnPluginData::SetPluginUidL( const TDesC8& aPluginUid )
@@ -350,6 +279,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnPluginData::SetPluginNameL()
+//
 // -----------------------------------------------------------------------------
 //
 void CXnPluginData::SetPluginNameL( const TDesC8& aPluginName )
@@ -389,6 +319,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnPluginData::SetPluginTypeL()
+//
 // -----------------------------------------------------------------------------
 //
 void CXnPluginData::SetPluginTypeL( const TDesC8& aPluginType )
@@ -401,6 +332,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnPluginData::SetResources()
+//
 // -----------------------------------------------------------------------------
 //
 void CXnPluginData::SetResources( CArrayPtrSeg< CXnResource >* aResources )
@@ -418,6 +350,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnPluginData::ResourcesL()
+//
 // -----------------------------------------------------------------------------
 //
 void CXnPluginData::ResourcesL( CArrayPtrSeg< CXnResource >& aList ) const
@@ -430,6 +363,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnPluginData::SetControlL()
+//
 // -----------------------------------------------------------------------------
 //
 void CXnPluginData::SetControlL( CXnNode* aNode )
@@ -444,6 +378,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnPluginData::ControlsL()
+//
 // -----------------------------------------------------------------------------
 //
 void CXnPluginData::ControlsL( RPointerArray< CXnControlAdapter >& aList ) const
@@ -456,27 +391,61 @@
 
 // -----------------------------------------------------------------------------
 // CXnPluginData::SetContentSourceNodeL()
+//
 // -----------------------------------------------------------------------------
 //
 void CXnPluginData::SetContentSourceNodeL( CXnNode* aNode )
-    {
-    User::LeaveIfError( iContentSourceNodes.InsertInAddressOrder( aNode ) );
+    {        
+    if ( !aNode )
+        {
+        return;
+        }
+    
+    for ( TInt i = 0; i < iPublishers.Count(); i++ )
+        {        
+        if ( *iPublishers[i] == *aNode )
+            {
+            // Duplicate entries not allowed
+            return;
+            }
+        }
+                 
+    CXnPublisherData* publisher = 
+        CXnPublisherData::NewLC( *this, *aNode );       
+    
+    iPublishers.AppendL( publisher );    
+    CleanupStack::Pop( publisher );   
     }
 
 // -----------------------------------------------------------------------------
 // CXnPluginData::ContentSourceNodesL()
+//
 // -----------------------------------------------------------------------------
 //
 void CXnPluginData::ContentSourceNodesL( RPointerArray< CXnNode >& aList ) const
     {
-    for ( TInt i = 0; i < iContentSourceNodes.Count(); i++ )
+    for ( TInt i = 0; i < iPublishers.Count(); i++ )
         {
-        aList.AppendL( iContentSourceNodes[i] );
+        aList.AppendL( iPublishers[i]->ContentSource() );
         }
     }
 
 // -----------------------------------------------------------------------------
+// CXnPluginData::Publishers()
+//
+// -----------------------------------------------------------------------------
+//
+void CXnPluginData::PublishersL( RPointerArray< CXnPublisherData >& aList ) const
+    {
+    for ( TInt i = 0; i < iPublishers.Count(); i++ )
+        {
+        aList.AppendL( iPublishers[i] );
+        }
+    }
+    
+// -----------------------------------------------------------------------------
 // CXnPluginData::SetAppearanceNodeL()
+//
 // -----------------------------------------------------------------------------
 //
 void CXnPluginData::SetAppearanceNodeL( CXnNode* aNode )
@@ -486,6 +455,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnPluginData::AppearanceNodesL()
+//
 // -----------------------------------------------------------------------------
 //
 void CXnPluginData::AppearanceNodesL( RPointerArray< CXnNode >& aList ) const
@@ -498,6 +468,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnPluginData::SetInitialFocusNodeL()
+//
 // -----------------------------------------------------------------------------
 //
 void CXnPluginData::SetInitialFocusNodeL( CXnNode* aNode )
@@ -507,6 +478,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnPluginData::InitialFocusNodesL()
+//
 // -----------------------------------------------------------------------------
 //
 void CXnPluginData::InitialFocusNodesL( RPointerArray< CXnNode >& aList ) const
@@ -558,12 +530,12 @@
         iResources = NULL;
         }
         
-    iControls.Reset();
-    iContentSourceNodes.Reset();
+    iPublishers.ResetAndDestroy();
+    iControls.Reset();    
     iAppearanceNodes.Reset();
     iInitialFocusNodes.Reset();
-    iPopupNodes.Reset();
-    iPluginsData.ResetAndDestroy();
+    iPopupNodes.Reset();    
+    iPluginsData.ResetAndDestroy();    
     
     User::Heap().Compress();
     }
@@ -634,6 +606,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnPluginData::PopupNodesL()
+//
 // -----------------------------------------------------------------------------
 //
 void CXnPluginData::PopupNodesL( RPointerArray< CXnNode >& aList ) const
@@ -644,44 +617,6 @@
         }
     }
 
-//------------------------------------------------------------------------------
-// CXnPluginData::ShowContentRemovedError()      
-//
-//------------------------------------------------------------------------------
-//    
-void CXnPluginData::ShowContentRemovedError()
-    {
-    TRAP_IGNORE( DoShowContentRemovedErrorL() );
-    }
-
-//------------------------------------------------------------------------------
-// CXnPluginData::DoShowContentRemovedErrorL()      
-//
-//------------------------------------------------------------------------------
-//    
-void CXnPluginData::DoShowContentRemovedErrorL()
-    {
-    HBufC* msg( StringLoader::LoadLC( R_QTN_HS_ERROR_WIDGETS_REMOVED ) );
-        
-    CAknErrorNote* note = new ( ELeave ) CAknErrorNote;
-    CleanupStack::PushL( note );
-    
-    note->ExecuteLD( *msg );
-    
-    CleanupStack::Pop( note );
-    CleanupStack::PopAndDestroy( msg );                                       
-    }
-
-//------------------------------------------------------------------------------
-// CXnPluginData::ShowOutOfMemErrorL()      
-//
-//------------------------------------------------------------------------------
-//    
-void CXnPluginData::ShowOutOfMemError()
-    {
-    TRAP_IGNORE( ViewManager().OomSysHandler().HandlePotentialOomL() );
-    }
-
 // -----------------------------------------------------------------------------
 // CXnViewData::SetLockingStatus
 // 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/idlehomescreen/xmluirendering/uiengine/src/xnpublisherdata.cpp	Tue May 11 16:02:39 2010 +0300
@@ -0,0 +1,264 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Publisher data
+*
+*/
+
+// System includes
+
+// User includes
+#include <aifwpublisherinfo.h>
+#include "xnappuiadapter.h"
+#include "xnplugindata.h"
+
+#include "xnpublisherdata.h"
+
+// Constants
+enum TXnPublisherDataFlags
+    {
+    EIsVirgin,
+    EIsStarted,
+    EIsLoading,
+    EIsFailed    
+    };
+
+// ============================ LOCAL FUNCTIONS ================================
+
+// ============================ MEMBER FUNCTIONS ===============================
+// -----------------------------------------------------------------------------
+// CXnPublisherData::NewL()
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CXnPublisherData* CXnPublisherData::NewL( CXnPluginData& aOwner, 
+    CXnNode& aNode )         
+    {
+    CXnPublisherData* self = CXnPublisherData::NewLC( aOwner, aNode );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CXnPublisherData::NewLC()
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CXnPublisherData* CXnPublisherData::NewLC( CXnPluginData& aOwner,
+    CXnNode& aNode )
+    {
+    CXnPublisherData* self = new ( ELeave ) CXnPublisherData( aOwner, aNode );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CXnPublisherData::~CXnPublisherData()
+// C++ default destructor.
+// -----------------------------------------------------------------------------
+//
+CXnPublisherData::~CXnPublisherData()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CXnPublisherData::CXnPublisherData()
+// C++ default constructor.
+// -----------------------------------------------------------------------------
+//
+CXnPublisherData::CXnPublisherData( CXnPluginData& aOwner, CXnNode& aNode )
+    : iOwner( aOwner ), iNode( aNode )
+    {
+    iAppUi = static_cast< CXnAppUiAdapter* >( iAvkonAppUi );
+    
+    iFlags.Set( EIsVirgin );
+    }
+
+// -----------------------------------------------------------------------------
+// CXnPublisherData::ConstructL()
+// 2nd phase constructor.
+// -----------------------------------------------------------------------------
+//
+void CXnPublisherData::ConstructL()
+    {    
+    User::LeaveIfError( iAppUi->PublisherInfo( iNode, iInfo ) );            
+    }
+
+// -----------------------------------------------------------------------------
+// CXnPublisherData::operator==()
+// 
+// -----------------------------------------------------------------------------
+//
+TBool CXnPublisherData::operator==( CXnNode& aNode ) const
+    {
+    THsPublisherInfo info;
+    
+    TRAPD( err, iAppUi->PublisherInfo( aNode, info ) );
+    
+    if ( !err )
+        {
+        return iInfo == info;
+        }
+    
+    return EFalse;             
+    }
+
+// -----------------------------------------------------------------------------
+// CXnPublisherData::operator==()
+// 
+// -----------------------------------------------------------------------------
+//
+TBool CXnPublisherData::operator==( const THsPublisherInfo& aInfo ) const
+    {
+    return iInfo == aInfo;
+    }
+
+// -----------------------------------------------------------------------------
+// CXnPublisherData::Info()
+// 
+// -----------------------------------------------------------------------------
+//
+const THsPublisherInfo& CXnPublisherData::Info() const
+    {
+    return iInfo;
+    }
+
+// -----------------------------------------------------------------------------
+// CXnPublisherData::ContentSource()
+// 
+// -----------------------------------------------------------------------------
+//
+CXnNode* CXnPublisherData::ContentSource() const
+    {
+    return &iNode;
+    }
+
+// -----------------------------------------------------------------------------
+// CXnPublisherData::Load()
+// 
+// -----------------------------------------------------------------------------
+//
+void CXnPublisherData::Load( TInt aReason ) 
+    {
+    if ( iFlags.IsSet( EIsFailed ) )
+        {
+        return;
+        }
+    
+    if ( aReason != EAiFwPluginStartup && iFlags.IsSet( EIsVirgin ) )
+        {               
+        aReason = EAiFwSystemStartup;                          
+        }
+    
+    iFlags.Set( EIsLoading );
+    
+    TAiFwCallback cb( NotifyLoaded, this );
+    TAiFwPublisherInfo publisher( iInfo, cb, aReason );
+           
+    iAppUi->LoadPublisher( publisher );
+    }
+
+// -----------------------------------------------------------------------------
+// CXnPublisherData::Load()
+// 
+// -----------------------------------------------------------------------------
+//
+void CXnPublisherData::Destroy( TInt aReason ) 
+    {
+    if ( iFlags.IsSet( EIsFailed ) )
+        {
+        return;
+        }
+        
+    iFlags.Clear( EIsLoading );
+        
+    TAiFwCallback cb( NotifyDestroyed, this );
+    TAiFwPublisherInfo publisher( iInfo, cb, aReason );
+        
+    iAppUi->DestroyPublisher( publisher );
+    }
+
+// -----------------------------------------------------------------------------
+// CXnPublisherData::IsFailed()
+// 
+// -----------------------------------------------------------------------------
+//
+TBool CXnPublisherData::IsFailed() const
+    {
+    return iFlags.IsSet( EIsFailed );
+    }
+
+// -----------------------------------------------------------------------------
+// CXnPublisherData::IsLoading()
+// 
+// -----------------------------------------------------------------------------
+//
+TBool CXnPublisherData::IsLoading() const
+    {
+    return iFlags.IsSet( EIsLoading );
+    }
+
+// -----------------------------------------------------------------------------
+// CXnPublisherData::Owner()
+// 
+// -----------------------------------------------------------------------------
+//
+CXnPluginData* CXnPublisherData::Owner() const
+    {
+    return &iOwner;
+    }
+
+// -----------------------------------------------------------------------------
+// CXnPublisherData::NotifyLoaded()
+// 
+// -----------------------------------------------------------------------------
+//
+/* static */ void CXnPublisherData::NotifyLoaded( TAny* aAny, TInt aResult )
+    {
+    CXnPublisherData* self = static_cast< CXnPublisherData* >( aAny );
+
+    self->iFlags.Clear( EIsLoading );
+    
+    if ( aResult == KErrCancel )
+        {
+        // Loading canceled
+        }
+    else
+        {
+        // Loading complete 
+        if ( aResult == KErrNone || aResult == KErrAlreadyExists )
+            {
+            self->iFlags.Set( EIsStarted );
+            self->iFlags.Clear( EIsVirgin );
+            }
+        else
+            {
+            self->iFlags.Set( EIsFailed );
+            }               
+        }    
+    
+    TRAP_IGNORE( self->iOwner.NotifyPublisherReadyL() );
+    }
+
+// -----------------------------------------------------------------------------
+// CXnPublisherData::NotifyDestroyed()
+// 
+// -----------------------------------------------------------------------------
+//
+/* static */ void CXnPublisherData::NotifyDestroyed( TAny* /*aAny*/, 
+    TInt /*aResult*/ )
+    {          
+    }
+
+// End of file
--- a/idlehomescreen/xmluirendering/uiengine/src/xnrootdata.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/src/xnrootdata.cpp	Tue May 11 16:02:39 2010 +0300
@@ -15,7 +15,11 @@
 *
 */
 
+// System includes
+
+
 // User includes
+#include <xnuiengine.rsg>
 #include "xnviewmanager.h"
 #include "xnviewdata.h"
 
@@ -215,7 +219,7 @@
         }
     else if ( err == KErrNoMemory )
         {
-        ShowOutOfMemError();
+        TRAP_IGNORE( iManager.ShowErrorL( R_QTN_HS_HS_MEMORY_FULL ) );
         }
 
     // Configuration loading failed totally
@@ -535,7 +539,8 @@
             {                       
             if ( toLoad->Load() == KErrNoMemory )
                 {
-                self->ShowOutOfMemError();
+                TRAP_IGNORE( 
+                    self->iManager.ShowErrorL( R_QTN_HS_HS_MEMORY_FULL ) );                
                 }
             }
         
--- a/idlehomescreen/xmluirendering/uiengine/src/xnuiengineimpl.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/src/xnuiengineimpl.cpp	Tue May 11 16:02:39 2010 +0300
@@ -8359,6 +8359,14 @@
                 {
                 // Mark tree rendered
                 iCurrentView->SetRenderedL();
+                                
+                if ( iAppUiAdapter.EffectManager()->ControlEffectActive( control ) )
+                    {
+                    // control effect is ongoing, no need to draw control yet
+                    redrawRegion.Clear();
+                    continue;
+                    }
+                
                 TInt count( redrawRegion.Count() );
                 
                 if( count > 2 )
@@ -8672,7 +8680,7 @@
     iDirtyList.Reset();
 
     iRedrawRegions.ResetAndDestroy();
-
+       
     // Remove previous menubar and stylus popup node
     iMenuNode = NULL;
     iStylusPopupNode = NULL;
@@ -8711,19 +8719,15 @@
             }
         }
 
-    // Set menu node even if its NULL, to allow keyevent dispatcher
-    // to handle no softkeys
-    if ( iKeyEventDispatcher )
-        {
-        iKeyEventDispatcher->SetMenuNodeL( iMenuNode );    
-        }
-    
     ReportScreenDeviceChangeL();
             
     SetClientRectL( iAppUiAdapter.ClientRect(), EFalse );
     
     RootNode()->SetDirtyL();
+           
     ForceRenderUIL();
+           
+    iLayoutControl &= ~XnLayoutControl::ERefreshMenu;
     }
 
 // -----------------------------------------------------------------------------
@@ -8921,14 +8925,18 @@
 //
 void CXnUiEngineImpl::RefreshMenuL()
     {
-    if ( iLayoutControl & XnLayoutControl::ERefreshMenu )
+    if ( IsLayoutDisabled() )
+        {
+        return;
+        }
+    
+    if ( iLayoutControl & XnLayoutControl::ERefreshMenu )         
         {
         if ( iKeyEventDispatcher )
             {
+            iLayoutControl &= ~XnLayoutControl::ERefreshMenu;
             iKeyEventDispatcher->RefreshMenuL();        
-            }
-        
-        iLayoutControl &= ~XnLayoutControl::ERefreshMenu;
+            }               
         }
     }
 
@@ -9118,7 +9126,7 @@
 
     ReportScreenDeviceChangeL();
     
-    iViewManager.OrientationChanged();
+    iAppUiAdapter.EffectManager()->OrientationChanged();
             
     if ( !iControlAdapterList )
         {
--- a/idlehomescreen/xmluirendering/uiengine/src/xnviewadapter.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/src/xnviewadapter.cpp	Tue May 11 16:02:39 2010 +0300
@@ -40,6 +40,8 @@
 #include "xnfocuscontrol.h"
 #include "xneditor.h"
 #include "xnbackgroundmanager.h"
+#include "xneffectmanager.h"
+#include "xnwallpaperview.h"
 
 #include "xnviewadapter.h"
 #include "xnmenu.h"
@@ -50,7 +52,10 @@
 
 // Constants
 const TUid KXmlViewUid = { 1 };
+
 _LIT8( KActivateDefaultView, "activatedefault" );
+_LIT8( KSetWallpaper, "setwallpaper" );
+
 _LIT8( KMenuBar, "menubar" );
 
 // Data types
@@ -64,8 +69,24 @@
     EIsDestructionRunning
     };
 
+enum TAction
+    {
+    ENoAction = 0,
+    EActivateDefault,
+    ESetWallpaper
+    };
+
 // ============================= LOCAL FUNCTIONS ===============================
 // -----------------------------------------------------------------------------
+// CleanupEffect
+// -----------------------------------------------------------------------------
+//
+static void CleanupEffect( TAny* aAny )
+    {
+    static_cast< CXnEffectManager* >( aAny )->CleanupControlEffect();
+    }
+
+// -----------------------------------------------------------------------------
 // DetermineStatusPaneLayout
 // -----------------------------------------------------------------------------
 //
@@ -264,6 +285,9 @@
 //
 void CXnViewAdapter::ReloadUiL()
     {
+    iTimer->Cancel();
+    iAction = ENoAction;
+    
     DeactivateContainerL();
     
     iAppUiAdapter.RemoveFromStack( iEventDispatcher );
@@ -410,6 +434,14 @@
         sp->DrawNow();
         }
 
+    if ( aCustomMessage == KSetWallpaper )
+        {
+        iAction = ESetWallpaper;
+        
+        iTimer->Cancel();
+        iTimer->Start( 1000, 1000, TCallBack( TimerCallback, this ) );        
+        }
+    
     // Set the active container
     if ( aCustomMessage == KActivateDefaultView )
         {
@@ -417,6 +449,8 @@
     
         ActivateDefaultContainerL();
     
+        iAction = EActivateDefault;
+        
         iTimer->Cancel();
         iTimer->Start( 1000, 1000, TCallBack( TimerCallback, this ) );
         }
@@ -444,8 +478,37 @@
     CXnViewAdapter* self = reinterpret_cast< CXnViewAdapter* >( aPtr );
     self->iTimer->Cancel();
     
-    self->iCoeEnv->WsSession().SetWindowGroupOrdinalPosition(
-            self->iCoeEnv->RootWin().Identifier(), 0 );
+    if ( self->iAction == EActivateDefault )
+        {
+        self->iCoeEnv->WsSession().SetWindowGroupOrdinalPosition(
+                self->iCoeEnv->RootWin().Identifier(), 0 );    
+        }
+    else if ( self->iAction == ESetWallpaper )
+        {
+        CAknViewAppUi& appui = static_cast< CAknViewAppUi& >( self->iAppUiAdapter );
+        
+        CXnWallpaperView* view = 
+            static_cast< CXnWallpaperView* >( appui.View( KWallpaperViewUid ) );
+        
+        if ( view )
+            {
+            TFileName filename( KNullDesC );
+            
+            // Get selected wallpaper
+            view->SelectedWallpaper( filename );
+            
+            if ( filename != KNullDesC )
+                {
+                if ( self->BgManager().SetWallpaper( filename ) )
+                    {
+                    self->iAppUiAdapter.EffectManager()->BgAppearEffect( 
+                        self->iBgManager, ETrue );                     
+                    }                                              
+                }                        
+            }        
+        }
+    
+    self->iAction = ENoAction;
 
     __PRINTS( "*** CXnViewAdapter::TimerCallback, done" );
     
@@ -486,19 +549,20 @@
 // -----------------------------------------------------------------------------
 //
 void CXnViewAdapter::ActivateContainerL( CXnViewData& aContainer, 
-    TBool aEnterEditState, TBool aForceActivation )
+    TBool aEnterEditState, TUid aEffect )
     {
     // Returns if the container remains the same and activation is not forced
     // Otherwise the old container is deactivated and the new is activated
-    if ( iFlags.IsSet( EIsDestructionRunning ) ||
-        ( ( !aForceActivation ) &&  ( iContainer == &aContainer ) ) )
+    if ( iFlags.IsSet( EIsDestructionRunning ) || iContainer == &aContainer )        
         {
         return;
         }
 
-    // Find previous container and then deactivate it
-    const CXnViewData* previous( iContainer );
-    DeactivateContainerL();
+    // Get previous container and then deactivate it    
+    const CXnViewData* previous( iContainer ); 
+    const CXnViewData& active( iAppUiAdapter.ViewManager().ActiveViewData() );
+    
+    DeactivateContainerL( EFalse );
 
     if ( iFlags.IsClear( EIsActivated ) )
         {
@@ -510,6 +574,10 @@
     // Update  
     iContainer = &aContainer;
         
+    CXnEffectManager* mgr( iAppUiAdapter.EffectManager() );
+    
+    CleanupStack::PushL( TCleanupItem( CleanupEffect, mgr ) );
+    
     // Disable layout and redraw until container activation is done
     iAppUiAdapter.UiEngine().DisableRenderUiLC();
 
@@ -541,20 +609,40 @@
         {
         EnterEditStateL( aContainer, EFalse );                                
         }
-                          
+   
+    TBool started(
+        mgr->BeginActivateViewEffect( active, aContainer, aEffect ) );
+            
+    if ( previous )
+        {
+        CXnControlAdapter* previousControl( 
+            previous->Node()->LayoutNode()->Control() );
+                                      
+        previousControl->MakeVisible( EFalse );
+        }
+              
+    CXnControlAdapter* adapter( node->Control() );
+    adapter->MakeVisible( ETrue );
+           
     iAppUiAdapter.ViewManager().NotifyContainerChangedL( aContainer );
     
-    if ( previous && iContainer )
-        {
-        iBgManager->WallpaperChanged( *previous, *iContainer );    
-        }
+    iBgManager->ChangeWallpaper( active, aContainer, !started );
     
-    CXnControlAdapter* adapter( node->Control() );
-    adapter->MakeVisible( ETrue );
-	            
     iAppUiAdapter.UiEngine().RenderUIL();
     
-    CleanupStack::PopAndDestroy(); // DisableRenderUiLC   
+    CleanupStack::PopAndDestroy(); // DisableRenderUiLC
+    
+    mgr->EndActivateViewEffect( active, aContainer, aEffect );
+    
+    CleanupStack::PopAndDestroy(); // cleanupitem
+    
+    iAppUiAdapter.ViewManager().UpdatePageManagementInformationL();
+            
+    if ( iEventDispatcher )
+        {        
+        iEventDispatcher->SetMenuNodeL( 
+            iAppUiAdapter.UiEngine().MenuBarNode() );            
+        }    
     }
 
 // -----------------------------------------------------------------------------
@@ -581,7 +669,7 @@
         EnterEditStateL( *viewData, aEnterEditState );
         // Deactivate container even though it hasn't changed to close all 
         // popups and other windows
-        ActivateContainerL( *viewData, aEnterEditState, ETrue );
+        ActivateContainerL( *viewData, aEnterEditState );
         }
     }
 
@@ -631,7 +719,7 @@
 // Deactivates current container
 // -----------------------------------------------------------------------------
 //
-void CXnViewAdapter::DeactivateContainerL()
+void CXnViewAdapter::DeactivateContainerL( TBool aHide )
     {
     if ( !iContainer || iFlags.IsSet( EIsDestructionRunning ) )    
         {
@@ -651,8 +739,12 @@
     CXnNode* node( iContainer->Node()->LayoutNode() );
                 
     node->ReportXuikonEventL( *iDeactivate );
-    node->Control()->MakeVisible( EFalse );
     
+    if ( aHide )
+        {
+        node->Control()->MakeVisible( EFalse );
+        }
+        
     iContainer = NULL;
     }
 
--- a/idlehomescreen/xmluirendering/uiengine/src/xnviewdata.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/src/xnviewdata.cpp	Tue May 11 16:02:39 2010 +0300
@@ -5,7 +5,6 @@
 * under the terms of "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
 * Initial Contributors:
 * Nokia Corporation - initial contribution.
 *
@@ -17,14 +16,15 @@
 
 // System includes
 #include <babitflags.h>
-#include <aifwdefs.h>
 
 // User includes
+#include <aifwdefs.h>
 #include "xnappuiadapter.h"
 #include "xncomposer.h"
 #include "xnodtparser.h"
 #include "xnviewmanager.h"
 #include "xnviewdata.h"
+#include "xnpublisherdata.h"
 #include "xncontroladapter.h"
 #include "xndomnode.h"
 #include "xnnode.h"
@@ -34,8 +34,6 @@
 #include "debug.h"
 
 // Constants
-const TInt KLoadDelay( 10000 );
-const TInt KInterval( 10000 );
 
 // ============================ LOCAL FUNCTIONS ================================
 
@@ -102,28 +100,42 @@
 // 
 // -----------------------------------------------------------------------------
 //
-void CXnViewData::SetActive( TBool aActive )
+TInt CXnViewData::SetActive( TBool aActive )
     {    
     TBool active( Active() );
     
-    if ( active == aActive || !Occupied() )
+    TInt err( KErrNone );
+    
+    if ( !Occupied() )
         {
-        return;
-        }
-       
-    if ( aActive )
+        err = KErrGeneral;
+        }    
+    else if ( active == aActive )
         {
-        iFlags.Set( EIsActive );
-        iFlags.Clear( EIsInitial );
-        
-        LoadPublishers();                             
+        err = KErrNone;
         }
     else
-        {                              
-        DestroyPublishers( EAiFwPageShutdown );
-
-        iFlags.Clear( EIsActive );
-        }
+        {
+        if ( aActive )
+            {
+            iFlags.Set( EIsActive );
+            iFlags.Clear( EIsInitial );
+            
+            LoadPublishers( EAiFwPageStartup );
+            
+            err = iLoadError;
+            
+            iLoadError = KErrNone;
+            }
+        else
+            {                              
+            DestroyPublishers( EAiFwPageShutdown );
+    
+            iFlags.Clear( EIsActive );
+            }    
+        }       
+    
+    return err;
     }
 
 // -----------------------------------------------------------------------------
@@ -132,58 +144,57 @@
 // -----------------------------------------------------------------------------
 //
 TInt CXnViewData::Load()
-    {               
+    {   
+    iLoadError = KErrNone;
+    
     if ( Occupied() )
         {
-        return KErrInUse;
-        }
-       
-    if ( !CXnOomSysHandler::HeapAvailable( VIEW_MIN_MEM ) )
+        iLoadError = KErrInUse;
+        }      
+    else if ( !CXnOomSysHandler::HeapAvailable( VIEW_MIN_MEM ) )
         {                                
-        return KErrNoMemory;
+        iLoadError = KErrNoMemory;
         }
-                   
-    TInt err( KErrNone );
-    
-    TRAP( err, err = iManager.Composer().ComposeViewL( *this ) );
-
-    if ( err == KErrNone )
+    else
         {
-        TRAP( err, iManager.Parser().LoadViewL( *this ) );
-        }
+        TInt err( KErrNone );
         
-    if ( err == KErrNone )
-        {    
-        iVirginPublishers = ETrue;
-        
-        // Load view's initial widgets
-        for ( TInt i = 0; i < iPluginsData.Count(); i++ )
+        TRAP( err, err = iManager.Composer().ComposeViewL( *this ) );
+    
+        if ( err == KErrNone )
             {
-            if ( iPluginsData[i]->PluginId() != KNullDesC8 )
-                {                    
-                TInt err2( iPluginsData[i]->Load() );
-                
-                if ( err2 == KXnErrPluginFailure )
-                    {
-                    // Content removed error note must be   
-                    // displayed once when this view is activated
-                    iShowContentRemoved = ETrue;
-                                        
-                    err = err2;                                        
-                    }          
-                else if ( err2 == KErrNoMemory )
-                    {                                          
-                    err = err2;                                                                  
-                    break;
+            TRAP( err, iManager.Parser().LoadViewL( *this ) );
+            }
+                           
+        if ( err == KErrNone )
+            {                  
+            // Load view's initial widgets
+            for ( TInt i = 0; i < iPluginsData.Count(); i++ )
+                {
+                if ( iPluginsData[i]->PluginId() != KNullDesC8 )
+                    {                    
+                    TInt err2( iPluginsData[i]->Load() );
+                    
+                    if ( err2 == KXnErrPluginFailure )
+                        {
+                        err = err2;                                        
+                        }          
+                    else if ( err2 == KErrNoMemory )
+                        {                                          
+                        err = err2;                                                                  
+                        break;
+                        }
                     }
                 }
-            }
+                           
+            // Succesfully enough composed, publishers 
+            // will be loaded when view is activated
+            }    
+        
+        iLoadError = err;
+        }
                        
-        // Succesfully enough composed, publishers 
-        // will be loaded when view is activated
-        }
-    
-    return err;
+    return iLoadError;
     }
 
 // -----------------------------------------------------------------------------
@@ -206,7 +217,9 @@
     
     delete iBgImagePath;
     iBgImagePath = NULL;
-              
+    
+    iLoadError = KErrNone;
+    
     Flush();      
     }
 
@@ -315,6 +328,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnViewData::SetWallpaperImagePathL
+//
 // -----------------------------------------------------------------------------
 //
 void CXnViewData::SetWallpaperImagePathL( const TDesC& aFileName )
@@ -329,6 +343,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnViewData::WallpaperImagePath
+//
 // -----------------------------------------------------------------------------
 //
 const TDesC& CXnViewData::WallpaperImagePath() const
@@ -462,151 +477,128 @@
 // Loads data plugins associated to the plugin
 // -----------------------------------------------------------------------------
 //
-void CXnViewData::LoadPublishers()
+void CXnViewData::LoadPublishers( TInt aReason )
     {
+    __PRINTS( "*** CXnViewData::LoadPublishers" );
+    
     if( !Active() || !Occupied() )
         {               
+        __PRINTS( "*** CXnViewData::LoadPublishers - done, !Active() || !Occupied()" );
+        
         return;
         }
     
-    iLoader->Cancel();
-    
-    iLoadIndex = 0;
-                                
-    iLoader->Start( TTimeIntervalMicroSeconds32( KLoadDelay ),
-                    TTimeIntervalMicroSeconds32( KInterval ),
-                    TCallBack( DoLoadPublishersL, this ) );           
-    }
-
-// -----------------------------------------------------------------------------
-// CXnViewData::DoLoadPublishersL()
-// 
-// -----------------------------------------------------------------------------
-//
-/* static */ TInt CXnViewData::DoLoadPublishersL( TAny* aAny )
-    {
-    __PRINTS( "*** CXnViewData::DoLoadPublishersL" );
-    
-    CXnViewData* self = static_cast< CXnViewData* >( aAny );
-    
-    CXnAppUiAdapter* appui = static_cast< CXnAppUiAdapter* >( iAvkonAppUi );         
-    
-    RPointerArray< CXnPluginData >& plugins( self->PluginData() );
-    
-    for ( TInt i = self->iLoadIndex; i < plugins.Count(); i++ )
-        {        
-        if ( !plugins[i]->Occupied() )
-            {
-            self->iLoadIndex++;
-            }
-        else
-            {
-            break;
+    for ( TInt i = 0; i < iPluginsData.Count(); i++ )
+        {
+        CXnPluginData* plugin( iPluginsData[i] );
+        
+        if ( plugin->Occupied() )
+            {            
+            plugin->LoadPublishers( aReason );
             }
         }
         
-    if ( self->iLoadIndex < plugins.Count() )
+    CXnPluginData::LoadPublishers( aReason );
+
+    __PRINTS( "*** CXnViewData::LoadPublishers - done" );
+    }
+
+// -----------------------------------------------------------------------------
+// CXnViewData::NotifyPublisherReadyL
+// Notifies a publisher is ready
+// -----------------------------------------------------------------------------
+//
+void CXnViewData::NotifyPublisherReadyL()
+    {       
+    if ( !Active() )
         {
-        CXnPluginData* plugin( plugins[self->iLoadIndex] );
-             
-        self->iLoadIndex++;
+        return;
+        }
+     
+    TBool allready( ETrue );
+    
+    RPointerArray< CXnPublisherData > list;
+    CleanupClosePushL( list );
+    
+    for ( TInt i = 0; i < iPluginsData.Count(); i++ )
+        {
+        CXnPluginData* plugin( iPluginsData[i] );
         
-        TInt reason( plugin->VirginPublishers() ? 
-            EAiFwSystemStartup : EAiFwPageStartup );         
+        if ( plugin->Occupied() )
+            {
+            plugin->PublishersL( list );
+            }
+        }
+    
+    CXnPluginData::PublishersL( list );
+
+    for ( TInt i = 0; i < list.Count(); i++ )
+        {
+        CXnPublisherData* publisher( list[i] );
         
-        TInt ret( plugin->LoadPublishers( reason ) );
+        if ( publisher->IsLoading() )
+            {
+            allready = EFalse;
+            break;
+            }
+        }
+
+    if ( allready && Active() )
+        {
+        TInt result( KErrNone );
         
-        if ( ret == KErrAlreadyExists )
+        for ( TInt i = 0; i < list.Count(); i++ )
             {
-            ret = KErrNone;
+            CXnPublisherData* publisher( list[i] );
+            
+            if ( publisher->IsFailed() )
+                {
+                CXnPluginData* plugin( publisher->Owner() );
+                
+                if ( plugin != this && plugin->Removable() )
+                    {
+                    iManager.UnloadWidgetFromPluginL( *plugin, ETrue );
+                    
+                    result = KXnErrPluginFailure;
+                    }                              
+                }
             }
         
-        if( ret != KErrNone )
-            {
-            self->iManager.UnloadWidgetFromPluginL( *plugin, ETrue );            
-            self->iShowContentRemoved = ETrue;
-            }        
+        TRAP_IGNORE( iManager.PublishersReadyL( *this, result ) );        
         }
-    else
-        {                
-        TInt reason( self->VirginPublishers() ? 
-            EAiFwSystemStartup : EAiFwPageStartup ); 
-        
-        self->iVirginPublishers = EFalse;
-        
-        self->iLoader->Cancel();
-        
-        self->iLoadIndex = 0;
         
-        for ( TInt i = 0; i < self->iContentSourceNodes.Count(); i++ )
-            {            
-            CXnNodeAppIf& plugin( self->iContentSourceNodes[i]->AppIfL() ); 
-                    
-            appui->LoadPublisher( plugin, reason );                          
-            }                
-                             
-        if ( self->iShowContentRemoved )
-            {
-            self->ShowContentRemovedError();
-            self->iShowContentRemoved = EFalse;
-            }      
-                
-        // Fire UI ready blindly here, it will be handled in AiFw if needed
-        appui->HandleUiReadyEventL();
-        }                  
-            
-    __PRINTS( "*** CXnViewData::DoLoadPublishersL - done" );
-    
-    return KErrNone;       
+    CleanupStack::PopAndDestroy( &list );
     }
 
 // -----------------------------------------------------------------------------
 // CXnViewData::DestroyPublishers
-// Remove data plugins associated to the plugin
+// Destroys data plugins associated to the plugin
 // -----------------------------------------------------------------------------
 //
 void CXnViewData::DestroyPublishers( TInt aReason )
     {
     __PRINTS( "*** CXnViewData::DestroyPublishers" );
     
-    if ( Occupied() )
+    if ( !Occupied() )
         {
-        // If not all plugins loaded yet               
-        iLoader->Cancel();                                  
+        __PRINTS( "*** CXnViewData::DestroyPublishers - done, !Occupied()" );
         
-        TRAP_IGNORE( DoDestroyPublishersL( aReason ) );
+        return;
+        }
+    
+    for ( TInt i = 0; i < iPluginsData.Count(); i++ )
+        {
+        CXnPluginData* plugin( iPluginsData[i] );
         
-        User::Heap().Compress();        
+        if ( plugin->Occupied() )
+            {
+            plugin->DestroyPublishers( aReason );
+            }
         }
     
+    CXnPluginData::DestroyPublishers( aReason );
+    
     __PRINTS( "*** CXnViewData::DestroyPublishers - done" );
     }
 
-// -----------------------------------------------------------------------------
-// CXnPluginData::DoDestroyPublishersL
-// Remove data plugins associated to the plugin
-// -----------------------------------------------------------------------------
-//
-void CXnViewData::DoDestroyPublishersL( TInt aReason )
-    {
-    __TIME_MARK( time );
-    
-    // Create list of data plugins to be removed    
-    RPointerArray< CXnNode > publishers;
-    CleanupClosePushL( publishers );
-    
-    TRAP_IGNORE( ContentSourceNodesL( publishers ) );
-    
-    for ( TInt i = 0; i < publishers.Count(); i++ )
-        {
-        // Destruction is synchronous
-        iManager.AppUiAdapter().DestroyPublisher( 
-            publishers[i]->AppIfL(), aReason );        
-        }
-        
-    CleanupStack::PopAndDestroy( &publishers );
-    
-    __TIME_ENDMARK( "CXnViewData::DoDestroyPublishersL, done", time );
-    }
-
 // End of file
--- a/idlehomescreen/xmluirendering/uiengine/src/xnviewmanager.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/src/xnviewmanager.cpp	Tue May 11 16:02:39 2010 +0300
@@ -27,7 +27,6 @@
 #include <aifwdefs.h>
 #include <gfxtranseffect/gfxtranseffect.h>
 #include <akntransitionutils.h>
-#include <layoutmetadata.cdl.h>
 
 // User includes
 #include "xnapplication.h"
@@ -56,6 +55,7 @@
 #include "xnoomsyshandler.h"
 #include "xnbackgroundmanager.h"
 #include "xneffectmanager.h"
+#include "xnkeyeventdispatcher.h"
 
 // Constants
 _LIT8( KEmptyWidgetUid, "0x2001f47f" );
@@ -64,6 +64,7 @@
 const TInt KPSCategoryUid( 0x200286E3 );
 const TInt KPSCrashCountKey( 1 );     
 const TInt KStabilityInterval( 60000000 ); // 1 minute
+const TInt KActivationCompleteInterval( 2000000 ); // 2s
 const TInt KCrashRestoreDefaultThreshold( 3 );
 const TInt KCrashRestoreAllTreshold( 4 );
 
@@ -278,7 +279,9 @@
 // -----------------------------------------------------------------------------
 //
 CXnViewManager::~CXnViewManager()
-    {        
+    {
+    delete iAsyncCb;
+    
     delete iStabilityTimer;
     
     iObservers.Reset();
@@ -325,9 +328,9 @@
     iHspsWrapper = &iEditor->HspsWrapper();
     
     iComposer = CXnComposer::NewL( *iHspsWrapper );
-    
-    iIsLandscapeOrientation = Layout_Meta_Data::IsLandscapeOrientation();
-    
+           
+    iAsyncCb = CPeriodic::NewL( CActive::EPriorityIdle ); 
+                       
     DoRobustnessCheckL();
     }
 
@@ -348,8 +351,8 @@
            
     CleanupStack::PopAndDestroy(); // DisableRenderUiLC();
     
-    // Activate initial view already here to get publishers loaded        
-    ActiveViewData().SetActive( ETrue );    
+    // Load initial view publishers         
+    ActiveViewData().LoadPublishers( EAiFwSystemStartup );    
     }
 
 // -----------------------------------------------------------------------------
@@ -364,6 +367,13 @@
     
     NotifyViewDeactivatedL( ActiveViewData() );
     
+    if ( iAsyncCb->IsActive() )
+        {
+        iAsyncCb->Cancel();
+        
+        ContainerActivated( this );
+        }
+    
     delete iWidgetAmountTrigger;
     iWidgetAmountTrigger = NULL;
           
@@ -388,6 +398,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnViewManager::LoadWidgetToPluginL()
+//
 // -----------------------------------------------------------------------------
 //
 TInt CXnViewManager::LoadWidgetToPluginL( const CHsContentInfo& aContentInfo,
@@ -416,7 +427,7 @@
         
         if( retval == KErrDiskFull )
             {
-            ShowDiskFullMessageL();
+            TRAP_IGNORE( ShowErrorL( R_QTN_HS_OPERATION_FAILED_NO_DISK ) );            
             }
         }
     else
@@ -435,7 +446,7 @@
             }
         else if( retval == KErrDiskFull )
             {
-            ShowDiskFullMessageL();
+            TRAP_IGNORE( ShowErrorL( R_QTN_HS_OPERATION_FAILED_NO_DISK ) );            
             }        
         
         CleanupStack::PopAndDestroy( result ); 
@@ -460,11 +471,11 @@
             }  
         else if ( retval == KErrNoMemory )
             {
-            aPluginData.ShowOutOfMemError();
+            TRAP_IGNORE( ShowErrorL( R_QTN_HS_HS_MEMORY_FULL ) );
             }
         else if ( retval == KXnErrPluginFailure )
             {            
-            aPluginData.ShowContentRemovedError();
+            TRAP_IGNORE( ShowErrorL( R_QTN_HS_ERROR_WIDGETS_REMOVED ) );
             }
         
         CleanupStack::PopAndDestroy(); // DisableRenderUiLC
@@ -475,6 +486,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnViewManager::UnloadWidgetFromPluginL()
+//
 // -----------------------------------------------------------------------------
 //
 TInt CXnViewManager::UnloadWidgetFromPluginL( CXnPluginData& aPluginData, 
@@ -558,6 +570,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnViewManager::ReplaceWidgetToPluginL
+//
 // -----------------------------------------------------------------------------
 //
 TInt CXnViewManager::ReplaceWidgetToPluginL( const CHsContentInfo& aContentInfo,
@@ -606,11 +619,11 @@
             }
         else if ( retval == KErrNoMemory )
             {
-            aPluginData.ShowOutOfMemError();
+            TRAP_IGNORE( ShowErrorL( R_QTN_HS_HS_MEMORY_FULL ) );            
             }
         else if ( retval == KXnErrPluginFailure )
             {            
-            aPluginData.ShowContentRemovedError();
+            TRAP_IGNORE( ShowErrorL( R_QTN_HS_ERROR_WIDGETS_REMOVED ) );        
             }
                         
         CleanupStack::PopAndDestroy(); // DisableRenderUiLC
@@ -780,6 +793,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnViewManager::AppearanceNodes()
+//
 // -----------------------------------------------------------------------------
 //
 RPointerArray< CXnNode >& CXnViewManager::AppearanceNodes() const
@@ -865,71 +879,29 @@
     CXnViewData& next( NextViewData() );
     
     if ( !next.Occupied() )
-        {                
-        if ( next.Load() == KErrNoMemory )
+        {    
+        TInt err( next.Load() );
+        
+        if ( err )
             {
-            next.ShowOutOfMemError();
-            return;
+            if ( err == KErrNoMemory )
+                {
+                TRAP_IGNORE( ShowErrorL( R_QTN_HS_HS_MEMORY_FULL ) );
+                }
+            else if ( err == KXnErrPluginFailure )
+                {            
+                TRAP_IGNORE( ShowErrorL( R_QTN_HS_ERROR_WIDGETS_REMOVED ) );
+                }
+            
+            return;            
             }
         }
         
     // Activate view
     if ( next.Occupied() && !next.Active() )
-        {       
-        CXnControlAdapter* thisView( 
-            ActiveViewData().ViewNode()->Control() );                
-        
-        CXnControlAdapter* nextView( 
-            next.ViewNode()->Control() );
-    
-        GfxTransEffect::Register( thisView, KGfxContextActivateNextView );    
-        GfxTransEffect::Register( nextView, KGfxContextActivateNextView );
-        
-        TInt ret( GfxTransEffect::BeginGroup() );
-        
-        CFbsBitmap* currentBg( ActiveViewData().WallpaperImage() );
-        CFbsBitmap* nextBg( next.WallpaperImage() );
-        
-        if ( currentBg || nextBg )
-            {
-            CCoeControl* bg( &iAppUiAdapter.ViewAdapter().BgManager() );
-            
-            if ( !currentBg && nextBg )
-                {
-                GfxTransEffect::Begin( bg, KGfxControlActionBgAnimToImgAppear );
-                }
-            else
-                {
-                GfxTransEffect::Begin( bg, KGfxControlActionBgImgToImgAppear );
-                }
-            
-            GfxTransEffect::SetDemarcation( bg, bg->Position() );
-            GfxTransEffect::End( bg );
-            }
-        
-        if ( iIsLandscapeOrientation )
-            {
-            GfxTransEffect::Begin( thisView, KGfxControlActionDisappearLsc );
-            GfxTransEffect::Begin( nextView, KGfxControlActionAppearLsc );
-            }
-        else
-            {
-            GfxTransEffect::Begin( thisView, KGfxControlActionDisappearPrt );
-            GfxTransEffect::Begin( nextView, KGfxControlActionAppearPrt );
-            }
-        
-        TRAP_IGNORE( iAppUiAdapter.ViewAdapter().ActivateContainerL( next ) );
-        
-        GfxTransEffect::SetDemarcation( thisView, thisView->Position() );
-        GfxTransEffect::End( thisView );
-        
-        GfxTransEffect::SetDemarcation( nextView, nextView->Position() );
-        GfxTransEffect::End( nextView );
-                                
-        GfxTransEffect::EndGroup( ret );
-        
-        GfxTransEffect::Deregister( thisView );
-        GfxTransEffect::Deregister( nextView );
+        {
+        iAppUiAdapter.ViewAdapter().ActivateContainerL( 
+            next, EFalse, KGfxContextActivateNextView );                        
         }
     }
 
@@ -944,70 +916,28 @@
 
     if ( !prev.Occupied() )
         {
-        if ( prev.Load() == KErrNoMemory )
+        TInt err( prev.Load() );
+        
+        if ( err )
             {
-            prev.ShowOutOfMemError();
-            return;
-            }
+            if ( err == KErrNoMemory )
+                {
+                TRAP_IGNORE( ShowErrorL( R_QTN_HS_HS_MEMORY_FULL ) );
+                }
+            else if ( err == KXnErrPluginFailure )
+                {            
+                TRAP_IGNORE( ShowErrorL( R_QTN_HS_ERROR_WIDGETS_REMOVED ) );
+                }
+            
+            return;            
+            }    
         }
         
     // Activate view
     if ( prev.Occupied() && !prev.Active() )
         {
-        CXnControlAdapter* thisView( 
-            ActiveViewData().ViewNode()->Control() ); 
-        
-        CXnControlAdapter* prevView( 
-            prev.ViewNode()->Control() );
-
-        GfxTransEffect::Register( thisView, KGfxContextActivatePrevView );    
-        GfxTransEffect::Register( prevView, KGfxContextActivatePrevView );
-    
-        TInt ret( GfxTransEffect::BeginGroup() );
-        
-        CFbsBitmap* currentBg( ActiveViewData().WallpaperImage() );
-        CFbsBitmap* prevBg( prev.WallpaperImage() );
-        
-        if ( currentBg || prevBg )
-            {
-            CCoeControl* bg( &iAppUiAdapter.ViewAdapter().BgManager() );
-            
-            if ( !currentBg && prevBg )
-                {
-                GfxTransEffect::Begin( bg, KGfxControlActionBgAnimToImgAppear );
-                }
-            else
-                {
-                GfxTransEffect::Begin( bg, KGfxControlActionBgImgToImgAppear );
-                }
-            
-            GfxTransEffect::SetDemarcation( bg, bg->Position() );
-            GfxTransEffect::End( bg );
-            }
-        
-        if ( iIsLandscapeOrientation )
-            {
-            GfxTransEffect::Begin( thisView, KGfxControlActionDisappearLsc );
-            GfxTransEffect::Begin( prevView, KGfxControlActionAppearLsc );
-            }
-        else
-            {
-            GfxTransEffect::Begin( thisView, KGfxControlActionDisappearPrt );
-            GfxTransEffect::Begin( prevView, KGfxControlActionAppearPrt );
-            }
-        
-        TRAP_IGNORE( iAppUiAdapter.ViewAdapter().ActivateContainerL( prev ) );
-        
-        GfxTransEffect::SetDemarcation( thisView, thisView->Position() );
-        GfxTransEffect::End( thisView );
-                                      
-        GfxTransEffect::SetDemarcation( prevView, prevView->Position() );
-        GfxTransEffect::End( prevView );
-                                
-        GfxTransEffect::EndGroup( ret );
-        
-        GfxTransEffect::Deregister( thisView );
-        GfxTransEffect::Deregister( prevView );        
+        iAppUiAdapter.ViewAdapter().ActivateContainerL( 
+            prev, EFalse, KGfxContextActivatePrevView );                                
         }
     }
 
@@ -1033,7 +963,7 @@
     
     if( retval == KErrDiskFull )
         {
-        ShowDiskFullMessageL();
+        TRAP_IGNORE( ShowErrorL( R_QTN_HS_OPERATION_FAILED_NO_DISK ) );
         }        
     else if ( retval == KErrNone )
         {                             
@@ -1048,9 +978,13 @@
                 
         if ( retval == KErrNoMemory )
             {
-            newView->ShowOutOfMemError();
+            TRAP_IGNORE( ShowErrorL( R_QTN_HS_HS_MEMORY_FULL ) );            
             }
-        
+        else if ( retval == KXnErrPluginFailure )
+            {            
+            TRAP_IGNORE( ShowErrorL( R_QTN_HS_ERROR_WIDGETS_REMOVED ) );
+            }
+                
         if ( newView->Occupied() )
             {
             // Load succeed, add the new view behind the current view               
@@ -1097,18 +1031,9 @@
     {
     if ( iRootData->PluginData().Count() >= iRootData->MaxPages() ) 
         { 
-        HBufC* msg( StringLoader::LoadLC( 
-            R_QTN_HS_MAX_AMOUNT_OF_PAGES_NOTE ) ); 
-
-        CAknErrorNote* note = new ( ELeave ) CAknErrorNote; 
-        CleanupStack::PushL( note ); 
-               
-        note->ExecuteLD( *msg ); 
-               
-        CleanupStack::Pop( note ); 
-        CleanupStack::PopAndDestroy( msg ); 
-
-        return; 
+        TRAP_IGNORE( ShowErrorL( R_QTN_HS_MAX_AMOUNT_OF_PAGES_NOTE ) );
+        
+        return;        
         }
 
     // Add new view (template view) to hsps
@@ -1121,7 +1046,7 @@
     
     if( status == KErrDiskFull )
         {
-        ShowDiskFullMessageL();
+        TRAP_IGNORE( ShowErrorL( R_QTN_HS_OPERATION_FAILED_NO_DISK ) );
         }            
     else if ( status == KErrNone )
         {                             
@@ -1136,9 +1061,13 @@
         
         if ( status == KErrNoMemory )
             {
-            newView->ShowOutOfMemError();
+            TRAP_IGNORE( ShowErrorL( R_QTN_HS_HS_MEMORY_FULL ) );
+            }        
+        else if ( status == KXnErrPluginFailure )
+            {            
+            TRAP_IGNORE( ShowErrorL( R_QTN_HS_ERROR_WIDGETS_REMOVED ) );
             }
-        
+                
         if ( newView->Occupied() )
             {
             // Start transition effect
@@ -1212,6 +1141,7 @@
             
                 // Activate the next view, or first if in the last view 
                 CXnViewData& next( NextViewData() );
+                
                 iAppUiAdapter.ViewAdapter().ActivateContainerL( next );
                 }
 
@@ -1221,11 +1151,7 @@
             retval = iHspsWrapper->RemovePluginL( view->PluginId() );
             
             // Notify observers of view list change
-            TRAPD( err, NotifyViewRemovalL( *view ) );
-            if ( err != KErrNone )
-                {
-                // ignored
-                }            
+            TRAP_IGNORE( NotifyViewRemovalL( *view ) );
 
             iRootData->DestroyViewData( view );
                                                                    
@@ -1298,11 +1224,8 @@
         iHspsWrapper->RemovePluginL( view->PluginId() );
         
         // Notify observers of view list change
-        TRAPD( err, NotifyViewRemovalL( *view ) );
-        if ( err != KErrNone )
-            {
-            // ignored
-            }   
+        TRAP_IGNORE( NotifyViewRemovalL( *view ) );
+
 
         iRootData->DestroyViewData( view );
         
@@ -1313,6 +1236,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnViewManager::AddObserver()
+//
 // -----------------------------------------------------------------------------
 //
 void CXnViewManager::AddObserver( const MXnViewObserver& aObserver )
@@ -1327,6 +1251,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnViewManager::RemoveObserver()
+//
 // -----------------------------------------------------------------------------
 //
 void CXnViewManager::RemoveObserver( const MXnViewObserver& aObserver )
@@ -1435,26 +1360,29 @@
 // CXnViewManager::NotifyContainerChangedL()
 // Notifies container is changed, this is called always by CXnViewAdapter
 // -----------------------------------------------------------------------------
+//
 void CXnViewManager::NotifyContainerChangedL( CXnViewData& aViewToActivate )
     {
+    iAsyncCb->Cancel();
+    
     CXnViewData& viewToDeactivate( ActiveViewData() );
     
+    TInt err( KErrNone );
+        
     if ( &aViewToActivate != &viewToDeactivate )
-        {        
+        {               
         NotifyViewDeactivatedL( viewToDeactivate );
                       
-        viewToDeactivate.SetActive( EFalse );
+        err = viewToDeactivate.SetActive( EFalse );
         aViewToActivate.SetActive( ETrue );
-                             
-        iHspsWrapper->SetActivePluginL( aViewToActivate.PluginId() ); 
-                    
+                                                        
         // Cache update is needed after view activation
         UpdateCachesL();               
         }
     else
         {
         // Activate first view
-        aViewToActivate.SetActive( ETrue );
+        err = aViewToActivate.SetActive( ETrue );
 
         // Cache update is needed after view activation
         UpdateCachesL();
@@ -1463,8 +1391,72 @@
         iRootData->LoadRemainingViews();
         }
     
-    NotifyViewActivatedL( aViewToActivate );
-    UpdatePageManagementInformationL();
+    if ( err == KErrNoMemory )
+        {
+        TRAP_IGNORE( ShowErrorL( R_QTN_HS_HS_MEMORY_FULL ) );
+        }
+    else if ( err == KXnErrPluginFailure )
+        {
+        TRAP_IGNORE( ShowErrorL( R_QTN_HS_ERROR_WIDGETS_REMOVED ) );
+        }       
+               
+    NotifyViewActivatedL( aViewToActivate );           
+    }
+
+// -----------------------------------------------------------------------------
+// CXnViewManager::PublishersReadyL()
+// Notifies that aViewData activation is complete
+// -----------------------------------------------------------------------------
+//
+void CXnViewManager::PublishersReadyL( CXnViewData& aViewData, TInt aResult )
+    {
+    if ( !aViewData.Active() )
+        {
+        return;
+        }
+           
+    iAsyncCb->Cancel();
+    
+    TCallBack cb( ContainerActivated, this ) ;
+    
+    iAsyncCb->Start( KActivationCompleteInterval, 0, cb ); 
+                     
+    if ( !iUiReady )
+        {
+        iAppUiAdapter.HandleUiReadyEventL();
+        iUiReady = ETrue;
+        }
+    
+    if ( aResult == KErrNoMemory )
+        {
+        ShowErrorL( R_QTN_HS_HS_MEMORY_FULL );
+        }
+    else if ( aResult == KXnErrPluginFailure )
+        {
+        ShowErrorL( R_QTN_HS_ERROR_WIDGETS_REMOVED );
+        }       
+    }
+
+// -----------------------------------------------------------------------------
+// CXnViewManager::ContainerActivated()
+// Notifies that a container activation is complete
+// -----------------------------------------------------------------------------
+//
+/* static */ TInt CXnViewManager::ContainerActivated( TAny* aAny )
+    {
+    CXnViewManager* self = static_cast< CXnViewManager* >( aAny );
+    
+    self->iAsyncCb->Cancel();
+    
+    CXnViewData& active( self->ActiveViewData() );
+    
+    TRAP_IGNORE( self->iHspsWrapper->SetActivePluginL( active.PluginId() ) );
+
+    CXnBackgroundManager& bg( self->iAppUiAdapter.ViewAdapter().BgManager() ); 
+        
+    TRAP_IGNORE( bg.StoreWallpaperL() );
+    
+    return KErrNone;
     }
 
 // -----------------------------------------------------------------------------
@@ -1572,6 +1564,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnViewManager::UpdateCachesL()
+//
 // -----------------------------------------------------------------------------
 //
 void CXnViewManager::UpdateCachesL()
@@ -1587,6 +1580,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnViewManager::ReportWidgetAmountL()
+//
 // -----------------------------------------------------------------------------
 //
 void CXnViewManager::ReportWidgetAmountL( const CXnViewData& aViewData )
@@ -1652,24 +1646,30 @@
     }
 
 // -----------------------------------------------------------------------------
-// CXnViewManager::ShowOperationFailedMessageL
+// CXnViewManager::ShowErrorL
+//
 // -----------------------------------------------------------------------------
 //
-void CXnViewManager::ShowDiskFullMessageL() const
-    {
-    HBufC* msg( StringLoader::LoadLC( R_QTN_HS_OPERATION_FAILED_NO_DISK ) ); 
-
-    CAknErrorNote* note = new ( ELeave ) CAknErrorNote; 
-    CleanupStack::PushL( note ); 
-           
-    note->ExecuteLD( *msg );
-           
-    CleanupStack::Pop( note ); 
-    CleanupStack::PopAndDestroy( msg );     
+void CXnViewManager::ShowErrorL( TInt aResource ) const
+    {       
+    if ( aResource == R_QTN_HS_HS_MEMORY_FULL )
+        {
+        iOomSysHandler->HandlePotentialOomL();
+        }
+    else
+        {
+        HBufC* msg( StringLoader::LoadLC( aResource ) ); 
+    
+        CAknErrorNote* note = new ( ELeave ) CAknErrorNote;                       
+        note->ExecuteLD( *msg );
+                       
+        CleanupStack::PopAndDestroy( msg );             
+        }    
     }
 
 // -----------------------------------------------------------------------------
 // CXnViewManager::OOMSysHandler
+//
 // -----------------------------------------------------------------------------
 //
 CXnOomSysHandler& CXnViewManager::OomSysHandler() const
@@ -1759,6 +1759,7 @@
 
 // -----------------------------------------------------------------------------
 // CXnViewManager::ResetCrashCount 
+//
 // -----------------------------------------------------------------------------
 void CXnViewManager::ResetCrashCount()
     {
@@ -1766,38 +1767,34 @@
     }
 
 // -----------------------------------------------------------------------------
-// CXnViewManager::ShowErrorNoteL 
-// -----------------------------------------------------------------------------
-void CXnViewManager::ShowErrorNoteL()
-    {        
-    CAknQueryDialog* query = CAknQueryDialog::NewL();
-    query->PrepareLC( R_HS_CONTENT_REMOVED_VIEW );
-
-    HBufC* queryText( StringLoader::LoadLC( R_HS_ERROR_CONTENT_REMOVED ) );    
-    query->SetPromptL( queryText->Des() );    
-    CleanupStack::PopAndDestroy( queryText );
-
-    query->RunLD();   
-    }
-
-// -----------------------------------------------------------------------------
-// CXnViewManager::DoRobustnessCheckL 
+// CXnViewManager::DoRobustnessCheckL
+//
 // -----------------------------------------------------------------------------
 void CXnViewManager::DoRobustnessCheckL()
     {
     TInt crashCount = 0;
+    
     RProperty::Get( TUid::Uid( KPSCategoryUid ),
                     KPSCrashCountKey,
                     crashCount );    
     
     if( crashCount == KCrashRestoreDefaultThreshold )
         {    
-        TInt err = iHspsWrapper->RestoreDefaultConfL();         
-        ShowErrorNoteL();
+        iHspsWrapper->RestoreDefaultConfL();
+        
+        CAknQueryDialog* query = CAknQueryDialog::NewL();
+        query->PrepareLC( R_HS_CONTENT_REMOVED_VIEW );
+
+        HBufC* queryText( StringLoader::LoadLC( R_HS_ERROR_CONTENT_REMOVED ) );    
+        query->SetPromptL( queryText->Des() );    
+        CleanupStack::PopAndDestroy( queryText );
+
+        query->RunLD();           
         }
     else if( crashCount >= KCrashRestoreAllTreshold )
         {       
-        TInt err = iHspsWrapper->RestoreRootL();              
+        iHspsWrapper->RestoreRootL();
+        
         ResetCrashCount();
         return;
         }
@@ -1814,12 +1811,4 @@
         }           
     }
 
-// -----------------------------------------------------------------------------
-// CXnViewManager::OrientationChanged 
-// -----------------------------------------------------------------------------
-void CXnViewManager::OrientationChanged()
-    {
-    iIsLandscapeOrientation = Layout_Meta_Data::IsLandscapeOrientation();    
-    }
-
 // End of file
--- a/idlehomescreen/xmluirendering/uiengine/src/xnwallpaperview.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/src/xnwallpaperview.cpp	Tue May 11 16:02:39 2010 +0300
@@ -16,17 +16,10 @@
 */
 
 // System includes
-#include <aknappui.h>
-#include <eikapp.h>
 #include <eikbtgpc.h>
 #include <avkon.rsg>
-#include <AknsWallpaperUtils.h>
-#include <MGFetch.h>
-#include <aknnotewrappers.h>
-#include <StringLoader.h> 
-#include <caf/caf.h>
+#include <MGFetch.h> 
 #include <bautils.h>
-#include <AknWaitDialog.h>
 #include <data_caging_path_literals.hrh>
 
 // User includes
@@ -36,9 +29,8 @@
 #include "xnuiengine.h"
 #include "xnappuiadapter.h"
 #include "xnviewadapter.h"
-#include "xnbackgroundmanager.h"
+#include "xnviewmanager.h"
 #include "xneffectmanager.h"
-#include "xnviewmanager.h"
 #include "xnspbgcleaner.h"
 
 // Constants
@@ -46,15 +38,15 @@
 _LIT( KResourceFile, "xnwallpaperview.rsc" );
 
 _LIT8( KMulti, "multi" );
+_LIT8( KSetWallpaper, "setwallpaper" );
 
 const TInt KFileArrayGranularity( 6 );
-const TInt KShortDelay = 1000;
-const TInt KLongDelay = 1000 * 1000;
 
 // ============================ MEMBER FUNCTIONS ===============================
 
 // -----------------------------------------------------------------------------
 // C++ default constructor.
+//
 // -----------------------------------------------------------------------------
 //
 CXnWallpaperView::CXnWallpaperView( CXnUiEngine& aEngine ) 
@@ -64,6 +56,7 @@
 
 // -----------------------------------------------------------------------------
 // Symbian 2nd phase constructor.
+//
 // -----------------------------------------------------------------------------
 //
 void CXnWallpaperView::ConstructL()
@@ -81,12 +74,16 @@
     
     BaseConstructL( R_WALLPAPER_VIEW );
            
-    iTimer = CPeriodic::NewL( CActive::EPriorityIdle );
-    iViewState = EIdle;
+    TCallBack cb( HandleCallback, this );
+    
+    iAsyncCb = new ( ELeave ) CAsyncCallBack( cb, CActive::EPriorityHigh );
+    
+    iFiles = new ( ELeave ) CDesCArrayFlat( KFileArrayGranularity );                
     }
 
 // -----------------------------------------------------------------------------
 // Two-phased constructor.
+//
 // -----------------------------------------------------------------------------
 //
 CXnWallpaperView* CXnWallpaperView::NewL( CXnUiEngine& aEngine )
@@ -100,24 +97,27 @@
 
 // -----------------------------------------------------------------------------
 // Destructor.
+//
 // -----------------------------------------------------------------------------
 //
 CXnWallpaperView::~CXnWallpaperView()
-    {
-    if ( iWaitDialog )
+    {        
+    CCoeEnv::Static()->DeleteResourceFile( iResourceOffset );    
+    
+    if ( iFiles )
         {
-        TRAP_IGNORE( iWaitDialog->ProcessFinishedL(); );
+        iFiles->Reset();
         }
     
-    CCoeEnv::Static()->DeleteResourceFile( iResourceOffset );    
-    
+    delete iFiles;    
     delete iContainer;
-    delete iXnSpBgCleaner;
-    delete iTimer;
+    delete iSpBgCleaner;
+    delete iAsyncCb;
     }
 
 // -----------------------------------------------------------------------------
 // CXnWallpaperView::Id
+//
 // -----------------------------------------------------------------------------
 //
 TUid CXnWallpaperView::Id() const
@@ -127,9 +127,10 @@
 
 // -----------------------------------------------------------------------------
 // CXnWallpaperView::DoActivateL
+//
 // -----------------------------------------------------------------------------
 //
-void CXnWallpaperView::DoActivateL( const TVwsViewId& aPrevViewId,           
+void CXnWallpaperView::DoActivateL( const TVwsViewId& /*aPrevViewId*/,           
     TUid /*aCustomMessageId*/, const TDesC8& aCustomMessage )            
     {
     // switch layout 
@@ -143,14 +144,14 @@
     sp->EnableTransparent( EFalse );
     
     // create background cleaner for sp
-    if ( !iXnSpBgCleaner )
+    if ( !iSpBgCleaner )
         {
-        iXnSpBgCleaner = CXnSpBgCleaner::NewL();
-        AppUi()->AddToStackL( *this, iXnSpBgCleaner );
+        iSpBgCleaner = CXnSpBgCleaner::NewL();
+        AppUi()->AddToStackL( *this, iSpBgCleaner );
         }
 
     // update sp
-    iXnSpBgCleaner->DrawNow();
+    iSpBgCleaner->DrawNow();
     sp->DrawNow();
     
     // update cba
@@ -170,33 +171,22 @@
         iContainer->ActivateL();
         iContainer->DrawNow();
         }
-    
-    iPreviousViewUid = aPrevViewId;
-    iMultiple = ( (aCustomMessage == KMulti) ? ETrue : EFalse );
-
-    iAppUi.EffectManager()->UiRendered();
+      
+    iAppUi.EffectManager()->EndFullscreenEffect( KGfxContextOpenWallpaperView );
     
-    iWaitDialog = NULL;
-    iViewState = EImageSelection;
-
-    // Run image selection dialog asynchronously
-    iTimer->Cancel();
-    iTimer->Start( KShortDelay, KLongDelay, TCallBack( TimerCallback, this ) );
+    iMultiple = ( aCustomMessage == KMulti ) ? ETrue : EFalse;
+           
+    // Run image selection dialog asynchronously    
+    iAsyncCb->CallBack();
     }
 
 // -----------------------------------------------------------------------------
-// CXnWallpaperView::DoActivateL
+// CXnWallpaperView::DoDeactivate
+//
 // -----------------------------------------------------------------------------
 //
 void CXnWallpaperView::DoDeactivate()
-    {
-    iTimer->Cancel(); // cancel timer
-    
-    if ( iWaitDialog )
-        {
-        TRAP_IGNORE( iWaitDialog->ProcessFinishedL(); );
-        }
-    
+    {       
     if ( iContainer )
         {
         iAppUi.RemoveFromStack( iContainer );
@@ -204,137 +194,86 @@
         iContainer = NULL;
         }
     
-    if ( iXnSpBgCleaner )
+    if ( iSpBgCleaner )
         {
-        AppUi()->RemoveFromStack( iXnSpBgCleaner );
-        delete iXnSpBgCleaner;
-        iXnSpBgCleaner = NULL;
+        AppUi()->RemoveFromStack( iSpBgCleaner );
+        delete iSpBgCleaner;
+        iSpBgCleaner = NULL;
         }
     
-    iViewState = EIdle;
-    iAppUi.EffectManager()->UiRendered();
+    iAppUi.EffectManager()->EndFullscreenEffect( KGfxContextCloseWallpaperView );
     }
 
 // -----------------------------------------------------------------------------
-// CXnWallpaperView::TimerCallback
+// CXnWallpaperView::SelectedWallpaper
+//
 // -----------------------------------------------------------------------------
 //
-TInt CXnWallpaperView::TimerCallback( TAny *aPtr )
+void CXnWallpaperView::SelectedWallpaper( TFileName& aFileName ) const
+    {
+    aFileName.Copy( iFileName );       
+    }
+
+// -----------------------------------------------------------------------------
+// CXnWallpaperView::HandleCallback
+//
+// -----------------------------------------------------------------------------
+//
+TInt CXnWallpaperView::HandleCallback( TAny* aAny )
     {       
-    CXnWallpaperView* self = reinterpret_cast< CXnWallpaperView* >( aPtr );
-    TRAPD( err, self->DoHandleCallBackL(); );    
-    if ( KErrNone != err )
-        {
-        // activate default view in case of any error
-        TVwsViewId defaultView;
-        if ( self->iAppUi.GetDefaultViewId( defaultView ) != KErrNone )
-            {
-            // use default if we got wrong viewid as previous view
-            defaultView.iAppUid = self->iAppUi.Application()->AppDllUid();
-            defaultView.iViewUid = TUid::Uid( 1 );
-            }        
-        // try activating default view
-        TRAP_IGNORE( self->iAppUi.ActivateViewL( defaultView ); );
-        }
+    CXnWallpaperView* self = static_cast< CXnWallpaperView* >( aAny );
+          
+    TRAP_IGNORE( self->DoHandleCallbackL() );
+    
     return KErrNone;
     }
 
 // -----------------------------------------------------------------------------
-// CXnWallpaperView::DoHandleCallBackL
+// CXnWallpaperView::DoHandleCallbackL
+//
 // -----------------------------------------------------------------------------
 //
-void CXnWallpaperView::DoHandleCallBackL()
-    {
-    iTimer->Cancel();
-    
-    if ( iViewState == EImageSelection )
+void CXnWallpaperView::DoHandleCallbackL()
+    {    
+    // Reset 
+    iFileName = KNullDesC();    
+    iFiles->Reset();
+        
+    TBool selected( EFalse );
+                   
+    TRAP_IGNORE( selected = 
+        MGFetch::RunL( *iFiles, EImageFile, iMultiple ) ); 
+            
+    if ( selected && iFiles->MdcaCount() > 0 )                 
         {
-        CDesCArrayFlat* files = 
-                new (ELeave) CDesCArrayFlat( KFileArrayGranularity );    
-        CleanupStack::PushL( files );
-    
-        TInt err( KErrNone );
-        TBool selected( EFalse );
-        
-        CXnBackgroundManager& bg( iAppUi.ViewAdapter().BgManager() );
-        
-        selected = MGFetch::RunL( *files, EImageFile, iMultiple );
-        
-        if ( selected && files->MdcaCount() > 0 )                 
+        // Reset
+        selected = EFalse;
+                
+        if( iFiles->MdcaCount() == 1 )
             {
-            // set wallpaper
-            if( files->MdcaCount() == 1 )
+            TPtrC fileName( iFiles->MdcaPoint( 0 ) );
+                            
+            RFs& fs( CEikonEnv::Static()->FsSession() );
+            
+            if ( BaflUtils::FileExists( fs, fileName ) )
                 {
-                TFileName fileName( files->MdcaPoint( 0 ) );
-                RFs& fs = CEikonEnv::Static()->FsSession();
-                if ( BaflUtils::FileExists( fs, fileName ) )
-                    {
-                    // if wallpaper adding will take more than 1,5 sec waitdlg will appear
-                    iWaitDialog = new( ELeave ) CAknWaitDialog(
-                            reinterpret_cast<CEikDialog**>( &iWaitDialog ), EFalse );
-                    iWaitDialog->ExecuteLD( R_CHANGE_WALLPAPER_WAIT_DIALOG );
-                    
-                    // add wallpaper
-                    err = bg.AddWallpaperL( fileName );
-    
-                    // notify waitdlg we're done.     
-                    iWaitDialog->ProcessFinishedL();
-                    // ProcessFinishedL() will NULL iWaitDialog
-                    }
+                // Accept the selected file
+                selected = ETrue;
+                iFileName.Copy( fileName );
                 }
             }
         
-        CleanupStack::PopAndDestroy( files );
-        
-        if( err == KErrTooBig || err == KErrNoMemory )
-            {
-            ShowErrorDialogL( R_QTN_HS_TOO_BIG_IMAGE_NOTE );
-            }
-        else if( err == KErrCancel || err == KErrCouldNotConnect )
-            {
-            // Ignore these.
-            }
-        else if( err != KErrNone )
-            {
-            ShowErrorDialogL( R_QTN_HS_CORRUPTED_IMAGE_NOTE );        
-            }
-        
-        // restart timer to deactivate view. View activation fails if
-        // any dialog was shown just before calling iAppUi.ActivateViewL
-        // specially when theme effects are on.
-        iViewState = EViewDeactivation;
-        iTimer->Start( KLongDelay, KLongDelay, TCallBack( TimerCallback, this ) );
-        }
-    else if ( iViewState == EViewDeactivation )
-        {        
-        iAppUi.EffectManager()->BeginFullscreenEffectL( 
-                                    KGfxContextCloseWallpaperView, 
-                                    iAppUi.ViewManager().ActiveViewData() );
-        iAppUi.ActivateViewL( iPreviousViewUid );
-        }
-    else
-        {
-        iViewState = EIdle;
-        User::Leave( KErrUnknown );
-        }
+        iFiles->Reset();
+        }       
+    
+    // Default view
+    TVwsViewId xmlViewId( iAppUi.View().ViewId() );
+    
+    const TDesC8& param( selected ? KSetWallpaper() : KNullDesC8() );
+    
+    iAppUi.EffectManager()->BeginFullscreenEffectL( KGfxContextCloseWallpaperView );
+    
+    iAppUi.ActivateLocalViewL( xmlViewId.iViewUid, TUid(), param );                         
     }
 
-// -----------------------------------------------------------------------------
-// CXnWallpaperView::ShowErrorDialogL
-// -----------------------------------------------------------------------------
-//
-void CXnWallpaperView::ShowErrorDialogL( const TInt aResourceId )
-    {
-    //load message text
-    HBufC* msg = StringLoader::LoadLC( aResourceId );
-    //ensure that dialog will not disappear immediatelly - by const. param
-    CAknErrorNote* dialog = new (ELeave) CAknErrorNote( true );
-    CleanupStack::PushL( dialog );
-    //show dialog to user and destroy it
-    dialog->ExecuteLD( *msg );
-    CleanupStack::Pop( dialog );
-    CleanupStack::PopAndDestroy( msg );
-    }
-
-
 //  End of File
--- a/idlehomescreen/xmluirendering/uiengine/src/xnwallpaperview.rss	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/src/xnwallpaperview.rss	Tue May 11 16:02:39 2010 +0300
@@ -24,6 +24,7 @@
 #include <appinfo.rh>
 #include <avkon.mbg>
 #include <activeidle3.loc>
+#include <drmcommon.loc>
 
 //  RESOURCE IDENTIFIER
 NAME    XNWP // 4 letter ID
@@ -63,7 +64,27 @@
     {
     buf = qtn_hs_too_big_image_note;
     }
-    
+
+// ----------------------------------------------------
+// r_qtn_hs_drm_protected_image_note
+//
+// ----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_hs_drm_protected_image_note 
+    {
+    buf = qtn_drm_mgr_det_exp;
+    }
+
+// ----------------------------------------------------
+// r_qtn_hs_processing_note
+//
+// ----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_hs_processing_note
+    {
+    buf = qtn_gen_note_processing;
+    }
+
 // ----------------------------------------------------
 // r_change_wallpaper_wait_dialog
 //
--- a/idlehomescreen/xmluirendering/uiengine/src/xnwidgetextensionadapter.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/idlehomescreen/xmluirendering/uiengine/src/xnwidgetextensionadapter.cpp	Tue May 11 16:02:39 2010 +0300
@@ -712,7 +712,7 @@
     
     else if( iPopup && aType == KAknSplitInputDisabled )
         {
-        HidePopupL();
+        TRAP_IGNORE( HidePopupL() );
         }
     }
 
--- a/menufw/group/bld.inf	Tue Apr 27 16:26:12 2010 +0300
+++ b/menufw/group/bld.inf	Tue May 11 16:02:39 2010 +0300
@@ -39,4 +39,4 @@
 OPTION SISNAME menufw_stub
 OPTION SRCDIR ../sis
 END
-#endif
\ No newline at end of file
+#endif
--- a/menufw/hierarchynavigator/hnmetadatamodel/src/hnmdeventmapping.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/menufw/hierarchynavigator/hnmetadatamodel/src/hnmdeventmapping.cpp	Tue May 11 16:02:39 2010 +0300
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:  
+* Description:
 *
 */
 
@@ -68,18 +68,18 @@
     if ( eventIdFound )
         return eventMappingElement->Actions();
     else
-        return emptyActions;  
+        return emptyActions;
     }
-    
+
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 void CHnMdEventMapping::ConstructL( TXmlEngElement aElement, THnMdCommonPointers* aCmnPtrs )
     {
     // construction...
     iCmnPtrs = aCmnPtrs;
-    
+
     RXmlEngNodeList< TXmlEngElement > children;
     CleanupClosePushL(children);
 
@@ -103,10 +103,10 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
-CHnMdEventMapping* CHnMdEventMapping::NewL( TXmlEngElement aElement, 
+CHnMdEventMapping* CHnMdEventMapping::NewL( TXmlEngElement aElement,
         THnMdCommonPointers* aCmnPtrs )
     {
     CHnMdEventMapping* self = CHnMdEventMapping::NewLC( aElement,
@@ -116,7 +116,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 TInt CHnMdEventMapping::Count() const
@@ -125,10 +125,10 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
-CHnMdEventMapping* CHnMdEventMapping::NewLC( TXmlEngElement aElement, 
+CHnMdEventMapping* CHnMdEventMapping::NewLC( TXmlEngElement aElement,
         THnMdCommonPointers* aCmnPtrs )
     {
     CHnMdEventMapping* self = new( ELeave ) CHnMdEventMapping;
@@ -138,7 +138,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 CHnMdEventMapping::CHnMdEventMapping()
@@ -146,7 +146,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 CHnMdEventMapping::~CHnMdEventMapping()
@@ -155,17 +155,17 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
-void CHnMdEventMapping::AddActionL( 
-        RHashMap<TInt,CArrayPtr<CHnActionModel> *> & aActions, 
+void CHnMdEventMapping::AddActionL(
+        RHashMap<TInt,CArrayPtr<CHnActionModel> *> & aActions,
         CHnActionModel *& aActionModel, TInt aEventId )
     {
     CArrayPtr<CHnActionModel>** actionsContainer = aActions.Find( aEventId );
     if ( !actionsContainer )
         {
-        CArrayPtr<CHnActionModel>* newActionsContainer = new( 
+        CArrayPtr<CHnActionModel>* newActionsContainer = new(
             ELeave ) CArrayPtrFlat<CHnActionModel>( KDefaultGranularity );
         CleanupStack::PushL( newActionsContainer );
         aActions.InsertL( aEventId, newActionsContainer );
@@ -176,24 +176,24 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
-void CHnMdEventMapping::FillActionsL( 
+void CHnMdEventMapping::FillActionsL(
         RHashMap< TInt, CArrayPtr<CHnActionModel>* >& aActions,
         const CLiwGenericParamList& aQueriesResultsList, TInt aPos )
     {
     RArray< TInt > eventIds;
     CleanupClosePushL( eventIds );
     GetEventIdsL( eventIds );
-    
+
     for ( TInt i( 0 ); i < eventIds.Count(); i++ )
         {
-        RPointerArray< CHnMdAction > actions = GetActionsForEventId( 
+        RPointerArray< CHnMdAction > actions = GetActionsForEventId(
                 eventIds[ i ] );
         for ( TInt j( 0 ); j < actions.Count(); j++ )
             {
-            if ( !actions[ j ] || !actions[ j ]->IsValidL( 
+            if ( !actions[ j ] || !actions[ j ]->IsValidL(
                     aQueriesResultsList, aPos ) )
                 {
                 continue;
@@ -209,13 +209,13 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 void CHnMdEventMapping::GetEventIdsL( RArray< TInt >& aIds ) const
     {
     TInt mappingCount = Count();
-        
+
     for( TInt i = 0; i < mappingCount; i++ )
         {
         CHnMdEventMappingElement* eme = iMappings[ i ];
--- a/menufw/hierarchynavigator/hnpresentationmodel/src/hnitemsorder.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/menufw/hierarchynavigator/hnpresentationmodel/src/hnitemsorder.cpp	Tue May 11 16:02:39 2010 +0300
@@ -22,7 +22,7 @@
 
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C CHnItemsOrder* CHnItemsOrder::NewL()
@@ -34,20 +34,20 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C void CHnItemsOrder::MarkSuiteUninitialized()
-	{
+  {
     for (TInt i(0); i < iItemsEvaluated.Count(); i++)
          {
          iItemsEvaluated[i] = EFalse;
          }
-    
+
     iSuiteEvaluated = EFalse;
-	}
+  }
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C CHnItemsOrder* CHnItemsOrder::NewLC()
@@ -58,7 +58,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 CHnItemsOrder::~CHnItemsOrder()
@@ -69,7 +69,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C void CHnItemsOrder::SetSuiteId( TInt aId )
@@ -78,7 +78,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C TInt CHnItemsOrder::GetSuiteId() const
@@ -87,7 +87,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C void CHnItemsOrder::RemoveItemId( TInt aId )
@@ -96,28 +96,28 @@
     if (position != KErrNotFound)
         {
         TInt modelNumber = CountModelNumberFor( position );
-        --iItemsOrderCounts[ modelNumber ] ;    
+        --iItemsOrderCounts[ modelNumber ] ;
         iComplexItemsOrder.Remove( position );
         }
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
-EXPORT_C void CHnItemsOrder::InsertItemIdToL( TInt aDataModelItem, 
+EXPORT_C void CHnItemsOrder::InsertItemIdToL( TInt aDataModelItem,
         TInt aIndex, TInt aId )
     {
     TInt position = CountStartIndexFor( aDataModelItem ) + aIndex;
     if (position < iComplexItemsOrder.Count() )
         {
-        iComplexItemsOrder.InsertL( aId, position ); 
+        iComplexItemsOrder.InsertL( aId, position );
         }
     else
         {
         iComplexItemsOrder.AppendL( aId );
         }
-    
+
     TInt modelsCount = iItemsOrderCounts.Count();
     if (modelsCount <= aDataModelItem)
         {
@@ -130,7 +130,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C TInt CHnItemsOrder::GetItemIdAt( TInt aDataModelItem, TInt aIndex )
@@ -138,34 +138,34 @@
     TInt globalItemPosition = CountStartIndexFor( aDataModelItem ) + aIndex;
     return (iComplexItemsOrder.Count() > globalItemPosition)
         ? iComplexItemsOrder[globalItemPosition] : KErrNotFound;
-    }  
+    }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C TInt CHnItemsOrder::GetItemIdAt( TInt aPosition )
     {
-    return (iComplexItemsOrder.Count() > aPosition) 
+    return (iComplexItemsOrder.Count() > aPosition)
         ? iComplexItemsOrder[aPosition] : KErrNotFound;
-    }  
+    }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C void CHnItemsOrder::GetIdsForL( TInt aDataModelItem,
         RArray< TInt >& aIds )
     {
-    if ( CountStartIndexFor( aDataModelItem ) == KErrNotFound 
+    if ( CountStartIndexFor( aDataModelItem ) == KErrNotFound
             || iItemsOrderCounts.Count() <= aDataModelItem )
         {
         return;
         }
-    
+
     TInt startIndex = CountStartIndexFor( aDataModelItem );
-    
-    for ( TInt i = 0; 
+
+    for ( TInt i = 0;
             i < iItemsOrderCounts[ aDataModelItem ]; i++ )
         {
         aIds.AppendL( iComplexItemsOrder[ startIndex + i ] );
@@ -173,7 +173,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C void CHnItemsOrder::SetItemIdAtL( TInt aPosition, TInt aId )
@@ -189,7 +189,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C void CHnItemsOrder::DefineModelItemCountL( TInt aItemCounts )
@@ -207,7 +207,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C void CHnItemsOrder::SuiteEvaluated()
@@ -216,7 +216,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C void CHnItemsOrder::ItemEvaluated( TInt aIndex )
@@ -225,7 +225,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C TBool CHnItemsOrder::IsSuiteReadyToShow()
@@ -235,11 +235,11 @@
          {
          ready = iItemsEvaluated[i];
          }
-    
+
     return ready && iSuiteEvaluated;
     }
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C TInt CHnItemsOrder::GetModelItemCount( )
@@ -248,7 +248,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C TInt CHnItemsOrder::operator[]( TInt aPosition )
@@ -257,16 +257,16 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C TInt CHnItemsOrder::GetItemPosition( TInt aId )
     {
     return iComplexItemsOrder.Find( aId );
     }
-    
+
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 TInt CHnItemsOrder::CountStartIndexFor( TInt aDataModelItem )
@@ -280,7 +280,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 TInt CHnItemsOrder::CountModelNumberFor( TInt aIndex )
@@ -301,7 +301,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C TInt CHnItemsOrder::Count()
@@ -310,20 +310,20 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 CHnItemsOrder::CHnItemsOrder() : iSuiteId( KErrNotFound )
     {
-    
+
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 void CHnItemsOrder::ConstructL()
     {
-    
+
     }
 
--- a/menufw/hierarchynavigator/hnutilities/src/hnliwutils.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/menufw/hierarchynavigator/hnutilities/src/hnliwutils.cpp	Tue May 11 16:02:39 2010 +0300
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:  
+* Description:
 *
 */
 
@@ -28,9 +28,9 @@
 // ======== MEMBER FUNCTIONS ========
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
-//      
+//
 EXPORT_C void HnLiwUtils::SetGenericParamListL(
     const RPointerArray<CHnMdBaseKey> & aKeys,
     CLiwGenericParamList & aInParam )
@@ -43,13 +43,13 @@
         TLiwVariant value;
         value.PushL();
         key->ToVariantL( value );
-        aInParam.AppendL( TLiwGenericParam( keyName, value ) );      
+        aInParam.AppendL( TLiwGenericParam( keyName, value ) );
         CleanupStack::PopAndDestroy( &value );
         }
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C TBool HnLiwUtils::VariantToStringL(
@@ -113,7 +113,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C TBool HnLiwUtils::VariantToStringL(
@@ -172,7 +172,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C TInt HnLiwUtils::GetIterableItemCountL( CLiwIterable& aIterable )
@@ -190,7 +190,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C TInt HnLiwUtils::GetStringL(
@@ -201,19 +201,19 @@
     TInt ret( KErrNone );
     TLiwVariant value;
     value.PushL();
-    
+
     ret = GetVariantL( aParam, aPath, value );
     if ( ret == KErrNone && !VariantToStringL( value, aRet ) )
         {
         ret = KErrBadDescriptor;
         }
-    
+
     CleanupStack::PopAndDestroy( &value );
     return ret;
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C TInt HnLiwUtils::GetStringL(
@@ -224,19 +224,19 @@
     TInt ret( KErrNone );
     TLiwVariant value;
     value.PushL();
-    
+
     ret = GetVariantL( aParam, aPath, value );
     if ( ret == KErrNone && !VariantToStringL( value, aRet ) )
         {
         ret = KErrBadDescriptor;
         }
-    
+
     CleanupStack::PopAndDestroy( &value );
     return ret;
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C TInt HnLiwUtils::GetStringL( const CLiwGenericParamList& aParam,
@@ -245,19 +245,19 @@
     TInt ret( KErrNone );
     TLiwVariant value;
     value.PushL();
-    
+
     ret = GetVariantL( aParam, aPath, aPos, value );
     if ( ret == KErrNone && !VariantToStringL( value, aRet ) )
         {
         ret = KErrBadDescriptor;
         }
-    
+
     CleanupStack::PopAndDestroy( &value );
     return ret;
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C TInt HnLiwUtils::GetStringL( const CLiwGenericParamList& aParam,
@@ -266,46 +266,46 @@
     TInt ret( KErrNone );
     TLiwVariant value;
     value.PushL();
-    
+
     ret = GetVariantL( aParam, aPath, aPos, value );
     if ( ret == KErrNone && !VariantToStringL( value, aRet ) )
         {
         ret = KErrBadDescriptor;
         }
-    
+
     CleanupStack::PopAndDestroy( &value );
     return ret;
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C TInt HnLiwUtils::GetInt64L( const CLiwGenericParamList& aParam,
     const TDesC8& aPath, TInt aPos, TInt64& aRet )
-    { 
+    {
     RBuf8 buf;
     TInt err = HnLiwUtils::GetStringL( aParam, aPath, aPos, buf );
-    
+
     if ( KErrNone == err )
-    	{
+      {
         TInt64 value( KErrNotFound );
         TLex8 lex( buf );
 
-    	if ( KErrNone == lex.Val( value ) )
-    		{
-    		aRet = value;
-    		err = KErrNone;
-    		}
-    	}
-    
+      if ( KErrNone == lex.Val( value ) )
+        {
+        aRet = value;
+        err = KErrNone;
+        }
+      }
+
     buf.Close();
-    
-    return err;    
+
+    return err;
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C TInt HnLiwUtils::GetVariantL(
@@ -330,11 +330,11 @@
             /*TInt pos( 0 );
             TInt rest( aPos );
             while ( ( rest = rest / 10 ) != 0 )
-                { 
+                {
                 pos++;
                 }*/
-            
-            path.SetLength( colonFound ); 
+
+            path.SetLength( colonFound );
             TLiwVariant tempVariant;
             tempVariant.PushL();
             if ( KErrNotFound != HnLiwUtils::GetVariantL( aParam, path, aRet ) )
@@ -353,36 +353,36 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 TInt HnLiwUtils::ExtractNameSpaceL(
-    const CLiwGenericParamList& aParam, 
+    const CLiwGenericParamList& aParam,
     const TDesC8& aNameSpace,
     TLiwVariant& aRet )
     {
         TInt pos( 0 );
         const TLiwGenericParam* param;
-        
+
         if ( &aParam != NULL )
-	    	{
-	    	param = aParam.FindFirst( pos, aNameSpace );
-	        if ( pos >= 0 )
-		        {
-		        aRet.SetL( param->Value() );
-		        }
-	    	}
+        {
+        param = aParam.FindFirst( pos, aNameSpace );
+          if ( pos >= 0 )
+            {
+            aRet.SetL( param->Value() );
+            }
+        }
         else
-        	{
-        	pos = KErrNotFound;
-        	}
-        
+          {
+          pos = KErrNotFound;
+          }
+
         return pos;
     }
 
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 EXPORT_C TInt HnLiwUtils::GetVariantL(
@@ -397,9 +397,9 @@
     TLiwVariant lastVariant;
     variant.PushL();
     lastVariant.PushL();
-    
+
     aRet.SetL( TLiwVariant( aPath ) );
-    
+
     ParsePathL( aPath, path );
 
     if ( path.Count() > 0
@@ -411,34 +411,34 @@
             TPtrC8 name = path[ i ];
             LIW::TVariantTypeId typeId = lastVariant.TypeId();
             // LIW::Type ID 7
-            if ( typeId == LIW::EVariantTypeList ) 
+            if ( typeId == LIW::EVariantTypeList )
                 {
                 TInt pos( GetPosition( name ) );
                 found = (pos != KErrNotFound) ? lastVariant.AsList()->AtL( pos, variant ) : EFalse;
                 }
             // LIW::Type ID 8
-            else if ( typeId == LIW::EVariantTypeMap ) 
+            else if ( typeId == LIW::EVariantTypeMap )
                 {
                 found = lastVariant.AsMap()->FindL( name, variant );
                 }
             // LIW::Type ID 9
-            else if ( typeId == LIW::EVariantTypeIterable ) 
+            else if ( typeId == LIW::EVariantTypeIterable )
                 {
                 TInt pos( GetPosition( name ) );
                 found = GetIterableByPositionL( *lastVariant.AsIterable(), pos, variant );
                 }
-            lastVariant.SetL( variant ); 
+            lastVariant.SetL( variant );
             }
         ret = found ? KErrNone : KErrNotFound;
         //aRet.SetL( ( ret != KErrNotFound ) ? variant : TLiwVariant( aPath ) );
         if ( found == 0 )
-        	{
-        	aRet.SetL( TLiwVariant( KNullDesC8 ) );
-        	}
+          {
+          aRet.SetL( TLiwVariant( KNullDesC8 ) );
+          }
         else
-        	{
-        	aRet.SetL( variant );
-        	}
+          {
+          aRet.SetL( variant );
+          }
         }
 
     CleanupStack::PopAndDestroy( &lastVariant );
@@ -448,15 +448,14 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 void HnLiwUtils::ParsePathL(
-    const TDesC8& aPath, 
+    const TDesC8& aPath,
     RArray< TPtrC8 >& aPathParts )
     {
     TChar ch; // token separator
-
     TInt colonPos = aPath.Find( KColon8 );
 
     if ( colonPos > 0 )
@@ -495,12 +494,12 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
-TBool HnLiwUtils::GetIterableByPositionL( CLiwIterable & aIterable, TInt pos, 
+TBool HnLiwUtils::GetIterableByPositionL( CLiwIterable & aIterable, TInt pos,
                                           TLiwVariant & aVariant )
-	{
+  {
     TBool ret(EFalse);
     if ( pos >= 0 )
         {
@@ -508,20 +507,20 @@
         aIterable.Reset();
         ret = aIterable.NextL( aVariant );
         while ( ret )
-        	{
-        	if (counter == pos)
-        		{
-        		break;
-        		}
-        	counter++;
-        	ret = aIterable.NextL( aVariant );
-        	}
+          {
+          if (counter == pos)
+            {
+            break;
+            }
+          counter++;
+          ret = aIterable.NextL( aVariant );
+          }
         }
-    return ret;   
+    return ret;
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 TInt HnLiwUtils::GetPosition( const TDesC8& aPosition )
@@ -543,7 +542,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 TInt HnLiwUtils::ReplaceIndexL( RBuf8& aPath8, TInt aPos )
@@ -564,16 +563,16 @@
         CleanupClosePushL( indexNum );
         indexNum.CreateL( KMaxLength );
         indexNum.AppendNum( aPos );
-    
+
         TInt indexPos = ret = aPath8.Find( KIndex8 );
         TInt indexLength = KIndex().Length();
-    
+
         aPath8.Replace( indexPos, indexLength, indexNum );
         ret += indexNum.Length();
-        
+
         CleanupStack::PopAndDestroy( &indexNum );
         }
-    
+
     return ret;
     }
 
--- a/menufw/menufwui/matrixmenu/src/mmappui.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/menufw/menufwui/matrixmenu/src/mmappui.cpp	Tue May 11 16:02:39 2010 +0300
@@ -12,8 +12,8 @@
 * Contributors:
 *
 * Description:  Application UI class
-*  Version     : %version: MM_176.1.28.1.69 % << Don't touch! Updated by Synergy at check-out.
-*  Version     : %version: MM_176.1.28.1.69 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: MM_176.1.28.1.75 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: MM_176.1.28.1.75 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -46,6 +46,7 @@
 #include <AknDlgShut.h>
 #include <mmenuinternalPSkeys.h>
 #include <aknstyluspopupmenu.h> //stylus popup for long tap event
+#include <APGWGNAM.H>
 
 #include "mmgui.hrh"
 #include "mmguiconstants.h"
@@ -218,12 +219,12 @@
             {
             iCurrentContainer->SetManualHighlightL( lastItemIndex, EFalse );
             }
-/*        else if( !iCurrentContainer->IsHighlightVisible()
+        else if( !iCurrentContainer->IsHighlightVisible()
                 && iCurrentContainer->Widget()->TopItemIndex() > -1)
             {
             iCurrentContainer->SetManualHighlightL(
                     iCurrentContainer->Widget()->TopItemIndex(), EFalse );
-            } */
+            }
 
         iCurrentContainer->SetRect( ClientRect() );
         iDummyContainer->SetRect( ClientRect() );
@@ -1277,19 +1278,19 @@
       RHashMap<TInt, CEikMenuPaneItem::SData> menuItemMap;
       CleanupClosePushL( menuItemMap );
 
-            while ( menuIterator->HasNextSpecific() )
-                {
-                CHnMenuItemModel* childItem = menuIterator->GetNextSpecific();
-        CEikMenuPaneItem::SData childData;
-        childData.iCommandId = childItem->Command();
-        childData.iText = childItem->NameL().
-          Left( CEikMenuPaneItem::SData::ENominalTextLength );
-        childData.iFlags = 0;
-        childData.iCascadeId = 0;
+      while ( menuIterator->HasNextSpecific() )
+          {
+          CHnMenuItemModel* childItem = menuIterator->GetNextSpecific();
+          CEikMenuPaneItem::SData childData;
+          childData.iCommandId = childItem->Command();
+          childData.iText = childItem->NameL().
+                  Left( CEikMenuPaneItem::SData::ENominalTextLength );
+          childData.iFlags = 0;
+          childData.iCascadeId = 0;
 
-        positionArray.AppendL( childItem->Position() );
-        menuItemMap.InsertL( childItem->Position(), childData );
-                }
+          positionArray.AppendL( childItem->Position() );
+          menuItemMap.InsertL( childItem->Position(), childData );
+          }
 
       positionArray.Sort();
 
@@ -1313,12 +1314,12 @@
     MMPERF(("CMmAppUi::DynInitMenuPaneL - STOP"));
     }
 
-  if ( !popupMenuDisplayed && iCurrentContainer )
-    {
-    iCurrentContainer->EndLongTapL( ETrue );
-    HandleHighlightItemSingleClickedL(
-        iCurrentContainer->Widget()->CurrentItemIndex() );
-    }
+    if ( !popupMenuDisplayed && iCurrentContainer )
+        {
+        iCurrentContainer->EndLongTapL( ETrue );
+        HandleHighlightItemSingleClickedL(
+            iCurrentContainer->Widget()->CurrentItemIndex() );
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -1807,6 +1808,10 @@
 
     if( iCurrentContainer != aWidgetContainer )
         {
+        // During open new folder cancel longTap. 
+        if( iCurrentContainer && iCurrentContainer->IsEditMode() )
+            iCurrentContainer->EnableLongTapAnimation( EFalse );
+
         // We want a highlight to be visible while switching between
         // grid and list views but no highlight should be visible
         // after opening a folder.
@@ -1822,6 +1827,26 @@
             {
             iCurrentContainer->SetHighlightVisibilityL( ETrue );
             }
+
+        // force scroll view to highlighted item in case we've been backing back
+        // and change presentation mode (to list view) had been done.
+        if( iCurrentContainer->WidgetType() == EListWidget )
+            {
+            TInt offsetBottom =
+                    iCurrentContainer->Widget()->View()->ItemPos(
+                        iCurrentSuiteModel->GetSuiteHighlight() ).iY
+                        + iCurrentContainer->Widget()->ItemHeight()
+                        - iCurrentContainer->Widget()->View()->ViewRect().Height();
+            TInt offsetTop = iCurrentContainer->Widget()->View()->ItemPos(
+                    iCurrentSuiteModel->GetSuiteHighlight() ).iY;
+            TBool takeTop = Abs( offsetTop ) < Abs( offsetBottom );
+            TInt offset = ( takeTop ) ? offsetTop : offsetBottom;
+            if( offset != 0 )
+                {
+                iCurrentContainer->Widget()->HandlePhysicsScrollEventL(
+                        offset );
+                }
+            }
         }
     else
         {
@@ -1832,7 +1857,7 @@
         {
         iCurrentContainer->SetRect(ClientRect());
         iDummyContainer->SetRect(ClientRect());
-        if( IsForeground() )
+        if( IsForeground() || IsFaded() )
             {
             // should be called before MakeVisible (and after SetRect or SetupLayout,
             // so that default highlight is displayed correctly when zoomed)
@@ -1913,6 +1938,7 @@
 TInt CMmAppUi::ExecuteExtensionActionL( const TUid aUid , const TDesC& aCommand,
                 CLiwGenericParamList* aEventParamList )
     {
+    iCurrentContainer->SetExDialogOpened( ETrue );
     return iMmExtManager->ExecuteActionL( aUid, aCommand, aEventParamList);
     }
 // ---------------------------------------------------------------------------
@@ -2451,7 +2477,7 @@
         // displayed and then the menu would appear again on the screen for
         // a fraction of second causing an ugly and confusing flicker effect.
         TRAP_IGNORE( PrepareHomescreenForMatrixExitL() );
-//        ShowHomescreenL( aExitType );
+        //ShowHomescreenL( aExitType );
         //if we got exit cmd from OS, let's really exit.
         Exit();
         }
@@ -2508,8 +2534,8 @@
             DEBUG(("\t_Mm_:Top item index reset"));
             iCurrentContainer->ResetWidgetPosition();
             iCurrentContainer->Widget()->UpdateScrollBarsL();
-      iCurrentContainer->MakeVisible( ETrue );
-      iCurrentContainer->DrawNow();
+            iCurrentContainer->MakeVisible( ETrue );
+            iCurrentContainer->DrawNow();
             }
         }
 
@@ -2524,29 +2550,49 @@
     {
     TInt appToShowUid(0);
     TInt idleid(0);
-    if (aExitType == EExitToIdle || aExitType == EExitToPhone)
+    switch( aExitType )
         {
-        User::LeaveIfError(RProperty::Get(KPSUidAiInformation, KActiveIdleUid,
-                appToShowUid));
-        OpenAppL(TUid::Uid(appToShowUid));
-        }
-    else if (KErrNone == RProperty::Get(KPSUidUikon, KUikVideoCallTopApp,
-            idleid))
-        {
-        // Possible error code not relevant, as we have valid id anyway
-        if (idleid != KVideoCallAppUid) // idle or phone
+        case EExitToIdle:
+            {
+            User::LeaveIfError( RProperty::Get( KPSUidAiInformation,
+                    KActiveIdleUid, appToShowUid ) );
+            OpenAppL( TUid::Uid( appToShowUid ) );
+            }
+            break;
+        case EExitToPhone:
             {
-            OpenAppL(TUid::Uid(KPhoneAppUid));
+            if( !RProperty::Get( KPSUidUikon, KUikVideoCallTopApp, idleid ) )
+                {
+                // Possible error code not relevant, as we have valid id anyway
+                if( idleid == KVideoCallAppUid )
+                    {
+                    CreateActivateViewEventL( TVwsViewId(
+                            TUid::Uid( idleid ), TUid::Uid( idleid ) ),
+                            KNullUid, KNullDesC8() );
+                    break;
+                    }
+                }
+            CAknTaskList* taskList = CAknTaskList::NewL(
+                    iCoeEnv->WsSession() );
+            TApaTask task = taskList->FindRootApp( TUid::Uid( KPhoneAppUid ) );
+            delete taskList;
+            if( task.Exists() )
+                {
+                CApaWindowGroupName* windowName = CApaWindowGroupName::NewLC(
+                                iCoeEnv->WsSession(), task.WgId() );
+                TBool hidden = windowName->Hidden();
+                CleanupStack::PopAndDestroy( windowName );
+                if( !hidden )
+                    {
+                    OpenAppL( TUid::Uid( KPhoneAppUid ) );
+                    break;
+                    }
+                }
+            ShowHomescreenL( EExitToIdle );
             }
-        else
-            {
-            CreateActivateViewEventL(TVwsViewId(TUid::Uid(idleid),
-                    TUid::Uid(idleid)), KNullUid, KNullDesC8());
-            }
-        }
-    else
-        {
-        OpenAppL(TUid::Uid(KPhoneAppUid));
+            break;
+        default:
+            ShowHomescreenL( EExitToPhone );
         }
     }
 
@@ -2562,10 +2608,16 @@
     TApaTask task = taskList->FindRootApp( TUid::Uid( KPhoneAppUid ) );
     delete taskList;
 
-    if ( task.Exists() )
+    if( task.Exists() )
         {
-        succeeded = !iCoeEnv->WsSession().SetWindowGroupOrdinalPosition(
-                    task.WgId(), 1 );
+        CApaWindowGroupName* windowName = CApaWindowGroupName::NewLC(
+                iCoeEnv->WsSession(), task.WgId() );
+        if( !windowName->Hidden() )
+            {
+            succeeded = !iCoeEnv->WsSession().SetWindowGroupOrdinalPosition(
+                            task.WgId(), 1 );
+            }
+        CleanupStack::PopAndDestroy( windowName );
         }
 
     if( !succeeded )
--- a/menufw/menufwui/mmextensions/mmfolderuiextension/src/mmmovetofoldercommand.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/menufw/menufwui/mmextensions/mmfolderuiextension/src/mmmovetofoldercommand.cpp	Tue May 11 16:02:39 2010 +0300
@@ -15,7 +15,7 @@
  *
 */
 
- 
+
 #include <liwcommon.h>
 
 #include "mmmovetofoldercommand.h"
@@ -89,7 +89,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 CMmMoveToFolderCommand::CMmMoveToFolderCommand()
@@ -97,11 +97,11 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 TInt CMmMoveToFolderCommand::HandleNotifyL(
-        TInt /*aCmdId*/, 
+        TInt /*aCmdId*/,
         TInt aEventId,
         CLiwGenericParamList& /*aEventParamList*/,
         const CLiwGenericParamList& /*aInParamList*/ )
@@ -117,13 +117,13 @@
 
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 void CMmMoveToFolderCommand::ExecuteActionL(
         CLiwGenericParamList* aEventParamList )
     {
-    
+
     //
     // Prepare move to folder operation
     MMPERF(("CMmMoveToFolderCommand::ExecuteActionL - START"));
@@ -131,16 +131,16 @@
     iParentId = GetIntL( *aEventParamList, KFolderAttrName8 );
     TPtrC widget = GetStringL( *aEventParamList, KWidgetAttrName8 );
     TPtrC currentTempName = GetStringL( *aEventParamList, KName8 );
-    
+
     iItemName.Close();
     iItemName.CreateL( currentTempName );
-    
+
     iWidgetType.Close();
     iWidgetType.CreateL( widget );
-    
+
     CMmFolder* rootFolder = CMmFolder::NewL();
     CleanupStack::PushL( rootFolder );
-   
+
     rootFolder->SetNameL( iSharedResources->GetRootFolder());
     rootFolder->SetId( KRootId );
     iOpenedHierarchy.AppendL( rootFolder );
@@ -149,36 +149,36 @@
 
     // Excute move to folder operation
     TInt err( KErrNone );
-    
-	// Get folder list form MCS
-	GetFolderListL( CurrentFolder()->Id() );
-	
-	RPointerArray< CMmFolder > folders;
-	CleanupResetAndDestroyPushL( folders );
+
+  // Get folder list form MCS
+  GetFolderListL( CurrentFolder()->Id() );
 
-	// Get folders from GetList output
-	GetFoldersL(folders);
-	
+  RPointerArray< CMmFolder > folders;
+  CleanupResetAndDestroyPushL( folders );
+
+  // Get folders from GetList output
+  GetFoldersL(folders);
+
     // if foler already exists, reopen options menu
     do
-    	{
-    	TRAP( err, ExecuteMoveToFolderL());
-    	}
+      {
+      TRAP( err, ExecuteMoveToFolderL());
+      }
     while ( err == KErrAlreadyExists && folders.Count() > 0 );
-    
+
     // if any different leave was trapped, pass it on
     if ( err != KErrNone )
-    	{
-    	User::Leave( err );
-    	}
-    
+      {
+      User::Leave( err );
+      }
+
     CleanupStack::PopAndDestroy( &folders );
     //MMPERF(("CFolderUiExtPlugin::AddFolderCommandL - END"));
     }
 
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 CMmFolder* CMmMoveToFolderCommand::CurrentFolder()
@@ -188,7 +188,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 void CMmMoveToFolderCommand::MoveToFolderL( TInt aId, TInt aFolderId,
@@ -205,7 +205,7 @@
         HBufC8* id = HnConvUtils::NumToStr8LC( aId );
         AddSubKeyL( listIds, KIdParam, KKeyTypeBoolean, *id );
         CleanupStack::PopAndDestroy();
-        
+
         inDataKey->AddSubKeyL( listIds );
         HBufC8* folderId = HnConvUtils::NumToStr8LC( aFolderId );
         AddSubKeyL( inDataKey, KFolderId8, KKeyTypeBoolean, *folderId );
@@ -228,7 +228,7 @@
         list->AppendL( itemCustomId );
         list->AppendL( command );
         iActionRequest->HandleRequestL( *list );
-        CleanupStack::PopAndDestroy( list );  
+        CleanupStack::PopAndDestroy( list );
         }
     else
         {
@@ -249,7 +249,7 @@
 
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 void CMmMoveToFolderCommand::SelectFolderL(
@@ -265,7 +265,7 @@
     currentFolder.Append( KFolderOpened );
     currentFolder.Append( CurrentFolder()->Name() );
     folders->AppendL( currentFolder );
-    
+
     for( int i( 0 ); i<aFolderContent.Count(); i++ )
         {
         CMmFolder* folder = aFolderContent[ i ];
@@ -277,10 +277,10 @@
         folders->AppendL( name );
         CleanupStack::PopAndDestroy( &name );
         }
-    
+
     TInt selected( SelectFolderFromListL(
         folders, CurrentFolder()->Id() == KRootId ) );
-    
+
     switch( selected )
         {
         case EAknSoftkeyBack:
@@ -318,21 +318,21 @@
             break;
             }
         }
-    
+
     CleanupStack::PopAndDestroy( &currentFolder );
     CleanupStack::PopAndDestroy( folders );
     }
 
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 TInt CMmMoveToFolderCommand::SelectFolderFromListL(
         CDesCArrayFlat* aItems, TBool aIsRoot )
     {
     TInt selected( KErrNotFound );
-    
+
     CAknListQueryDialog* dialog =
         new ( ELeave ) CAknListQueryDialog( &selected );
     if( aIsRoot )
@@ -348,14 +348,14 @@
     CArrayPtr<CGulIcon>* icons = GetFolderIconsL();
     dialog->SetIconArrayL( icons );
     dialog->ListBox()->SetCurrentItemIndexAndDraw( 0 );
-    
+
     if( !iLockDialog )
         {
         SetDialogL( dialog );
         TInt softkey ( KErrNotFound );
         softkey = dialog->RunLD();
         SetDialogL( NULL );
-        
+
         if( softkey == KSoftkeyBack )
             {
             selected = EAknSoftkeyBack;
@@ -379,14 +379,14 @@
 // ---------------------------------------------------------------------------
 // Action resolving function.
 // ---------------------------------------------------------------------------
-//  
+//
 CArrayPtr<CGulIcon>* CMmMoveToFolderCommand::GetFolderIconsL()
     {
     CArrayPtr<CGulIcon>* icons = new( ELeave )CAknIconArray( 10 );
     CleanupStack::PushL( icons );
     CFbsBitmap* folderClosed     = NULL;
     CFbsBitmap* folderClosedMask = NULL;
-        
+
     AknIconUtils::CreateIconL( folderClosed, folderClosedMask,
             AknIconUtils::AvkonIconFileName(),
             EMbmAvkonQgn_prop_folder_small,
@@ -400,7 +400,7 @@
     CFbsBitmap* folderOpenedMask = NULL;
     AknIconUtils::CreateIconL( folderOpened, folderOpenedMask,
             AknIconUtils::AvkonIconFileName(),
-            EMbmAvkonQgn_prop_folder_current, 
+            EMbmAvkonQgn_prop_folder_current,
             EMbmAvkonQgn_prop_folder_current_mask );
     CleanupStack::PushL( folderOpened );
     CleanupStack::PushL( folderOpenedMask );
@@ -413,7 +413,7 @@
 // ---------------------------------------------------------------------------
 // Action resolving function.
 // ---------------------------------------------------------------------------
-//  
+//
 HBufC* CMmMoveToFolderCommand::GetFromResourceLC( TInt aIdentifier )
     {
     HBufC* string = StringLoader::LoadLC( aIdentifier );
@@ -424,21 +424,21 @@
 // ---------------------------------------------------------------------------
 // Action resolving function.
 // ---------------------------------------------------------------------------
-//  
+//
 void CMmMoveToFolderCommand::NotificationMovingCompleteL()
     {
     CDesCArrayFlat* items = new(ELeave) CDesCArrayFlat( 1 );
     CleanupStack::PushL( items );
     items->AppendL( iItemName );
     items->AppendL( iFolderName );
-    
+
     HBufC* msg = StringLoader::LoadLC( R_APPS_NOTE_MOVE_TO_FOLDER, *items );
     CAknNoteDialog* dialog = new (ELeave) CAknNoteDialog(
             CAknNoteDialog::EConfirmationTone,
             CAknNoteDialog::ELongTimeout );
     dialog->SetTextL( msg->Des() );
     dialog->ExecuteDlgLD( R_MENU_EDIT_MOVING_COMPLETE_NOTIFICATION );
-    
+
     CleanupStack::PopAndDestroy( msg );
     CleanupStack::PopAndDestroy( items );
     }
@@ -447,7 +447,7 @@
 // ---------------------------------------------------------------------------
 // Action resolving function.
 // ---------------------------------------------------------------------------
-//  
+//
 void CMmMoveToFolderCommand::NotificationItemAlreadyStoredL()
     {
     HBufC* message = StringLoader::LoadLC( R_APPS_NOTE_ITEM_ALREADY_STORED );
@@ -456,107 +456,107 @@
             CAknNoteDialog::ELongTimeout );
     dialog->SetTextL( message->Des() );
     dialog->ExecuteDlgLD( R_MENU_EDIT_MOVING_ABORT_NOTIFICATION );
-    
+
     CleanupStack::PopAndDestroy( message );
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 void CMmMoveToFolderCommand::StepBackInHierarchy()
-	{
-	// Remove last folder from iOpenedHierarchy
-	CMmFolder* folder = CurrentFolder();
-	iOpenedHierarchy.Remove( iOpenedHierarchy.Count() - 1 );
-	delete folder;
-	}
+  {
+  // Remove last folder from iOpenedHierarchy
+  CMmFolder* folder = CurrentFolder();
+  iOpenedHierarchy.Remove( iOpenedHierarchy.Count() - 1 );
+  delete folder;
+  }
 
 
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 void CMmMoveToFolderCommand::ExecuteMoveToFolderL()
-	{
+  {
     while (iOpenedHierarchy.Count() > 0)
-    	{
-    	// Get folder list form MCS
-    	GetFolderListL( CurrentFolder()->Id() );
-    	
-    	RPointerArray< CMmFolder > folders;
-    	CleanupResetAndDestroyPushL( folders );
+      {
+      // Get folder list form MCS
+      GetFolderListL( CurrentFolder()->Id() );
 
-    	// Get folders from GetList output
-    	GetFoldersL(folders);
+      RPointerArray< CMmFolder > folders;
+      CleanupResetAndDestroyPushL( folders );
+
+      // Get folders from GetList output
+      GetFoldersL(folders);
 
-    	// Perform further folder selection or move operation
-    	if( folders.Count() > 0 )
-    		{
-    		SelectFolderL( folders );
-    		}
-    	else
-    		{
-    		iFolderName.Close();
-    		iFolderName.CreateL( CurrentFolder()->Name() );
-    		MoveToFolderL( iItemId, CurrentFolder()->Id() );
-    		}
-    	CleanupStack::PopAndDestroy( &folders );
-    	}
-	}
+      // Perform further folder selection or move operation
+      if( folders.Count() > 0 )
+        {
+        SelectFolderL( folders );
+        }
+      else
+        {
+        iFolderName.Close();
+        iFolderName.CreateL( CurrentFolder()->Name() );
+        MoveToFolderL( iItemId, CurrentFolder()->Id() );
+        }
+      CleanupStack::PopAndDestroy( &folders );
+      }
+  }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 void CMmMoveToFolderCommand::GetFoldersL(RPointerArray<CMmFolder >& aFolderArray)
-	{
-	TInt pos( 0 );
-	TInt count = iGetListOutParam->FindFirst(
-			pos, KReturnValue8() )->Value().AsList()->Count();
-	TLiwVariant var; var.PushL();
-	
-	// Get propper widget names depending from view type
-	// and append to aFolderArray
-	for( TInt i = 0; i < count; i++ )
-		{
-		HnLiwUtils::GetVariantL( *iGetListOutParam, KIdPath8, i, var );
-		TInt32 id;
-		var.Get( id );
+  {
+  TInt pos( 0 );
+  TInt count = iGetListOutParam->FindFirst(
+      pos, KReturnValue8() )->Value().AsList()->Count();
+  TLiwVariant var; var.PushL();
+
+  // Get propper widget names depending from view type
+  // and append to aFolderArray
+  for( TInt i = 0; i < count; i++ )
+    {
+    HnLiwUtils::GetVariantL( *iGetListOutParam, KIdPath8, i, var );
+    TInt32 id;
+    var.Get( id );
+
+    if (id != iItemId)
+      {
+      CMmFolder* folder = CMmFolder::NewL();
+      CleanupStack::PushL( folder );
+
+      folder->SetId( id );
 
-		if (id != iItemId)
-			{
-			CMmFolder* folder = CMmFolder::NewL();
-			CleanupStack::PushL( folder );
-			
-			folder->SetId( id );
-			
-			TPtrC title;
-			if( !iWidgetType.Compare( KWidgetTypeList ) )
-				{
-				HnLiwUtils::GetVariantL(
-						*iGetListOutParam, KLongNamePath8, i, var );
-				}
-			else if( !iWidgetType.Compare( KWidgetTypeGrid ) )
-				{
-				HnLiwUtils::GetVariantL(
-						*iGetListOutParam, KShortNamePath8, i, var );
-				}
-			else
-				{
-				HnLiwUtils::GetVariantL(
-						*iGetListOutParam, KAppGroupNamePath8, i, var );
-				}
-			var.Get( title );
-			folder->SetNameL( title );
-			aFolderArray.AppendL( folder );
-			
-			CleanupStack::Pop( folder );
-			}
-		}
-	CleanupStack::PopAndDestroy(&var);
-	}
+      TPtrC title;
+      if( !iWidgetType.Compare( KWidgetTypeList ) )
+        {
+        HnLiwUtils::GetVariantL(
+            *iGetListOutParam, KLongNamePath8, i, var );
+        }
+      else if( !iWidgetType.Compare( KWidgetTypeGrid ) )
+        {
+        HnLiwUtils::GetVariantL(
+            *iGetListOutParam, KShortNamePath8, i, var );
+        }
+      else
+        {
+        HnLiwUtils::GetVariantL(
+            *iGetListOutParam, KAppGroupNamePath8, i, var );
+        }
+      var.Get( title );
+      folder->SetNameL( title );
+      aFolderArray.AppendL( folder );
+
+      CleanupStack::Pop( folder );
+      }
+    }
+  CleanupStack::PopAndDestroy(&var);
+  }
 
 // ---------------------------------------------------------------------------
 // Symbian factory function.
@@ -589,7 +589,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 CMmFolder::CMmFolder()
@@ -597,7 +597,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 void CMmFolder::SetNameL( const TDesC& aName )
@@ -607,7 +607,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 const TDesC& CMmFolder::Name() const
@@ -616,7 +616,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 void CMmFolder::SetId( TInt aId )
@@ -625,13 +625,13 @@
     }
 
 // ---------------------------------------------------------------------------
-// 
+//
 // ---------------------------------------------------------------------------
 //
 TInt CMmFolder::Id()
     {
     return iId;
     }
-    
+
 // end of file
 
--- a/menufw/menufwui/mmwidgets/bwins/mmwidgetsu.def	Tue Apr 27 16:26:12 2010 +0300
+++ b/menufw/menufwui/mmwidgets/bwins/mmwidgetsu.def	Tue May 11 16:02:39 2010 +0300
@@ -39,4 +39,5 @@
 	?CancelDragL@CMmWidgetContainer@@QAEXH@Z @ 38 NONAME ; void CMmWidgetContainer::CancelDragL(int)
 	?AllowMove@CMmWidgetContainer@@QBEHXZ @ 39 NONAME ; int CMmWidgetContainer::AllowMove(void) const
 	?SetTriggerMoveItemL@CMmWidgetContainer@@QAEXHPAVCLiwGenericParamList@@@Z @ 40 NONAME ; void CMmWidgetContainer::SetTriggerMoveItemL(int, class CLiwGenericParamList *)
+	?SetExDialogOpened@CMmWidgetContainer@@QAEXH@Z @ 41 NONAME ; void CMmWidgetContainer::SetExDialogOpened(int)
 
--- a/menufw/menufwui/mmwidgets/eabi/mmwidgetsu.def	Tue Apr 27 16:26:12 2010 +0300
+++ b/menufw/menufwui/mmwidgets/eabi/mmwidgetsu.def	Tue May 11 16:02:39 2010 +0300
@@ -40,4 +40,5 @@
 	_ZThn52_N18CMmWidgetContainer23HandleForegroundGainedLEv @ 39 NONAME
 	_ZN18CMmWidgetContainer19SetTriggerMoveItemLEiP20CLiwGenericParamList @ 40 NONAME
 	_ZNK18CMmWidgetContainer9AllowMoveEv @ 41 NONAME
+	_ZN18CMmWidgetContainer17SetExDialogOpenedEi @ 42 NONAME
 
--- a/menufw/menufwui/mmwidgets/inc/mmlistboxview.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/menufw/menufwui/mmwidgets/inc/mmlistboxview.h	Tue May 11 16:02:39 2010 +0300
@@ -11,8 +11,8 @@
 *
 * Contributors:
 *
-* Description:  
-*  Version     : %version: MM_12.1.7 % << Don't touch! Updated by Synergy at check-out.
+* Description:
+*  Version     : %version: MM_12.1.8 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -23,20 +23,20 @@
 // INCLUDES
 #include <e32std.h>
 #include <e32base.h>
-#include <eikfrlb.h> 
+#include <eikfrlb.h>
 
 // CLASS DECLARATION
 
 /**
  *  Multimedia Menu Listbox view.
- *  
+ *
  *  @code
  *  @endcode
  *  @lib mmwidgets
  *  @since S60 v3.0
  *  @ingroup group_mmwidgets
  */
-NONSHARABLE_CLASS( CMmListBoxView ) : public CFormattedCellListBoxView 
+NONSHARABLE_CLASS( CMmListBoxView ) : public CFormattedCellListBoxView
     {
 public:
     // Constructors and destructor
@@ -55,149 +55,120 @@
      * Two-phased constructor.
      */
     static CMmListBoxView* NewLC();
-	
-	/**
-	 * Calculate the bottom item index.
-	 * 
-	 * @since S60 v3.0
-	 */
+
+  /**
+   * Calculate the bottom item index.
+   *
+   * @since S60 v3.0
+   */
     void CalcBottomItemIndex();
-	
-	/**
-	 * Draw the view.
-	 * 
-	 * @since S60 v3.0
-	 * @param clipRect Clipping rectangle.
-	 */
+
+  /**
+   * Draw the view.
+   *
+   * @since S60 v3.0
+   * @param clipRect Clipping rectangle.
+   */
     void Draw(const TRect* clipRect) const;
-    
-	/**
-	 * Draws the listbox within the given clipping rect.
-	 * 
-	 * @since S60 v3.0
-	 * @param clipRect Clipping rectangle.
-	 */
+
+  /**
+   * Draws the listbox within the given clipping rect.
+   *
+   * @since S60 v3.0
+   * @param clipRect Clipping rectangle.
+   */
     void DoDraw(const TRect* aClipRect) const;
-    
-	/**
-	 * Draw item in view. It is possible that it
-	 * calls drawing of more than one item.
-	 * 
-	 * @since S60 v3.0
-	 * @param aItemIndex Item index.
-	 */
+
+  /**
+   * Draw item in view. It is possible that it
+   * calls drawing of more than one item.
+   *
+   * @since S60 v3.0
+   * @param aItemIndex Item index.
+   */
     void DrawItem(TInt aItemIndex) const;
-    
-	/**
-	 * Draw a single item in view.
-	 * 
-	 * @since S60 v3.0
-	 * @param aItemIndex Item index.
-	 */
+
+  /**
+   * Draw a single item in view.
+   *
+   * @since S60 v3.0
+   * @param aItemIndex Item index.
+   */
     void DrawSingleItem (TInt aItemIndex) const;
-    
-	/**
-	 * Get the number of items that fit in rectangle.
-	 * 
-	 * @since S60 v3.0
-	 * @param aRect Clipping rectangle.
-	 * @return Number of items that fit in rectangle.
-	 */
-    TInt NumberOfItemsThatFitInRect(const TRect& aRect) const;
-	
-	/**
-	 * Get the number of items that fit in rectangle (with option to include
-	 * partial item at bottom of view).
-	 * 
-	 * @since S60 v3.0
-	 * @param aRect Rect for calculations.
-	 * @param aIncludePartialItem Should partial item be included.
-	 * @return Number of items that fit in rectangle.
-	 */
-    TInt GetNumberOfItemsThatFitInRect (const TRect& aRect, TBool aIncludePartialItem ) const;
-	
-	/**
-	 * Get item size.
-	 * 
-	 * @since S60 v3.0
-	 * @param aItemIndex Item index.
-	 * @return Size of item.
-	 */
-    TSize ItemSize(TInt aItemIndex) const;
-	
-	/**
-	 * Sets aItemIndex to the index of the item whose bounding box contains aPosition.
-	 * 
-	 * @since S60 v3.0
-	 * @param aPosition Item position.
-	 * @param aItemIndex Item index.
-	 * @return Was item found.
-	 */
+
+  /**
+   * Sets aItemIndex to the index of the item whose bounding box contains aPosition.
+   *
+   * @since S60 v3.0
+   * @param aPosition Item position.
+   * @param aItemIndex Item index.
+   * @return Was item found.
+   */
     TBool XYPosToItemIndex(TPoint aPosition, TInt& aItemIndex) const;
-    
-	/**
-	 * Gets item position.
-	 * 
-	 * @since S60 v3.0
-	 * @param aItemIndex Item index.
-	 * @return Item position.
-	 */
+
+  /**
+   * Gets item position.
+   *
+   * @since S60 v3.0
+   * @param aItemIndex Item index.
+   * @return Item position.
+   */
     TPoint ItemPos(TInt aItemIndex) const;
-	
-	/**
-	 * Sets item height.
-	 * 
-	 * @since S60 v3.0
-	 * @param aItemHeight Item height.
-	 */
+
+  /**
+   * Sets item height.
+   *
+   * @since S60 v3.0
+   * @param aItemHeight Item height.
+   */
     void SetItemHeight(TInt aItemHeight);
-	
-	/**
-	 * Calculates new top item index so item is visible.
-	 * 
-	 * @since S60 v3.0
-	 * @param aItemIndex Item to be visible.
-	 * @return New top item index.
-	 */
+
+  /**
+   * Calculates new top item index so item is visible.
+   *
+   * @since S60 v3.0
+   * @param aItemIndex Item to be visible.
+   * @return New top item index.
+   */
     TInt CalcNewTopItemIndexSoItemIsVisible(TInt aItemIndex) const;
-	
-	/**
-	 * Draw background between rects.
-	 * 
-	 * @since S60 v3.0
-	 * @param aUsedPortionOfViewRect Inner rect.
-	 * @param aSmallerViewRect Outer rect.
-	 */
+
+  /**
+   * Draw background between rects.
+   *
+   * @since S60 v3.0
+   * @param aUsedPortionOfViewRect Inner rect.
+   * @param aSmallerViewRect Outer rect.
+   */
     void RedrawBackground( TRect aUsedPortionOfViewRect, TRect aSmallerViewRect) const;
-	
-	/**
-	 * Draws background in list which is not covered by vivible items.
-	 * 
-	 * @since S60 v3.0
-	 */
+
+  /**
+   * Draws background in list which is not covered by vivible items.
+   *
+   * @since S60 v3.0
+   */
     void RedrawBackground() const;
-	
-	/**
-	 * Gets total height of items within range.
-	 * 
-	 * @since S60 v3.0
-	 * @param aStartIndex Start item index.
-	 * @param aEndIndex End item index.
-	 * @return Total height of items starting from aStartIndex, ending with aEndIndex.
-	 */
+
+  /**
+   * Gets total height of items within range.
+   *
+   * @since S60 v3.0
+   * @param aStartIndex Start item index.
+   * @param aEndIndex End item index.
+   * @return Total height of items starting from aStartIndex, ending with aEndIndex.
+   */
     TInt GetTotalHeight( TInt aStartIndex, TInt aEndIndex ) const;
 
     /**
      * Gets the current widget vertical item offset.
-     * 
+     *
      * @since S60 v5.0
      * @return The current widget vertical item offset.
      */
     TInt VerticalItemOffset() const;
-    
+
     /**
      * Overridden to allow for disabling this method in certain situations.
-     * 
+     *
      * @param aItemIndex Item index.
      */
     TBool ScrollToMakeItemVisible(TInt aItemIndex);
@@ -205,7 +176,7 @@
     /**
      * Disables ScrollToMakeItemVisible.
      * When disabled, ScrollToMakeItemVisible does nothing.
-     * 
+     *
      * @param aDisable Self-explanatory.
      */
     void DisableScrollToItem( TBool aDisable );
@@ -229,47 +200,47 @@
      */
     void ConstructL();
 
-	/**
-	 * Updates average item height.
-	 * 
-	 * @since S60 v3.0
-	 */
-   	void UpdateAverageItemHeight();
+  /**
+   * Updates average item height.
+   *
+   * @since S60 v3.0
+   */
+     void UpdateAverageItemHeight();
 
-	/**
-	 * Gets last item index depending on height.
-	 * 
-	 * @since S60 v3.0
-	 * @param aStartIndex Start item index.
-	 * @param aHeight Height of area.
-	 * @return Last item index.
-	 */
+  /**
+   * Gets last item index depending on height.
+   *
+   * @since S60 v3.0
+   * @param aStartIndex Start item index.
+   * @param aHeight Height of area.
+   * @return Last item index.
+   */
     TInt GetLastIndexInHeight( const TInt aStartIndex, TInt aHeight ) const;
-    
-	/**
-	 * Sets the previously drawn current item index.
-	 * 
-	 * @since S60 v3.0
-	 * @param aIndex Current Item index.
-	 */
+
+  /**
+   * Sets the previously drawn current item index.
+   *
+   * @since S60 v3.0
+   * @param aIndex Current Item index.
+   */
     void SetPreviouslyDrawnCurrentItemIndex( TBool aIndex );
-    
+
 private:
 
-	/**
-	 * Scrollbar visibility flag.
-	 */
-	TBool iScrollbarIsVisible;
-	
-	/**
-	 * iCurrentItemIndex
-	 */
-	TInt iPreviouslyDrawnCurrentItemIndex;
-	
-	/**
-	 * When ETrue, disables ScrollToMakeItemVisible method.
-	 */
-	TBool iScrollToItemDisabled;
+  /**
+   * Scrollbar visibility flag.
+   */
+  TBool iScrollbarIsVisible;
+
+  /**
+   * iCurrentItemIndex
+   */
+  TInt iPreviouslyDrawnCurrentItemIndex;
+
+  /**
+   * When ETrue, disables ScrollToMakeItemVisible method.
+   */
+  TBool iScrollToItemDisabled;
     };
 
 #endif // MMLISTBOXVIEW_H
--- a/menufw/menufwui/mmwidgets/inc/mmwidgetcontainer.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/menufw/menufwui/mmwidgets/inc/mmwidgetcontainer.h	Tue May 11 16:02:39 2010 +0300
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description:
-*  Version     : %version: MM_48.1.38 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: MM_48.1.40 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -688,6 +688,11 @@
      */
     void TriggerMoveItemL();
 
+    /**
+     * Sets if extention dialog is opened.
+     */
+    IMPORT_C void SetExDialogOpened( TBool aOpened );
+
 public: // from MMmVisibilityObserver
 
     /**
@@ -1051,6 +1056,22 @@
      */
     CLiwGenericParamList *iEventParameters;
 
+    /*
+     * Two following flags were added for fix ou1cimx1#344006 error.
+     * iDialogOpened - it's used to mark if any dialog has been opened.
+     * iHighlightVisibleBeforeLongTap - it's used to remember if highlight
+     *          had been visible when dialog has been opened.
+     */
+    /**
+     * ETrue if extension dialog is opend.
+     */
+    TBool iDialogOpened;
+
+    /**
+     * ETrue if highlight was visible before longTap event.
+     */
+    TBool iHighlightVisibleBeforeLongTap;
+
   };
 
 #endif // MMMWIDGETCONTAINER_H
--- a/menufw/menufwui/mmwidgets/src/mmlistbox.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/menufw/menufwui/mmwidgets/src/mmlistbox.cpp	Tue May 11 16:02:39 2010 +0300
@@ -680,25 +680,25 @@
 // -----------------------------------------------------------------------------
 //
 void CMmListBox::UpdateScrollBarsL()
-  {
-  TBool redrawNeeded = HandleScrollbarVisibilityChangeL();
-  if (ScrollBarFrame()->VerticalScrollBar()->IsVisible())
     {
-    CMmListBoxView* view = static_cast<CMmListBoxView*>( View() );
-    view->DisableScrollToItem( ETrue );
-    TScrollToItemEnabler reverter = { view };
-    CleanupClosePushL( reverter );
-    CEikFormattedCellListBoxTypedef::UpdateScrollBarsL();
-    CleanupStack::PopAndDestroy( &reverter );
+    TBool redrawNeeded = HandleScrollbarVisibilityChangeL();
+    if (ScrollBarFrame()->VerticalScrollBar()->IsVisible())
+        {
+        CMmListBoxView* view = static_cast<CMmListBoxView*>( View() );
+        view->DisableScrollToItem( ETrue );
+        TScrollToItemEnabler reverter = { view };
+        CleanupClosePushL( reverter );
+        CEikFormattedCellListBoxTypedef::UpdateScrollBarsL();
+        CleanupStack::PopAndDestroy( &reverter );
+        }
+    iMmDrawer->TemplateLibrary()->SetScrollbarWidthL(
+        ScrollBarFrame()->VerticalScrollBar()->Rect().Width() );
+    FixViewForMirroredLayout();
+    if ( redrawNeeded )
+        {
+        DrawNow();
+        }
     }
-  iMmDrawer->TemplateLibrary()->SetScrollbarWidthL(
-        ScrollBarFrame()->VerticalScrollBar()->Rect().Width() );
-  FixViewForMirroredLayout();
-  if ( redrawNeeded )
-    {
-    DrawNow();
-    }
-  }
 
 // -----------------------------------------------------------------------------
 //
--- a/menufw/menufwui/mmwidgets/src/mmlistboxitemdrawer.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/menufw/menufwui/mmwidgets/src/mmlistboxitemdrawer.cpp	Tue May 11 16:02:39 2010 +0300
@@ -60,22 +60,22 @@
 //
 CMmListBoxItemDrawer::CMmListBoxItemDrawer(
         CMmListBoxModel* aMmListBoxModel,
-	    const CFont* aFont,
-	    CFormattedCellListBoxData* aFormattedCellData,
-	    TMmWidgetType aWidgetType,
-	    CMmTemplateLibrary* aTemplateLibrary )
-	: CFormattedCellListBoxItemDrawer( aMmListBoxModel , aFont, aFormattedCellData),
-	iFont(aFont), iLeftOverAreaUnderAnimatedItem(EFalse)
-	{
-	iWidgetType = aWidgetType;
-	iTemplateLibrary = aTemplateLibrary;
-	iMmModel = aMmListBoxModel;
-	iRedrawBackground = ETrue;
-	iDrawSeparatorLines = EFalse;
-	iZoomIconIndex = -1;
-	iIconAnimationZoomRatio = 1;
-	// this is needed to get iColors initialized on first use:
-	iLastDrawnItemWasFloating = ETrue;
+      const CFont* aFont,
+      CFormattedCellListBoxData* aFormattedCellData,
+      TMmWidgetType aWidgetType,
+      CMmTemplateLibrary* aTemplateLibrary )
+  : CFormattedCellListBoxItemDrawer( aMmListBoxModel , aFont, aFormattedCellData),
+  iFont(aFont), iLeftOverAreaUnderAnimatedItem(EFalse)
+  {
+  iWidgetType = aWidgetType;
+  iTemplateLibrary = aTemplateLibrary;
+  iMmModel = aMmListBoxModel;
+  iRedrawBackground = ETrue;
+  iDrawSeparatorLines = EFalse;
+  iZoomIconIndex = -1;
+  iIconAnimationZoomRatio = 1;
+  // this is needed to get iColors initialized on first use:
+  iLastDrawnItemWasFloating = ETrue;
     SetFlags( CListItemDrawer::EDisableHighlight );
     }
 
@@ -414,8 +414,8 @@
 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
     if( transApi )
         {
-	    transApi->EndRedraw( MAknListBoxTfxInternal::EListItem, aItemIndex );
-		}
+      transApi->EndRedraw( MAknListBoxTfxInternal::EListItem, aItemIndex );
+    }
 #endif
 
 
@@ -505,7 +505,7 @@
         }
 #endif
 
-	if( iDrawSeparatorLines )
+  if( iDrawSeparatorLines )
         {
         CMmListBoxView* view = static_cast<CMmListBoxView*>( iWidget->View() );
         if( aItemIndex != ( view->ModelItemsCount() - 1  ))
@@ -616,8 +616,8 @@
         TTemplateChild aSubCellTemplate, TInt aIndex, TInt aItemIndex ) const
     {
     aSubCellTemplate.iRectAccordingToParent.iBr
-		= TPoint(ItemCellSize().iWidth * iIconAnimationZoomRatio,
-				ItemCellSize().iHeight * iIconAnimationZoomRatio);
+    = TPoint(ItemCellSize().iWidth * iIconAnimationZoomRatio,
+        ItemCellSize().iHeight * iIconAnimationZoomRatio);
 
     aSubCellTemplate.iRectAccordingToParent.iTl = TPoint(0, 0);
     SetupSubCellL( aSubCellTemplate, aIndex, aItemIndex );
@@ -931,16 +931,16 @@
 // -----------------------------------------------------------------------------
 //
 void CMmListBoxItemDrawer::SetDraggedPointL( TPoint aPoint )
-	{
-	TInt dragFloatingItem = GetFloatingItemIndex(EDrag);
-	if (dragFloatingItem != KErrNotFound )
-		{
-		TMmFloatingItem & item = GetFloatingItemAtIndex( dragFloatingItem );
-		TMmFloatingItem floatingItem( item.GetDrawnItemIndex(),
-				aPoint,	EDrag, MmEffects::KNoAnimationFramesCount, NULL );
-		floatingItem.SetManualDelete( ETrue );
+  {
+  TInt dragFloatingItem = GetFloatingItemIndex(EDrag);
+  if (dragFloatingItem != KErrNotFound )
+    {
+    TMmFloatingItem & item = GetFloatingItemAtIndex( dragFloatingItem );
+    TMmFloatingItem floatingItem( item.GetDrawnItemIndex(),
+        aPoint,	EDrag, MmEffects::KNoAnimationFramesCount, NULL );
+    floatingItem.SetManualDelete( ETrue );
 
-		TMmFloatingItem postDragRefresh( item.GetDrawnItemIndex(),
+    TMmFloatingItem postDragRefresh( item.GetDrawnItemIndex(),
                 item.GetItemPosition(), EPostDragRefreshItem,
                 MmEffects::KNoAnimationFramesCount, iWidget->View() );
 
@@ -1056,13 +1056,13 @@
 // -----------------------------------------------------------------------------
 //
 void CMmListBoxItemDrawer::DrawActualIndicatorItem( TInt aItemIndex, TRect /*actualItemRect*/ )
-	{
-	if ( iDrawMoveIndicators )
-		{
-		iIsIndicatorItem = ETrue;
-		TBool redrawItemBackground =
+  {
+  if ( iDrawMoveIndicators )
+    {
+    iIsIndicatorItem = ETrue;
+    TBool redrawItemBackground =
             IsRedrawItemBackgroundEnabled( );
-		SetRedrawItemBackground( EFalse );
+    SetRedrawItemBackground( EFalse );
 
     DrawActualItem( aItemIndex, AdjustItemRect( aItemIndex ) , EFalse, EFalse, EFalse, EFalse);
 
@@ -1114,9 +1114,9 @@
 // -----------------------------------------------------------------------------
 //
 void CMmListBoxItemDrawer::SetMarqueeDrawing( TBool aIsMarqueeBeingDrawn )
-	{
-	iIsMarqueeBeingDrawn = aIsMarqueeBeingDrawn;
-	}
+  {
+  iIsMarqueeBeingDrawn = aIsMarqueeBeingDrawn;
+  }
 
 
 // -----------------------------------------------------------------------------
@@ -1124,12 +1124,12 @@
 // -----------------------------------------------------------------------------
 //
 TBool CMmListBoxItemDrawer::IsTextClippedL( TTemplateChild aTemplateChild,
-		const TDesC& aText ) const
-	{
+    const TDesC& aText ) const
+  {
     TBuf< MmMarqueeConstants::KClippingBufLength > clipbuf
-		= aText.Left( MmMarqueeConstants::KTextTrimmingThreshold);
-	TInt maxClipWidth = aTemplateChild.iRectAccordingToParent.Width();
-	const CFont* font = AknLayoutUtils::FontFromId(aTemplateChild.iFontId);
+    = aText.Left( MmMarqueeConstants::KTextTrimmingThreshold);
+  TInt maxClipWidth = aTemplateChild.iRectAccordingToParent.Width();
+  const CFont* font = AknLayoutUtils::FontFromId(aTemplateChild.iFontId);
     return AknBidiTextUtils::ConvertToVisualAndClipL( clipbuf, *font,
             aTemplateChild.iRectAccordingToParent.Width(), maxClipWidth );
     }
@@ -1148,16 +1148,16 @@
 // -----------------------------------------------------------------------------
 //
 void CMmListBoxItemDrawer::SetupIconSubcellL(
-		RArray<TTemplateChild>& aTemplateChildArray, TInt aChildIndex, TInt aItemIndex,
-		RBuf& aItemText, TInt& aSubcellIncrement ) const
-		{
-		CGulIcon* icon = NULL;
-		TTemplateChild child = aTemplateChildArray[aChildIndex];
-		if ( !IsEditMode() &&
-		        child.iImageVisualId == EImageVisualIdEditMode )
-		    {
-		    child.iIsImage = EFalse;
-		    }
+    RArray<TTemplateChild>& aTemplateChildArray, TInt aChildIndex, TInt aItemIndex,
+    RBuf& aItemText, TInt& aSubcellIncrement ) const
+    {
+    CGulIcon* icon = NULL;
+    TTemplateChild child = aTemplateChildArray[aChildIndex];
+    if ( !IsEditMode() &&
+            child.iImageVisualId == EImageVisualIdEditMode )
+        {
+        child.iIsImage = EFalse;
+        }
 
     if( IsEditMode() && IsDraggable() && aItemIndex == iZoomIconIndex )
         {
@@ -1321,7 +1321,7 @@
                 child.iIsImage )
             {
             TSize itemSize = GetItemSize( aItemIndex,
-            		aItemIndex == iWidget->View()->CurrentItemIndex() );
+                aItemIndex == iWidget->View()->CurrentItemIndex() );
             CHnIconHolder* iconHolder = iMmModel->GetAttributeAsRefCountedGraphics( aItemIndex, child.iData, &itemSize );
             icon = iconHolder ? iconHolder->GetGulIcon() : NULL;
             if( icon )
@@ -1386,14 +1386,14 @@
     CleanupClosePushL( templateChildArray );
     if( !iIsIndicatorItem )
         {
-    iTemplateLibrary->GetChildrenL( iWidgetType, templateChildArray, mmTemplate,
+        iTemplateLibrary->GetChildrenL( iWidgetType, templateChildArray, mmTemplate,
         landscapeOrientation, aItemIsCurrent,	IsEditMode() );
-    }
+        }
     else if ( !AknLayoutUtils::PenEnabled() )
-    {
-    iTemplateLibrary->GetMoveIndicatorChildrenL( iWidgetType, templateChildArray,
-          mmTemplate, landscapeOrientation, aItemIsCurrent );
-    }
+        {
+        iTemplateLibrary->GetMoveIndicatorChildrenL( iWidgetType, templateChildArray,
+                mmTemplate, landscapeOrientation, aItemIsCurrent );
+        }
 
     iLastSubcellsSetupCode.Clear();
 
@@ -1409,7 +1409,7 @@
         iItemHasBackdrop = EFalse;
         }
 
-  for ( TInt i( 0 ) ; i < templateChildArray.Count() && !iLeftOverAreaUnderAnimatedItem; i++ )
+    for ( TInt i( 0 ) ; i < templateChildArray.Count() && !iLeftOverAreaUnderAnimatedItem; i++ )
         {
         TTemplateChild child = templateChildArray[i];
         if ( child.iImageVisualId == EImageVisualIdEditMode && child.iIsImage )
@@ -1417,16 +1417,16 @@
             continue;
             }
         else if( !child.iIsImage )
-        {
-        SetupTextSubcellL( templateChildArray, i, aItemIndex, itemText, subcellIncrement );
-        }
-      else
-        {
-        SetupIconSubcellL( templateChildArray, i, aItemIndex, itemText, subcellIncrement );
+            {
+            SetupTextSubcellL( templateChildArray, i, aItemIndex, itemText, subcellIncrement );
+            }
+        else
+            {
+            SetupIconSubcellL( templateChildArray, i, aItemIndex, itemText, subcellIncrement );
             }
         }
     TInt subcellsJustSet = subcellIncrement;
-  iCurrentNumberOfSubcellsSet = Max( iCurrentNumberOfSubcellsSet, subcellsJustSet );
+    iCurrentNumberOfSubcellsSet = Max( iCurrentNumberOfSubcellsSet, subcellsJustSet );
     __ASSERT_DEBUG( iCurrentNumberOfSubcellsSet <= MmTemplateContants::KSubCellsCount,
             User::Invariant() );
 
@@ -1545,11 +1545,11 @@
     ItemHasFloatingType( aItemIndex, EDragTransition );
 
     return 	IsEditMode() /* draw the backdrop only in edit mode */
-    		&& !currentlyDraggedItem /* backdrop is disabled for dragged items */
-    		&& !iIsIndicatorItem /* in non-touch backdrop is not drawn, just "move indicators" */
-    		&& !iLeftOverAreaUnderAnimatedItem /* is the currently drawn item the area left over behind dragged item*/
-    		&& !( STATIC_CAST( CMmWidgetContainer*,Widget()->Parent() )->IsHighlightVisible()
-    				&& aItemIsCurrent );/*if the timer is active then we want to draw highlight (not backdrop) on the current index*/
+        && !currentlyDraggedItem /* backdrop is disabled for dragged items */
+        && !iIsIndicatorItem /* in non-touch backdrop is not drawn, just "move indicators" */
+        && !iLeftOverAreaUnderAnimatedItem /* is the currently drawn item the area left over behind dragged item*/
+        && !( STATIC_CAST( CMmWidgetContainer*,Widget()->Parent() )->IsHighlightVisible()
+            && aItemIsCurrent );/*if the timer is active then we want to draw highlight (not backdrop) on the current index*/
     }
 
 // -----------------------------------------------------------------------------
--- a/menufw/menufwui/mmwidgets/src/mmlistboxview.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/menufw/menufwui/mmwidgets/src/mmlistboxview.cpp	Tue May 11 16:02:39 2010 +0300
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description:
- *  Version     : %version: MM_52 % << Don't touch! Updated by Synergy at check-out.
+ *  Version     : %version: MM_53 % << Don't touch! Updated by Synergy at check-out.
  *
 */
 
@@ -39,164 +39,126 @@
 #endif
 
 CMmListBoxView::CMmListBoxView ()
-	{
-	// No implementation required
-	}
+  {
+  // No implementation required
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 CMmListBoxView::~CMmListBoxView ()
-	{
-	}
+  {
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 CMmListBoxView* CMmListBoxView::NewLC ()
-	{
-	CMmListBoxView* self = new (ELeave)CMmListBoxView();
-	CleanupStack::PushL (self);
-	self->ConstructL ();
-	return self;
-	}
+  {
+  CMmListBoxView* self = new (ELeave)CMmListBoxView();
+  CleanupStack::PushL (self);
+  self->ConstructL ();
+  return self;
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 CMmListBoxView* CMmListBoxView::NewL ()
-	{
-	CMmListBoxView* self=CMmListBoxView::NewLC ();
-	CleanupStack::Pop( self );
-	return self;
-	}
+  {
+  CMmListBoxView* self=CMmListBoxView::NewLC ();
+  CleanupStack::Pop( self );
+  return self;
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMmListBoxView::ConstructL ()
-	{
-	iScrollbarIsVisible = ETrue;
-	iPreviouslyDrawnCurrentItemIndex = KErrNotFound;
-	}
+  {
+  iScrollbarIsVisible = ETrue;
+  iPreviouslyDrawnCurrentItemIndex = KErrNotFound;
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMmListBoxView::UpdateAverageItemHeight ()
-	{
-	TInt count( iModel->NumberOfItems() );
-	if ( !count )
-	    {
-	    SetItemHeight( 2 );
-	    }
-	else
-	    {
-	    TInt totalHeight = GetTotalHeight( 0, count - 1 );
-	    TInt averageItemHeight = totalHeight / count;
-	    if ( totalHeight % count )
-	        {
-	        ++averageItemHeight;
-	        // this ensures that it is always possible to
-	        // scroll to the very bottom of the view by
-	        // using scrollbar.
-	        }
-	    SetItemHeight( averageItemHeight );
-	    }
-	}
+  {
+  TInt count( iModel->NumberOfItems() );
+  if ( !count )
+      {
+      SetItemHeight( 2 );
+      }
+  else
+      {
+      TInt totalHeight = GetTotalHeight( 0, count - 1 );
+      TInt averageItemHeight = totalHeight / count;
+      if ( totalHeight % count )
+          {
+          ++averageItemHeight;
+          // this ensures that it is always possible to
+          // scroll to the very bottom of the view by
+          // using scrollbar.
+          }
+      SetItemHeight( averageItemHeight );
+      }
+  }
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 TInt CMmListBoxView::GetTotalHeight (const TInt aStartIndex, TInt aEndIndex) const
-	{
-	TInt totalHeight = 0;
+  {
+  TInt totalHeight = 0;
 
-	if ( aEndIndex >= 0)
-		{
-		TInt itemCount = iModel->NumberOfItems ();
-		aEndIndex = (aEndIndex >= itemCount ) ? itemCount-1 : aEndIndex;
-		CMmListBoxItemDrawer* drawer= STATIC_CAST( CMmListBoxItemDrawer*, iItemDrawer);
-		for (TInt i(aStartIndex); i <= aEndIndex; i++)
-			{
-			totalHeight += drawer->GetItemHeight (i, CurrentItemIndex () == i);
-			}
-		}
+  if ( aEndIndex >= 0)
+    {
+    TInt itemCount = iModel->NumberOfItems ();
+    aEndIndex = (aEndIndex >= itemCount ) ? itemCount-1 : aEndIndex;
+    CMmListBoxItemDrawer* drawer= STATIC_CAST( CMmListBoxItemDrawer*, iItemDrawer);
+    for (TInt i(aStartIndex); i <= aEndIndex; i++)
+      {
+      totalHeight += drawer->GetItemHeight (i, CurrentItemIndex () == i);
+      }
+    }
 
-	return totalHeight;
-	}
+  return totalHeight;
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 TInt CMmListBoxView::GetLastIndexInHeight (const TInt aStartIndex, TInt aHeight) const
-	{
-	TInt i = aStartIndex;
-	TInt totalHeight = 0;
-
-	TInt itemCount(iModel->NumberOfItems () );
-	CMmListBoxItemDrawer* drawer= STATIC_CAST( CMmListBoxItemDrawer*, iItemDrawer);
+  {
+  TInt i = aStartIndex;
+  TInt totalHeight = 0;
 
-	for (; (i > -1) && (i < itemCount); i++)
-		{
-		totalHeight += drawer->GetItemHeight (i, CurrentItemIndex () == i);
-		if ( totalHeight > aHeight)
-			break;
-		}
-
-	TInt ret(i - aStartIndex);
-
-	if ( !AknLayoutUtils::PenEnabled() && totalHeight > aHeight )
-		{
-		ret--; // exclude partial item
-		}
-
-	return ret;
-	}
+  TInt itemCount(iModel->NumberOfItems () );
+  CMmListBoxItemDrawer* drawer= STATIC_CAST( CMmListBoxItemDrawer*, iItemDrawer);
 
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TInt CMmListBoxView::NumberOfItemsThatFitInRect(const TRect& aRect) const
-	{
-	return GetNumberOfItemsThatFitInRect( aRect, EFalse );
-	}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TInt CMmListBoxView::GetNumberOfItemsThatFitInRect (const TRect& aRect,
-		TBool aIncludePartialItem ) const
-	{
-	TInt i = iTopItemIndex;
-	TInt totalHeight = iVerticalOffset;
+  for (; (i > -1) && (i < itemCount); i++)
+    {
+    totalHeight += drawer->GetItemHeight (i, CurrentItemIndex () == i);
+    if ( totalHeight > aHeight)
+      break;
+    }
 
-	TInt itemCount( iModel->NumberOfItems () );
-	CMmListBoxItemDrawer* drawer= STATIC_CAST( CMmListBoxItemDrawer*, iItemDrawer);
-	while (totalHeight < aRect.Height ())
-		{
-		totalHeight += ((i > -1) && (i < itemCount )) ? drawer->GetItemHeight (
-				i, CurrentItemIndex () == i) : iItemHeight;
-		++i;
-		}
+  TInt ret(i - aStartIndex);
 
-	TInt ret(i - iTopItemIndex);
+  if ( !AknLayoutUtils::PenEnabled() && totalHeight > aHeight )
+    {
+    ret--; // exclude partial item
+    }
 
-	if ( !AknLayoutUtils::PenEnabled() && !aIncludePartialItem && totalHeight > aRect.Height() )
-		{
-		ret--; // exclude partial item
-		}
-
-	return ret;
-	}
+  return ret;
+  }
 
 // -----------------------------------------------------------------------------
 //
@@ -213,49 +175,49 @@
 // -----------------------------------------------------------------------------
 //
 void CMmListBoxView::CalcBottomItemIndex ()
-	{
+  {
 
-	TInt numberOfVisibleItems = NumberOfItemsThatFitInRect( iViewRect );
-	iBottomItemIndex = Min( iTopItemIndex + numberOfVisibleItems - 1,
-	        iModel->NumberOfItems() );
+  TInt numberOfVisibleItems = NumberOfItemsThatFitInRect( iViewRect );
+  iBottomItemIndex = Min( iTopItemIndex + numberOfVisibleItems - 1,
+          iModel->NumberOfItems() );
 
-	// The next piece of code removes filtering from find box when
-	// new list items are added.
-	if ( Flags () & CListBoxView::EItemCountModified)
-		{
-		CAknFilteredTextListBoxModel *model= STATIC_CAST(CAknFilteredTextListBoxModel*,iModel);
-		CAknListBoxFilterItems *filter = model ? model->Filter () : 0;
-		if ( filter)
-			{
-			TRAP_IGNORE(filter->ResetFilteringL());
-			}
-		}
-	}
+  // The next piece of code removes filtering from find box when
+  // new list items are added.
+  if ( Flags () & CListBoxView::EItemCountModified)
+    {
+    CAknFilteredTextListBoxModel *model= STATIC_CAST(CAknFilteredTextListBoxModel*,iModel);
+    CAknListBoxFilterItems *filter = model ? model->Filter () : 0;
+    if ( filter)
+      {
+      TRAP_IGNORE(filter->ResetFilteringL());
+      }
+    }
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMmListBoxView::Draw (const TRect* aClipRect) const
-	{
+  {
     TBool drawingInitiated(EFalse);
     if ( CAknEnv::Static()->TransparencyEnabled() &&
-    		iWin && iWin->GetDrawRect() == TRect::EUninitialized )
-    	{
-    	TRect a(ViewRect());
-    	if (!aClipRect || *aClipRect == TRect(0,0,0,0) )
-    		{
-    		aClipRect = &a;
-    		}
-    	drawingInitiated=ETrue;
-		iWin->Invalidate( *aClipRect );
-		iWin->BeginRedraw( *aClipRect );
-    	}
+        iWin && iWin->GetDrawRect() == TRect::EUninitialized )
+      {
+      TRect a(ViewRect());
+      if (!aClipRect || *aClipRect == TRect(0,0,0,0) )
+        {
+        aClipRect = &a;
+        }
+      drawingInitiated=ETrue;
+    iWin->Invalidate( *aClipRect );
+    iWin->BeginRedraw( *aClipRect );
+      }
 
-	DoDraw(aClipRect);
+  DoDraw(aClipRect);
 
-	CMmListBoxItemDrawer* itemDrawer =
-			static_cast<CMmListBoxItemDrawer*>(iItemDrawer );
+  CMmListBoxItemDrawer* itemDrawer =
+      static_cast<CMmListBoxItemDrawer*>(iItemDrawer );
     if (aClipRect)
         {
         TRect rect(*aClipRect);
@@ -269,77 +231,77 @@
         }
 
     if ( CAknEnv::Static()->TransparencyEnabled() &&
-    		iWin && drawingInitiated )
-    	{
-    	drawingInitiated = EFalse;
-    	iWin->EndRedraw( );
-    	}
-	}
+        iWin && drawingInitiated )
+      {
+      drawingInitiated = EFalse;
+      iWin->EndRedraw( );
+      }
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMmListBoxView::DoDraw(const TRect* aClipRect) const
-	{
-	CMmListBoxView* view= CONST_CAST( CMmListBoxView*, this );
-	view->UpdateAverageItemHeight ();
+  {
+  CMmListBoxView* view= CONST_CAST( CMmListBoxView*, this );
+  view->UpdateAverageItemHeight ();
 
-	CMmListBoxModel* model = static_cast< CMmListBoxModel* > ( iModel );
-	if ( model && model->GetSuiteModel()
-			&& !model->GetSuiteModel()->GetItemsOrder()->IsSuiteReadyToShow() )
-		{
-		return;
-		}
+  CMmListBoxModel* model = static_cast< CMmListBoxModel* > ( iModel );
+  if ( model && model->GetSuiteModel()
+      && !model->GetSuiteModel()->GetItemsOrder()->IsSuiteReadyToShow() )
+    {
+    return;
+    }
 
-	if ( RedrawDisabled () || !IsVisible () )
-		{
-		return;
-		}
+  if ( RedrawDisabled () || !IsVisible () )
+    {
+    return;
+    }
 
-	TInt i = iTopItemIndex;
-	CMmListBoxItemDrawer* itemDrawer =
-			static_cast<CMmListBoxItemDrawer*>(iItemDrawer );
-	MAknsSkinInstance *skin = AknsUtils::SkinInstance ();
-	CCoeControl* control = itemDrawer->FormattedCellData()->Control ();
-	MAknsControlContext *cc = AknsDrawUtils::ControlContext (control);
+  TInt i = iTopItemIndex;
+  CMmListBoxItemDrawer* itemDrawer =
+      static_cast<CMmListBoxItemDrawer*>(iItemDrawer );
+  MAknsSkinInstance *skin = AknsUtils::SkinInstance ();
+  CCoeControl* control = itemDrawer->FormattedCellData()->Control ();
+  MAknsControlContext *cc = AknsDrawUtils::ControlContext (control);
 
-	if ( !cc)
-		{
-		cc = itemDrawer->FormattedCellData()->SkinBackgroundContext ();
-		}
+  if ( !cc)
+    {
+    cc = itemDrawer->FormattedCellData()->SkinBackgroundContext ();
+    }
 
-	itemDrawer->SetTopItemIndex (iTopItemIndex);
+  itemDrawer->SetTopItemIndex (iTopItemIndex);
 
-	if ( iModel->NumberOfItems () > 0)
-		{
-		TBool drawingInitiated = ETrue;
-		if ( CAknEnv::Static()->TransparencyEnabled () )
-			{
-			if ( iWin && iWin->GetDrawRect () == TRect::EUninitialized)
-				{
+  if ( iModel->NumberOfItems () > 0)
+    {
+    TBool drawingInitiated = ETrue;
+    if ( CAknEnv::Static()->TransparencyEnabled () )
+      {
+      if ( iWin && iWin->GetDrawRect () == TRect::EUninitialized)
+        {
 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
-								MAknListBoxTfxInternal* transApi =
-									CAknListLoader::TfxApiInternal( iGc );
-								drawingInitiated = transApi && !transApi->EffectsDisabled();
+                MAknListBoxTfxInternal* transApi =
+                  CAknListLoader::TfxApiInternal( iGc );
+                drawingInitiated = transApi && !transApi->EffectsDisabled();
 #else
-				drawingInitiated = EFalse;
+        drawingInitiated = EFalse;
 #endif
-				}
+        }
 
-			if ( !drawingInitiated)
-				{
-				iWin->Invalidate ( *aClipRect);
-				iWin->BeginRedraw ( *aClipRect);
-				}
-			}
+      if ( !drawingInitiated)
+        {
+        iWin->Invalidate ( *aClipRect);
+        iWin->BeginRedraw ( *aClipRect);
+        }
+      }
 
-		TInt lastPotentialItemIndex = Min (iModel->NumberOfItems (),
-				iTopItemIndex + GetNumberOfItemsThatFitInRect( ViewRect (), ETrue ) );
+    TInt lastPotentialItemIndex = Min( iModel->NumberOfItems(),
+                iTopItemIndex + NumberOfItemsThatFitInRect( ViewRect() ) );
 
-		if ( !itemDrawer->IsEditMode() )
-		    {
-		    itemDrawer->DrawBackground( ViewRect() );
+    if ( !itemDrawer->IsEditMode() )
+        {
+        itemDrawer->DrawBackground( ViewRect() );
             itemDrawer->SetRedrawItemBackground( EFalse );
             itemDrawer->SetDrawSeparatorLines( ETrue );
             while (i < lastPotentialItemIndex)
@@ -348,111 +310,92 @@
                 }
             itemDrawer->SetRedrawItemBackground( ETrue );
             itemDrawer->SetDrawSeparatorLines( EFalse );
-		    }
-		else
-		    {
-		    while (i < lastPotentialItemIndex)
+        }
+    else
+        {
+        while (i < lastPotentialItemIndex)
                 {
                 DrawItem(i++);
                 }
-		    // this redraws background in the view portion not covered by items
-		    RedrawBackground();
-		    }
+        // this redraws background in the view portion not covered by items
+        RedrawBackground();
+        }
 
 
-		if ( CAknEnv::Static()->TransparencyEnabled () && !drawingInitiated)
-			{
-			iWin->EndRedraw ();
-			}
-		}
+    if ( CAknEnv::Static()->TransparencyEnabled () && !drawingInitiated)
+      {
+      iWin->EndRedraw ();
+      }
+    }
 
-	}
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMmListBoxView::DrawItem (TInt aItemIndex) const
-	{
-	CMmListBoxItemDrawer* itemDrawer= STATIC_CAST( CMmListBoxItemDrawer*, iItemDrawer );
-	TBool currentChanged( CurrentItemIndex() != iPreviouslyDrawnCurrentItemIndex );
-	TBool redrawConsumed(EFalse);
-	if ( currentChanged )
-		{
-		CMmListBoxView* view= CONST_CAST( CMmListBoxView*, this );
-		redrawConsumed =
-			static_cast<CMmListBox*> (itemDrawer->Widget())->RedrawIfNecessary(
-								iPreviouslyDrawnCurrentItemIndex,
-								CurrentItemIndex());
-		view->SetPreviouslyDrawnCurrentItemIndex( CurrentItemIndex() );
-		}
+    {
+    CMmListBoxItemDrawer* itemDrawer= STATIC_CAST( CMmListBoxItemDrawer*, iItemDrawer );
+    TBool currentChanged( CurrentItemIndex() != iPreviouslyDrawnCurrentItemIndex );
+    TBool redrawConsumed(EFalse);
+    if ( currentChanged )
+        {
+        CMmListBoxView* view= CONST_CAST( CMmListBoxView*, this );
+        redrawConsumed =
+                static_cast<CMmListBox*> (itemDrawer->Widget())->RedrawIfNecessary(
+                        iPreviouslyDrawnCurrentItemIndex,
+                        CurrentItemIndex());
+        view->SetPreviouslyDrawnCurrentItemIndex( CurrentItemIndex() );
+        }
 
-	if ( !redrawConsumed )
-		{
+    if ( !redrawConsumed )
+        {
         itemDrawer->SetDrawSeparatorLines( ETrue );
-	    DrawSingleItem ( aItemIndex );
+        DrawSingleItem ( aItemIndex );
         itemDrawer->SetDrawSeparatorLines( EFalse );
-		}
-	}
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-TSize CMmListBoxView::ItemSize (TInt aItemIndex) const
-	{
-	CMmListBoxView* view= CONST_CAST( CMmListBoxView*, this );
-	view->UpdateAverageItemHeight ();
-
-    CMmListBoxItemDrawer* itemDrawer= STATIC_CAST( CMmListBoxItemDrawer*, iItemDrawer );
-    TSize size(CFormattedCellListBoxView::ItemSize(aItemIndex).iWidth, itemDrawer->GetItemHeight (aItemIndex,
-            CurrentItemIndex () == aItemIndex) );
-
-    if ( size.iHeight < 2)
-        size.iHeight = 2;
-
-    return size;
-	}
+        }
+    }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 TPoint CMmListBoxView::ItemPos (TInt aItemIndex) const
-	{
-	TInt vRealPos = CFormattedCellListBoxView::ItemPos(TopItemIndex()).iY;
-	TInt totalHeight = 0;
-	if ( aItemIndex > iTopItemIndex )
-	    {
-	    totalHeight = GetTotalHeight( iTopItemIndex, aItemIndex - 1 );
-	    }
-	else if ( aItemIndex < iTopItemIndex )
-	    {
-	    totalHeight = -GetTotalHeight( aItemIndex, iTopItemIndex - 1 );
-	    }
+  {
+  TInt vRealPos = CFormattedCellListBoxView::ItemPos(TopItemIndex()).iY;
+  TInt totalHeight = 0;
+  if ( aItemIndex > iTopItemIndex )
+      {
+      totalHeight = GetTotalHeight( iTopItemIndex, aItemIndex - 1 );
+      }
+  else if ( aItemIndex < iTopItemIndex )
+      {
+      totalHeight = -GetTotalHeight( aItemIndex, iTopItemIndex - 1 );
+      }
 
-	return TPoint (-iHScrollOffset + iViewRect.iTl.iX, iViewRect.iTl.iY
-			+ totalHeight + vRealPos);
-	}
+  return TPoint (-iHScrollOffset + iViewRect.iTl.iX, iViewRect.iTl.iY
+      + totalHeight + vRealPos);
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 TBool CMmListBoxView::XYPosToItemIndex (TPoint aPosition, TInt& aItemIndex) const
-	{
-	// returns ETrue and sets aItemIndex to the index of the item whose bounding box contains aPosition
-	// returns EFalse if no such item exists
-	TBool itemFound = EFalse;
-	if ( iViewRect.Contains (aPosition))
-		{
-		TInt vRealPos = CFormattedCellListBoxView::ItemPos(TopItemIndex()).iY;
-		// aPosition is inside the display area
-		TInt numberOfVisibleItems = GetLastIndexInHeight (iTopItemIndex,
-				aPosition.iY - iViewRect.iTl.iY - vRealPos );
-		TInt itemAtSpecifiedPos = iTopItemIndex + numberOfVisibleItems;
-		aItemIndex = itemAtSpecifiedPos;
-		itemFound = ( GetTotalHeight( iTopItemIndex, iBottomItemIndex )
+  {
+  // returns ETrue and sets aItemIndex to the index of the item whose bounding box contains aPosition
+  // returns EFalse if no such item exists
+  TBool itemFound = EFalse;
+  if ( iViewRect.Contains (aPosition))
+    {
+    TInt vRealPos = CFormattedCellListBoxView::ItemPos(TopItemIndex()).iY;
+    // aPosition is inside the display area
+    TInt numberOfVisibleItems = GetLastIndexInHeight (iTopItemIndex,
+        aPosition.iY - iViewRect.iTl.iY - vRealPos );
+    TInt itemAtSpecifiedPos = iTopItemIndex + numberOfVisibleItems;
+    aItemIndex = itemAtSpecifiedPos;
+    itemFound = ( GetTotalHeight( iTopItemIndex, iBottomItemIndex )
             >= aPosition.iY ) && ( iModel->NumberOfItems() > itemAtSpecifiedPos );
 //        if ( itemFound )
 //            {
@@ -462,42 +405,42 @@
 //            TInt itemAtSpecifiedPos = iTopItemIndex + numberOfVisibleItems;
 //            aItemIndex = itemAtSpecifiedPos;
 //            }
-		}
-	return itemFound;
-	}
+    }
+  return itemFound;
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMmListBoxView::SetItemHeight (TInt aItemHeight)
-	{
-	//	we need to update the iItemHeight member in widget also (there are two different item height value holders - in widget and here in widget view)
-	iItemHeight = aItemHeight;
+  {
+  //	we need to update the iItemHeight member in widget also (there are two different item height value holders - in widget and here in widget view)
+  iItemHeight = aItemHeight;
 
-	CMmListBoxItemDrawer* itemDrawer =
-			STATIC_CAST( CMmListBoxItemDrawer*, ItemDrawer() );
-	static_cast<CMmListBox*>(itemDrawer->Widget())->SetItemHeight( aItemHeight );
+  CMmListBoxItemDrawer* itemDrawer =
+      STATIC_CAST( CMmListBoxItemDrawer*, ItemDrawer() );
+  static_cast<CMmListBox*>(itemDrawer->Widget())->SetItemHeight( aItemHeight );
 
-	}
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 TInt CMmListBoxView::CalcNewTopItemIndexSoItemIsVisible (TInt aItemIndex) const
-	{
-	CMmListBoxItemDrawer* itemDrawer =
+  {
+  CMmListBoxItemDrawer* itemDrawer =
             static_cast<CMmListBoxItemDrawer*>( iItemDrawer );
 
-	TInt newTopItemIndex = iTopItemIndex;
+  TInt newTopItemIndex = iTopItemIndex;
 
-	TInt itemHeight = itemDrawer->
-		GetItemHeight( aItemIndex, aItemIndex == CurrentItemIndex() );
+  TInt itemHeight = itemDrawer->
+    GetItemHeight( aItemIndex, aItemIndex == CurrentItemIndex() );
 
-	// ItemIsPartiallyVisible uses fixed iItemHeight, but we have to support
-	// variable item height in lists, unfortunately ItemIsPartiallyVisible
-	// is not virtual
+  // ItemIsPartiallyVisible uses fixed iItemHeight, but we have to support
+  // variable item height in lists, unfortunately ItemIsPartiallyVisible
+  // is not virtual
     TPoint itemPosition( ItemPos( aItemIndex ) );
     TBool itemPartiallyVisible =
         ( itemPosition.iY < iViewRect.iTl.iY &&
@@ -505,24 +448,24 @@
         ( itemPosition.iY <= iViewRect.iBr.iY &&
           itemPosition.iY + itemHeight > iViewRect.iBr.iY );
 
-	TBool itemIsFullyVisible = ItemIsVisible( aItemIndex ) &&
-            !itemPartiallyVisible;
+    TBool itemIsFullyVisible = ItemIsVisible( aItemIndex ) &&
+        !itemPartiallyVisible;
 
-	TBool itemIsAboveVisibleArea = !itemIsFullyVisible &&
+    TBool itemIsAboveVisibleArea = !itemIsFullyVisible &&
             ItemPos( aItemIndex ).iY < ViewRect().iTl.iY;
 
-	TBool itemIsBeneathVisibleArea = !itemIsFullyVisible &&
+    TBool itemIsBeneathVisibleArea = !itemIsFullyVisible &&
             !itemIsAboveVisibleArea && ItemPos( aItemIndex ).iY + itemDrawer->
             GetItemHeight( aItemIndex, aItemIndex == CurrentItemIndex() ) >
             ViewRect().iBr.iY;
 
-	if ( itemIsAboveVisibleArea )
-	    {
-	    newTopItemIndex = aItemIndex;
-	    const_cast<CMmListBoxView*>( this )->SetItemOffsetInPixels( 0 );
-	    }
+    if ( itemIsAboveVisibleArea )
+        {
+        newTopItemIndex = aItemIndex;
+        const_cast<CMmListBoxView*>( this )->SetItemOffsetInPixels( 0 );
+        }
 
-	if ( itemIsBeneathVisibleArea )
+    if ( itemIsBeneathVisibleArea )
         {
         const TInt viewHeight = ViewRect().Height();
         newTopItemIndex = aItemIndex;
@@ -539,16 +482,16 @@
             }
         }
 
-	return newTopItemIndex;
-	}
+  return newTopItemIndex;
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMmListBoxView::RedrawBackground (TRect aUsedPortionOfViewRect,
-		TRect aSmallerViewRect) const
-	{
+    TRect aSmallerViewRect) const
+  {
 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
         MAknListBoxTfxInternal* transApi = CAknListLoader::TfxApiInternal(iGc);
     if (transApi)
@@ -557,12 +500,12 @@
         }
 #endif
 
-	CMmListBoxItemDrawer* itemDrawer = STATIC_CAST( CMmListBoxItemDrawer*, iItemDrawer );
+  CMmListBoxItemDrawer* itemDrawer = STATIC_CAST( CMmListBoxItemDrawer*, iItemDrawer );
     MAknsSkinInstance *skin = AknsUtils::SkinInstance();
     CCoeControl* control = itemDrawer->FormattedCellData()->Control();
     MAknsControlContext *cc = AknsDrawUtils::ControlContext(control);
 
-	if (control)
+  if (control)
         {
         AknsDrawUtils::BackgroundBetweenRects(skin, cc, control, *iGc,
                 aSmallerViewRect, aUsedPortionOfViewRect);
@@ -580,7 +523,7 @@
         transApi->StopDrawing();
         }
 #endif
-	}
+  }
 
 // -----------------------------------------------------------------------------
 //
@@ -607,62 +550,62 @@
 
     RedrawBackground(usedPortionOfViewRect, iViewRect);
 #endif
-	}
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMmListBoxView::SetPreviouslyDrawnCurrentItemIndex( TBool aIndex )
-	{
-	iPreviouslyDrawnCurrentItemIndex = aIndex;
-	}
+  {
+  iPreviouslyDrawnCurrentItemIndex = aIndex;
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMmListBoxView::DrawSingleItem (TInt aItemIndex) const
-	{
-	CMmListBoxItemDrawer* itemDrawer =
+  {
+  CMmListBoxItemDrawer* itemDrawer =
             STATIC_CAST( CMmListBoxItemDrawer*, iItemDrawer );
-	TBool highlightVisible = !( itemDrawer->Flags()
-	        & CListItemDrawer::ESingleClickDisabledHighlight );
-	TSize size = itemDrawer->GetItemSize( aItemIndex, highlightVisible &&
-	        CurrentItemIndex() == aItemIndex );
-	itemDrawer->SetItemCellSize( size );
+  TBool highlightVisible = !( itemDrawer->Flags()
+          & CListItemDrawer::ESingleClickDisabledHighlight );
+  TSize size = itemDrawer->GetItemSize( aItemIndex, highlightVisible &&
+          CurrentItemIndex() == aItemIndex );
+  itemDrawer->SetItemCellSize( size );
 
-	// CMmListBoxView* view= CONST_CAST( CMmListBoxView*, this );
-	// view->SetItemHeight( size.iHeight );
-	// The above line (currently commented-out) was originaly needed to correct
-	// some drawing-related error which used to occur when moving highlight with
-	// rocker keys. It seems that this is no longer needed. If anything should
-	// change, please note that now the SetItemHeight method does much more than
-	// it used to, so simply uncommenting this line would be a bad idea (consider
-	// setting the iItemHeight member variable directly).
+  // CMmListBoxView* view= CONST_CAST( CMmListBoxView*, this );
+  // view->SetItemHeight( size.iHeight );
+  // The above line (currently commented-out) was originaly needed to correct
+  // some drawing-related error which used to occur when moving highlight with
+  // rocker keys. It seems that this is no longer needed. If anything should
+  // change, please note that now the SetItemHeight method does much more than
+  // it used to, so simply uncommenting this line would be a bad idea (consider
+  // setting the iItemHeight member variable directly).
 
-	CFormattedCellListBoxView::DrawItem (aItemIndex);
+  CFormattedCellListBoxView::DrawItem (aItemIndex);
 
-	//To eliminate the effect of undrawn fragment of background, when the last
-	//is drawn, background is refreshed
-	if ( aItemIndex == ( iModel->NumberOfItems()-1 ) && ItemIsVisible( iModel->NumberOfItems()-1 ) )
-		{
-		CMmListBoxItemDrawer* itemDrawer= STATIC_CAST( CMmListBoxItemDrawer*, iItemDrawer );
-		if ( !itemDrawer->IsEditMode() )
-			{
-			RedrawBackground();
-			}
-		}
-	}
+  //To eliminate the effect of undrawn fragment of background, when the last
+  //is drawn, background is refreshed
+  if ( aItemIndex == ( iModel->NumberOfItems()-1 ) && ItemIsVisible( iModel->NumberOfItems()-1 ) )
+    {
+    CMmListBoxItemDrawer* itemDrawer= STATIC_CAST( CMmListBoxItemDrawer*, iItemDrawer );
+    if ( !itemDrawer->IsEditMode() )
+      {
+      RedrawBackground();
+      }
+    }
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 TInt CMmListBoxView::VerticalItemOffset() const
-	{
-	return iVerticalOffset;
-	}
+  {
+  return iVerticalOffset;
+  }
 
 // -----------------------------------------------------------------------------
 //
--- a/menufw/menufwui/mmwidgets/src/mmtemplatelibrary.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/menufw/menufwui/mmwidgets/src/mmtemplatelibrary.cpp	Tue May 11 16:02:39 2010 +0300
@@ -52,21 +52,21 @@
 // ---------------------------------------------------------------------------
 //:
 CMmTemplateLibrary::CMmTemplateLibrary()
-	: iWidgetType(EWidgetTypeNone),
-	iTemplateSizesMap( &HBuf16Hash, &HBuf16Ident ),
-	iTemplateChildrenMap( &HBuf16Hash, &HBuf16Ident ),
-	iMoveIndicatorRectsMap( &HBuf16Hash, &HBuf16Ident )
-	{
-	// No implementation required
-	}
+  : iWidgetType(EWidgetTypeNone),
+  iTemplateSizesMap( &HBuf16Hash, &HBuf16Ident ),
+  iTemplateChildrenMap( &HBuf16Hash, &HBuf16Ident ),
+  iMoveIndicatorRectsMap( &HBuf16Hash, &HBuf16Ident )
+  {
+  // No implementation required
+  }
 // ---------------------------------------------------------------------------
 //
 // ---------------------------------------------------------------------------
 //
 CMmTemplateLibrary::~CMmTemplateLibrary()
-	{
-	CleanAndClearCache();
-	}
+  {
+  CleanAndClearCache();
+  }
 // ---------------------------------------------------------------------------
 //
 // ---------------------------------------------------------------------------
@@ -74,27 +74,27 @@
 void CMmTemplateLibrary::CleanAndClearCache( )
     {
 
-	THashMapIter<HBufC8*, TSize> iter( iTemplateSizesMap );
-	while ( HBufC8* const * ptr = iter.NextKey() )
-		{
-		delete *ptr;
-		}
-	iTemplateSizesMap.Close();
+  THashMapIter<HBufC8*, TSize> iter( iTemplateSizesMap );
+  while ( HBufC8* const * ptr = iter.NextKey() )
+    {
+    delete *ptr;
+    }
+  iTemplateSizesMap.Close();
 
-	THashMapIter<HBufC8*, RArray<TTemplateChild> > iter2( iTemplateChildrenMap );
-	while ( HBufC8* const * ptr = iter2.NextKey() )
-		{
-		iter2.CurrentValue()->Close();
-		delete *ptr;
-		}
-	iTemplateChildrenMap.Close();
+  THashMapIter<HBufC8*, RArray<TTemplateChild> > iter2( iTemplateChildrenMap );
+  while ( HBufC8* const * ptr = iter2.NextKey() )
+    {
+    iter2.CurrentValue()->Close();
+    delete *ptr;
+    }
+  iTemplateChildrenMap.Close();
 
-	THashMapIter<HBufC8*, TRect> iter4( iMoveIndicatorRectsMap );
-	while ( HBufC8* const * ptr = iter4.NextKey() )
-		{
-		delete *ptr;
-		}
-	iMoveIndicatorRectsMap.Close();
+  THashMapIter<HBufC8*, TRect> iter4( iMoveIndicatorRectsMap );
+  while ( HBufC8* const * ptr = iter4.NextKey() )
+    {
+    delete *ptr;
+    }
+  iMoveIndicatorRectsMap.Close();
 
     }
 
@@ -103,11 +103,11 @@
 // ---------------------------------------------------------------------------
 //
 EXPORT_C CMmTemplateLibrary* CMmTemplateLibrary::NewL()
-	{
-	CMmTemplateLibrary* self = CMmTemplateLibrary::NewLC();
-	CleanupStack::Pop( self );
-	return self;
-	}
+  {
+  CMmTemplateLibrary* self = CMmTemplateLibrary::NewLC();
+  CleanupStack::Pop( self );
+  return self;
+  }
 
 // ---------------------------------------------------------------------------
 //
@@ -126,22 +126,22 @@
 // ---------------------------------------------------------------------------
 //
 void CMmTemplateLibrary::ConstructL()
-	{
-	//No implementation needed.
-	}
+  {
+  //No implementation needed.
+  }
 
 // ---------------------------------------------------------------------------
 //
 // ---------------------------------------------------------------------------
 //
 TSize CMmTemplateLibrary::GetSize(  TMmWidgetType aWidgetType, const TDesC8& aTemplate,
-		TBool aLandscapeOrientation, TBool aHighlighted, TRect aParentRect )
-	{
-	TSize result;
-	GetSize(result, aWidgetType, aTemplate, aLandscapeOrientation,
-			aHighlighted, aParentRect );
-	return result;
-	}
+    TBool aLandscapeOrientation, TBool aHighlighted, TRect aParentRect )
+  {
+  TSize result;
+  GetSize(result, aWidgetType, aTemplate, aLandscapeOrientation,
+      aHighlighted, aParentRect );
+  return result;
+  }
 
 // ---------------------------------------------------------------------------
 //
@@ -152,7 +152,7 @@
         TBool aLandscapeOrientation, TBool aHighlighted, TRect aParentRect )
     {
     if ( KNullDesC8()== aTemplate || aParentRect == TRect(TPoint(0,0), TPoint(0,0))
-    		|| !aTemplate.Compare( KEmpty8 ) )
+        || !aTemplate.Compare( KEmpty8 ) )
         {
         return KErrNotFound;
         }
@@ -169,10 +169,10 @@
         if ( err == KErrNone )
             {
             itemSize = iTemplateSizesMap.Find( lookup_string );
-        	if( !itemSize )
-        		{
+          if( !itemSize )
+            {
                 User::Panic( KMtlPanic, KErrNotFound );
-        		}
+            }
             aItemSize = *itemSize;
             }
         }
@@ -189,7 +189,7 @@
             }
         aItemSize = *itemSize;
         }
-	delete lookup_string;
+  delete lookup_string;
 
     return err;
     }
@@ -199,144 +199,146 @@
 // ---------------------------------------------------------------------------
 //
 TSize CMmTemplateLibrary::GetLayoutSizeL( TMmWidgetType aWidgetType, const TDesC8& aTemplate,
-		TBool aLandscapeOrientation )
-	{
-	if ( KNullDesC8()== aTemplate )
-		{
-		User::Leave( -1 );
-		}
-	TSize* layoutSize = NULL;
-	switch ( aWidgetType )
-		{
-		case EGrid:
-			{
-		    HBufC8* lookup_string = LookupLayoutText( aWidgetType,
+    TBool aLandscapeOrientation )
+  {
+  if ( KNullDesC8()== aTemplate )
+    {
+    User::Leave( -1 );
+    }
+  TSize* layoutSize = NULL;
+  switch ( aWidgetType )
+    {
+    case EGrid:
+      {
+        HBufC8* lookup_string = LookupLayoutText( aWidgetType,
                 aTemplate, aLandscapeOrientation );
-			CleanupStack::PushL( lookup_string );
-		    layoutSize = iTemplateSizesMap.Find( lookup_string );
-		    if (!layoutSize)
-		        {
-		        LoadTemplateL( aWidgetType, aTemplate, aLandscapeOrientation );
-		        layoutSize = iTemplateSizesMap.Find( lookup_string );
-		        if( !layoutSize )
-		            User::Panic( KMtlPanic, -1);
-		        }
-			CleanupStack::PopAndDestroy( lookup_string );
-			}
+      CleanupStack::PushL( lookup_string );
+        layoutSize = iTemplateSizesMap.Find( lookup_string );
+        if (!layoutSize)
+            {
+            LoadTemplateL( aWidgetType, aTemplate, aLandscapeOrientation );
+            layoutSize = iTemplateSizesMap.Find( lookup_string );
+            if( !layoutSize )
+                User::Panic( KMtlPanic, -1);
+            }
+      CleanupStack::PopAndDestroy( lookup_string );
+      }
 
-			break;
-		case EListbox:
-			return TSize( MmListBox::KCols,0 );
-		default:
-			User::Panic( KMtlPanic, -1);
-		}
-	return *layoutSize;
-	}
+      break;
+    case EListbox:
+      return TSize( MmListBox::KCols,0 );
+    default:
+      User::Panic( KMtlPanic, -1);
+    }
+  return *layoutSize;
+  }
 
 // ---------------------------------------------------------------------------
 //
 // ---------------------------------------------------------------------------
 //
 TRect CMmTemplateLibrary::GetMoveIndicatorRect(TMmWidgetType aWidgetType,
-		const TDesC8& aTemplate, TBool aLandscapeOrientation,
-		TBool aHighlighted)
-	{
-	ASSERT( KNullDesC8() != aTemplate && aTemplate.Compare( KEmpty8 ) );
+    const TDesC8& aTemplate, TBool aLandscapeOrientation,
+    TBool aHighlighted)
+  {
+  ASSERT( KNullDesC8() != aTemplate && aTemplate.Compare( KEmpty8 ) );
 
-	HBufC8* lookup_string = LookupText(aTemplate, aWidgetType,
+  HBufC8* lookup_string = LookupText(aTemplate, aWidgetType,
         aLandscapeOrientation, aHighlighted );
-	HBufC8* lookup_indicator_string = LookupIndicatorText( *lookup_string );
+  HBufC8* lookup_indicator_string = LookupIndicatorText( *lookup_string );
 
-	TRect* itemRect = iMoveIndicatorRectsMap.Find( lookup_indicator_string );
+  TRect* itemRect = iMoveIndicatorRectsMap.Find( lookup_indicator_string );
     if (!itemRect)
         {
-    	TSize itemSize;
-    	GetSize( itemSize, aWidgetType, aTemplate, aLandscapeOrientation, EFalse, GetParentRect( aLandscapeOrientation ) );
-    	TRAPD( err, SetupMoveIndicatorTemplateChildrenL(
-    	        *lookup_indicator_string, itemSize ) );
-    	if ( KErrNone == err )
-    	    {
+      TSize itemSize;
+      GetSize( itemSize, aWidgetType, aTemplate, aLandscapeOrientation, EFalse, GetParentRect( aLandscapeOrientation ) );
+      TRAPD( err, SetupMoveIndicatorTemplateChildrenL(
+              *lookup_indicator_string, itemSize ) );
+      if ( KErrNone == err )
+          {
             itemRect = iMoveIndicatorRectsMap.Find( lookup_indicator_string );
             if (!itemRect)
                 {
                 User::Panic( KMtlPanic, -1);
                 }
-    	    }
+          }
         }
 
     delete lookup_indicator_string;
     delete lookup_string;
     return *itemRect;
-	}
+  }
 
 // ---------------------------------------------------------------------------
 //
 // ---------------------------------------------------------------------------
 //
 void CMmTemplateLibrary::GetChildrenL(TMmWidgetType aWidgetType, RArray<
-		TTemplateChild>& aArray, const TDesC8& aTemplate,
-		TBool aLandscapeOrientation, TBool aHighlighted, TBool aIsEditMode)
-	{
-	ASSERT( KNullDesC8() != aTemplate && aTemplate.Compare( KEmpty8 ) );
+    TTemplateChild>& aArray, const TDesC8& aTemplate,
+    TBool aLandscapeOrientation, TBool aHighlighted, TBool aIsEditMode)
+    {
+    ASSERT( KNullDesC8() != aTemplate && aTemplate.Compare( KEmpty8 ) );
 
-	HBufC8* lookup_string = LookupText( aTemplate, aWidgetType,
-        aLandscapeOrientation, aHighlighted );
-	CleanupStack::PushL( lookup_string );
+    HBufC8* lookup_string = LookupText( aTemplate, aWidgetType,
+            aLandscapeOrientation, aHighlighted );
+    CleanupStack::PushL( lookup_string );
     RArray<TTemplateChild>* children = iTemplateChildrenMap.Find( lookup_string );
     if ( !children )
         {
         LoadTemplateL( aWidgetType, aTemplate, aLandscapeOrientation );
         children = iTemplateChildrenMap.Find( lookup_string );
         if (!children)
-        	{
+            {
             User::Panic( KMtlPanic, -1);
-        	}
+            }
         }
     CleanupStack::PopAndDestroy( lookup_string );
     for (TInt i = 0; i < children->Count(); i++)
-    	aArray.AppendL((*children)[i]);
+        aArray.AppendL((*children)[i]);
     if ( aIsEditMode )
-    	{
-    	TSize size = GetSize( aWidgetType, aTemplate, aLandscapeOrientation, aHighlighted, GetParentRect(aLandscapeOrientation) );
-        AppendEditModeTemplateL( aArray, size );
-    	}
-	}
+        {
+          TSize size = GetSize( aWidgetType, aTemplate, aLandscapeOrientation, aHighlighted, GetParentRect(aLandscapeOrientation) );
+          AppendEditModeTemplateL( aArray, size );
+        }
+    }
 
 // ---------------------------------------------------------------------------
 //
 // ---------------------------------------------------------------------------
 //
 void CMmTemplateLibrary::GetMoveIndicatorChildrenL(TMmWidgetType aWidgetType,
-		RArray<TTemplateChild>& aArray, const TDesC8& aTemplate,
-		TBool aLandscapeOrientation, TBool aHighlighted)
-	{
-	ASSERT( KNullDesC8() != aTemplate && aTemplate.Compare( KEmpty8 ) );
+    RArray<TTemplateChild>& aArray, const TDesC8& aTemplate,
+    TBool aLandscapeOrientation, TBool aHighlighted)
+    {
+    ASSERT( KNullDesC8() != aTemplate && aTemplate.Compare( KEmpty8 ) );
 
-	HBufC8* lookup_string = LookupText(aTemplate, aWidgetType,
-        aLandscapeOrientation, aHighlighted );
-	CleanupStack::PushL( lookup_string );
-	HBufC8* lookup_indicator_string = LookupIndicatorText( *lookup_string );
-	CleanupStack::PushL( lookup_indicator_string );
+    HBufC8* lookup_string = LookupText(aTemplate, aWidgetType,
+            aLandscapeOrientation, aHighlighted );
+    CleanupStack::PushL( lookup_string );
+    HBufC8* lookup_indicator_string = LookupIndicatorText( *lookup_string );
+    CleanupStack::PushL( lookup_indicator_string );
 
-    RArray<TTemplateChild>* children = iTemplateChildrenMap.Find( lookup_indicator_string );
+    RArray<TTemplateChild>* children = iTemplateChildrenMap.Find(
+            lookup_indicator_string );
     if ( !children )
-    	{
-    	TSize itemSize;
-    	GetSize( itemSize, aWidgetType, aTemplate, aLandscapeOrientation, EFalse, GetParentRect( aLandscapeOrientation ) );
+        {
+        TSize itemSize;
+        GetSize( itemSize, aWidgetType, aTemplate, aLandscapeOrientation,
+                EFalse, GetParentRect( aLandscapeOrientation ) );
         SetupMoveIndicatorTemplateChildrenL( *lookup_indicator_string, itemSize );
         children = iTemplateChildrenMap.Find( lookup_indicator_string );
         if (!children)
-        	User::Panic( KMtlPanic, -1);
-    	}
+            User::Panic( KMtlPanic, -1);
+        }
 
     CleanupStack::PopAndDestroy( lookup_indicator_string );
-	CleanupStack::PopAndDestroy( lookup_string );
+    CleanupStack::PopAndDestroy( lookup_string );
 
     for (TInt i = 0; i < children->Count(); i++)
-    	{
-    	aArray.AppendL((*children)[i]);
-    	}
-	}
+        {
+        aArray.AppendL((*children)[i]);
+        }
+    }
 
 // ---------------------------------------------------------------------------
 //
@@ -347,25 +349,25 @@
     {
     HBufC8* lookup_string = HBufC8::New( MmTemplateContants::KTemplateChildTextLength );
     if (lookup_string)
-    	{
-		TPtr8 lookup_string_ptr( lookup_string->Des() );
-		lookup_string_ptr.Append( aTemplate );
-		lookup_string_ptr.Append( KColon8 );
-		switch ( aWidgetType )
-			{
-			case EListbox:
-				lookup_string_ptr.Append( KListbox8 );
-				break;
-			case EGrid:
-				lookup_string_ptr.Append( KGrid8 );
-				break;
-			}
-		lookup_string_ptr.Append( KColon8 );
-		lookup_string_ptr.AppendNum( aLandscapeOrientation );
-		lookup_string_ptr.Append( KColon8 );
-		lookup_string_ptr.AppendNum( aHighlighted );
-		lookup_string_ptr.Append( KColon8 );
-    	}
+      {
+    TPtr8 lookup_string_ptr( lookup_string->Des() );
+    lookup_string_ptr.Append( aTemplate );
+    lookup_string_ptr.Append( KColon8 );
+    switch ( aWidgetType )
+      {
+      case EListbox:
+        lookup_string_ptr.Append( KListbox8 );
+        break;
+      case EGrid:
+        lookup_string_ptr.Append( KGrid8 );
+        break;
+      }
+    lookup_string_ptr.Append( KColon8 );
+    lookup_string_ptr.AppendNum( aLandscapeOrientation );
+    lookup_string_ptr.Append( KColon8 );
+    lookup_string_ptr.AppendNum( aHighlighted );
+    lookup_string_ptr.Append( KColon8 );
+      }
     return lookup_string;
     }
 
@@ -375,59 +377,59 @@
 //
 HBufC8* CMmTemplateLibrary::LookupLayoutText( TMmWidgetType aWidgetType,
         const TDesC8& aTemplate, TBool aLandscapeOrientation )
-	{
+  {
     HBufC8* lookup_string = HBufC8::New( MmTemplateContants::KTemplateChildTextLength );
     if (lookup_string)
-    	{
-		TPtr8 lookup_string_ptr( lookup_string->Des() );
-		switch ( aWidgetType )
-			{
-			case EListbox:
-				lookup_string_ptr.Append( KListbox8 );
-				break;
-			case EGrid:
-				lookup_string_ptr.Append( KGrid8 );
-				break;
-			}
-		lookup_string_ptr.Append( KColon8 );
+      {
+    TPtr8 lookup_string_ptr( lookup_string->Des() );
+    switch ( aWidgetType )
+      {
+      case EListbox:
+        lookup_string_ptr.Append( KListbox8 );
+        break;
+      case EGrid:
+        lookup_string_ptr.Append( KGrid8 );
+        break;
+      }
+    lookup_string_ptr.Append( KColon8 );
         lookup_string_ptr.Append( KColon8 );
-		lookup_string_ptr.Append( aTemplate );
-		lookup_string_ptr.Append( KColon8 );
-		lookup_string_ptr.AppendNum( aLandscapeOrientation );
-    	}
+    lookup_string_ptr.Append( aTemplate );
+    lookup_string_ptr.Append( KColon8 );
+    lookup_string_ptr.AppendNum( aLandscapeOrientation );
+      }
     return lookup_string;
-	}
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 HBufC8* CMmTemplateLibrary::LookupIndicatorText( const TDesC8& aLookupText )
-	{
-	HBufC8* lookup_string = HBufC8::New( MmTemplateContants::KTemplateChildTextLength );
-	if (lookup_string)
-		{
-		TPtr8 lookup_string_ptr( lookup_string->Des() );
-		lookup_string_ptr.Append( KMI8 );
-		lookup_string_ptr.Append( KColon8 );
-		lookup_string_ptr.Append( aLookupText );
-		}
+  {
+  HBufC8* lookup_string = HBufC8::New( MmTemplateContants::KTemplateChildTextLength );
+  if (lookup_string)
+    {
+    TPtr8 lookup_string_ptr( lookup_string->Des() );
+    lookup_string_ptr.Append( KMI8 );
+    lookup_string_ptr.Append( KColon8 );
+    lookup_string_ptr.Append( aLookupText );
+    }
 
-	return lookup_string;
-	}
+  return lookup_string;
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMmTemplateLibrary::LoadTemplateL( TMmWidgetType aWidgetType,
-		const TDesC8& aTemplate, TBool aLandscapeOrientation )
-	{
-	iWidgetType = aWidgetType;
-	DEBUG(("_Mm_:CMmTemplateLibrary::LoadTemplateL IN"));
-	TMmTemplateType mmTemplateType;
-	HBufC8* content = GetTemplateContentL( aTemplate, aWidgetType, mmTemplateType );
-	CleanupStack::PushL( content );
+    const TDesC8& aTemplate, TBool aLandscapeOrientation )
+  {
+  iWidgetType = aWidgetType;
+  DEBUG(("_Mm_:CMmTemplateLibrary::LoadTemplateL IN"));
+  TMmTemplateType mmTemplateType;
+  HBufC8* content = GetTemplateContentL( aTemplate, aWidgetType, mmTemplateType );
+  CleanupStack::PushL( content );
     RXmlEngDOMImplementation domImpl;
     CleanupClosePushL( domImpl );
     RXmlEngDOMParser domParser;
@@ -456,9 +458,9 @@
             if (orientationElement.AttributeValueL(KId8) == KLandscape8)
                 landscapeOrientation = ETrue;
             if ( landscapeOrientation != aLandscapeOrientation )
-            	{
-            	continue;
-            	}
+              {
+              continue;
+              }
             RXmlEngNodeList<TXmlEngElement> elements;
             orientationElement.GetChildElements( elements );
             CleanupClosePushL( elements );
@@ -466,8 +468,8 @@
             while ( elements.HasNext() )
                 {
                 element = elements.Next();
-            	DEBUG(("_Mm_:iMmTemplateType != EMmTemplateMoveIndicator"));
-            	if (element.AttributeValueL(KId8) == KHighlight8)
+              DEBUG(("_Mm_:iMmTemplateType != EMmTemplateMoveIndicator"));
+              if (element.AttributeValueL(KId8) == KHighlight8)
                     {
                     DEBUG(("_Mm_:AttributeValueL - id == highlight"));
                     ProcessElementL( mmTemplateType, element, aTemplate, landscapeOrientation, ETrue );
@@ -503,20 +505,20 @@
 // -----------------------------------------------------------------------------
 //
 void CMmTemplateLibrary::ProcessElementL(TMmTemplateType aMmTemplateType,
-										 TXmlEngElement aElement,
+                     TXmlEngElement aElement,
                                          const TDesC8& aTemplate,
                                          TBool aLandscapeOrientation,
                                          TBool aHighlighted )
     {
     switch ( aMmTemplateType )
-	    {
-	    case ETemplateTypeLCT:
-	    	ProcessLCTTemplateElementL(aElement, aTemplate, aLandscapeOrientation, aHighlighted );
-	    	break;
-	    case ETemplateTypeCustom:
-	    	ProcessCustomTemplateElementL(aElement, aTemplate, aLandscapeOrientation, aHighlighted );
-	    	break;
-	    }
+      {
+      case ETemplateTypeLCT:
+        ProcessLCTTemplateElementL(aElement, aTemplate, aLandscapeOrientation, aHighlighted );
+        break;
+      case ETemplateTypeCustom:
+        ProcessCustomTemplateElementL(aElement, aTemplate, aLandscapeOrientation, aHighlighted );
+        break;
+      }
     }
 
 // -----------------------------------------------------------------------------
@@ -527,64 +529,64 @@
                                          const TDesC8& aTemplate,
                                          TBool aLandscapeOrientation,
                                          TBool aHighlighted )
-	{
-	RXmlEngNodeList<TXmlEngElement> layoutElements;
-	CleanupClosePushL( layoutElements );
-	aElement.GetChildElements( layoutElements );
-	TXmlEngElement layoutElement;
-	TSize itemSize;
-	while ( layoutElements.HasNext() )
-		{
-		layoutElement = layoutElements.Next();
+  {
+  RXmlEngNodeList<TXmlEngElement> layoutElements;
+  CleanupClosePushL( layoutElements );
+  aElement.GetChildElements( layoutElements );
+  TXmlEngElement layoutElement;
+  TSize itemSize;
+  while ( layoutElements.HasNext() )
+    {
+    layoutElement = layoutElements.Next();
 
-		if ( !layoutElement.Name().Compare( KLayout8 ) )
-			{
-			TPtrC8 lctAtt = layoutElement.AttributeValueL(KLct8);
+    if ( !layoutElement.Name().Compare( KLayout8 ) )
+      {
+      TPtrC8 lctAtt = layoutElement.AttributeValueL(KLct8);
 
-			// set layout for grid
-			TInt variety;
-			HnConvUtils::Str8ToInt(layoutElement.AttributeValueL(KVariety8), variety);
+      // set layout for grid
+      TInt variety;
+      HnConvUtils::Str8ToInt(layoutElement.AttributeValueL(KVariety8), variety);
 
-			TSize layoutSize;
-			if ( iWidgetType == EGrid )
-				{
-				layoutSize = MmLCTUtils::GetLayoutSize( lctAtt, variety );
-				CacheLayoutSizeL( layoutSize, aTemplate, aLandscapeOrientation );
-				}
-			else
-				{
-				layoutSize = GetLayoutSizeL( iWidgetType, aTemplate, aLandscapeOrientation );
-				}
+      TSize layoutSize;
+      if ( iWidgetType == EGrid )
+        {
+        layoutSize = MmLCTUtils::GetLayoutSize( lctAtt, variety );
+        CacheLayoutSizeL( layoutSize, aTemplate, aLandscapeOrientation );
+        }
+      else
+        {
+        layoutSize = GetLayoutSizeL( iWidgetType, aTemplate, aLandscapeOrientation );
+        }
 
-			TAknWindowLineLayout layout;
-			TSize itemSize = GetLCTSize( lctAtt, variety, layout, aLandscapeOrientation );
+      TAknWindowLineLayout layout;
+      TSize itemSize = GetLCTSize( lctAtt, variety, layout, aLandscapeOrientation );
 
-			AdjustItemSize( itemSize, layoutSize, aLandscapeOrientation );
-			HBufC8* lookup_string = LookupText( aTemplate, iWidgetType,
+      AdjustItemSize( itemSize, layoutSize, aLandscapeOrientation );
+      HBufC8* lookup_string = LookupText( aTemplate, iWidgetType,
                 aLandscapeOrientation, aHighlighted );
-			iTemplateSizesMap.InsertL( lookup_string, itemSize );
+      iTemplateSizesMap.InsertL( lookup_string, itemSize );
 
-			// setup children
-			RArray< TTemplateChild > childrenDefinition;
-			CleanupClosePushL( childrenDefinition );
-			RXmlEngNodeList<TXmlEngElement> childrenElements;
-			CleanupClosePushL( childrenElements );
-			layoutElement.GetChildElements( childrenElements );
-			TXmlEngElement childElement;
-			while ( childrenElements.HasNext() )
-				{
-				childElement = childrenElements.Next();
-				TPtrC8 name = childElement.Name();
-				if ( !name.Compare( KTextVisual8 ) ||
-						!name.Compare( KImageVisual8 ) )
-					{
-					TTemplateChild childTemplate;
-					childTemplate.iLct = childElement.AttributeValueL(KLct8);
-					TInt variety;
-					HnConvUtils::Str8ToInt(childElement.AttributeValueL(KVariety8), variety);
-					childTemplate.iVariety = variety;
+      // setup children
+      RArray< TTemplateChild > childrenDefinition;
+      CleanupClosePushL( childrenDefinition );
+      RXmlEngNodeList<TXmlEngElement> childrenElements;
+      CleanupClosePushL( childrenElements );
+      layoutElement.GetChildElements( childrenElements );
+      TXmlEngElement childElement;
+      while ( childrenElements.HasNext() )
+        {
+        childElement = childrenElements.Next();
+        TPtrC8 name = childElement.Name();
+        if ( !name.Compare( KTextVisual8 ) ||
+            !name.Compare( KImageVisual8 ) )
+          {
+          TTemplateChild childTemplate;
+          childTemplate.iLct = childElement.AttributeValueL(KLct8);
+          TInt variety;
+          HnConvUtils::Str8ToInt(childElement.AttributeValueL(KVariety8), variety);
+          childTemplate.iVariety = variety;
 
-					TPtrC8 ptr = childElement.AttributeValueL(KHAlign8);
+          TPtrC8 ptr = childElement.AttributeValueL(KHAlign8);
                     if (!ptr.Compare(KNullDesC8))
                         {
                         childTemplate.iHAlign = EManualAlignUndefined;
@@ -602,21 +604,21 @@
                         childTemplate.iHAlign = EManualAlignRight;
                         }
 
-					SetupLCTTemplateL( childTemplate, childElement, itemSize );
-					childrenDefinition.AppendL( childTemplate );
-					}
-				}
-			CleanupStack::PopAndDestroy( &childrenElements );
-			// save children defintion in map
-			lookup_string = LookupText(aTemplate, iWidgetType,
+          SetupLCTTemplateL( childTemplate, childElement, itemSize );
+          childrenDefinition.AppendL( childTemplate );
+          }
+        }
+      CleanupStack::PopAndDestroy( &childrenElements );
+      // save children defintion in map
+      lookup_string = LookupText(aTemplate, iWidgetType,
                 aLandscapeOrientation, aHighlighted );
-			iTemplateChildrenMap.InsertL(lookup_string, childrenDefinition);
-			CleanupStack::Pop( &childrenDefinition );
-			break;
-	        }
+      iTemplateChildrenMap.InsertL(lookup_string, childrenDefinition);
+      CleanupStack::Pop( &childrenDefinition );
+      break;
+          }
         }
     CleanupStack::PopAndDestroy( &layoutElements );
-	}
+  }
 
 // -----------------------------------------------------------------------------
 //
@@ -626,7 +628,7 @@
                                          const TDesC8& aTemplate,
                                          TBool aLandscapeOrientation,
                                          TBool aHighlighted )
-	{
+  {
     RXmlEngNodeList<TXmlEngElement> layoutElements;
     CleanupClosePushL( layoutElements );
     aElement.GetChildElements( layoutElements );
@@ -638,25 +640,25 @@
             {
             TSize itemSize;
             // set sizes
-        	TInt height;
+          TInt height;
             TInt width;
             HBufC8* lookup_string;
 
             HnConvUtils::Str8ToInt(layoutElement.AttributeValueL(KHeight8), height);
             HnConvUtils::Str8ToInt(layoutElement.AttributeValueL(KWidth8), width);
-        	lookup_string = LookupText( aTemplate, iWidgetType,
+          lookup_string = LookupText( aTemplate, iWidgetType,
                 aLandscapeOrientation, aHighlighted );
-        	itemSize = TSize( width, height );
+          itemSize = TSize( width, height );
 
 
             TSize layoutSize = ( aLandscapeOrientation ) ?
-            		TSize( MmGrid::KColsLandscapeZoomNormal, MmGrid::KRowsLandscapeZoomNormal ):
-            		TSize( MmGrid::KColsPortraitZoomNormal, MmGrid::KRowsPortraitZoomNormal ) ;
+                TSize( MmGrid::KColsLandscapeZoomNormal, MmGrid::KRowsLandscapeZoomNormal ):
+                TSize( MmGrid::KColsPortraitZoomNormal, MmGrid::KRowsPortraitZoomNormal ) ;
             layoutSize = ( iWidgetType == EGrid ) ? layoutSize: TSize(MmListBox::KCols,0);
             CacheLayoutSizeL( layoutSize, aTemplate, aLandscapeOrientation );
 
             AdjustItemWidth( itemSize, layoutSize, aLandscapeOrientation );
-        	iTemplateSizesMap.InsertL(lookup_string, itemSize);
+          iTemplateSizesMap.InsertL(lookup_string, itemSize);
 
             // set children
             RArray< TTemplateChild > childrenDefinition;
@@ -680,122 +682,122 @@
                 }
             CleanupStack::PopAndDestroy( &childrenElements );
             // save children defintion in map
-        	lookup_string = LookupText(aTemplate, iWidgetType,
+          lookup_string = LookupText(aTemplate, iWidgetType,
                 aLandscapeOrientation, aHighlighted );
-        	iTemplateChildrenMap.InsertL(lookup_string, childrenDefinition);
-        	CleanupStack::Pop( &childrenDefinition );
+          iTemplateChildrenMap.InsertL(lookup_string, childrenDefinition);
+          CleanupStack::Pop( &childrenDefinition );
             // we found first layout, it is enough
             break;
             }
         }
     CleanupStack::PopAndDestroy( &layoutElements );
-	}
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 HBufC8* CMmTemplateLibrary::GetTemplateContentL(const TDesC8& aTemplate,
-		TMmWidgetType aWidgetType, TMmTemplateType& aMmTemplateType)
-	{
-	HBufC8* content;
-	TRAPD( err , GetTemplateFileContentL( content, aTemplate, aWidgetType, aMmTemplateType ) );
-	if ( KErrNone != err || !content )
-		{
+    TMmWidgetType aWidgetType, TMmTemplateType& aMmTemplateType)
+  {
+  HBufC8* content;
+  TRAPD( err , GetTemplateFileContentL( content, aTemplate, aWidgetType, aMmTemplateType ) );
+  if ( KErrNone != err || !content )
+    {
 //		if LCT template was not loaded try to load a custom template
-		TRAPD( err , GetTemplateFileContentL( content, aTemplate, aWidgetType, aMmTemplateType, ETrue ) );
-		if ( KErrNoMemory == err )
-		    {
-		    User::Leave( KErrNoMemory );
-		    }
-		if ( KErrNone != err || !content )
-			{
-			User::Panic(KMtlPanic, -1);
-			}
-		}
-	return content;
-	}
+    TRAPD( err , GetTemplateFileContentL( content, aTemplate, aWidgetType, aMmTemplateType, ETrue ) );
+    if ( KErrNoMemory == err )
+        {
+        User::Leave( KErrNoMemory );
+        }
+    if ( KErrNone != err || !content )
+      {
+      User::Panic(KMtlPanic, -1);
+      }
+    }
+  return content;
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMmTemplateLibrary::GetTemplateFileContentL( HBufC8*& aContent,
-		const TDesC8& aTemplate, TMmWidgetType aWidgetType,
-		TMmTemplateType& aMmTemplateType, TBool aLoadCustomTemplate )
-	{
+    const TDesC8& aTemplate, TMmWidgetType aWidgetType,
+    TMmTemplateType& aMmTemplateType, TBool aLoadCustomTemplate )
+  {
     DEBUG(("_Mm_:CMmTemplateLibrary::GetTemplateContentL IN"));
     TFileName filename;
 //  create filename  egz: akn_logical_template_3.xml
-	filename.Copy(aTemplate);
-	filename.Insert(0, KUnderline );
-	filename.Insert(0, KAkn );
-	filename.Append( KXmlExt );
+  filename.Copy(aTemplate);
+  filename.Insert(0, KUnderline );
+  filename.Insert(0, KAkn );
+  filename.Append( KXmlExt );
 
 //  append path egz: z:\\resource\\grid\\lct\\akn_logical_template_3.xml
 
-	if ( !aLoadCustomTemplate )
-		{
-		filename.Insert(0, KBslash );
-		filename.Insert(0, KLct );
-		}
-	else
-		{
-		filename.Insert(0, KBslash );
-		filename.Insert(0, KCustom );
-		}
+  if ( !aLoadCustomTemplate )
+    {
+    filename.Insert(0, KBslash );
+    filename.Insert(0, KLct );
+    }
+  else
+    {
+    filename.Insert(0, KBslash );
+    filename.Insert(0, KCustom );
+    }
 
-	switch (aWidgetType)
-		{
-		case EGrid:
-			filename.Insert(0, KBslash );
-			filename.Insert(0, KWidgetTypeGrid);
-			break;
-		case EListbox:
-			filename.Insert(0, KBslash );
-			filename.Insert(0, KWidgetTypeList );
-			break;
-		}
+  switch (aWidgetType)
+    {
+    case EGrid:
+      filename.Insert(0, KBslash );
+      filename.Insert(0, KWidgetTypeGrid);
+      break;
+    case EListbox:
+      filename.Insert(0, KBslash );
+      filename.Insert(0, KWidgetTypeList );
+      break;
+    }
 
-	filename.Insert(0, KZResource );
+  filename.Insert(0, KZResource );
 
-	DEBUG(("\t_Mm_:tail: %S", &filename));
+  DEBUG(("\t_Mm_:tail: %S", &filename));
     DEBUG(("_Mm_:CMmTemplateLibrary::GetTemplateContentL OUT"));
 
 //  load LCT Template or if it does not exist then load custom template
     aContent =  HnUtils::ReadFileLC(filename);
-	CleanupStack::Pop( aContent );
+  CleanupStack::Pop( aContent );
 
-	if ( aLoadCustomTemplate )
-		{
-		aMmTemplateType = ETemplateTypeCustom;
-		}
-	else
-		{
-		aMmTemplateType = ETemplateTypeLCT;
-		}
-	return;
-	}
+  if ( aLoadCustomTemplate )
+    {
+    aMmTemplateType = ETemplateTypeCustom;
+    }
+  else
+    {
+    aMmTemplateType = ETemplateTypeLCT;
+    }
+  return;
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 TSize CMmTemplateLibrary::GetLCTSize( const TDesC8& aLCTTemplate, TInt aVariety,
-		TAknWindowLineLayout& aWindowLayout, TBool aLandscapeOrientation )
-	{
-	TSize size = MmLCTUtils::GetLCTSize( aLCTTemplate, aVariety,
-			GetParentRect( aLandscapeOrientation ), aWindowLayout );
-	return size;
-	}
+    TAknWindowLineLayout& aWindowLayout, TBool aLandscapeOrientation )
+  {
+  TSize size = MmLCTUtils::GetLCTSize( aLCTTemplate, aVariety,
+      GetParentRect( aLandscapeOrientation ), aWindowLayout );
+  return size;
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMmTemplateLibrary::SetupLCTTemplateL(TTemplateChild& aChildTemplate,
-		TXmlEngElement& aChildElement, TSize aItemSize )
-	{
+    TXmlEngElement& aChildElement, TSize aItemSize )
+  {
     TPtrC8 name = aChildElement.Name();
     aChildTemplate.iData = aChildElement.AttributeValueL(KId8);
     SetupTemplateVisualId( aChildTemplate );
@@ -822,17 +824,17 @@
             }
         }
     CleanupStack::PopAndDestroy( &attributeElements );
-	}
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMmTemplateLibrary::SetupCustomTemplateL(TTemplateChild& aChildTemplate,
-		TXmlEngElement& aChildElement)
-	{
+    TXmlEngElement& aChildElement)
+  {
     TPtrC8 name = aChildElement.Name();
-	TInt positionx; TInt positiony;
+  TInt positionx; TInt positiony;
     TInt height; TInt width;
 
     HnConvUtils::Str8ToInt(aChildElement.AttributeValueL(KPositionX8), positionx);
@@ -888,42 +890,42 @@
         }
 
     CleanupStack::PopAndDestroy( &attributeElements );
-	}
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMmTemplateLibrary::SetupTemplateVisualId(TTemplateChild& aChildTemplate )
-	{
-	if( !aChildTemplate.iData.Compare( KMmBackdropIcon8 ))
+  {
+  if( !aChildTemplate.iData.Compare( KMmBackdropIcon8 ))
         {
         aChildTemplate.iImageVisualId = EImageVisualIdEditMode;
         }
-	else
-		{
-		aChildTemplate.iImageVisualId = EImageVisualIdNormalMode;
-		}
-	}
+  else
+    {
+    aChildTemplate.iImageVisualId = EImageVisualIdNormalMode;
+    }
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMmTemplateLibrary::AppendEditModeTemplateL(
-		RArray<TTemplateChild>& aTemplateArray, TSize aSize)
-	{
+    RArray<TTemplateChild>& aTemplateArray, TSize aSize)
+    {
     //setup backdrop icon
     TTemplateChild childTemplate;
     childTemplate.iIsImage = ETrue;
     childTemplate.iFontId = EAknLogicalFontSecondaryFont;
     childTemplate.iTextAlign = CGraphicsContext::ELeft;
     childTemplate.iRectAccordingToParent = TRect( TPoint( 0,0 ),
-    		TPoint( aSize.iWidth, aSize.iHeight ) );
+        TPoint( aSize.iWidth, aSize.iHeight ) );
     childTemplate.iData = TBufC8< MmTemplateContants::KTemplateChildTextLength >( KMmBackdropIcon8 );
     SetupTemplateVisualId( childTemplate );
     aTemplateArray.AppendL( childTemplate );
-	}
+  }
 
 
 // -----------------------------------------------------------------------------
@@ -931,78 +933,78 @@
 // -----------------------------------------------------------------------------
 //
 void CMmTemplateLibrary::SetupMoveIndicatorTemplateChildrenL(
-		const TDesC8& aLookupString, TSize aItemSize )
-	{
-	RArray< TTemplateChild > childrenDefinition;
+    const TDesC8& aLookupString, TSize aItemSize )
+  {
+  RArray< TTemplateChild > childrenDefinition;
     TTemplateChild childTemplate;
     childTemplate.iIsImage = ETrue;
     childTemplate.iImageVisualId = EImageVisualIdNormalMode;
     childTemplate.iFontId = EAknLogicalFontSecondaryFont;
     childTemplate.iTextAlign = CGraphicsContext::ELeft;
-	TPoint startingPosition = TPoint(
-			MmTemplateContants::KMoveIndicatorStartingPos,
-			MmTemplateContants::KMoveIndicatorStartingPos);
+  TPoint startingPosition = TPoint(
+      MmTemplateContants::KMoveIndicatorStartingPos,
+      MmTemplateContants::KMoveIndicatorStartingPos);
 
     //setup move_indicator_arrow_left
     childTemplate.iRectAccordingToParent = TRect(TPoint(0,aItemSize.iHeight/2 + startingPosition.iY/2),
-    		TPoint(startingPosition.iX,
-    				startingPosition.iY*3/2 + aItemSize.iHeight/2));
+        TPoint(startingPosition.iX,
+            startingPosition.iY*3/2 + aItemSize.iHeight/2));
     childTemplate.iData = TBufC8< MmTemplateContants::KTemplateChildTextLength>(
-    		KMmMoveIndicatorArrowLeft8 );
+        KMmMoveIndicatorArrowLeft8 );
     childrenDefinition.AppendL( childTemplate );
 
     //setup move_indicator_arrow_right
     childTemplate.iRectAccordingToParent = TRect(
-    		TPoint(startingPosition.iX + aItemSize.iWidth , aItemSize.iHeight/2 + startingPosition.iY/2),
-    		TPoint(startingPosition.iX*2 + aItemSize.iWidth,
-    				startingPosition.iY*3/2 + aItemSize.iHeight/2));
+        TPoint(startingPosition.iX + aItemSize.iWidth , aItemSize.iHeight/2 + startingPosition.iY/2),
+        TPoint(startingPosition.iX*2 + aItemSize.iWidth,
+            startingPosition.iY*3/2 + aItemSize.iHeight/2));
     childTemplate.iData = TBufC8< MmTemplateContants::KTemplateChildTextLength>(
-    		KMmMoveIndicatorArrowRight8 );
+        KMmMoveIndicatorArrowRight8 );
     childrenDefinition.AppendL( childTemplate );
 
     //setup move_indicator_arrow_top
     childTemplate.iRectAccordingToParent = TRect(TPoint( aItemSize.iWidth/2 + startingPosition.iX/2, 0 ),
-    		TPoint(aItemSize.iWidth/2 + startingPosition.iX*3/2, startingPosition.iY));
+        TPoint(aItemSize.iWidth/2 + startingPosition.iX*3/2, startingPosition.iY));
     childTemplate.iData = TBufC8< MmTemplateContants::KTemplateChildTextLength >(
-    		KMmMoveIndicatorArrowTop8 );
+        KMmMoveIndicatorArrowTop8 );
     childrenDefinition.AppendL( childTemplate );
 
     //setup move_indicator_arrow_bottom
     childTemplate.iRectAccordingToParent = TRect( TPoint( aItemSize.iWidth/2 + startingPosition.iX/2,
-    		aItemSize.iHeight + startingPosition.iY + 2 ),
-    		TPoint(aItemSize.iWidth/2 + startingPosition.iX*3/2,
-    				aItemSize.iHeight + 2 *startingPosition.iY));
+        aItemSize.iHeight + startingPosition.iY + 2 ),
+        TPoint(aItemSize.iWidth/2 + startingPosition.iX*3/2,
+            aItemSize.iHeight + 2 *startingPosition.iY));
     childTemplate.iData = TBufC8< MmTemplateContants::KTemplateChildTextLength>(
-    		KMmMoveIndicatorArrowBottom8 );
+        KMmMoveIndicatorArrowBottom8 );
     childrenDefinition.AppendL( childTemplate );
 
-	HBufC8* lookup_string = aLookupString.AllocLC();
-	iTemplateChildrenMap.InsertL(lookup_string, childrenDefinition);
-	CleanupStack::Pop( lookup_string );
-	lookup_string = NULL;
+  HBufC8* lookup_string = aLookupString.AllocLC();
+  iTemplateChildrenMap.InsertL(lookup_string, childrenDefinition);
+  CleanupStack::Pop( lookup_string );
+  lookup_string = NULL;
 
     lookup_string = aLookupString.AllocLC();
-	TRect rectAccordingToParent = TRect(
-			TPoint( -startingPosition.iX, -startingPosition.iY),
-			TPoint(2*startingPosition.iX + aItemSize.iWidth ,
-					2*startingPosition.iY + aItemSize.iHeight) );
+  TRect rectAccordingToParent = TRect(
+      TPoint( -startingPosition.iX, -startingPosition.iY),
+      TPoint(2*startingPosition.iX + aItemSize.iWidth ,
+          2*startingPosition.iY + aItemSize.iHeight) );
 
-	iMoveIndicatorRectsMap.InsertL( lookup_string, rectAccordingToParent );
-	CleanupStack::Pop( lookup_string );
-	}
+  iMoveIndicatorRectsMap.InsertL( lookup_string, rectAccordingToParent );
+  CleanupStack::Pop( lookup_string );
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMmTemplateLibrary::SetScrollbarVisibilityL( TBool aIsScrollbarVisible )
-	{
-	if ( iIsScrollbarVisible != aIsScrollbarVisible )
-		{
-		iIsScrollbarVisible = aIsScrollbarVisible;
-		CleanAndClearCache();
-		}
-	}
+  {
+  if ( iIsScrollbarVisible != aIsScrollbarVisible )
+    {
+    iIsScrollbarVisible = aIsScrollbarVisible;
+    CleanAndClearCache();
+    }
+  }
 
 // -----------------------------------------------------------------------------
 //
@@ -1018,24 +1020,24 @@
 // -----------------------------------------------------------------------------
 //
 void CMmTemplateLibrary::SetScrollbarWidthL( TInt aScrollbarWidth )
-	{
-	if ( iIsScrollbarVisible )
-		{
-		if ( iScrollbarWidth != aScrollbarWidth )
-			{
-			iScrollbarWidth = aScrollbarWidth;
-			CleanAndClearCache();
-			}
-		}
-	else
-		{
-		if ( iScrollbarWidth != 0 )
-			{
-			iScrollbarWidth = 0;
-			CleanAndClearCache();
-			}
-		}
-	}
+  {
+  if ( iIsScrollbarVisible )
+    {
+    if ( iScrollbarWidth != aScrollbarWidth )
+      {
+      iScrollbarWidth = aScrollbarWidth;
+      CleanAndClearCache();
+      }
+    }
+  else
+    {
+    if ( iScrollbarWidth != 0 )
+      {
+      iScrollbarWidth = 0;
+      CleanAndClearCache();
+      }
+    }
+  }
 
 // -----------------------------------------------------------------------------
 //
@@ -1051,29 +1053,29 @@
 // -----------------------------------------------------------------------------
 //
 void CMmTemplateLibrary::AdjustItemWidth(TSize& aItemSize, TSize aLayoutSize,
-		TBool aLandscapeOrientation)
-	{
-	if ( iIsScrollbarVisible )
-		{
-		aItemSize.iWidth = ( GetParentRect(aLandscapeOrientation).Width() - iScrollbarWidth ) / aLayoutSize.iWidth;
-		}
-	else
-		{
-		aItemSize.iWidth = GetParentRect(aLandscapeOrientation).Width() / aLayoutSize.iWidth;
-		}
-	}
+    TBool aLandscapeOrientation)
+  {
+  if ( iIsScrollbarVisible )
+    {
+    aItemSize.iWidth = ( GetParentRect(aLandscapeOrientation).Width() - iScrollbarWidth ) / aLayoutSize.iWidth;
+    }
+  else
+    {
+    aItemSize.iWidth = GetParentRect(aLandscapeOrientation).Width() / aLayoutSize.iWidth;
+    }
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMmTemplateLibrary::UpdateParentRect( TRect aParentRect, TBool aLandscapeOrientation )
-	{
+  {
     if( GetParentRect( aLandscapeOrientation ) != aParentRect )
-	    {
-    	SetParentRect( aLandscapeOrientation, aParentRect );
-	    }
-	}
+      {
+      SetParentRect( aLandscapeOrientation, aParentRect );
+      }
+  }
 
 
 // -----------------------------------------------------------------------------
@@ -1081,62 +1083,62 @@
 // -----------------------------------------------------------------------------
 //
 TRect CMmTemplateLibrary::GetParentRect( TBool aLandscapeOrientation )
-	{
-	if ( aLandscapeOrientation )
-		return iParentRectLandscape;
-	else
-		return iParentRectPortrait;
-	}
+  {
+  if ( aLandscapeOrientation )
+    return iParentRectLandscape;
+  else
+    return iParentRectPortrait;
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMmTemplateLibrary::SetParentRect( TBool aLandscapeOrientation, TRect aParentRect)
-	{
-	if ( aLandscapeOrientation )
-		iParentRectLandscape = aParentRect;
-	else
-		iParentRectPortrait = aParentRect;
-	}
+  {
+  if ( aLandscapeOrientation )
+    iParentRectLandscape = aParentRect;
+  else
+    iParentRectPortrait = aParentRect;
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMmTemplateLibrary::AdjustItemSize(TSize& aItemSize, TSize aLayoutSize,
-		TBool aLandscapeOrientation)
-	{
-	switch ( iWidgetType )
-		{
-		case EGrid:
-			aItemSize.iHeight = GetParentRect( aLandscapeOrientation ).Height() / aLayoutSize.iHeight;
-			break;
-		case EListbox:
-			break;
-		}
-	AdjustItemWidth( aItemSize, aLayoutSize, aLandscapeOrientation );
-	}
+    TBool aLandscapeOrientation)
+  {
+  switch ( iWidgetType )
+    {
+    case EGrid:
+      aItemSize.iHeight = GetParentRect( aLandscapeOrientation ).Height() / aLayoutSize.iHeight;
+      break;
+    case EListbox:
+      break;
+    }
+  AdjustItemWidth( aItemSize, aLayoutSize, aLandscapeOrientation );
+  }
 
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
 //
 void CMmTemplateLibrary::CacheLayoutSizeL(TSize aLayoutSize,
-		const TDesC8& aTemplate, TBool aLandscapeOrientation)
-	{
-	HBufC8* lookup_layout_text = LookupLayoutText( iWidgetType,
+    const TDesC8& aTemplate, TBool aLandscapeOrientation)
+  {
+  HBufC8* lookup_layout_text = LookupLayoutText( iWidgetType,
         aTemplate, aLandscapeOrientation );
 
-	if ( iTemplateSizesMap.Find( lookup_layout_text ) )
-		{
-		delete lookup_layout_text;
-		}
-	else
-		{
-		iTemplateSizesMap.InsertL( lookup_layout_text, aLayoutSize );
-		}
-	}
+  if ( iTemplateSizesMap.Find( lookup_layout_text ) )
+    {
+    delete lookup_layout_text;
+    }
+  else
+    {
+    iTemplateSizesMap.InsertL( lookup_layout_text, aLayoutSize );
+    }
+  }
 
 // -----------------------------------------------------------------------------
 //
--- a/menufw/menufwui/mmwidgets/src/mmwidgetcontainer.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/menufw/menufwui/mmwidgets/src/mmwidgetcontainer.cpp	Tue May 11 16:02:39 2010 +0300
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description:
-*  Version     : %version: MM_71.1.17.1.59 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: MM_71.1.17.1.64 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -105,9 +105,12 @@
     , iIsFaded( EFalse )
     , iHasFocus( ETrue )
     , iInForeground( ETrue )
+    , iLongTapDetector( NULL )
     , iAllowMove( EFalse )
     , iRecipientId( KErrNotFound )
     , iEventParameters( NULL )
+    , iDialogOpened( EFalse )
+    , iHighlightVisibleBeforeLongTap( EFalse )
     {
     iWidgetPositionCache.iValid = EFalse;
     }
@@ -135,6 +138,11 @@
     if( iLongTapDetector )
         {
         iLongTapDetector->EnableLongTapAnimation( aEnable );
+        // cancel longTap timer, avoid showing popupmenu
+        if( !aEnable )
+            {
+            iLongTapDetector->PointerEventL( TPointerEvent() );
+            }
         }
     }
 
@@ -236,6 +244,19 @@
         }
 
     TBool highlightVisibleBefore = iWidget->IsVisible() && IsHighlightVisible();
+
+    // fix ou1cimx1#344006 error; when we close dialog - if highlight had been
+    // visible/invisible before dialog has been opened, we restore highlight visibility flag.
+    if( !iIsFaded && iDialogOpened)
+        {
+        iDialogOpened = EFalse;
+        if(highlightVisibleBefore != iHighlightVisibleBeforeLongTap)
+            {
+            SetHighlightVisibilityL( iHighlightVisibleBeforeLongTap);
+            }
+        highlightVisibleBefore = iHighlightVisibleBeforeLongTap;
+        }
+
     CCoeControl::HandleResourceChange( aType );
     if( highlightVisibleBefore )
         {
@@ -523,6 +544,15 @@
 //
 // -----------------------------------------------------------------------------
 //
+EXPORT_C void CMmWidgetContainer::SetExDialogOpened( TBool aOpened )
+    {
+    iDialogOpened = aOpened;
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
 TBool CMmWidgetContainer::IsDeleteLockedL( TInt aItemIndex )
     {
     TBool result = ETrue;
@@ -956,7 +986,7 @@
         iPreviousHighlight = iCurrentHighlight;
         iCurrentHighlight = aItemIndex;
 
-        if( iPreviousHighlight != iCurrentHighlight )
+        if( IsHighlightVisible() && iPreviousHighlight != iCurrentHighlight )
             {
             HideOptionsMenuIfDisplayed();
             }
@@ -1583,7 +1613,7 @@
             && suiteModel->GetSuiteHighlight() == highlightedItemIndex
             && ItemIsVisible( highlightedItemIndex ) )
         {
-      iWidgetPositionCache.iHighlightedItemId =
+        iWidgetPositionCache.iHighlightedItemId =
             suiteModel->IdByIndex( highlightedItemIndex );
         }
 
@@ -1612,7 +1642,7 @@
                 // effect.
                 }
 
-      Widget()->View()->SetTopItemIndex(iWidgetPositionCache.iTopItemIndex);
+            Widget()->View()->SetTopItemIndex(iWidgetPositionCache.iTopItemIndex);
             SetVerticalItemOffset( iWidgetPositionCache.iVerticalItemOffset );
             TRAP_IGNORE( AlignBottomOfViewL() );
 
@@ -1624,11 +1654,11 @@
             if( suiteModel && IsHighlightVisible() )
                 {
                 TInt highlightedItemIndex = suiteModel->GetSuiteHighlight();
-          TInt highlightedItemId = highlightedItemIndex != KErrNotFound ?
-              suiteModel->IdByIndex( highlightedItemIndex ) : KErrNotFound;
-          if ( highlightedItemId != KErrNotFound
-                  && highlightedItemId == iWidgetPositionCache.iHighlightedItemId
-                  && !ItemIsVisible( highlightedItemIndex ) )
+                TInt highlightedItemId = highlightedItemIndex != KErrNotFound ?
+                        suiteModel->IdByIndex( highlightedItemIndex ) : KErrNotFound;
+                if ( highlightedItemId != KErrNotFound
+                        && highlightedItemId == iWidgetPositionCache.iHighlightedItemId
+                        && !ItemIsVisible( highlightedItemIndex ) )
                     {
                     TRAP_IGNORE( ScrollToItemL( highlightedItemIndex ) );
                     }
@@ -1823,10 +1853,10 @@
     if( aIndex >= 0 && aIndex <= NumberOfItems() )
         {
         scrollConsumed = AlignBottomOfViewL();
-    if ( !scrollConsumed && Widget()->View()->ItemIsPartiallyVisible(aIndex))
+        if ( !scrollConsumed && Widget()->View()->ItemIsPartiallyVisible(aIndex))
             {
             //			the case when the item is partially visible at top or
-            //			bottom of screen. Th e view is scrolled the offset to
+            //			bottom of screen. The view is scrolled the offset to
             //			make the item entirely visible.
             TInt offsetBottom = Widget()->View()->ItemPos( aIndex ).iY
                     + Widget()->ItemHeight()
@@ -1901,6 +1931,7 @@
     TInt index( KErrNotFound );
     if( iWidget->View()->XYPosToItemIndex( aPenEventLocation, index ) )
         {
+        iHighlightVisibleBeforeLongTap = iPreviousHighlightVisibility;
         SetHighlightVisibilityL( ETrue );
         iLongTapInProgress = ETrue;
         if( iLongTapObserver )
@@ -1928,7 +1959,7 @@
     if( iLongTapInProgress )
         {
         iLongTapInProgress = EFalse;
-        if( aStopTimer )
+        if( aStopTimer && !iIsFaded )
             {
             SetHighlightVisibilityL( EFalse );
             }
--- a/menufw/menusuites/foldersuite/data/items_touch.xml	Tue Apr 27 16:26:12 2010 +0300
+++ b/menufw/menusuites/foldersuite/data/items_touch.xml	Tue May 11 16:02:39 2010 +0300
@@ -261,7 +261,7 @@
         </mm:event>
 
 		<mm:edit_mode count="folder_items:ReturnValue/[$count]"  template="logical_template_3|list_single_hc_apps_pane" id="folder_suite_items" remove_locked="folder_items:ReturnValue/[$index]/delete_locked" type="folder_items:ReturnValue/[$index]/type" custom_id="folder_items:ReturnValue/[$index]/id" uid="folder_items:ReturnValue/[$index]/uid">
-		    <mm:menuitem_action name="foldersuite_rsc:R_MENU_OPEN" event="key:select" position="80" condition="folder_items:ReturnValue/[$index]/type = menu:folder" />
+		    <mm:menuitem_action name="foldersuite_rsc:R_MENU_OPEN" event="key:select" position="80" condition="folder_items:ReturnValue/[$index]/type = menu:folder &amp; folder_items:ReturnValue/[$index]/delete_locked != true" />
             <mm:menuitem_specific name="foldersuite_rsc:R_OPTIONS_ORG_MOVE_TO_FOLDER" event="custom:move_to_folder" position="81" condition="params:remove_locked != true" />
 			<mm:menuitem name="foldersuite_rsc:R_OPTIONS_ORG_NEW_FOLDER" event="custom:add_folder" position="82" condition="params:remove_locked != true" />    
             <mm:menuitem_specific name="foldersuite_rsc:R_FLDR_DELETE" event="custom:delete_folder" position="83" condition="folder_items:ReturnValue/[$index]/type = menu:folder &amp; params:remove_locked != true &amp; folder_items:ReturnValue/[$index]/delete_locked != true &amp; folder_items:ReturnValue/[$index]/children_count = 0" />
--- a/menufw/menusuites/foldersuite/group/bld.inf	Tue Apr 27 16:26:12 2010 +0300
+++ b/menufw/menusuites/foldersuite/group/bld.inf	Tue May 11 16:02:39 2010 +0300
@@ -33,7 +33,7 @@
 ../data/suite.xml z:/private/101F4CD2/import/suites/foldersuite/suite.xml
 #ifdef __PEN_SUPPORT
 ../data/items_touch.xml z:/private/101F4CD2/import/suites/foldersuite/items.xml
-#else 
+#else
 ../data/items_nontouch.xml z:/private/101F4CD2/import/suites/foldersuite/items.xml
 #endif
 
@@ -102,4 +102,4 @@
   SRCFILE move_indicator_icons.mbg
 END
 #endif
-#endif
\ No newline at end of file
+#endif
--- a/taskswitcher/contextengine/tsfswserver/engine/inc/tsfswdatalist.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/taskswitcher/contextengine/tsfswserver/engine/inc/tsfswdatalist.h	Tue May 11 16:02:39 2010 +0300
@@ -147,6 +147,13 @@
      */
     TUid AppUidForWgIdL( TInt aWgId );
 
+    /**
+     * Returns the most top parent's wg id or KErrNotFound.
+     * @param   aWgId   a valid window group id
+     * @return parent wg id or KErrNotFound if there is no parent
+     */
+    TInt FindMostTopParentWgId( TInt aWgId );
+    
 private:
     /**
      * Adds running apps to the list.
@@ -200,13 +207,6 @@
     TInt FindParentWgId( TInt aWgId );
 
     /**
-     * Returns the most top parent's wg id or KErrNotFound.
-     * @param   aWgId   a valid window group id
-     * @return parent wg id or KErrNotFound if there is no parent
-     */
-    TInt FindMostTopParentWgId( TInt aWgId );
-
-    /**
      * Finds out the application name.
      * @param   aWindowName window group name or NULL
      * @param   aAppUId     application uid
--- a/taskswitcher/contextengine/tsfswserver/engine/inc/tsfswengine.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/taskswitcher/contextengine/tsfswserver/engine/inc/tsfswengine.h	Tue May 11 16:02:39 2010 +0300
@@ -241,9 +241,7 @@
 
     // window group ids returned by last WindowGroupList call
     RArray<TInt> iWgIds;
-
-    // For publishing the foreground app uid to Context Framework    
-    TAppUidHexString iFgAppUidStr;
+  
     TUid iFgAppUid;
 
     // For rotating bitmaps
--- a/taskswitcher/contextengine/tsfswserver/engine/src/tsfswdatalist.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/taskswitcher/contextengine/tsfswserver/engine/src/tsfswdatalist.cpp	Tue May 11 16:02:39 2010 +0300
@@ -153,8 +153,8 @@
 TBool CTsFswDataList::CollectTasksL()
     {
     // clear dirty flag
-    TBool changed = iTaskListDirty;
     iTaskListDirty = EFalse;
+    TBool changed = EFalse;
     
     RTsFswArray newAppsList;
     RTsFswArray newWidgetsList;
--- a/taskswitcher/contextengine/tsfswserver/engine/src/tsfswengine.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/taskswitcher/contextengine/tsfswserver/engine/src/tsfswengine.cpp	Tue May 11 16:02:39 2010 +0300
@@ -40,9 +40,6 @@
 // for screenshots, they are scaled down to (screensize/this_factor).
 const TInt KScreenSizeFactor = 2;
 
-// format to get a lowercase hex string prefixed with 0x
-_LIT( KHexFmt, "0x%x" );
-
 const TUid KTsCameraUid = { 0x101F857a };
 
 //close command for widget
@@ -318,7 +315,7 @@
     if ( iFgAppUid != newUid && newUid.iUid )
         {
         iFgAppUid = newUid;
-        iFgAppUidStr.Format( KHexFmt, iFgAppUid.iUid );
+        iDataList->MoveEntryAtStart(newUid.iUid, EFalse);
         }
 
     TSLOG_OUT();
@@ -482,7 +479,12 @@
     TSLOG2_IN( "aWgId = %d aFbsHandle = %d", aWgId, aFbsHandle );
 
     TUid appUid;
-    TInt err = iDataList->AppUidForWgId( aWgId, appUid );
+    TInt wgId = iDataList->FindMostTopParentWgId(aWgId);
+    if ( wgId == KErrNotFound )
+        {
+        wgId = aWgId;
+        }
+    TInt err = iDataList->AppUidForWgId( wgId, appUid );
     if ( err || appUid == KTsCameraUid )
         {
         // Dont't assign screenshot to camera app
@@ -497,7 +499,6 @@
     iPreviewProvider->AckPreview(aFbsHandle);
     if ( err == KErrNone )
         {
-		iDataList->MoveEntryAtStart(appUid.iUid, EFalse);
         StoreScreenshot(aWgId, bmp);
         }
 
--- a/taskswitcher/taskswitcherui/taskswitcherapp/data/taskswitcher.rss	Tue Apr 27 16:26:12 2010 +0300
+++ b/taskswitcher/taskswitcherui/taskswitcherapp/data/taskswitcher.rss	Tue May 11 16:02:39 2010 +0300
@@ -272,11 +272,9 @@
 
 RESOURCE TBUF r_ts_title { buf = "Task Switcher"; }
 
-RESOURCE TBUF r_ts_fsw_activate { buf = qtn_task_switcher_popup_open_app; }
 RESOURCE TBUF r_ts_fsw_close { buf = qtn_task_switcher_popup_close_app; }
 RESOURCE TBUF r_ts_fsw_close_all { buf = qtn_task_switcher_popup_close_all; }
 RESOURCE TBUF r_ts_fsw_no_apps { buf = qtn_task_switcher_no_apps; }
-RESOURCE TBUF r_ts_fsw_confirm_close { buf = qtn_memlo_confirm_close; }
 
 RESOURCE TBUF r_task_switcher_heading_applications { buf = qtn_task_switcher_heading_applications; }
 
--- a/taskswitcher/taskswitcherui/taskswitcherapp/inc/tsappui.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/taskswitcher/taskswitcherui/taskswitcherapp/inc/tsappui.h	Tue May 11 16:02:39 2010 +0300
@@ -106,6 +106,11 @@
      */
     TBool LayoutChangeAllowed();
     
+    /**
+     * Checks if task switcher is in foreground
+     */
+    TBool IsForeground() const;
+    
 public:
     /**
      * From MTsCenrepChangeObserver
--- a/taskswitcher/taskswitcherui/taskswitcherapp/inc/tsappview.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/taskswitcher/taskswitcherui/taskswitcherapp/inc/tsappview.h	Tue May 11 16:02:39 2010 +0300
@@ -117,6 +117,15 @@
      * @return  ETrue if application is being closed, EFalse otherwise
      */
     TBool AppCloseInProgress( TInt aWgId );
+    
+    /**
+     * Checks if app with the given window group id is present on taskswitcher
+     * list.
+     * 
+     * @param  aWgId  window group of the application to be checked
+     * @return  ETrue if there is application with the given id is on the list
+     */
+    TBool WgOnTaskList( TInt aWgId );
 
 protected:
     // from MCoeControlObserver
@@ -278,6 +287,11 @@
     TRect iBgContextOuterRect;
     TRect iBgContextInnerRect;
     CTsEventControler* iEvtHandler; //own
+    
+    /**
+     * Flag for marking exit on pointer events
+     */
+    TBool iExitOnPointerUp;
     };
 
 #endif // TSAPPVIEW_H
--- a/taskswitcher/taskswitcherui/taskswitcherapp/inc/tsfastswaparea.h	Tue Apr 27 16:26:12 2010 +0300
+++ b/taskswitcher/taskswitcherui/taskswitcherapp/inc/tsfastswaparea.h	Tue May 11 16:02:39 2010 +0300
@@ -33,6 +33,7 @@
 class CAknQueryDialog;
 class CTsEventControler;
 class MTsDataChangeObserver;
+class CAknLongTapAnimation;
 
 /**
  * Taskswitcher Fast Swap area UI.
@@ -110,6 +111,11 @@
     void SwitchToApp( TInt aIndex );
     
     /**
+     * Brings the app with the give Uid into foreground
+     */
+    void SwitchToApp( const TUid& aUid );
+    
+    /**
      * Sends close msg to given app.
      * @param   aIndex      index
      * @param   aSuppressRendering  content is not refreshed if ETrue
@@ -223,6 +229,12 @@
      */
     TBool IsAppClosing( TInt aWgId );
     
+    /**
+     * Checks if app with the given window group id is present on taskswitcher
+     * list.
+     */
+    TBool WgOnTaskList( TInt aWgId );
+    
 public:    
     // from CCoeControl    
     TInt CountComponentControls() const;
@@ -253,6 +265,11 @@
 // new functions    
 
     /**
+     * Switches to another application.
+     */
+    void SwitchToApp( TInt aWgId, const TUid& aUid );
+    
+    /**
      * Makes a copy of the given bitmap.
      * Also scaled to the given size, but maintains aspect ratio,
      * so the size of the returned bitmap may be less then aSize.
@@ -396,7 +413,21 @@
      *          layout meta data functions.
      */
     TBool GetVariety( TInt& aVariety );
-        
+    
+    /**
+     * Cancels long tap animation.
+     */
+    void CancelLongTapAnimation( TBool aDisablePopup = ETrue );
+    
+    /**
+     * Checks if long tap animation should be shown in
+     * a given point.
+     * 
+     * @param  aHitPoint  point where tapped event is registered
+     * @return  ETrue if long animation is allowed for that position
+     */
+    TBool LongTapAnimForPos( const TPoint& aHitPoint );
+    
 private: // Data
     
     // parent control
@@ -434,6 +465,8 @@
     // Tap event
     TPointerEvent iTapEvent;
     CTsFastSwapTimer* iHighlightTimer;
+    TPoint iActivateOnPointerRelease;
+    TBool iHandlePointerCandidate;
     
     // View offset position, used by animation physics
     TInt iLogicalViewPosOffset;
@@ -455,6 +488,12 @@
     // App closing handling
     RArray<TInt> iIsClosing;
     TInt iWidgetClosingCount;
+    TInt iPrevAppCount;
+    
+    // Long tap animation
+    CAknLongTapAnimation* iLongTapAnimation;
+    CTsFastSwapTimer* iLongTapAnimationTimer;
+    TBool iLongTapAnimationRunning;
     };
 
 #endif // TSFASTSWAPAREA_H
--- a/taskswitcher/taskswitcherui/taskswitcherapp/loc/taskswitcher.loc	Tue Apr 27 16:26:12 2010 +0300
+++ b/taskswitcher/taskswitcherui/taskswitcherapp/loc/taskswitcher.loc	Tue May 11 16:02:39 2010 +0300
@@ -17,13 +17,6 @@
 
 
 //d:Popup menu item text
-//d:Activate selected application
-//l:list_single_touch_menu_pane_t1
-//r:5.0
-//
-#define qtn_task_switcher_popup_open_app "Activate"
-
-//d:Popup menu item text
 //d:Close selected application
 //l:list_single_touch_menu_pane_t1
 //r:5.0
@@ -41,16 +34,10 @@
 //l:heading_pane_t1
 //r:5.0
 //
-#define qtn_task_switcher_heading_applications "Open applications (%d)"
+#define qtn_task_switcher_heading_applications "Open applications (%N)"
 
-//d:Text for no appliactions
-//l:none
+//d:Text seen in taskswitcher if there is no open applications
+//l:main_list_empty_pane
 //r:5.0
 //
-#define qtn_task_switcher_no_apps "No open application"
-
-//d:Text for appliactions that has no name
-//l:none
-//r:5.0
-//
-#define qtn_task_switcher_default_task_name "No name"
+#define qtn_task_switcher_no_apps "No open applications"
--- a/taskswitcher/taskswitcherui/taskswitcherapp/src/tsappui.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/taskswitcher/taskswitcherui/taskswitcherapp/src/tsappui.cpp	Tue May 11 16:02:39 2010 +0300
@@ -34,6 +34,7 @@
 #include <hal_data.h>
 #include <akntranseffect.h>
 #include <UikonInternalPSKeys.h>
+#include <apgwgnam.h>
 
 
 // AknCapServer UID, used for P&S category
@@ -121,6 +122,9 @@
     iWg = RWindowGroup(CCoeEnv::Static()->WsSession());
     iWg.Construct((TUint32)&iWg, ETrue);
     iWg.EnableScreenChangeEvents(); 
+    CApaWindowGroupName* rootWgName = CApaWindowGroupName::NewLC( iEikonEnv->WsSession(), iEikonEnv->RootWin().Identifier() );
+    rootWgName->SetWindowGroupName( iWg );
+    CleanupStack::PopAndDestroy( rootWgName );
     
     // Create UI
     iAppView = CTsAppView::NewL( ApplicationRect(), *iDeviceState, iWg );
@@ -756,7 +760,8 @@
         TInt wgId = WgIdOfUnderlyingApp(EFalse);
         if ( iForeground &&
              wgId != iUnderAppWgId &&
-             !iAppView->AppCloseInProgress(iUnderAppWgId) )
+             !iAppView->AppCloseInProgress(iUnderAppWgId) &&
+             !iAppView->WgOnTaskList(wgId) )
             {
             MoveAppToBackground( ENoneTransition );
             }
@@ -835,4 +840,14 @@
 	return retVal;
 	}
 
+
+// -----------------------------------------------------------------------------
+// CTsAppUi::IsForeground
+// -----------------------------------------------------------------------------
+//
+TBool CTsAppUi::IsForeground() const
+    {
+    return iForeground;
+    }
+
 // End of file
--- a/taskswitcher/taskswitcherui/taskswitcherapp/src/tsappview.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/taskswitcher/taskswitcherui/taskswitcherapp/src/tsappview.cpp	Tue May 11 16:02:39 2010 +0300
@@ -71,7 +71,7 @@
 // -----------------------------------------------------------------------------
 //
 CTsAppView::CTsAppView(CTsDeviceState& aDeviceState)
-        : iDeviceState( aDeviceState )
+        : iDeviceState( aDeviceState ), iExitOnPointerUp(EFalse)
     {
     // no implementation required
     }
@@ -261,7 +261,6 @@
     TSLOG_CONTEXT( CTsAppView::GetRects, TSLOG_LOCAL );
     TSLOG_IN();
     
-#ifndef TASKSWITCHER_USE_CUSTOM_LAYOUT
     TInt variety = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0;
     
     TAknLayoutRect appsLabel;
@@ -282,18 +281,6 @@
 
     aRects.Append( appsLabel.Rect() );
     aRects.Append( fastSwapAreaPane.Rect() );
-#else
-    TRect tempRect;
-    AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EScreen, tempRect);
-    tempRect.iTl = TPoint(0,0);
-    TRect fastSwapRect, headingRect;
-    fastSwapRect.iTl = TPoint(KFswBorderSize, (tempRect.Height() - KFswItemHeight - KFswHeadingHeight) / 2 + KFswHeadingHeight);
-    fastSwapRect.iBr = TPoint(tempRect.iBr.iX - KFswBorderSize, fastSwapRect.iTl.iY + KFswItemHeight);
-    headingRect.iTl = TPoint(KFswBorderSize, fastSwapRect.iTl.iY - KFswHeadingHeight);
-    headingRect.iBr = TPoint(fastSwapRect.iBr.iX, fastSwapRect.iTl.iY);
-    aRects.Append( headingRect );
-    aRects.Append( fastSwapRect );
-#endif
 
     TSLOG_OUT();
     }
@@ -612,16 +599,33 @@
     {
     if( TPointerEvent::EButton1Down == aPointerEvent.iType )
         {
+        iEvtHandler->EnableEventHandling(ETrue);
+        iExitOnPointerUp = EFalse;
 		LaunchFeedback(ETouchFeedbackBasic, TTouchFeedbackType(
 				ETouchFeedbackVibra | ETouchFeedbackAudio), aPointerEvent);
 
-		if( !DragArea().Contains(aPointerEvent.iParentPosition))
+		if( !DragArea().Contains(aPointerEvent.iParentPosition) ||
+		    !iFastSwapArea->Count() )
 		    {
 		    //move task switcher to background
 		    iEvtHandler->EnableEventHandling(EFalse);
-		    iEikonEnv->EikAppUi()->HandleCommandL(EAknSoftkeyExit);
+		    if ( !iAppsHeading->Rect().Contains( aPointerEvent.iParentPosition ) ||
+		         !iFastSwapArea->Count() )
+		        {
+		        iExitOnPointerUp = ETrue;
+		        }
 		    }
         }
+    else if( TPointerEvent::EButton1Up == aPointerEvent.iType && iExitOnPointerUp )
+        {
+        // Possible exit, check if pointer up is outside of control area
+        if( ( !DragArea().Contains(aPointerEvent.iParentPosition) &&
+              !iAppsHeading->Rect().Contains(aPointerEvent.iParentPosition) ) ||
+            !iFastSwapArea->Count() )
+            {
+            iEikonEnv->EikAppUi()->HandleCommandL(EAknSoftkeyExit);
+            }
+        }
     iFastSwapArea->HandlePointerEventL(aPointerEvent);
     }
 
@@ -773,6 +777,17 @@
     {
     return iFastSwapArea->IsAppClosing(aWgId);
     }
+
+
+// -----------------------------------------------------------------------------
+// CTsAppView::WgOnTaskList()
+// -----------------------------------------------------------------------------
+//
+TBool CTsAppView::WgOnTaskList( TInt aWgId )
+    {
+    return iFastSwapArea->WgOnTaskList(aWgId);
+    }
+
 // -----------------------------------------------------------------------------
 // CTsAppView::DragArea
 // -----------------------------------------------------------------------------
@@ -783,12 +798,12 @@
 	if (Layout_Meta_Data::IsLandscapeOrientation())
 		{
 		dragArea.SetRect(iAppsHeading->Rect().iTl.iX,
-				iAppsHeading->Rect().iTl.iY, iFastSwapArea->Rect().iBr.iX,
+		        iFastSwapArea->Rect().iTl.iY, iFastSwapArea->Rect().iBr.iX,
 				iFastSwapArea->Rect().iBr.iY);
 		}
 	else
 		{
-		dragArea.SetRect(Rect().iTl.iX, iAppsHeading->Rect().iTl.iY,
+		dragArea.SetRect(Rect().iTl.iX, iFastSwapArea->Rect().iTl.iY,
 				Rect().iBr.iX, iFastSwapArea->Rect().iBr.iY);
 		}
 	return dragArea;
--- a/taskswitcher/taskswitcherui/taskswitcherapp/src/tseventcontroler.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/taskswitcher/taskswitcherui/taskswitcherapp/src/tseventcontroler.cpp	Tue May 11 16:02:39 2010 +0300
@@ -113,6 +113,10 @@
     {
     if(EAknTouchGestureFwLongTap == aEvent.Type())
         {
+        if( IsPhysicsRunning() )
+            {
+            iPhysicsHelper->Stop();
+            }
         iObserver.LongTapL(aEvent.Position());
         }
     else if(EAknTouchGestureFwTap == aEvent.Type())
--- a/taskswitcher/taskswitcherui/taskswitcherapp/src/tsfastswaparea.cpp	Tue Apr 27 16:26:12 2010 +0300
+++ b/taskswitcher/taskswitcherui/taskswitcherapp/src/tsfastswaparea.cpp	Tue May 11 16:02:39 2010 +0300
@@ -31,6 +31,7 @@
 #include <touchfeedback.h>
 #include <akntransitionutils.h>
 #include <akntranseffect.h>
+#include <aknlongtapanimation.h>
 
 #include "tsfastswaparea.h"
 #include "tsapplogging.h"
@@ -63,9 +64,14 @@
 const TInt KHighlighActivationTime = 100000; // 100 ms
 const TInt KUpdateGridTime = 0; // imediately
 const TInt KOrientationSwitchTime = 1000000; // 1 sec
+const TInt KLongTapAnimationInitTime = 150000; // 0.15 sec
+const TInt KLongTapAnimationTimeout = 1000000; // 1 sec
 
 const TInt KMaxGranularity = 4;
 
+const TUid KTsMenuUid = { 0x101f4cd2 };
+const TUid KTsHomescreenUid = { 0x102750f0 };
+
 // -----------------------------------------------------------------------------
 // CTsFastSwapArea::NewL
 // -----------------------------------------------------------------------------
@@ -103,7 +109,7 @@
     CTsDeviceState& aDeviceState,
     CTsEventControler& aEventHandler) :
     iParent(aParent), iDeviceState(aDeviceState), iEvtHandler(aEventHandler),
-    iIgnoreLayoutSwitch(EFalse), iWidgetClosingCount(0)
+    iIgnoreLayoutSwitch(EFalse), iWidgetClosingCount(0), iLongTapAnimationRunning(EFalse)
     {
     // no implementation required
     }
@@ -123,6 +129,8 @@
     delete iRedrawTimer;
     delete iUpdateGridTimer;
     delete iOrientationSignalTimer;
+    delete iLongTapAnimation;
+    delete iLongTapAnimationTimer;
     }
 
 // -----------------------------------------------------------------------------
@@ -161,6 +169,12 @@
     iOrientationSignalTimer = new (ELeave) CTsFastSwapTimer( *this ); 
     iOrientationSignalTimer->ConstructL();
     
+    iLongTapAnimationTimer = new (ELeave) CTsFastSwapTimer( *this ); 
+    iLongTapAnimationTimer->ConstructL();
+    
+    iActivateOnPointerRelease = TPoint();
+    iHandlePointerCandidate = EFalse;
+    
     ActivateL();
     }
 
@@ -419,26 +433,59 @@
         {
         TInt wgId = iArray[aIndex]->WgId();
         TUid appUid = iArray[aIndex]->AppUid();
-        // Move other app to foreground and then move ourselves to background.
-        // Order is important and cannot be reversed.
-        iFSClient->SwitchToApp( wgId );
-        // We do not want to come back to ts if the activated app is closed.
-        // Therefore ts must be moved to background. Ignore orientation updates, it
-        // will be done after task switcher is sent to background
-        iIgnoreLayoutSwitch = ETrue;
-        CTsAppUi* appui =
-            static_cast<CTsAppUi*>( iEikonEnv->AppUi() );
-        appui->MoveAppToBackground( CTsAppUi::EActivationTransition, appUid, wgId );
-        iIgnoreLayoutSwitch = EFalse;
-        
-        // Orientation update
-        iPrevScreenOrientation = -1; // force orientation reinit
-        iOrientationSignalTimer->Cancel();
-        iOrientationSignalTimer->After(KOrientationSwitchTime);
+        SwitchToApp( wgId, appUid );
         }
     }
 
 // --------------------------------------------------------------------------
+// CTsFastSwapArea::SwitchToApp
+// --------------------------------------------------------------------------
+//
+void CTsFastSwapArea::SwitchToApp( const TUid& aUid )
+    {
+    TApaTaskList taskList( iEikonEnv->WsSession() );
+    TApaTask task = taskList.FindApp( aUid );
+    TInt wgId = task.WgId();
+    SwitchToApp( wgId, aUid );
+    }
+
+
+// --------------------------------------------------------------------------
+// CTsFastSwapArea::SwitchToApp
+// --------------------------------------------------------------------------
+//
+void CTsFastSwapArea::SwitchToApp( TInt aWgId, const TUid& aUid )
+    {
+    CTsAppUi* appui =
+        static_cast<CTsAppUi*>( iEikonEnv->AppUi() );
+    TBool effectsEnabled = appui->EffectsEnabled();
+
+    // Move other app to foreground
+    if ( !effectsEnabled )
+        {
+        iFSClient->SwitchToApp( aWgId );
+        }
+    
+    // We do not want to come back to ts if the activated app is closed.
+    // Therefore ts must be moved to background. Ignore orientation updates, it
+    // will be done after task switcher is sent to background
+    iIgnoreLayoutSwitch = ETrue;
+    appui->MoveAppToBackground( CTsAppUi::EActivationTransition, aUid, aWgId );
+    iIgnoreLayoutSwitch = EFalse;
+    
+    // Move other app to foreground
+    if ( effectsEnabled )
+        {
+        iFSClient->SwitchToApp( aWgId );
+        }
+    
+    // Orientation update
+    iPrevScreenOrientation = -1; // force orientation reinit
+    iOrientationSignalTimer->Cancel();
+    iOrientationSignalTimer->After(KOrientationSwitchTime);
+    }
+
+// --------------------------------------------------------------------------
 // CTsFastSwapArea::TryCloseAppL
 // --------------------------------------------------------------------------
 //
@@ -499,6 +546,8 @@
         iPrevScreenOrientation = GetCurrentScreenOrientation();
         iOrientationSignalTimer->Cancel();
         iOrientationSignalTimer->After(KOrientationSwitchTime);
+        
+        iPrevAppCount = iArray.Count();
         }
 
     TSLOG_OUT();
@@ -536,7 +585,10 @@
 TBool CTsFastSwapArea::CanClose( TInt aIndex ) const
     {
     CTsFswEntry* e = iArray[aIndex];
-    return !e->AlwaysShown() && !e->SystemApp();
+    TBool canClose = !e->AlwaysShown() && !e->SystemApp();
+    // Special cases: Menu
+    canClose |= e->AppUid() == KTsMenuUid;
+    return canClose;
     }
 
 // --------------------------------------------------------------------------
@@ -815,6 +867,7 @@
         {
         iGrid->HideHighlight();
         }
+    CancelLongTapAnimation();
     }
 
 // -----------------------------------------------------------------------------
@@ -828,6 +881,7 @@
     
     iIsClosing.Reset();
     iWidgetClosingCount = 0;
+    iHandlePointerCandidate = EFalse;
     
     CTsGridItemDrawer* itemDrawer =
         static_cast<CTsGridItemDrawer*>( iGrid->ItemDrawer() );
@@ -865,6 +919,8 @@
     
     // give feedback
     LaunchPopupFeedback();
+    
+    iPrevAppCount = iArray.Count();
 
     TSLOG_OUT();
     }
@@ -900,6 +956,8 @@
         const TKeyEvent& aKeyEvent,
         TEventCode aType )
     {
+    CancelLongTapAnimation();
+    
     iKeyEvent = ETrue;
     // handle the 'clear' key
     if ( aType == EEventKey && aKeyEvent.iCode == EKeyBackspace )
@@ -922,7 +980,8 @@
     // pass the event to grid
     // do not pass down and up arrow key events
     if ( aKeyEvent.iScanCode != EStdKeyUpArrow &&
-         aKeyEvent.iScanCode != EStdKeyDownArrow )
+         aKeyEvent.iScanCode != EStdKeyDownArrow &&
+         aKeyEvent.iScanCode != EStdKeyApplication0 )
         {
         TBool animate(ETrue);
         TBool redraw(EFalse);
@@ -999,10 +1058,26 @@
     iKeyEvent = EFalse;
     if(aPointerEvent.iType == TPointerEvent::EButton1Down)
         {
+        iHandlePointerCandidate = ETrue;
         iTapEvent = aPointerEvent;
         iGrid->EnableAknEventHandling(EFalse);
         iGrid->HandlePointerEventL(aPointerEvent);
         iGrid->EnableAknEventHandling(ETrue);
+        // Check if long tap animation should be launched
+        if ( LongTapAnimForPos(aPointerEvent.iParentPosition) )
+            {
+            iLongTapAnimationTimer->Cancel();
+            iLongTapAnimationTimer->After(KLongTapAnimationInitTime);
+            }
+        }
+    else if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
+        {
+        CancelLongTapAnimation( EFalse );
+        if( iActivateOnPointerRelease != TPoint() )
+            {
+            TapL(iActivateOnPointerRelease);
+            iActivateOnPointerRelease = TPoint();
+            }
         }
     }
 
@@ -1139,6 +1214,29 @@
             iRedrawTimer->After(KRedrawTime);
             }
         }
+    else if ( aSource == iLongTapAnimationTimer )
+        {
+        if ( iLongTapAnimationRunning )
+            {
+            CancelLongTapAnimation();
+            }
+        else
+            {
+            static_cast<CTsAppUi*>(iEikonEnv->AppUi())->RequestPopUpL();
+            if ( iLongTapAnimation )
+                {
+                delete iLongTapAnimation;
+                iLongTapAnimation = NULL;
+                }
+            iLongTapAnimation = CAknLongTapAnimation::NewL(EFalse);
+            iLongTapAnimation->SetParent( this );
+            iLongTapAnimation->ShowAnimationL( iTapEvent.iParentPosition.iX,
+                                               iTapEvent.iParentPosition.iY );
+            iLongTapAnimationRunning = ETrue;
+            iLongTapAnimationTimer->Cancel();
+            iLongTapAnimationTimer->After(KLongTapAnimationTimeout);
+            }
+        }
     }
 
 
@@ -1397,18 +1495,13 @@
         {
         if( aType == KAppKeyTypeShort )
             {
-            if(iGrid->IsHighlightVisible())
-                {
-                SelectNextItem();
-                }
-            else
-                {
-                iGrid->ShowHighlight();
-                }
+            // Switch to homescreen
+            SwitchToApp( KTsHomescreenUid );
             }
         else if( aType == KAppKeyTypeLong )
             {
-            SwitchToApp( SelectedIndex() );
+            // Dismiss task switcher
+            TRAP_IGNORE( iEikonEnv->EikAppUi()->HandleCommandL(EAknSoftkeyExit) );
             }
         }
     else
@@ -1427,6 +1520,13 @@
     TSLOG2_IN("Old position x: %d, y:%d", ViewPos().iX, ViewPos().iY);
     TSLOG2_IN("New position x: %d, y:%d", aPoint.iX, aPoint.iY);
     TSLOG_OUT();
+    
+    
+    if( iHandlePointerCandidate )
+        {
+		//pointer was pressed and it's being waiting for handling
+        return;
+        }
 
     //postpone center item request in case of being moved
     if(iUpdateGridTimer->IsActive())
@@ -1465,6 +1565,13 @@
 //
 void CTsFastSwapArea::TapL(const TPoint& aPoint)
     {
+    CancelLongTapAnimation();
+    
+    if(!iHandlePointerCandidate)
+        {
+        return;
+        }
+    
     if(Rect().Contains(aPoint) && iArray.Count())
         {
         //provide tap pointer event to grid
@@ -1477,6 +1584,7 @@
         //move task switcher to background
         iEikonEnv->EikAppUi()->HandleCommandL(EAknSoftkeyExit);
         }
+	iHandlePointerCandidate = EFalse;
     }
 
 // --------------------------------------------------------------------------
@@ -1485,6 +1593,13 @@
 //
 void CTsFastSwapArea::LongTapL(const TPoint& aPoint)
     {
+    CancelLongTapAnimation();
+    
+    if(!iHandlePointerCandidate)
+        {
+        return;
+        }
+    
     TInt index(KErrNotFound);
     if( iGrid->GridView()->XYPosToItemIndex(aPoint,index) && iArray.Count() )
         {
@@ -1492,18 +1607,12 @@
         SaveSelectedIndex();
         if ( !ShowPopupL(iSavedSelectedIndex, aPoint) )
             {
-            TapL(aPoint);
+            iActivateOnPointerRelease = aPoint;
             }
-        else
-            {
-            iGrid->ShowHighlight();
-            DrawNow();
-            }
+        iGrid->ShowHighlight();
+        DrawNow();
         }
-    else
-        {
-        TapL(aPoint);
-        }
+	iHandlePointerCandidate = EFalse;
     }
 
 // --------------------------------------------------------------------------
@@ -1513,6 +1622,10 @@
 void CTsFastSwapArea::DragL(
     const MAknTouchGestureFwDragEvent& aEvent)
     {
+    CancelLongTapAnimation();
+    // Reset activation point
+    iActivateOnPointerRelease = TPoint();
+	iHandlePointerCandidate = EFalse;
 	if( aEvent.State() == EAknTouchGestureFwStop)
 		{
 		CenterItem( KUpdateGridTime );
@@ -1757,11 +1870,15 @@
 TBool CTsFastSwapArea::GetVariety( TInt& aVariety )
     {
     aVariety = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0;
-    TInt screenOrientation = GetCurrentScreenOrientation();
-    if ( aVariety != screenOrientation )
+    TBool foreground = static_cast<CTsAppUi*>(iEikonEnv->AppUi())->IsForeground();
+    if ( foreground )
         {
-        aVariety = screenOrientation;
-        return ETrue;
+        TInt screenOrientation = GetCurrentScreenOrientation();
+        if ( aVariety != screenOrientation )
+            {
+            aVariety = screenOrientation;
+            return ETrue;
+            }
         }
     return EFalse;
     }
@@ -1787,19 +1904,78 @@
             iWidgetClosingCount--;
             }
         }
-    else
+    return retVal;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CTsFastSwapArea::WgOnTaskList
+// -----------------------------------------------------------------------------
+//
+TBool CTsFastSwapArea::WgOnTaskList( TInt aWgId )
+    {
+    TBool retVal(EFalse);
+    TInt appCount = iArray.Count();
+    if ( iPrevAppCount != appCount )
         {
-        // Check current item list
+        TApaTaskList taskList( iEikonEnv->WsSession() );
+        TApaTask task = taskList.FindApp( KTsHomescreenUid );
+        TInt homescrWgId = task.WgId();
+        
         for ( TInt i = 0; i < iArray.Count(); i++ )
             {
             TInt wgId = iArray[i]->WgId();
-            if ( wgId == aWgId )
+            if ( wgId == aWgId ||
+                 homescrWgId == aWgId )
                 {
                 retVal = ETrue;
                 }
             }
         }
+    iPrevAppCount = appCount;
     return retVal;
     }
 
+// -----------------------------------------------------------------------------
+// CTsFastSwapArea::CancelLongTapAnimation
+// -----------------------------------------------------------------------------
+//
+void CTsFastSwapArea::CancelLongTapAnimation(TBool aDisablePopup)
+    {
+    iLongTapAnimationRunning = EFalse;
+    iLongTapAnimationTimer->Cancel();
+    if ( iLongTapAnimation )
+        {
+        iLongTapAnimation->HideAnimation();
+        delete iLongTapAnimation;
+        iLongTapAnimation = NULL;
+        }
+    if( aDisablePopup )
+        {
+        TRAP_IGNORE( 
+        static_cast<CTsAppUi*>(iEikonEnv->AppUi())->DisablePopUpL() );
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CTsFastSwapArea::LongTapAnimForPos
+// -----------------------------------------------------------------------------
+//
+TBool CTsFastSwapArea::LongTapAnimForPos( const TPoint& aHitPoint )
+    {
+    if ( Rect().Contains(aHitPoint) )
+        {
+        for ( TInt i = 0; i < GridItemCount(); i++ )
+            {
+            TBool isItemHit = iGrid->GridView()->XYPosToItemIndex( aHitPoint, i );
+            if ( isItemHit && ( CanClose( i ) || CanCloseAll( i ) ) )
+                {
+                return ETrue;
+                }
+            }
+        }
+    return EFalse;
+    }
+
 // End of file