Revision: 201015 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 27 Apr 2010 16:55:05 +0300
branchRCL_3
changeset 18 0aa5fbdfbc30
parent 16 71dd06cfe933
child 19 aa94898fb0b4
child 23 3d340a0166ff
Revision: 201015 Kit: 201017
applicationinterworkingfw/ServiceHandler/src/AiwCommon.cpp
applicationinterworkingfw/ServiceHandler/src/AiwMenu.cpp
classicui_plat/ganes_api/inc/ganes/HgGrid.h
classicui_plat/ganes_api/inc/ganes/HgScroller.h
classicui_plat/ganes_api/inc/ganes/HgVgMediaWall.h
classicui_plat/ode_api/group/bld.inf
classicui_plat/ode_api/inc/lookup_tables.h
classicui_plat/special_character_table_api/inc/AknSctDialog.h
classicui_pub/application_framework_api/inc/AknAppUi.h
classicui_pub/editors_api/inc/EIKSECED.H
classicui_pub/queries_api/inc/aknmessagequerycontrol.h
classicui_pub/ui_framework_definitions_api/inc/EIKON.HRH
commonuis/CommonDialogs/src/CAknFileSelectionEventHandler.cpp
commonuis/CommonDialogs/src/caknmemoryselectionmodelmultidrive.cpp
commonuis/CommonUi/src/DocumentHandler.cpp
lafagnosticuifoundation/bmpanimation/tef/Tanctl.cpp
lafagnosticuifoundation/uigraphicsutils/tef/t_phonenumberutils.cpp
lafagnosticuifoundation/uigraphicsutils/tef/t_phonenumberutils.h
lafagnosticuifoundation/uigraphicsutils/tulsrc/tulphonenumberutils.cpp
psln/Group/Psln.mmp
psln/Inc/PslnBaseContainer.h
psln/Inc/PslnBaseView.h
psln/Inc/PslnGeneralThemeContainer.h
psln/Inc/PslnGeneralThemeView.h
psln/Inc/PslnMainView.h
psln/Inc/PslnScreenSaverView.h
psln/Inc/PslnUi.h
psln/Inc/PslnWallpaperView.h
psln/PslnFramework/src/PslnFWBaseView.cpp
psln/Rss/Psln.rss
psln/Rss/PslnCommon.rss
psln/Src/PslnBaseView.cpp
psln/Src/PslnGeneralThemeContainer.cpp
psln/Src/PslnGeneralThemeView.cpp
psln/Src/PslnMainView.cpp
psln/Src/PslnScreenSaverView.cpp
psln/Src/PslnUi.cpp
psln/Src/PslnWallpaperView.cpp
psln/pslnengine/src/PslnModel.cpp
uifw/AknGlobalUI/AknCapServer/inc/akncapserverdiscreetpopuphandler.h
uifw/AknGlobalUI/AknCapServer/src/AknCapServerShutdown.cpp
uifw/AknGlobalUI/AknCapServer/src/AknFastswapWindowControl.cpp
uifw/AknGlobalUI/AknCapServer/src/aknKeyFilter.cpp
uifw/AknGlobalUI/AknCapServer/src/akncapserverdiscreetpopuphandler.cpp
uifw/AknGlobalUI/NotifierWrapper/group/aknnotifierwrapper.mmp
uifw/AknGlobalUI/NotifierWrapper/src/AknNotiferAppServerApplication.cpp
uifw/AknGlobalUI/OldStyleNotif/Inc/AknListQueryNotificationDialog.h
uifw/AknGlobalUI/OldStyleNotif/Src/AknListQueryNotificationDialog.cpp
uifw/AknGlobalUI/OldStyleNotif/Src/AknPrivateImageLoader.cpp
uifw/AknGlobalUI/akncustcmds/src/akncapserverstart.cpp
uifw/AvKon/aknhlist/inc/akntreelistview.h
uifw/AvKon/aknhlist/src/akntree.cpp
uifw/AvKon/aknhlist/src/akntreelist.cpp
uifw/AvKon/aknhlist/src/akntreelistview.cpp
uifw/AvKon/conf/s60/avkon.confml
uifw/AvKon/group/bld.inf
uifw/AvKon/rom/avkon.iby
uifw/AvKon/src/AknAdaptiveSearchGrid.cpp
uifw/AvKon/src/AknAppUi.cpp
uifw/AvKon/src/AknCharMap.cpp
uifw/AvKon/src/AknIndicatorContainer.cpp
uifw/AvKon/src/AknLayoutConfig.cpp
uifw/AvKon/src/AknNoteDialog.cpp
uifw/AvKon/src/AknPreviewPopUp.cpp
uifw/AvKon/src/AknSctDialog.cpp
uifw/AvKon/src/AknSettingPage.cpp
uifw/AvKon/src/AknSmileyImage.cpp
uifw/AvKon/src/AknSmileyModel.cpp
uifw/AvKon/src/Aknpopupform.cpp
uifw/AvKon/src/aknPopup.cpp
uifw/AvKon/src/aknbattery.cpp
uifw/AvKon/src/akndialog.cpp
uifw/AvKon/src/akndiscreetpopupcontrol.cpp
uifw/AvKon/src/akngrid.cpp
uifw/AvKon/src/aknlists.cpp
uifw/AvKon/src/aknmessagequerycontrol.cpp
uifw/AvKon/src/aknview.cpp
uifw/AvKon/src/eikfrlb.cpp
uifw/AvKon/src/eikfrlbd.cpp
uifw/AvKon/srcdata/AvkonSystemSounds.ra
uifw/AvKon/srcdata/AvkonSystemSounds/battery_dead.wav
uifw/AvKon/srcdata/AvkonSystemSounds/battery_low.wav
uifw/AvKon/srcdata/AvkonSystemSounds/default_beep.wav
uifw/AvKon/srcdata/AvkonSystemSounds/volume_max.wav
uifw/AvKon/srcdata/AvkonSystemSounds/volume_min.wav
uifw/AvKon/srcdata/avkon.rss
uifw/EikStd/coctlsrc/AknClearer.cpp
uifw/EikStd/coctlsrc/EIKEDWIN.CPP
uifw/EikStd/coctlsrc/EIKLBX.CPP
uifw/EikStd/coctlsrc/EIKMENUP.CPP
uifw/EikStd/coctlsrc/aknitemactionmenu.cpp
uifw/EikStd/coctlsrc/aknstyluspopupmenu.cpp
uifw/EikStd/coctlsrc/akntoolbarextensionview.cpp
uifw/EikStd/coctlsrc/eikspmod.cpp
uifw/EikStd/dlgsrc/EIKDIALG.CPP
uifw/EikStd/srvuiinc/eikkeysoundserver.h
uifw/EikStd/srvuisrc/eikkeysoundserver.cpp
uifw/eikctl/src/EIKCLB.CPP
uifw/eikctl/src/EIKMFNE.CPP
uifw/eikctl/src/EIKSECED.CPP
uifw/ganes/BWINS/ganesu.def
uifw/ganes/EABI/ganesu.def
uifw/ganes/src/HgGrid.cpp
uifw/ganes/src/HgScroller.cpp
uifw/ganes/src/HgVgMediaWall.cpp
--- a/applicationinterworkingfw/ServiceHandler/src/AiwCommon.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/applicationinterworkingfw/ServiceHandler/src/AiwCommon.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -241,7 +241,7 @@
     {
     return ((iCriteriaId                                  == aItem.iCriteriaId)           &&
             (iServiceCmd                                  == aItem.iServiceCmd)           &&
-            (iContentType->Compare(*(aItem.iContentType)) == KErrNone)                    &&
+            (ContentType().Compare(aItem.ContentType())   == KErrNone)                    &&
             (iServiceClass.iUid                           == aItem.iServiceClass.iUid)    &&
             (iDefaultProvider.iUid                        == aItem.iDefaultProvider.iUid) &&
             (iMaxProviders                                == aItem.iMaxProviders)         &&
--- a/applicationinterworkingfw/ServiceHandler/src/AiwMenu.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/applicationinterworkingfw/ServiceHandler/src/AiwMenu.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -26,7 +26,7 @@
 
 // This is needed for resource reading.
 const TInt KCCMask(0x00000fff);
-
+const TInt KNominalTextLength = 40;
 
 EXPORT_C CAiwMenuPane::CAiwMenuPane(CEikMenuPane& aMenuPane, TInt aBaseCmdId) 
 : iMenuPane(&aMenuPane), iBaseCmdId(aBaseCmdId)
@@ -98,7 +98,8 @@
         data.iCommandId = aReader.ReadInt32();
         data.iCascadeId = aReader.ReadInt32();  
         data.iFlags = aReader.ReadInt32();
-        data.iText.Copy(aReader.ReadTPtrC());
+        TPtrC text( aReader.ReadTPtrC() );
+        data.iText.Copy( text.Ptr(), Min( KNominalTextLength, text.Length() ) );
         
         // Extra text (additional submenu text) must be handled separately
         // because SData doesn't offer space for it.
@@ -224,7 +225,7 @@
     data.iCommandId = AIW_SUBMENU_TITLE;
     data.iCascadeId = 0;  
     data.iFlags = 0;
-    data.iText.Copy(aTitle);
+    data.iText.Copy(aTitle.Ptr(),Min(KNominalTextLength,aTitle.Length()));
 
     iMenuPane->InsertMenuItemL(data, aIndex);       
     }
--- a/classicui_plat/ganes_api/inc/ganes/HgGrid.h	Wed Apr 14 16:14:00 2010 +0300
+++ b/classicui_plat/ganes_api/inc/ganes/HgGrid.h	Tue Apr 27 16:55:05 2010 +0300
@@ -66,6 +66,14 @@
      */
     IMPORT_C void SetLandscapeScrollingSupport( TBool aSupportLandscapeScrolling );
     
+    /**
+     * Set toolbar visibilty. The toolbar visibility ETrue changes the lanscape layout to 
+     * fill the toolbar space with grid content.
+     * 
+     * @param aToolbarVisible Is toolbar visible or not.
+     */
+    IMPORT_C void SetToolbarVisibility( TBool aToolbarVisible );
+    
 protected: // CHgScroller
     TInt GetSelected( TPoint aPosition ) const;
     void HandleSizeChanged();
@@ -110,6 +118,7 @@
 
     TInt iRowWidth;
     TBool iLandScapeScrollingSupported;
+    TBool iToolbarVisible;
     };
 
 #endif // HGGRID_H_
--- a/classicui_plat/ganes_api/inc/ganes/HgScroller.h	Wed Apr 14 16:14:00 2010 +0300
+++ b/classicui_plat/ganes_api/inc/ganes/HgScroller.h	Tue Apr 27 16:55:05 2010 +0300
@@ -147,6 +147,13 @@
     IMPORT_C TInt FirstIndexOnScreen();
     
     /**
+     * Sets the first index on the screen.
+     * 
+     * @param aFirstIndexOnScreen The index of the first item on the screen. 
+     */
+    IMPORT_C void SetFirstIndexOnScreen( TInt aFirstIndexOnScreen );
+    
+    /**
      * How many items fit on one screen. 
      * @return Item count.
      */
--- a/classicui_plat/ganes_api/inc/ganes/HgVgMediaWall.h	Wed Apr 14 16:14:00 2010 +0300
+++ b/classicui_plat/ganes_api/inc/ganes/HgVgMediaWall.h	Tue Apr 27 16:55:05 2010 +0300
@@ -677,6 +677,11 @@
      * 
      */
     void FillSystemGcWithSkin( ) const;
+    
+    /**
+     * 
+     */
+    void SetConstantsForStyle();
 
 protected:
     CHgScrollBufferManager* iManager; // Own
@@ -799,6 +804,7 @@
     TInt iDragFrames;
     TBool iObserverNotified;
 
+    TRect iOpenedItemRect;
     };
 
        
--- a/classicui_plat/ode_api/group/bld.inf	Wed Apr 14 16:14:00 2010 +0300
+++ b/classicui_plat/ode_api/group/bld.inf	Tue Apr 27 16:55:05 2010 +0300
@@ -1,44 +1,33 @@
-/*************************************************************************
- *                                                                       *
- * Copyright (c) 2009, Nokia Corporation and/or its subsidiaries.        *
- * All rights reserved.                                                  *
- *                                                                       *
- * Redistribution and use in source and binary forms,                    *
- * with or without modification, are permitted provided                  *
- * that the following conditions are met:                                *
- *                                                                       *
- * Redistributions of source code must retain the above                  *
- * copyright notice, this list of conditions and the                     *
- * following disclaimer.                                                 *
- *                                                                       *
- * Redistributions in binary form must reproduce the above               *
- * copyright notice, this list of conditions and the                     *
- * following disclaimer in the documentation and/or                      *
- * other materials provided with the distribution.                       *
- *                                                                       *
- * Neither the name of the Nokia Corporation nor the                     *
- * names of its contributors may be used to endorse or                   *
- * promote products derived from this software without                   *
- * specific prior written permission.                                    *
- *                                                                       *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS                    *
- * AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED                   *
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED                *
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A                       *
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL                  *
- * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY                 *
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR                  *
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,                 *
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF                  *
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER              *
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN                     *
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING                        *
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE                *
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY              *
- * OF SUCH DAMAGE.                                                       *
- *                                                                       *
- *************************************************************************/
-
+/*
+ *
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, 
+ * are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, 
+ * this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice, 
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * Neither the name of Nokia Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
 
 #include <platform_paths.hrh>
 
--- a/classicui_plat/ode_api/inc/lookup_tables.h	Wed Apr 14 16:14:00 2010 +0300
+++ b/classicui_plat/ode_api/inc/lookup_tables.h	Tue Apr 27 16:55:05 2010 +0300
@@ -1,3 +1,34 @@
+/*
+ *
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, 
+ * are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, 
+ * this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice, 
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * Neither the name of Nokia Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
 #ifndef LOOKUP_TABLES_H_
 #define LOOKUP_TABLES_H_
 
--- a/classicui_plat/special_character_table_api/inc/AknSctDialog.h	Wed Apr 14 16:14:00 2010 +0300
+++ b/classicui_plat/special_character_table_api/inc/AknSctDialog.h	Tue Apr 27 16:55:05 2010 +0300
@@ -162,7 +162,7 @@
     void SwitchTablesOrPagesL();
     TBool SwitchTablesL();
     void SwitchPagesL();
-    void RefreshTitleAndNavi();
+    void RefreshTitleAndNaviL();
 
     void ChangeCategoryL(const TInt aCategory);
     void ChangeLayoutL(const TBool aLayoutChanged);
--- a/classicui_pub/application_framework_api/inc/AknAppUi.h	Wed Apr 14 16:14:00 2010 +0300
+++ b/classicui_pub/application_framework_api/inc/AknAppUi.h	Tue Apr 27 16:55:05 2010 +0300
@@ -738,7 +738,7 @@
 
 private:
     void UpdateKeyBlockMode();
-    TBool SimulateHashKeyMarkingEvent(const TWsEvent& aEvent);
+    TBool SimulateHashKeyMarkingEventL(const TWsEvent& aEvent);
 
 private:
     TBool iDumpNextControl;
--- a/classicui_pub/editors_api/inc/EIKSECED.H	Wed Apr 14 16:14:00 2010 +0300
+++ b/classicui_pub/editors_api/inc/EIKSECED.H	Tue Apr 27 16:55:05 2010 +0300
@@ -78,7 +78,8 @@
         
         ELaunchPenInputAutomatic,
         
-        EPartialScreenInput
+        EPartialScreenInput,
+        ELockQuerySCT
         };    
         
         
--- a/classicui_pub/queries_api/inc/aknmessagequerycontrol.h	Wed Apr 14 16:14:00 2010 +0300
+++ b/classicui_pub/queries_api/inc/aknmessagequerycontrol.h	Tue Apr 27 16:55:05 2010 +0300
@@ -233,7 +233,7 @@
     * If the message query doesn't use the list query layout (iListQLayout == EFalse),
     * this function returns immediately.
     */
-    void TruncateTextForListQLayout( TDes& aMessage );
+    void TruncateTextForListQLayoutL( TDes& aMessage );
     
     void DoSizeChangedL();
     
--- a/classicui_pub/ui_framework_definitions_api/inc/EIKON.HRH	Wed Apr 14 16:14:00 2010 +0300
+++ b/classicui_pub/ui_framework_definitions_api/inc/EIKON.HRH	Tue Apr 27 16:55:05 2010 +0300
@@ -831,6 +831,8 @@
 #define EEikDialogFlagDontEatUpDownEvents 0x200000
 #define EEikDialogFlagCloseDialogWhenTapped   0x400000
 #define EEikDialogFlagVirtualInput            0x800000
+// New flag for postponing the disappear effect after OkToExitL.
+#define EEikDialogFlagDelayEffects      0x01000000
 
 
 #define EEikDlgItemNoSeparator          0
--- a/commonuis/CommonDialogs/src/CAknFileSelectionEventHandler.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/commonuis/CommonDialogs/src/CAknFileSelectionEventHandler.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -296,17 +296,17 @@
         {
         case ERightSoftkeyPress: // USER HAS HIT RIGHT SOFTKEY
             {
-            while( iModel->DirectoryLevel() > 0 ) // Find until existing contents
-                {
-                entries = iModel->GotoParentFolderL();
-                PopIndices( aTopItemIndex, aFocusedItemIndex );
-                if( entries > 0 || entries < KErrNotFound )
-                    {
-                    break;
-                    }
-                }
             if( iModel->DirectoryLevel() > 0 ) // We are not in the root folder
                 {
+                while( iModel->DirectoryLevel() > 0 ) // Find until existing contents
+                    {
+                    entries = iModel->GotoParentFolderL();
+                    PopIndices( aTopItemIndex, aFocusedItemIndex );
+                    if( entries > 0 || entries < KErrNotFound )
+                        {
+                        break;
+                        }
+                    }
                 if( entries > 0 )
                     {
                     if (aFocusedItemIndex >= entries)
@@ -316,6 +316,10 @@
                     UpdateSoftkeysL( aFocusedItemIndex, aContainer );
                     returnType = EItemsUpdated;
                     }
+                else
+                    {
+                    returnType = ETryingToExit;
+                    }
                 }
             else // We are in the root folder
                 {
--- a/commonuis/CommonDialogs/src/caknmemoryselectionmodelmultidrive.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/commonuis/CommonDialogs/src/caknmemoryselectionmodelmultidrive.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -457,9 +457,8 @@
         else
         	{
         	AddMMCItemToLbxL( aDriveInfo );
+        	iHasMMCUnavailable = ( aDriveInfo.iDriveStatus == EDriveNotReady );
         	}
-
-        iHasMMCUnavailable = ( aDriveInfo.iDriveStatus == EDriveNotReady );
         }
     else if ( ( aDriveInfo.iStatus & DriveInfo::EDriveRemote )
         && ( aDriveInfo.iMediaType == EMediaRemote ) )
@@ -939,55 +938,38 @@
             itemString.Append( KTabChar );
 
             // 1st row text:
-            if( ( aDriveInfo.iDriveStatus == EDriveOK ) &&
-                ( aDriveInfo.iVolumeLabel.Length() > 0 ) )
-                {
-                StringLoader::Format(
-                    textString2,
-                    *iLocStringArray[ ETextMMCNamed ],
-                    KIndexFirst,
-                    driveUnit.Name()
-                    );
-                StringLoader::Format(
-                    textString,
-                    textString2,
-                    KIndexSecond,
-                    aDriveInfo.iVolumeLabel
-                    );
-                }
-            else if ( aDriveInfo.iDriveStatus == EDriveNotReady )
+            if( aDriveInfo.iDriveStatus == EDriveOK )
                 {
-                //textString.Format(
-                //    *iLocStringArray[ ETextMMCUnavailable ],
-                //    driveUnit.Name() );
-                StringLoader::Format(
-                    textString,
-                    *iLocStringArray[ ETextMMCUnavailable ],
-                    KNoIndex,
-                    driveUnit.Name()
-                    );
-                }
-            else if( aDriveInfo.iDriveStatus == EDriveLocked )
-                {
-                //textString.Format(
-                //    *iLocStringArray[ ETextMMCLocked ],
-                //    driveUnit.Name() );
-                StringLoader::Format(
-                    textString,
-                    *iLocStringArray[ ETextMMCLocked ],
-                    KNoIndex,
-                    driveUnit.Name()
-                    );
+                if( aDriveInfo.iVolumeLabel.Length() > 0 )
+                    {
+                    StringLoader::Format(
+                        textString2,
+                        *iLocStringArray[ ETextMMCNamed ],
+                        KIndexFirst,
+                        driveUnit.Name()
+                        );
+                    StringLoader::Format(
+                        textString,
+                        textString2,
+                        KIndexSecond,
+                        aDriveInfo.iVolumeLabel
+                        );
+                    }
+                else
+                    {
+                    StringLoader::Format(
+                        textString,
+                        *iLocStringArray[ ETextInternalMassStorage ],
+                        KNoIndex,
+                        driveUnit.Name()
+                        );
+                    }
                 }
             else
                 {
-                // Use default drive description
-                //textString.Format(
-                //    *iLocStringArray[ ETextMMCDefaultName ],
-                //    driveUnit.Name() );
                 StringLoader::Format(
                     textString,
-                    *iLocStringArray[ ETextMMCDefaultName ],
+                    *iLocStringArray[ ETextInternalMassStorageUnavailable ],
                     KNoIndex,
                     driveUnit.Name()
                     );
@@ -1002,11 +984,6 @@
             if( aDriveInfo.iVolumeLabel.Length() > 0 )
                 {
                 // Append drive name if it has one
-                //itemString.Format(
-                //    *iLocStringArray[ ETextMMCNamed ],
-                //    driveUnit.Name(),
-                //    aDriveInfo.iVolumeLabel
-                //    );
                 StringLoader::Format(
                     textString,
                     *iLocStringArray[ ETextMMCNamed ],
@@ -1022,13 +999,9 @@
                 }
             else
                 {
-                //itemString.Format(
-                //    *iLocStringArray[ ETextMMCDefaultName ],
-                //    driveUnit.Name()
-                //    );
                 StringLoader::Format(
                     itemString,
-                    *iLocStringArray[ ETextMMCDefaultName ],
+                    *iLocStringArray[ ETextInternalMassStorage ],
                     KNoIndex,
                     driveUnit.Name()
                     );
@@ -1059,13 +1032,9 @@
             else
                 {
                 // Use default drive description
-                //textString.Format(
-                //    *iLocStringArray[ ETextMMCDefaultName ],
-                //    driveUnit.Name()
-                //   );
                 StringLoader::Format(
                     textString,
-                    *iLocStringArray[ ETextMMCDefaultName ],
+                    *iLocStringArray[ ETextInternalMassStorage ],
                     KNoIndex,
                     driveUnit.Name()
                     );
@@ -1074,41 +1043,31 @@
             itemString.Append( KTabChar );
 
             // 2nd row text:
-            switch( aDriveInfo.iDriveStatus )
+            if ( aDriveInfo.iDriveStatus == EDriveOK )
                 {
-                case EDriveNotReady:
+                HBufC* buffer;
+                TInt64 freeSpace = aDriveInfo.iDiskSpace;
+                if ( freeSpace >= 0 )
                     {
-                    itemString.Append(
-                        *iLocStringArray[ ETextMMCUnavailable ] );
-                    break;
+                    buffer = HBufC::NewLC( KListBoxEntryMaxLength );  
+                    TPtr unitStr( buffer->Des() );
+                    AknCFDUtility::SetSecondRowTextL( freeSpace, unitStr );
                     }
-                case EDriveLocked:
-                    {
-                    itemString.Append( *iLocStringArray[ ETextMMCLocked ] );
-                    break;
-                    }
-                case EDriveOK:
-                default:
+                else
                     {
-                    HBufC* buffer;
-                    TInt64 freeSpace = aDriveInfo.iDiskSpace;
-                    if ( freeSpace >= 0 )
-                        {
-                        buffer = HBufC::NewLC( KListBoxEntryMaxLength );  
-                        TPtr unitStr( buffer->Des() );
-                        AknCFDUtility::SetSecondRowTextL( freeSpace, unitStr );
-                        }
-                    else
-                        {
-                        // Disk space is unavailable
-                        buffer = StringLoader::LoadLC(
-                                    R_CFD_QTN_MEMC_SPACE_NOT_AVAILABLE,
-                                    iCoeEnv);
-                        }
-                    itemString.Append( *buffer );//Free mem text
-                    CleanupStack::PopAndDestroy( buffer );
-                    break;
+                    // Disk space is unavailable
+                    buffer = StringLoader::LoadLC(
+                                R_CFD_QTN_MEMC_SPACE_NOT_AVAILABLE,
+                                iCoeEnv);
                     }
+                itemString.Append( *buffer );//Free mem text
+                CleanupStack::PopAndDestroy( buffer );
+                }
+            else
+                {
+                itemString.Append(
+                    *iLocStringArray[
+                        ETextInternalMassStorageUnavailable ] );
                 }
             break;
             }
--- a/commonuis/CommonUi/src/DocumentHandler.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/commonuis/CommonUi/src/DocumentHandler.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -1393,26 +1393,19 @@
         CloseSharableFS();
         User::LeaveIfError(iSharableFS.Connect());
         User::LeaveIfError(iSharableFS.ShareProtected());
-        TInt err = aSharableFile.Open(iSharableFS,aFileName,EFileShareReadersOnly);
-        if (err == KErrInUse)
-            {
-            err = aSharableFile.Open( iSharableFS,aFileName,EFileShareReadersOrWriters );
-            }
-        else if ( err == KErrTooBig )
-        	{
-			RFile64* file64 = NULL;
-			file64 = static_cast<RFile64*> (&aSharableFile);
-			if( file64 != NULL )
-				{
-				err = file64->Open(iSharableFS,aFileName,EFileShareReadersOnly);
-				if( err == KErrInUse )
-					{
-                    err = aSharableFile.Open( iSharableFS,aFileName,EFileShareReadersOrWriters );
-					}
-				}
-        	}
-        error = err; // Otherwise possible KErrNotReady caused by hotswap leads to crash later           
-        }
+
+		error = aSharableFile.Open( iSharableFS, aFileName, EFileShareReadersOrWriters );
+        if( error == KErrTooBig )
+			{
+		    RFile64* file64 = NULL;
+		    file64 = static_cast<RFile64*> (&aSharableFile);
+		    if( file64 != NULL )
+			    {
+			    error = file64->Open( iSharableFS, aFileName, EFileShareReadersOrWriters );
+			    }
+			}
+		}
+    
     #ifdef _DEBUG
     RDebug::Print( _L("DocumentHandler: CDocumentHandler::OpenTempFileL: finished with error=%d."), error);
     #endif
--- a/lafagnosticuifoundation/bmpanimation/tef/Tanctl.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/lafagnosticuifoundation/bmpanimation/tef/Tanctl.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -134,11 +134,14 @@
 	const TInt maskId = aFramesReader.ReadInt16();
 	if (bmpId >= 0)
 		{
-		CFbsBitmap* bitmap = iEikonEnv->CreateBitmapL(aFileName, bmpId);
+        // Create a bitmap with no error dialog - the 3rd argument of CEikonEnv::CreateBitmapL is to decide whether
+        // or not to show a error dialog on failure. With this option, it leaves with KErrExtendedWkithText if the creation of 
+        // bitmap fails. For this test we do not need this error dialog and we expect the raw error code (i.e. KErrNoMemory).
+		CFbsBitmap* bitmap = iEikonEnv->CreateBitmapL(aFileName, bmpId, EFalse);
 		frameData->SetBitmap(bitmap);
 		if (maskId >= 0)
 			{
-			CFbsBitmap* mask = iEikonEnv->CreateBitmapL(aFileName, maskId);
+			CFbsBitmap* mask = iEikonEnv->CreateBitmapL(aFileName, maskId, EFalse);
 			frameData->SetMask(mask);
 			}
 		}
--- a/lafagnosticuifoundation/uigraphicsutils/tef/t_phonenumberutils.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/lafagnosticuifoundation/uigraphicsutils/tef/t_phonenumberutils.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -92,7 +92,7 @@
 void CT_PhoneNumberUtilsStep::ParsePhoneNumberForPPN()
     {
 	INFO_PRINTF1(_L("Test to Parse PhoneNumber With Valid PlainPhoneNumber"));
-    TBuf<50> number = _L("+46 345 34(34347) 42443 42"); // This should be a parseable Plain Phone Number
+    TBuf<KMaxTestBufferSize> number = _L("+46 345 34(34347) 42443 42"); // This should be a parseable Plain Phone Number
 	TEST(TulPhoneNumberUtils::Normalize(number, TulPhoneNumberUtils::EPlainPhoneNumber));
 	INFO_PRINTF2(_L("Normalized Phone No. is %S"), &number);
 	
@@ -152,7 +152,7 @@
  void CT_PhoneNumberUtilsStep::ParsePhoneNumberForCCN()
     {
   	INFO_PRINTF1(_L("Test to Parse PhoneNumber With Valid ContactCardNumber"));
-  	TBuf<50> number = _L("*31*6(0)35/6546"); // This should be a parseable Contact Card Number
+  	TBuf<KMaxTestBufferSize> number = _L("*31*6(0)35/6546"); // This should be a parseable Contact Card Number
 	TEST(TulPhoneNumberUtils::Normalize(number, TulPhoneNumberUtils::EContactCardNumber));
 	INFO_PRINTF2(_L("Normalized Contact Card No. is %S"), &number);
 
@@ -204,15 +204,24 @@
 void CT_PhoneNumberUtilsStep::ParsePhoneNumberForSMSNumber()
    {
    INFO_PRINTF1(_L("Test to Validate SMS number"));
-   TBuf<50> number = _L("12*3-45/345-24.3"); // This should be a Valid SMS number
+   TBuf<KMaxTestBufferSize> number = _L("12*3-45/345-24.3"); // This should be a Valid SMS number
    TEST(TulPhoneNumberUtils::IsValid(number, TulPhoneNumberUtils::ESMSNumber));
    
    TEST(TulPhoneNumberUtils::Normalize(number, TulPhoneNumberUtils::ESMSNumber));
    INFO_PRINTF2(_L("Normalized SMS No. is %S"), &number);
 
-   number = _L("123453452431234534524312345345243"); // This should be a NOT Valid SMS number
-   TEST(!(TulPhoneNumberUtils::IsValid(number, TulPhoneNumberUtils::ESMSNumber)));
-
+   if (KPhoneNoUtilsMaxNumbers < KMaxTestBufferSize)
+        {
+        // form number more than max number
+        number.Zero();
+        for (TInt i = 0; i <= KPhoneNoUtilsMaxNumbers; ++i)
+            {
+            number.Append('0' + i % 10);
+            }
+        // This should be a NOT Valid SMS number
+        TEST(!(TulPhoneNumberUtils::IsValid(number, TulPhoneNumberUtils::ESMSNumber)));
+        }
+   
    number = _L(" "); // This should NOT be a Valid SMS numbernumber
    TEST(!(TulPhoneNumberUtils::IsValid(number, TulPhoneNumberUtils::ESMSNumber)));
    
@@ -250,7 +259,7 @@
 	{
    	INFO_PRINTF1(_L("Test to Validate PhoneClientNumber"));
 
-   	TBuf<50> number = _L("1p23-4534w5-2*43#34"); // This should be a Valid Phone Client Number
+   	TBuf<KMaxTestBufferSize> number = _L("1p23-4534w5-2*43#34"); // This should be a Valid Phone Client Number
 	TEST(TulPhoneNumberUtils::IsValid(number, TulPhoneNumberUtils::EPhoneClientNumber));
     
     TEST(TulPhoneNumberUtils::Normalize(number, TulPhoneNumberUtils::EPhoneClientNumber));
--- a/lafagnosticuifoundation/uigraphicsutils/tef/t_phonenumberutils.h	Wed Apr 14 16:14:00 2010 +0300
+++ b/lafagnosticuifoundation/uigraphicsutils/tef/t_phonenumberutils.h	Tue Apr 27 16:55:05 2010 +0300
@@ -25,6 +25,9 @@
 #include "appfwk_test_AppUi.h"
 #include <tulphonenumberutils.h>
 
+const TInt KMaxTestBufferSize = 128;
+const TInt KPhoneNoUtilsMaxNumbers = 48; // see hard coded value in ... tulphonenumberutils.cpp
+
 _LIT(KT_PhoneNumberUtilsStep,"t_phonenumberutils");
 
 //PPN == EPlainPhoneNumber
--- a/lafagnosticuifoundation/uigraphicsutils/tulsrc/tulphonenumberutils.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/lafagnosticuifoundation/uigraphicsutils/tulsrc/tulphonenumberutils.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -33,6 +33,7 @@
 // DEFINES
 const TInt KPhoneNoUtilsMinNumbers  = 1;
 const TInt KPhoneNoUtilsMaxNumbers  = 48; // Maximum phone number supported in Contacts
+                                          // see dependent test case t_phonenumberutils.cpp when changing this 
 
 // ---------------------------------------------------------
 // Phone number parsing methods
--- a/psln/Group/Psln.mmp	Wed Apr 14 16:14:00 2010 +0300
+++ b/psln/Group/Psln.mmp	Tue Apr 27 16:55:05 2010 +0300
@@ -116,8 +116,6 @@
 LIBRARY                 featmgr.lib
 LIBRARY                 eikdlg.lib
 LIBRARY                 hal.lib
-
-LIBRARY                 aknlocalskinlib.lib
 LIBRARY                 aknlistloadertfx.lib
 LIBRARY                 psmclient.lib
 
--- a/psln/Inc/PslnBaseContainer.h	Wed Apr 14 16:14:00 2010 +0300
+++ b/psln/Inc/PslnBaseContainer.h	Tue Apr 27 16:55:05 2010 +0300
@@ -31,6 +31,8 @@
 */
 class CPslnBaseContainer : public CCoeControl
     {
+    friend class CPslnGeneralThemeView;
+
     public:
 
         /**
--- a/psln/Inc/PslnBaseView.h	Wed Apr 14 16:14:00 2010 +0300
+++ b/psln/Inc/PslnBaseView.h	Tue Apr 27 16:55:05 2010 +0300
@@ -99,12 +99,6 @@
         * Handles list box selections.
         */
         virtual void HandleListBoxSelectionL() = 0;
-                
-        /**
-        * Called by HandleListBoxEventL.
-        * Handles list box item highlight events.
-        */
-        virtual void HandleListBoxItemHighlightL() = 0;
 
         /**
         * Adds given resource text as MSK to CBA.
@@ -137,18 +131,6 @@
         */
         virtual TInt CbaResourceId( const TVwsViewId& aPrevViewId,TUid aCustomMessageId );
         
-        /**
-        * Called by HandleListBoxEventL.
-        * Handles list box stylus down event.
-        */
-        virtual void HandleListBoxStylusDown();
-        
-        /**
-        * Called by HandleListBoxEventL.
-        * Handles list box stylus move event.
-        */
-        virtual void HandleListBoxStylusDrag();
-        
     private:
 
         /* Remove container. */
--- a/psln/Inc/PslnGeneralThemeContainer.h	Wed Apr 14 16:14:00 2010 +0300
+++ b/psln/Inc/PslnGeneralThemeContainer.h	Tue Apr 27 16:55:05 2010 +0300
@@ -22,21 +22,6 @@
 
 #include "PslnBaseContainer.h"
 
-class CAknLocalSkinInstance;
-
-/**
-*  Observer interface for theme preview state changes.
-*  aPreviewMode new mode for theme preview - ETrue preview is active
-*                                            EFalse preview is now ready
-*
-*  @since S60 v5.0
-*/
-class MPslnThemePreviewObserver
-    {
-    public:
-        virtual void HandlePreviewStateChange( const TBool& aPreviewMode ) = 0;
-    };
-
 /**
 *  General theme container.
 *  Contains available skins.
@@ -95,121 +80,16 @@
         * @since 5.0
         */
         void UpdateSkinListItemsDColumnOnlyL();
-
-        /**
-        * Starts theme preview.
-        *
-        * @since 5.0
-        */
-        void StartThemePreviewL( TBool aTouch = ETrue );
-                
-        
-        /**
-        * Cancel theme preview.
-        *
-        * @since 5.0
-        */
-        void CancelThemePreviewL();
-
-
-        /**
-        * Sets theme preview change observer (MPslnThemePreviewObserver).
-        * aObserver observer for theme preview changes.
-        *
-        * @since 5.0
-        */
-        void SetThemePreviewObserver( MPslnThemePreviewObserver* aObserver );
-
-        /**
-        * Locks/enables up and down key events to this container.
-        *
-        * @since 5.0
-        */
-        void LockUpAndDownKeys( const TBool& aLocked );
-        
-        /**
-        * Restart Quick Preview
-        */
-        void RestartQuickPreviewL();
-
-        /**
-        * Set theme preview state active.
-        */    
-        void SetPreviewStateActive();
-        
-        /**
-        * Is current focus theme in preview state. 
-        * @return ETrue if theme is in preview state.
-        */    
-        TBool CurrentThemeInPreviewState();
         
 
     private:            
         
         // Gets Help context.        
         void GetHelpContext( TCoeHelpContext& aContext ) const;
-        // From CPslnBaseContainer
-        TKeyResponse OfferKeyEventL(
-            const TKeyEvent& aKeyEvent, 
-            TEventCode aType );
-        // From CCoeControl
-        void HandlePointerEventL( const TPointerEvent &aPointerEvent );
-
-        /* Creates (&initializes) a locally skinnable item list.*/
-        void CreateSkinItemList();
-        
-        /* Adds skin item to locally skinnable item list. */
-        TInt AddItemToList( const TAknsItemID& aSkinID );
-
-        /* Callback interface for idle time. */
-        static TInt DoHandleIdleTimeL( TAny* aAny );
-
-        /* Callback interface for theme effect ending. */
-        static TInt DoHandleEffectEndL( TAny* aAny );
-
-        /* Handle idle time. */
-        void HandleIdleTimeL();
-
-        /* Handle theme effect ending. */
-        void HandleEffectEndL();
-        
-        /*
-        * Get Preview Skin Index.
-        */
-        TInt PreviewSkinIndex();
-
-        /* Initialize theme preview delay time settings. */
-        void InitPreviewTime();
-        
-        /* Show Error Note. */
-        void ShowErrorNoteL( TInt  aResourceId  ); 
 
     private: // data
 
         /*
-        * List of skin items to skin locally.
-        */
-        RArray<TAknsItemID> iSkinItemList;
-
-        /*
-        * Timer for delay.
-        * Own.
-        */
-        CPeriodic* iPreviewIdle;
-
-        /*
-        * Skin preview library instance.
-        * Own.
-        */
-        CAknLocalSkinInstance* iLocalSkinInstance;
-
-        /*
-        * Theme preview state change observer.
-        * Not own.
-        */
-        MPslnThemePreviewObserver* iObserver;
-
-        /*
         * To be used index in highlight when container is updated.
         * This is used when skin is activated and user has already
         * highlighted some other theme.
@@ -217,32 +97,10 @@
         TInt iToBeUsedIndex;
 
         /*
-        * Up and down key events are ignored while a skin is activating.
-        * This is to avoid drawing of container when the skin items might
-        * not be valid.
-        */
-        TBool iLockedKeys;
-                
-        /*
         * Current preview theme index in listbox.
         */
         TInt iActiveSkinItemIndex;
-        
-        /*
-        * Theme preview delay time.
-        */
-        TInt iPreviewDelayTime;
-        
-        /*
-        * Theme preview delay time, arisen by navigation key.
-        */
-        TInt iPreviewDelayTimeOnHardKey;
-        
-        /*
-        * Theme preview interval time.
-        */
-        TInt iPreviewIntervalTime;
-        
+
         /*
         * Old Skin Num.
         */
--- a/psln/Inc/PslnGeneralThemeView.h	Wed Apr 14 16:14:00 2010 +0300
+++ b/psln/Inc/PslnGeneralThemeView.h	Tue Apr 27 16:55:05 2010 +0300
@@ -31,8 +31,7 @@
 *  @since S60 v3.1
 */
 class CPslnGeneralThemeView : public CPslnBaseView, 
-                              public MPslnFWMSKObserver,
-                              public MPslnThemePreviewObserver
+                              public MPslnFWMSKObserver
     {
     public:  // Constructors and destructor
 
@@ -83,22 +82,6 @@
         */
         void UpdateSkinListItemsDColumnOnlyL();
 
-        /**
-        * From MPslnThemePreviewObserver.
-        * New theme preview state available.
-        */
-        void HandlePreviewStateChange( const TBool& aPreviewMode );
-        
-        /**
-        * Restart Quick Preview
-        */
-        void RestartQuickPreviewL();
-
-        /**
-        * Remove local skin items.
-        */
-        void RemoveLocalSkinItems();
-
     private:
 
         /**
@@ -124,11 +107,6 @@
         * From CPslnBaseView.
         */
         void HandleListBoxSelectionL();
-        
-        /**
-        * From CPslnBaseView.
-        */
-        void HandleListBoxItemHighlightL();
 
         /**
         * From CPslnBaseView.
@@ -153,16 +131,6 @@
         */
         void ConstructL();
         
-        /**
-        * From CPslnBaseView.
-        */
-        void HandleListBoxStylusDown();
-        
-        /**
-        * From CPslnBaseView.
-        */
-        void HandleListBoxStylusDrag();
-        
         
     private:    // Data
 
@@ -175,21 +143,6 @@
     * Download item index.
     */
     TInt iDownloadItemIndex;
-    
-    /**
-    * What is current skin preview mode.
-    *   ETrue - preview is occuring.
-    *   EFalse - preview is ready / no skin preview active.
-    */
-    TBool iPreviewMode;
-
-    /**
-    * Is delayed skin activation ongoing.
-    * If user highlights a skin and immediately activates it, 
-    * preview is first done completely AND then skin activation
-    * is handled.
-    */
-    TBool iDelayedSkinActivation;
 
     /**
     * Index to be used when skin is activated AFTER skin preview.
--- a/psln/Inc/PslnMainView.h	Wed Apr 14 16:14:00 2010 +0300
+++ b/psln/Inc/PslnMainView.h	Tue Apr 27 16:55:05 2010 +0300
@@ -107,11 +107,6 @@
         * From CPslnBaseView.
         */
         void HandleListBoxSelectionL();
-        
-        /**
-        * From CPslnBaseView.
-        */
-        void HandleListBoxItemHighlightL();
 
         /**
         * From CPslnBaseView.
--- a/psln/Inc/PslnScreenSaverView.h	Wed Apr 14 16:14:00 2010 +0300
+++ b/psln/Inc/PslnScreenSaverView.h	Tue Apr 27 16:55:05 2010 +0300
@@ -144,11 +144,6 @@
         * Handles listbox selection.
         */
         void HandleListBoxSelectionL();
-              
-        /**
-        * From CPslnBaseView.
-        */
-        void HandleListBoxItemHighlightL();
 
         /**
         * From CPslnBaseView.
--- a/psln/Inc/PslnUi.h	Wed Apr 14 16:14:00 2010 +0300
+++ b/psln/Inc/PslnUi.h	Tue Apr 27 16:55:05 2010 +0300
@@ -27,6 +27,7 @@
 #include <AknsSrvClient.h>
 #include <e32property.h>
 
+class CAknWaitDialog;
 class CAknNavigationControlContainer;
 class CAknNavigationDecorator;
 class MAknBackgroundProcess;
@@ -216,18 +217,6 @@
     void ConstructTabGroupL();
 
     /**
-    * Toggles screen blanker on/off. 
-    * @param aToggleValue ETrue activates screen blanker; EFalse removes it.
-    * @param aStatusPaneVisible indicates if the blanker should cover the 
-    *        statuspane as well. This is irrelevant, when removing the blanker.
-    * @since 3.1
-    */
-    void ToggleScreenBlankerL(
-        const TBool& aToggleValue,
-        const TBool& aStatusPaneVisible,
-        const TBool& aRealAct = ETrue );
-
-    /**
     * Indicates if the UI class has deployed the skin already and is ready to 
     * receive further skin activation related commands.
     * @return ETrue when UI class can handle a new skin activation related 
@@ -391,6 +380,20 @@
     */
     void HandleUSBCallBackL();
 
+    /**
+     * show progress bar when it is hiden 
+     *
+     * @return none.
+     */
+    void ShowProgressBarL();
+
+    /**
+     * hide progress bar when it is shown 
+     *
+     * @return none.
+     */
+    void HideProgressBar();
+
 private: // data
 
     /**
@@ -544,6 +547,11 @@
     */
     CPslnGeneralThemeView* iGeneralThemeView;
 
+    /**
+     * the waiting note
+     * Own
+     */    
+    CAknWaitDialog* iWaitDialog;    
     };
 
 // Inline methods.
--- a/psln/Inc/PslnWallpaperView.h	Wed Apr 14 16:14:00 2010 +0300
+++ b/psln/Inc/PslnWallpaperView.h	Tue Apr 27 16:55:05 2010 +0300
@@ -100,11 +100,6 @@
 
         /* From CPslnBaseView. */
         void HandleListBoxSelectionL();
-        
-        /**
-        * From CPslnBaseView.
-        */
-        void HandleListBoxItemHighlightL();        
 
         /* From CPslnBaseView. */
         void NewContainerL();
--- a/psln/PslnFramework/src/PslnFWBaseView.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/psln/PslnFramework/src/PslnFWBaseView.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -129,21 +129,27 @@
         if ( appUi )
             {
             CEikStatusPane* sp = appUi->StatusPane();
-            iNaviControlContainer = static_cast<CAknNavigationControlContainer*>
-                ( sp->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) );
+            if ( sp )
+                {
+                iNaviControlContainer = static_cast<CAknNavigationControlContainer*>
+                    ( sp->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) );
+                }
             }
         }
 
     _LIT( KPanicText, "CPslnFWBaseView" );
     __ASSERT_DEBUG( iNaviControlContainer, User::Panic( KPanicText, KErrGeneral ) );
-    	        
-    if ( iNaviPaneContext )
+
+    if ( iNaviControlContainer )
         {
-        iNaviControlContainer->PushL( *iNaviPaneContext );
-        }
-    else
-        {
-        iNaviControlContainer->PushDefaultL();
+        if ( iNaviPaneContext )
+            {
+            iNaviControlContainer->PushL( *iNaviPaneContext );
+            }
+        else
+            {
+            iNaviControlContainer->PushDefaultL();
+            }
         }
     PSLN_TRACE_DEBUG("CPslnFWBaseView::SetNaviPaneL END");
     }
--- a/psln/Rss/Psln.rss	Wed Apr 14 16:14:00 2010 +0300
+++ b/psln/Rss/Psln.rss	Tue Apr 27 16:55:05 2010 +0300
@@ -459,7 +459,7 @@
         {
         MENU_TITLE { menu_pane = r_psln_basic_menupane; },
         MENU_TITLE { menu_pane = r_psln_transition_effects_menu_pane; },
-//        MENU_TITLE { menu_pane = r_psln_anim_background_menu_pane; },
+        MENU_TITLE { menu_pane = r_psln_anim_background_menu_pane; },
         MENU_TITLE { menu_pane = R_PSLN_GEN_VIEW_MENUPANE; }
         };
     }
@@ -1005,4 +1005,18 @@
             }
         };
     }
+
+// **PROCESSING NOTE
+
+// -----------------------------------------------------------------------------
+//
+// r_psln_qtn_gen_note_processing
+//
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_psln_qtn_gen_note_processing
+    {
+    buf = qtn_gen_note_processing;
+    }
 // End of File
--- a/psln/Rss/PslnCommon.rss	Wed Apr 14 16:14:00 2010 +0300
+++ b/psln/Rss/PslnCommon.rss	Tue Apr 27 16:55:05 2010 +0300
@@ -45,11 +45,13 @@
             {
             command = EPslnCmdAppDownload;
             txt = qtn_skins_option_dltheme;
+            flags = EEikMenuItemAction;
             },
         MENU_ITEM 
             {
             command = EPslnCmdAppActivate;
             txt = qtn_skins_option_activate;
+            flags = EEikMenuItemAction;
             }  
         };
     }
--- a/psln/Src/PslnBaseView.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/psln/Src/PslnBaseView.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -62,7 +62,10 @@
     {
     if ( iContainer )
         {
-        iPslnUi->RemoveFromStack( iContainer );
+        if( iPslnUi )
+            {
+            iPslnUi->RemoveFromStack( iContainer );
+            }
         delete iContainer;
         }
     if ( iNaviPaneContext &&
@@ -81,25 +84,10 @@
     {
     switch ( aEventType )
         {
-        case EEventItemClicked:
-        case EEventFlickStopped:
-            if ( iContainer && iContainer->GetMiddleSoftkeyObserver() )
-                {
-                iContainer->GetMiddleSoftkeyObserver()->CheckMiddleSoftkeyLabelL();
-                }
-            HandleListBoxItemHighlightL();    
-            break;
         case EEventEnterKeyPressed:
-        case EEventItemDoubleClicked:
         case EEventItemSingleClicked:
             HandleListBoxSelectionL();
             break;
-        case EEventPenDownOnItem:
-            HandleListBoxStylusDown();
-            break;
-        case EEventItemDraggingActioned:
-            HandleListBoxStylusDrag();
-            break;
         default:
            break;
         }
@@ -261,22 +249,6 @@
     return R_AVKON_SOFTKEYS_OPTIONS_BACK;
     }
     
-// -----------------------------------------------------------------------------
-// Handle listbox stylus move event.
-// -----------------------------------------------------------------------------
-//
-void CPslnBaseView::HandleListBoxStylusDown()
-    {
-    }
-    
-// -----------------------------------------------------------------------------
-// Handle listbox stylus move event.
-// -----------------------------------------------------------------------------
-//
-void CPslnBaseView::HandleListBoxStylusDrag()
-    {
-    }
-
 // ---------------------------------------------------------------------------
 // Removes container.
 // ---------------------------------------------------------------------------
--- a/psln/Src/PslnGeneralThemeContainer.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/psln/Src/PslnGeneralThemeContainer.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -23,7 +23,6 @@
 #include <StringLoader.h>
 #include <AknGlobalNote.h>
 
-#include <aknlocalskinlib.h>
 #include <aknlistloadertfx.h>
 
 #include <aknnotewrappers.h> 
@@ -57,12 +56,6 @@
 #include <pslnfwiconhelper.h>
 #include <mpslnfwmsklabelobserver.h>
 
-// Constant for delay for the first timer event
-const TTimeIntervalMicroSeconds32 KIdlePreviewDelay = 250000;
-
-// Constant for interval for the subsequent timer events
-const TTimeIntervalMicroSeconds32 KIdlePreviewInterval = 200000;
-
 // ============================ MEMBER FUNCTIONS ===============================
 // -----------------------------------------------------------------------------
 // C++ default constructor can NOT contain any code, that might leave.
@@ -79,17 +72,6 @@
 void CPslnGeneralThemeContainer::ConstructL( const TRect& aRect )
     {
     iListBox = new (ELeave) CAknSingleGraphicStyleListBox;
-
-
-    iPreviewIdle = CPeriodic::NewL( CActive::EPriorityIdle );
-
-    RFs& fs = CCoeEnv::Static()->FsSession();
-    iLocalSkinInstance = CAknLocalSkinInstance::NewL ( fs, iModel->SkinSrvSession() );
-    
-    if( PslnFeatures::IsSupported( KPslnSupportFastPreviewTheme ) )
-        {
-        InitPreviewTime();
-        }
     BaseConstructL( aRect, R_PSLN_SKIN_LIST_VIEW_TITLE, KPslnNoResource );
     iOldSkinNum = iModel->NumberOfSkins();
     }
@@ -97,25 +79,6 @@
 // Destructor
 CPslnGeneralThemeContainer::~CPslnGeneralThemeContainer()
     {
-    // iListBox is deleted in class CPslnBaseContainer.
-
-    iSkinItemList.Reset();
-
-    if ( iPreviewIdle )
-        {
-        iPreviewIdle->Cancel();
-        }
-    delete iPreviewIdle;
-    delete iLocalSkinInstance;
-
-    // Remove locally skinned items.
-    MAknsSkinInstance* si = AknsUtils::SkinInstance();
-    if ( si )
-        {        
-        si->SetChangeEventsEnabled( EFalse );
-        si->RemoveLocalItemDefs();
-        si->SetChangeEventsEnabled( ETrue );
-        }
     }
 
 // ---------------------------------------------------------------------------
@@ -163,7 +126,6 @@
 //
 void CPslnGeneralThemeContainer::ConstructListBoxL( TInt /*aResLbxId*/ )
     {
-    iListBox->DisableSingleClick( ETrue );
     UpdateSkinListItemsL( KErrNotFound );
     }
 
@@ -299,7 +261,6 @@
     iListBox->HandleItemAdditionL();
     if ( iOldSkinNum != maxSkinIndex )
         {
-        StartThemePreviewL();
         iOldSkinNum = maxSkinIndex;
         }
     PSLN_TRACE_DEBUG("CPslnGeneralThemeContainer::CreateListBoxItemsL END");
@@ -322,65 +283,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// Starts theme preview.
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::StartThemePreviewL( TBool aTouch )
-    {    
-    // Start timer with 0.5s delay.
-    iPreviewIdle->Cancel();
-    
-    if( PslnFeatures::IsSupported( KPslnSupportFastPreviewTheme ) )
-        {
-        iPreviewIdle->Start( 
-            aTouch ? iPreviewDelayTime : iPreviewDelayTimeOnHardKey, 
-            iPreviewIntervalTime, 
-            TCallBack( DoHandleIdleTimeL, this ) );
-        }
-    else
-        {
-        iPreviewIdle->Start( 
-            KIdlePreviewDelay, 
-            KIdlePreviewInterval, 
-            TCallBack( DoHandleIdleTimeL, this ) );
-        }
-    }
-    
-// ---------------------------------------------------------------------------
-// Cancel theme preview.
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::CancelThemePreviewL()
-    {   
-    iPreviewIdle->Cancel();
-    }
-
-// ---------------------------------------------------------------------------
-// Sets theme preview observer.
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::SetThemePreviewObserver( 
-    MPslnThemePreviewObserver* aObserver )
-    {
-    iObserver = aObserver;
-    }
-
-// ---------------------------------------------------------------------------
-// Locks up and down key events.
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::LockUpAndDownKeys( const TBool& aLocked )
-    {
-    TRAPD( transitionEffectsValue, iModel->GetTransitionEffectStateL() );
-    // Effects are enabled if value is NOT KMaxTInt.
-    // Only lock keys, if transition effects are off.
-    if( transitionEffectsValue == KMaxTInt ) 
-        {        
-        iLockedKeys = aLocked;
-        }
-    }
-
-// ---------------------------------------------------------------------------
 // Gets help context for Help application.
 // ---------------------------------------------------------------------------
 //
@@ -391,440 +293,4 @@
     aContext.iContext = KSKINS_HLP_LIST;
     }
 
-// ---------------------------------------------------------------------------
-// Handles key events.
-// Starts the new preview theme load before passing the event to base class.
-// ---------------------------------------------------------------------------
-//
-TKeyResponse CPslnGeneralThemeContainer::OfferKeyEventL(
-    const TKeyEvent& aKeyEvent, 
-    TEventCode aType )
-    {
-    TKeyResponse resp = EKeyWasConsumed;
-
-    // If lock is active, ignore up and down key events.
-    if ( iLockedKeys &&
-         !( aKeyEvent.iCode == EKeyUpArrow || aKeyEvent.iCode == EKeyDownArrow ) ||
-        !iLockedKeys )
-        {
-        resp = CPslnBaseContainer::OfferKeyEventL( aKeyEvent, aType );
-        }
-    
-       // React to up and down arrow key events IF download skin is not selected.
-    if ( aType == EEventKey && 
-         (aKeyEvent.iCode == EKeyUpArrow || aKeyEvent.iCode == EKeyDownArrow ) &&
-         !iLockedKeys )
-        {
-        iObserver->HandlePreviewStateChange( ETrue );
-        StartThemePreviewL( EFalse );
-        }
-
-    return resp;
-    }
-
-// ---------------------------------------------------------------------------
-// Creates the skin item list for local item skinning.
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::CreateSkinItemList()
-    {
-    PSLN_TRACE_DEBUG("CPslnGeneralThemeContainer::CreateSkinItemList" );
-    TInt retVal = KErrNone;
-
-    // Main area, screen, status pane and control pane.
-    retVal += AddItemToList( KAknsIIDQsnBgScreen );
-    //retVal += AddItemToList( KAknsIIDQsnBgAreaMainListGene );
-    retVal += AddItemToList( KAknsIIDQsnBgAreaStaconRt );
-    retVal += AddItemToList( KAknsIIDQsnBgAreaStaconLt );
-    retVal += AddItemToList( KAknsIIDQsnBgAreaStaconRb );
-    retVal += AddItemToList( KAknsIIDQsnBgAreaStaconLb );
-    retVal += AddItemToList( KAknsIIDQsnBgAreaControl );
-    retVal += AddItemToList( KAknsIIDQsnBgAreaControlPopup );
-    retVal += AddItemToList( KAknsIIDQsnBgAreaStatus );
-    retVal += AddItemToList( KAknsIIDQsnFrStatusFlat );
-    retVal += AddItemToList( KAknsIIDQsnFrStatusFlatCornerTl );
-    retVal += AddItemToList( KAknsIIDQsnFrStatusFlatCornerTr );
-    retVal += AddItemToList( KAknsIIDQsnFrStatusFlatCornerBl );
-    retVal += AddItemToList( KAknsIIDQsnFrStatusFlatCornerBr );
-    retVal += AddItemToList( KAknsIIDQsnFrStatusFlatSideT );
-    retVal += AddItemToList( KAknsIIDQsnFrStatusFlatSideB );
-    retVal += AddItemToList( KAknsIIDQsnFrStatusFlatSideL );
-    retVal += AddItemToList( KAknsIIDQsnFrStatusFlatSideR );
-    retVal += AddItemToList( KAknsIIDQsnFrStatusFlatCenter );
-
-    // Navipane
-    retVal += AddItemToList( KAknsIIDQsnBgNavipaneSolid );
-    retVal += AddItemToList( KAknsIIDQsnBgNavipaneWipe );
-    retVal += AddItemToList( KAknsIIDQgnIndiNaviArrowLeft );
-    retVal += AddItemToList( KAknsIIDQgnIndiNaviArrowRight );
-
-    // Battery pane, signal pane
-    retVal += AddItemToList( KAknsIIDQgnIndiSignalStrength );
-    retVal += AddItemToList( KAknsIIDQgnIndiBatteryStrength );
-
-    // Scrollbars
-    retVal += AddItemToList( KAknsIIDQsnCpScrollBgTop );
-    retVal += AddItemToList( KAknsIIDQsnCpScrollBgMiddle );
-    retVal += AddItemToList( KAknsIIDQsnCpScrollBgBottom );
-    retVal += AddItemToList( KAknsIIDQsnCpScrollHandleBgTop );
-    retVal += AddItemToList( KAknsIIDQsnCpScrollHandleBgMiddle );
-    retVal += AddItemToList( KAknsIIDQsnCpScrollHandleBgBottom );
-    retVal += AddItemToList( KAknsIIDQsnCpScrollHandleTop );
-    retVal += AddItemToList( KAknsIIDQsnCpScrollHandleMiddle );
-    retVal += AddItemToList( KAknsIIDQsnCpScrollHandleBottom );
-
-    // Tabs
-    retVal += AddItemToList( KAknsIIDQgnGrafTabActiveL );
-    retVal += AddItemToList( KAknsIIDQgnGrafTabActiveM );
-    retVal += AddItemToList( KAknsIIDQgnGrafTabActiveR );
-    retVal += AddItemToList( KAknsIIDQgnGrafTabPassiveL );
-    retVal += AddItemToList( KAknsIIDQgnGrafTabPassiveM );
-    retVal += AddItemToList( KAknsIIDQgnGrafTabPassiveR );    
-
-    // Highlight
-    retVal += AddItemToList( KAknsIIDQsnFrList );
-    retVal += AddItemToList( KAknsIIDQsnFrListCornerTl );
-    retVal += AddItemToList( KAknsIIDQsnFrListCornerTr );
-    retVal += AddItemToList( KAknsIIDQsnFrListCornerBl );
-    retVal += AddItemToList( KAknsIIDQsnFrListCornerBr );
-    retVal += AddItemToList( KAknsIIDQsnFrListSideT );
-    retVal += AddItemToList( KAknsIIDQsnFrListSideB );
-    retVal += AddItemToList( KAknsIIDQsnFrListSideL );
-    retVal += AddItemToList( KAknsIIDQsnFrListSideR );
-    retVal += AddItemToList( KAknsIIDQsnFrListCenter );
-
-    // Options menu
-    retVal += AddItemToList( KAknsIIDQsnFrPopup );
-    retVal += AddItemToList( KAknsIIDQsnFrPopupCornerTl );
-    retVal += AddItemToList( KAknsIIDQsnFrPopupCornerTr );
-    retVal += AddItemToList( KAknsIIDQsnFrPopupCornerBl );
-    retVal += AddItemToList( KAknsIIDQsnFrPopupCornerBr );
-    retVal += AddItemToList( KAknsIIDQsnFrPopupSideT );
-    retVal += AddItemToList( KAknsIIDQsnFrPopupSideB );
-    retVal += AddItemToList( KAknsIIDQsnFrPopupSideL );
-    retVal += AddItemToList( KAknsIIDQsnFrPopupSideR );
-    retVal += AddItemToList( KAknsIIDQsnFrPopupCenter );
-    retVal += AddItemToList( KAknsIIDQsnFrPopupSub );
-    retVal += AddItemToList( KAknsIIDQsnFrPopupSubCornerTl );
-    retVal += AddItemToList( KAknsIIDQsnFrPopupSubCornerTr );
-    retVal += AddItemToList( KAknsIIDQsnFrPopupSubCornerBl );
-    retVal += AddItemToList( KAknsIIDQsnFrPopupSubCornerBr );
-    retVal += AddItemToList( KAknsIIDQsnFrPopupSubSideT );
-    retVal += AddItemToList( KAknsIIDQsnFrPopupSubSideB );
-    retVal += AddItemToList( KAknsIIDQsnFrPopupSubSideL );
-    retVal += AddItemToList( KAknsIIDQsnFrPopupSubSideR );
-    retVal += AddItemToList( KAknsIIDQsnFrPopupCenterSubmenu );
-    retVal += AddItemToList( KAknsIIDQgnIndiSubmenu );
-
-    // Icons
-    retVal += AddItemToList( KAknsIIDQgnPropPslnActive );
-    retVal += AddItemToList( KAknsIIDQgnIndiMmcAdd );
-
-    // QHD specific CBA.    
-    retVal += AddItemToList( KAknsIIDQgnIndiSctrlMaskInactLsc );
-    retVal += AddItemToList( KAknsIIDQgnIndiSctrlMaskActLsc );
-    retVal += AddItemToList( KAknsIIDQgnFrSctrlButton );
-    retVal += AddItemToList( KAknsIIDQgnFrSctrlButtonCornerTl );
-    retVal += AddItemToList( KAknsIIDQgnFrSctrlButtonCornerTr );
-    retVal += AddItemToList( KAknsIIDQgnFrSctrlButtonCornerBl );
-    retVal += AddItemToList( KAknsIIDQgnFrSctrlButtonCornerBr );
-    retVal += AddItemToList( KAknsIIDQgnFrSctrlButtonSideT );
-    retVal += AddItemToList( KAknsIIDQgnFrSctrlButtonSideB );
-    retVal += AddItemToList( KAknsIIDQgnFrSctrlButtonSideL );
-    retVal += AddItemToList( KAknsIIDQgnFrSctrlButtonSideR );
-    retVal += AddItemToList( KAknsIIDQgnFrSctrlButtonCenter );
-    retVal += AddItemToList( KAknsIIDQgnFrSctrlSkButton  );
-    retVal += AddItemToList( KAknsIIDQgnFrSctrlSkButtonCornerTl );
-    retVal += AddItemToList( KAknsIIDQgnFrSctrlSkButtonCornerTr );
-    retVal += AddItemToList( KAknsIIDQgnFrSctrlSkButtonCornerBl );
-    retVal += AddItemToList( KAknsIIDQgnFrSctrlSkButtonCornerBr );
-    retVal += AddItemToList( KAknsIIDQgnFrSctrlSkButtonSideT );
-    retVal += AddItemToList( KAknsIIDQgnFrSctrlSkButtonSideB );
-    retVal += AddItemToList( KAknsIIDQgnFrSctrlSkButtonSideL );
-    retVal += AddItemToList( KAknsIIDQgnFrSctrlSkButtonSideR );
-    retVal += AddItemToList( KAknsIIDQgnFrSctrlSkButtonCenter );
-
-    __ASSERT_DEBUG( retVal == KErrNone, User::Panic(_L("Error in inserting"), 1) );
-    }
-
-// ---------------------------------------------------------------------------
-// Adds one item to skin item list.
-// ---------------------------------------------------------------------------
-//
-TInt CPslnGeneralThemeContainer::AddItemToList( const TAknsItemID& aSkinID )
-    {
-    TAknsItemID skinItem;
-    skinItem.Set( aSkinID.iMajor, aSkinID.iMinor );
-    TInt error = iSkinItemList.InsertInOrder( skinItem, TAknsItemID::LinearOrder );
-    PSLN_TRACE_DEBUG3("CPslnGeneralThemeContainer::AddItemToList item=%d %d added %d", 
-        aSkinID.iMajor, aSkinID.iMinor, error );
-    return error;
-    }
-
-// -----------------------------------------------------------------------------
-// Callback function when application is idle.
-// -----------------------------------------------------------------------------
-//
-TInt CPslnGeneralThemeContainer::DoHandleIdleTimeL( TAny* aAny )
-    {
-    static_cast< CPslnGeneralThemeContainer* >( aAny )->HandleIdleTimeL();
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// Callback function when application is idle.
-// -----------------------------------------------------------------------------
-//
-TInt CPslnGeneralThemeContainer::DoHandleEffectEndL( TAny* aAny )
-    {
-    static_cast< CPslnGeneralThemeContainer* >( aAny )->HandleEffectEndL();
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// Handle idle time.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::HandleIdleTimeL()
-    {
-    PSLN_TRACE_DEBUG("CPslnGeneralThemeContainer::HandleIdleTimeL" );
-    // First stop timer.
-    iPreviewIdle->Cancel();
-    
-    // No re-preview the same theme
-    if( iActiveSkinItemIndex == iListBox->CurrentItemIndex() )
-        {
-        return;
-        }
-
-    // Check free mem
-    TInt freeMem = 0;
-    HAL::Get( HALData::EMemoryRAMFree , freeMem );
-    if( freeMem <= KPslnMinMemSize )
-        {
-        HBufC* errorBuf = StringLoader::LoadLC(
-            R_PSLN_QTN_MEMLO_RAM_OUT_OF_MEM );
-        // Display global note.
-        CAknGlobalNote* errorNote = CAknGlobalNote::NewLC();
-        errorNote->ShowNoteL( EAknGlobalErrorNote, *errorBuf );
-        CleanupStack::PopAndDestroy( 2 ); // errorNote & errorBuf
-        return;
-        }
-
-    iActiveSkinItemIndex = iListBox->CurrentItemIndex();
-    // Ignore download skin item if it is available.
-    TInt modifier = IsEmbeddedLinkVisible();
-    TInt activeSkinIndex = iActiveSkinItemIndex - modifier;
-    
-    TBool usbAttached = static_cast<CPslnUi*>( ControlEnv()->AppUi() )->USBAttachState();
-            
-    if( iModel->IsValidForPreview(activeSkinIndex) == EFalse )
-        {
-        // If skin file didn't valid, preview active skin.
-        activeSkinIndex = iModel->ActiveSkinIndex();
-        }
-    if ( IsEmbeddedLinkVisible() && iListBox->CurrentItemIndex() == 0 )
-        {
-        activeSkinIndex = iModel->ActiveSkinIndex();
-        }
-    if( iModel->IsThemeOnMemoryCard( activeSkinIndex ) && usbAttached)
-        {
-        activeSkinIndex = 0;
-        }
-    
-    CPslnSkinEntry* activeSkin = iModel->VisibleSkin( activeSkinIndex );
-    
-    if ( activeSkin )
-        {
-        // Re-create the list, since skin preview library removes skinned items
-        // from used list (performance reasons).
-        iSkinItemList.Reset();
-        CreateSkinItemList();        
-        PSLN_TRACE_DEBUG("CPslnGeneralThemeContainer::HandleIdleTimeL Create Preview" );
-        static_cast<CPslnUi*>( ControlEnv()->AppUi() )->ToggleScreenBlankerL( ETrue, ETrue, EFalse );
-
-        if ( iModel->IsActiveSkinSelected( activeSkinIndex  ) )
-            {            
-            // Remove locally skinned items.
-            MAknsSkinInstance* si = AknsUtils::SkinInstance();
-            if ( si )
-                {        
-                si->SetChangeEventsEnabled( EFalse );
-                si->RemoveLocalItemDefs();
-                si->SetChangeEventsEnabled( ETrue );
-                }
-            }
-        else
-            {   
-            TRAPD(err,iLocalSkinInstance->ApplyL( activeSkin->FullName(), iSkinItemList ));
-            if (err == EAknsSrvProtected)
-                {            
-                ShowErrorNoteL( R_PSLN_QTN_DRM_PREV_RIGHTS_SET );
-                }
-            else if (err == KErrCorrupt)
-                {
-                //Skin corrupt
-                ShowErrorNoteL( R_PSLN_QTN_SKINS_ERROR_CORRUPTED );
-                //Preview the active skin
-                TRAP_IGNORE(iLocalSkinInstance->ApplyL( 
-                                iModel->VisibleSkin(iModel->ActiveSkinIndex())->FullName(),
-                                iSkinItemList ));
-                SetCurrentItemIndex( iModel->ActiveSkinIndex() + modifier);
-                if ( iMSKObserver )
-                    {
-                    iMSKObserver->CheckMiddleSoftkeyLabelL();
-                    }
-                }
-            else
-                {
-                User::LeaveIfError(err);    
-                }        
-            }
-
-        // This is needed to make the list effects update
-        CAknListLoader::InvalidateAll();
-
-        if( PslnFeatures::IsSupported( KPslnSupportFastPreviewTheme ) )
-            {
-            iPreviewIdle->Start( 
-                iPreviewDelayTime, 
-                iPreviewIntervalTime, 
-                TCallBack( DoHandleEffectEndL, this ) );
-            }
-        else
-            {
-            iPreviewIdle->Start( 
-                KIdlePreviewDelay, 
-                KIdlePreviewInterval, 
-                TCallBack( DoHandleEffectEndL, this ) );
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Handle effect end.
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::HandleEffectEndL()
-    {
-    // First stop timer.
-    iPreviewIdle->Cancel();
-    static_cast<CPslnUi*>( ControlEnv()->AppUi() )->
-        ToggleScreenBlankerL( EFalse, EFalse );
-    iObserver->HandlePreviewStateChange( EFalse );
-    }
-
-
-    
-// ---------------------------------------------------------------------------
-// Restart Quick Preview
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::RestartQuickPreviewL()
-    {
-    TInt modifier = IsEmbeddedLinkVisible();
-    TInt activeSkinIndex = iListBox->CurrentItemIndex() - modifier;
-    if( iModel->IsThemeOnMemoryCard(activeSkinIndex) )
-        {
-        HandleIdleTimeL();
-        }
-    }
-    
-// ---------------------------------------------------------------------------
-// Get Preview Skin Index
-// ---------------------------------------------------------------------------
-//    
-TInt CPslnGeneralThemeContainer::PreviewSkinIndex()
-    {
-    // Ignore download skin item if it is available.
-    TInt modifier = IsEmbeddedLinkVisible();
-    TInt previewSkinIndex = iListBox->CurrentItemIndex() - modifier;
-    
-    TBool usbAttached = static_cast<CPslnUi*>( ControlEnv()->AppUi() )->USBAttachState();
-    
-    if( !iModel->IsValidForPreview(previewSkinIndex) )
-        {
-        // If skin file on memorycard and usb attached, preview default skin.
-        previewSkinIndex = 0;
-        }
-    else if( iModel->IsThemeOnMemoryCard( previewSkinIndex ) && usbAttached)
-        {
-        // If skin file didn't exist, preview default skin.
-        previewSkinIndex = 0;
-        }
-    return previewSkinIndex;
-    }
-
-// ---------------------------------------------------------------------------
-// Set theme preview state active.
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::SetPreviewStateActive()
-    {
-    iObserver->HandlePreviewStateChange( ETrue );
-    }
-    
-// ---------------------------------------------------------------------------
-// Checks if current focus theme is in preview state. 
-// ---------------------------------------------------------------------------
-//
-TBool CPslnGeneralThemeContainer::CurrentThemeInPreviewState()
-    {
-    return iListBox->CurrentItemIndex() != iActiveSkinItemIndex;
-    }
-    
-// -----------------------------------------------------------------------------
-// Load preview delay time settings from CenRep.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::InitPreviewTime()
-    {
-    //load from cenrep
-    iPreviewDelayTime = KErrNone;
-    iPreviewDelayTimeOnHardKey = KErrNone;
-    iPreviewIntervalTime = KErrNone;
-    CRepository* timeRepository = NULL;
-    TRAPD( err, timeRepository = CRepository::NewL( KCRUidThemes ) );
-    if( err != KErrNone )
-        {
-        return;
-        }
-    timeRepository->Get( KThemesPreviewDelayTime, iPreviewDelayTime ); 
-    timeRepository->Get( KThemesPreviewDelayTimeOnHardKey, iPreviewDelayTimeOnHardKey ); 
-    timeRepository->Get( KThemesPreviewIntervalTime, iPreviewIntervalTime );
-    delete timeRepository;
-    timeRepository = NULL;
-    }
-
-// -----------------------------------------------------------------------------
-// Show Error Note.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::ShowErrorNoteL( TInt  aResourceId ) 
-    {
-    HBufC* errorText = StringLoader::LoadLC(aResourceId);
-    CAknErrorNote * note = new(ELeave) CAknErrorNote (EFalse);
-    note->ExecuteLD(*errorText);
-    CleanupStack::PopAndDestroy(errorText);
-    }
-
-// -----------------------------------------------------------------------------
-// Handle Pointer Event.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeContainer::HandlePointerEventL( const TPointerEvent &aPointerEvent )
-    {
-    // Cancel this kind of preview, in conflict with kinetic scrolling.
-/*
-    // Launch theme preview when pen up, in case pen is out of listbox.
-    if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
-        {
-        iObserver->HandlePreviewStateChange( ETrue );
-        StartThemePreviewL( ETrue );
-        }
-*/
-    
-    CCoeControl::HandlePointerEventL( aPointerEvent );
-    }
-
 //  End of File
--- a/psln/Src/PslnGeneralThemeView.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/psln/Src/PslnGeneralThemeView.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -160,15 +160,6 @@
 
             TInt error = iModel->SetTransitionEffectsL( EPslnEnableAllEffects );
             
-            if ( error == KErrNone )
-                {            
-                if ( PslnFeatures::IsSupported( KPslnSupportAnimBackground ) &&
-                     iModel->IsSupportAnimBg(  iModel->ActiveSkinIndex() ) )
-                    {
-                    error = iModel->SetAnimBackground( EPslnEnableAllEffects );
-                    }            
-                }
-            
             if ( error == KErrNoMemory )
                 {
                 HBufC* errorBuf = StringLoader::LoadLC(
@@ -186,12 +177,24 @@
             break;
         case EPslnCmdTransitionEffectsDeactivate:
             iModel->SetTransitionEffectsL( EPslnDisableAllEffects );
-            //Deactive AnimBackground
-            iModel->SetAnimBackground( EPslnDisableAllEffects );
             break;
         
         case EPslnCmdAnimBackgroundActivate:
             {
+            TInt PsmMode = 0;
+            CPsmSettings *PsmSettings = CPsmSettings::NewL();
+            PsmSettings->GetCurrentMode( PsmMode );
+            delete PsmSettings;
+
+            if ( PsmMode == EPsmsrvModePowerSave ) // PSM on, setting is protected
+                {
+                HBufC* buf = StringLoader::LoadLC( R_PSLN_QTN_PSM_INFONOTE );
+                CAknInformationNote* note = new (ELeave) CAknInformationNote( ETrue );
+                note->ExecuteLD( *buf );
+                CleanupStack::PopAndDestroy( buf );
+                return;
+                }
+
             TInt error = iModel->SetAnimBackground( EPslnEnableAllEffects );
             if ( error == KErrNoMemory )
                 {
@@ -212,18 +215,6 @@
             {
             if ( iContainer )
                 {
-                if ( iPreviewMode )
-                    {
-                    //stop preview
-                    iToBeActivatedSkinIndex = activeSkinIndex; 
-                    static_cast<CPslnGeneralThemeContainer*>(iContainer)->
-                        LockUpAndDownKeys( ETrue );
-                    static_cast<CPslnGeneralThemeContainer*>(iContainer)->
-                        CancelThemePreviewL();
-                        
-                    HandlePreviewStateChange( EFalse );
-                    }
-                    
                 if ( iToBeActivatedSkinIndex != KErrNotFound )
                     {
                     activeSkinIndex = iToBeActivatedSkinIndex;
@@ -232,9 +223,6 @@
                 // Do nothing if active theme is selected.
                 if ( iModel->IsActiveSkinSelected( activeSkinIndex  ) )
                     {
-                    HandlePreviewStateChange( ETrue );
-                    static_cast<CPslnGeneralThemeContainer*>(iContainer)->
-                        StartThemePreviewL();
                     break;
                     }
                 // Check is the theme corrupted.
@@ -252,8 +240,6 @@
                     {
                     iModel->SetCurrentSelectedSkinIndex( activeSkinIndex );
                     }
-                static_cast<CPslnGeneralThemeContainer*>(iContainer)->
-                    LockUpAndDownKeys( EFalse );
                 }
             }
         case EPslnCmdAppDownload: // Fallthrough
@@ -315,7 +301,6 @@
 
     CheckMiddleSoftkeyLabelL();
 
-    iPslnUi->ToggleScreenBlankerL( EFalse, EFalse );
     iToBeActivatedSkinIndex = -1;
     }
 
@@ -343,7 +328,18 @@
         {
         if ( iContainer )
             {
-            iCurrentItem = iContainer->CurrentItemIndex();
+            if ( iContainer->iListBox->IsHighlightEnabled() )
+                {
+                iCurrentItem = iContainer->CurrentItemIndex();
+                }
+            else
+                {
+                iCurrentItem = iModel->ActiveSkinIndex();
+                if ( iDownloadItemIndex != KErrNotFound )
+                    {
+                    iCurrentItem++;
+                    }
+                }
             }
 
         TBool downloadExists = ETrue;
@@ -423,7 +419,7 @@
             }
         TInt skinIndex = iCurrentItem - (TInt) downloadExists;
 		
-        if ( ( iCurrentItem != iDownloadItemIndex &&
+        if ( ( iCurrentItem == iDownloadItemIndex &&
              iDownloadItemIndex != KErrNotFound )||
              !iModel->IsActiveSkinSelected() ||
              !PslnFeatures::IsSupported( KPslnSupportAnimBackground ) ||
@@ -491,21 +487,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// Handle listbox item highlight.
-//
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::HandleListBoxItemHighlightL()
-    {
-    PSLN_TRACE_DEBUG("CPslnGeneralThemeView::HandleListBoxItemHighlightL");
-    if ( iContainer )
-        {
-        HandlePreviewStateChange( ETrue );
-        static_cast<CPslnGeneralThemeContainer*>(iContainer)->StartThemePreviewL();
-        }
-    }
-
-// -----------------------------------------------------------------------------
 // Create container.
 //
 // -----------------------------------------------------------------------------
@@ -514,8 +495,6 @@
     {
     iContainer = new(ELeave) CPslnGeneralThemeContainer();
     iContainer->SetMiddleSoftkeyObserver( this );
-    static_cast<CPslnGeneralThemeContainer*>(iContainer)->
-        SetThemePreviewObserver( this );
     }
 
 // -----------------------------------------------------------------------------
@@ -596,53 +575,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// New theme preview state available.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::HandlePreviewStateChange( const TBool& aPreviewMode )
-    {
-    iPreviewMode = aPreviewMode;
-//    TRAPD( state, iModel->GetTransitionEffectStateL() );
-//    if ( state != KMaxTInt )
-//        {        
-//        CAknView::StopDisplayingMenuBar();
-//        }
-    if ( iDelayedSkinActivation && !iPreviewMode )
-        {
-        TRAP_IGNORE( HandleCommandL( EPslnCmdAppActivate ) );
-        iDelayedSkinActivation = EFalse;
-        }
-    }
-
-    
-// ---------------------------------------------------------------------------
-// Restart Quick Preview
-// ---------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::RestartQuickPreviewL()
-    {
-    CPslnGeneralThemeContainer* container = static_cast<CPslnGeneralThemeContainer*>(iContainer);
-
-    container->RestartQuickPreviewL();
-    }
-
-// -----------------------------------------------------------------------------
-// Remove local skin items.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::RemoveLocalSkinItems()
-    {
-    // Remove locally skinned items.
-    MAknsSkinInstance* si = AknsUtils::SkinInstance();
-    if ( si )
-        {        
-        si->SetChangeEventsEnabled( EFalse );
-        si->RemoveLocalItemDefs();
-        si->SetChangeEventsEnabled( ETrue );
-        }
-    }
-
-// -----------------------------------------------------------------------------
 // Remove MSK command mappings.
 // This method should do nothing but MSK issues.
 // -----------------------------------------------------------------------------
@@ -658,21 +590,7 @@
         cbaGroup->RemoveCommandFromStack( KPslnMSKControlID, EPslnCmdAppActivate );
         }
     }
-// -----------------------------------------------------------------------------
-// Handle listbox stylus down event.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::HandleListBoxStylusDown()
-    {
-    }
-    
-// -----------------------------------------------------------------------------
-// Handle listbox stylus move event.
-// -----------------------------------------------------------------------------
-//
-void CPslnGeneralThemeView::HandleListBoxStylusDrag()
-    {
-    }
+
 // -----------------------------------------------------------------------------
 // Hightligt Default skin
 // -----------------------------------------------------------------------------
--- a/psln/Src/PslnMainView.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/psln/Src/PslnMainView.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -224,14 +224,6 @@
     HandleCommandL( EPslnCmdAppOpen );
     }
 
-// -----------------------------------------------------------------------------
-// CPslnMainView::HandleListBoxItemHighlightL
-// -----------------------------------------------------------------------------
-//
-void CPslnMainView::HandleListBoxItemHighlightL()
-    {    
-    }
-
 // ---------------------------------------------------------------------------
 // CPslnMainView::NewContainerL
 // ---------------------------------------------------------------------------
--- a/psln/Src/PslnScreenSaverView.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/psln/Src/PslnScreenSaverView.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -478,14 +478,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// CPslnScreenSaverView::HandleListBoxItemHighlightL
-// -----------------------------------------------------------------------------
-//
-void CPslnScreenSaverView::HandleListBoxItemHighlightL()
-    {    
-    }
-
-// -----------------------------------------------------------------------------
 // CPslnScreenSaverView::NewContainerL
 // -----------------------------------------------------------------------------
 //
--- a/psln/Src/PslnUi.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/psln/Src/PslnUi.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -31,6 +31,7 @@
 // Notes & Dialogs
 #include <AknGlobalNote.h>
 #include <aknnotewrappers.h>
+#include <AknWaitDialog.h> 
 
 // DRM.
 #include <DRMHelper.h>
@@ -154,6 +155,7 @@
     {
     PSLN_TRACE_DEBUG("CPslnUi::Destructor");
 
+    HideProgressBar();
     // Reset skin info when exiting normally. This prevents model class
     // from trying to revert back to previous skin.
     if ( iView && iView->Id().iUid == KPslnMainView2.iUid )
@@ -327,7 +329,6 @@
     if ( err != KErrNone )
         {
         TRAP_IGNORE( iGeneralThemeView->UpdateSkinListItemsL() );
-        TRAP_IGNORE( ToggleScreenBlankerL( EFalse, EFalse ) );
         }
     }
 
@@ -721,47 +722,6 @@
 #endif //RD_CONTROL_PANEL
     }
 
-// ---------------------------------------------------------------------------
-// Activates screen blanker. Note that second parameter is only used when
-// enabling blanker (i.e. first parameter is ETrue ).
-// ---------------------------------------------------------------------------
-void CPslnUi::ToggleScreenBlankerL( 
-    const TBool& aToggleValue, const TBool& /*aStatusPaneVisible*/, const TBool& aRealAct )
-    {
-    TInt transitionEffectsValue = iModel->GetTransitionEffectStateL();
-    if ( aToggleValue )
-        {
-        // Effects are enabled if value is NOT KMaxTInt.
-        if( transitionEffectsValue != KMaxTInt )
-            {
-            if ( aRealAct )
-                {
-                iModel->TransEffect(EPslnTransitionEffectStartThemeActivation);
-                }
-            else
-                {
-                iModel->TransEffect(EPslnTransitionEffectStartPreview);
-                }
-            }
-//        else if ( iView && iView->MenuBar()->IsDisplayed() )
-//            {
-//            iView->MenuBar()->StopDisplayingMenuBar();
-//            }
-        }
-    else
-        {
-        // Effects are enabled if value is NOT KMaxTInt.
-        if( transitionEffectsValue != KMaxTInt )
-            {
-            iModel->TransEffect(EPslnTransitionEffectStop);
-            }
-//        else if ( iView && iView->MenuBar()->IsDisplayed() )
-//            {
-//            iView->MenuBar()->MenuPane()->DrawNow();
-//            }
-        }
-    }
-
 
 // ---------------------------------------------------------------------------
 // Is this class able to handle a new skin activation related command.
@@ -957,6 +917,7 @@
             if ( GetStatus( EPslnSkinActivated ) )
                 {
                 SetStateOff( EPslnSkinActivated );
+                HideProgressBar();
                 DoCreateWaitNoteL();
                 }
             break;
@@ -972,6 +933,7 @@
             if ( GetStatus( EPslnSkinActivated ) )
                 {
                 SetStateOff( EPslnSkinActivated );
+                HideProgressBar();
                 DoCreateWaitNoteL();
                 }
             SetStateOn( EPslnListUpdateNeeded );
@@ -985,6 +947,7 @@
             if ( GetStatus( EPslnSkinActivated ) )
                 {
                 SetStateOff( EPslnSkinActivated );
+                HideProgressBar();
                 SkinDeployedL();
                 }
             else // Theme changed by other app, update view.
@@ -992,7 +955,6 @@
                 iModel->PerformCompleteUpdateL();             
                 iGeneralThemeView->UpdateSkinListItemsL( iModel->ActiveSkinIndex() + 
                                 PslnFeatures::IsEnhancedEmbeddedLinksSupported() );
-                iGeneralThemeView->RemoveLocalSkinItems();
                 }
             
             if ( GetStatus( EPslnSoundActivationPending ) )
@@ -1000,7 +962,6 @@
                 SetStateOff( EPslnSoundActivationPending );
                 ActivateSoundsL();
                 }
-            ToggleScreenBlankerL( EFalse, EFalse );
             break;
         default:
             break;
@@ -1113,11 +1074,9 @@
             iModel->GuardActivationLC();
             TBool shownote = EFalse;
 
-            // Show screen clearer when skin is changing.
-            ToggleScreenBlankerL( ETrue, ETrue );
-
             PSLN_TRACE_DEBUG("CPslnUi::ActivateSkinL directly");
             shownote = iModel->ActivateSkinL( skinIndex );
+            ShowProgressBarL();
 
             if ( shownote )
                 {
@@ -1132,8 +1091,6 @@
                     {
                     PSLN_TRACE_DEBUG("CPslnUi::ActivateSkinL decline DRM activation");
                     SetStateOff( EPslnSkinChangeRequested );
-                    // Remove screen clearer.
-                    ToggleScreenBlankerL( EFalse, EFalse );
                     }
                 }
             CleanupStack::PopAndDestroy(); // activation guard
@@ -1359,7 +1316,6 @@
             error = err;
             }
         }
-    iGeneralThemeView->RemoveLocalSkinItems();
     return error;
     }
 
@@ -1475,8 +1431,43 @@
             {
             iUSBAttached = EFalse;
             }
-        static_cast< CPslnGeneralThemeView* >( iView )->RestartQuickPreviewL();
         }
     }
+
+// ---------------------------------------------------------------------------
+// CPslnUi::ShowProgressBarL
+// ---------------------------------------------------------------------------
+//
+void CPslnUi::ShowProgressBarL()
+    {
+    if ( iWaitDialog == NULL )
+        {
+        iWaitDialog = new (ELeave) CAknWaitDialog(
+                    ( REINTERPRET_CAST( CEikDialog**, &iWaitDialog ) ), ETrue );
+        iWaitDialog->PrepareLC( R_PSLN_GENERAL_WAIT_NOTE );
+
+        HBufC* noteText = NULL;
+        noteText = StringLoader::LoadLC( R_PSLN_QTN_GEN_NOTE_PROCESSING, iEikonEnv );
+        iWaitDialog->SetTextL( *noteText );
+        CleanupStack::PopAndDestroy( noteText );
+
+        iWaitDialog->RunLD();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CPslnUi::HideProgressBar
+// ---------------------------------------------------------------------------
+//
+void CPslnUi::HideProgressBar()
+    {
+    if( iWaitDialog )
+        {
+        TRAP_IGNORE( iWaitDialog->ProcessFinishedL() )
+        delete iWaitDialog;
+        iWaitDialog = NULL;
+        }
+    }
+
 // End of File
 
--- a/psln/Src/PslnWallpaperView.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/psln/Src/PslnWallpaperView.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -420,14 +420,6 @@
         }
     HandleCommandL( EAknSoftkeyOk );
     }
-    
-// -----------------------------------------------------------------------------
-// CPslnWallpaperView::HandleListBoxItemHighlightL
-// -----------------------------------------------------------------------------
-//
-void CPslnWallpaperView::HandleListBoxItemHighlightL()
-    {    
-    }    
 
 // -----------------------------------------------------------------------------
 // CPslnWallpaperView::NewContainerL
--- a/psln/pslnengine/src/PslnModel.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/psln/pslnengine/src/PslnModel.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -782,11 +782,6 @@
         User::Leave( KErrGeneral );
         }
 
-    if ( !activeEntry->IsSupportAnimBg() )
-        {
-        //Stop animated background
-        SetAnimBackground( EPslnDisableAllEffects );
-        }
     TAknsPkgID activeSkinPid = activeEntry->PkgID();
     // Activate whole skin
     PSLN_TRACE_DEBUG("CPslnModel::ActivateSkinL set all definition sets");
--- a/uifw/AknGlobalUI/AknCapServer/inc/akncapserverdiscreetpopuphandler.h	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AknGlobalUI/AknCapServer/inc/akncapserverdiscreetpopuphandler.h	Tue Apr 27 16:55:05 2010 +0300
@@ -143,7 +143,7 @@
      * 
      * @param aMessage Server message.
      */    
-    void HandleQueryInUseRect( const RMessage2& aMessage );
+    void HandleQueryInUseRectL( const RMessage2& aMessage );
     
     /**
      * Shows popup.
--- a/uifw/AknGlobalUI/AknCapServer/src/AknCapServerShutdown.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AknGlobalUI/AknCapServer/src/AknCapServerShutdown.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -112,7 +112,7 @@
       // This UID comes from the app, not the mmp!
       TUid uid = doomed->AppUid(); 
       iWs.GetWindowGroupClientThreadId(wgIds->At(ii), threadId);
-      thd.Open(threadId);  
+      TInt error = thd.Open(threadId);  
 	  CleanupClosePushL( thd );
 
       // Is this app OK to kill? We don't kill the this app, EikSrv backdrop or the app that 
--- a/uifw/AknGlobalUI/AknCapServer/src/AknFastswapWindowControl.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AknGlobalUI/AknCapServer/src/AknFastswapWindowControl.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -2924,8 +2924,13 @@
 TPtrC CAknFastSwapWindowControl::CurrentAppName()
     {
     _AKNTRACE_FUNC_ENTER;
-    TPtrC name = iGrid->Model()->ItemText( iGrid->CurrentDataIndex() );
-    name.Set( name.Mid( name.Find(KTab)+1) );
+    TInt textindex = iGrid->CurrentDataIndex();
+    TPtrC name;
+    if ( textindex > 0 )
+        {
+        name.Set( iGrid->Model()->ItemText( textindex ) );
+        name.Set( name.Mid( name.Find(KTab)+1 ) );
+        }
     _AKNTRACE_FUNC_EXIT;
     return name;
     }        
--- a/uifw/AknGlobalUI/AknCapServer/src/aknKeyFilter.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AknGlobalUI/AknCapServer/src/aknKeyFilter.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -891,13 +891,12 @@
             0,
             0,
             KAknScreenModeUnset );
-        
-        }
-    
-    if (screenMode == screen->CurrentScreenMode() )
-        {
-        // Remember that there was at least one inhibited screen mode
-        iAppUi->SgcServer()->SetBackgroundAppsStateChangeDeferred( ETrue );
+            
+        if ( screenMode == screen->CurrentScreenMode() )
+            {
+            // Remember that there was at least one inhibited screen mode
+            iAppUi->SgcServer()->SetBackgroundAppsStateChangeDeferred( ETrue );
+            }
         }
     }
 
--- a/uifw/AknGlobalUI/AknCapServer/src/akncapserverdiscreetpopuphandler.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AknGlobalUI/AknCapServer/src/akncapserverdiscreetpopuphandler.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -151,7 +151,7 @@
             }
         case ( TAknDiscreetPopupData::EAknPopupTypeQueryInUseRect ):
             {
-            HandleQueryInUseRect( aMessage );
+            HandleQueryInUseRectL( aMessage );
             break;
             }        
         default:
@@ -281,10 +281,10 @@
     }
 
 // ---------------------------------------------------------------------------
-// CAknCapServerDiscreetPopupHandler::HandleQueryInUseRect
+// CAknCapServerDiscreetPopupHandler::HandleQueryInUseRectL
 // ---------------------------------------------------------------------------
 //
-void CAknCapServerDiscreetPopupHandler::HandleQueryInUseRect( 
+void CAknCapServerDiscreetPopupHandler::HandleQueryInUseRectL( 
         const RMessage2& aMessage )
     {
     _AKNTRACE_FUNC_ENTER;
--- a/uifw/AknGlobalUI/NotifierWrapper/group/aknnotifierwrapper.mmp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AknGlobalUI/NotifierWrapper/group/aknnotifierwrapper.mmp	Tue Apr 27 16:55:05 2010 +0300
@@ -51,6 +51,7 @@
 LIBRARY         estor.lib 
 LIBRARY         eiksrvui.lib
 LIBRARY         akncapserverclient.lib
+LIBRARY         gfxtrans.lib
 
 deffile         AKNNOTIFIERWRAPPER.DEF
 
--- a/uifw/AknGlobalUI/NotifierWrapper/src/AknNotiferAppServerApplication.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AknGlobalUI/NotifierWrapper/src/AknNotiferAppServerApplication.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -24,6 +24,9 @@
 #include <aknnotewrappers.h>
 #include <AknCapServerDefs.h>
 
+#include <gfxtranseffect/gfxtranseffect.h>
+#include "akntranseffect.h" // for Transition effect enumerations
+
 #include <avkondomainpskeys.h>
 #include <e32property.h>
 
@@ -348,6 +351,7 @@
         {
     case EApaSystemEventBroughtToForeground:
         { // ignore this event as it causes undesired effects on applications underneath
+        GfxTransEffect::EndFullScreen();
         break;
         }
     default:
--- a/uifw/AknGlobalUI/OldStyleNotif/Inc/AknListQueryNotificationDialog.h	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AknGlobalUI/OldStyleNotif/Inc/AknListQueryNotificationDialog.h	Tue Apr 27 16:55:05 2010 +0300
@@ -47,6 +47,8 @@
 protected:
     TBool OkToExitL(TInt aButtonId);
     
+    void HandlePointerEventL(const TPointerEvent& aPointerEvent);
+    
 private: 
     virtual void CEikDialog_Reserved_1();
     virtual void CEikDialog_Reserved_2();   
@@ -56,6 +58,7 @@
     CAknListQueryNotificationDialog** iSelfPtr;
     TBool iPanning;
     TBool iFlick;
+    TBool iPointerUpEaten;
     };
 
 #endif // __AKNLISTQUERYNOTIFICATIONDIALOG__
--- a/uifw/AknGlobalUI/OldStyleNotif/Src/AknListQueryNotificationDialog.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AknGlobalUI/OldStyleNotif/Src/AknListQueryNotificationDialog.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -24,7 +24,10 @@
     TInt* aIndex,
     MAknListQueryNotificationCallback* aCallBack,
     CAknListQueryNotificationDialog** aSelfPtr)
-    : CAknListQueryDialog(aIndex), iCallBack(aCallBack), iSelfPtr(aSelfPtr)
+    : CAknListQueryDialog(aIndex)
+    , iCallBack(aCallBack)
+    , iSelfPtr(aSelfPtr)
+    , iPointerUpEaten(EFalse)
     {
     }
 
@@ -55,6 +58,8 @@
         return EKeyWasNotConsumed;
         }
     
+    iPointerUpEaten = EFalse;
+    
     TInt code = aKeyEvent.iCode;
     
     switch (code)
@@ -111,6 +116,14 @@
 
 TBool CAknListQueryNotificationDialog::OkToExitL(TInt aButtonId)
     {
+    // Fix the problem where the pointer up event is handled to close the power menu key,
+    // when the popup shows on the top of power menu before releasing the tap.
+    if (iPointerUpEaten && AknLayoutUtils::PenEnabled() && aButtonId == EAknSoftkeyOk)
+        {
+        iPointerUpEaten = EFalse;
+        return EFalse;
+        }
+    
     TInt ret = -1;
     if (aButtonId != EAknSoftkeyCancel)
         {
@@ -124,6 +137,17 @@
     return EFalse;
     }
 
+void CAknListQueryNotificationDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent)
+    {
+    iPointerUpEaten = EFalse;
+    if (aPointerEvent.iType == TPointerEvent::EButton1Up && !IsFocused())
+        {
+        iPointerUpEaten = ETrue;
+        }
+    
+    CAknListQueryDialog::HandlePointerEventL(aPointerEvent);
+    }
+
 void CAknListQueryNotificationDialog::CEikDialog_Reserved_1()
     {
     }
--- a/uifw/AknGlobalUI/OldStyleNotif/Src/AknPrivateImageLoader.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AknGlobalUI/OldStyleNotif/Src/AknPrivateImageLoader.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -372,7 +372,8 @@
     // create soft mask
     icon->SetMask( new(ELeave) CFbsBitmap() );
     User::LeaveIfError( icon->Mask()->Create( aSize, EGray256 ) );
-
+    svgEngine->SetViewportHeight((CSvgDocumentImpl *)handle,aSize.iHeight);
+    svgEngine->SetViewportWidth((CSvgDocumentImpl *)handle,aSize.iWidth);
     // render svg image
     LeaveIfErrorL( 
         svgEngine->RenderDom( handle, icon->Bitmap(), icon->Mask() ) );
--- a/uifw/AknGlobalUI/akncustcmds/src/akncapserverstart.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AknGlobalUI/akncustcmds/src/akncapserverstart.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -86,7 +86,10 @@
 
     TRAP_IGNORE( SetColorPaletteL() );
     TRAPD( err, RAknUiServer::StartAknCapserverL() );
+    
+#ifdef _DEBUG
     RDebug::Print( _L( "RAknUiServer::StartAknCapserverL leave code %d" ), err );
+#endif
 
     TRequestStatus* request = &aRequest;
     User::RequestComplete( request, err );
--- a/uifw/AvKon/aknhlist/inc/akntreelistview.h	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/aknhlist/inc/akntreelistview.h	Tue Apr 27 16:55:05 2010 +0300
@@ -1098,6 +1098,14 @@
 	 * Whether or not mirrored layout is currently in use.
 	 */
 	TBool iMirroredLayoutInUse;
+	
+
+    /**
+     * Remember pointer to bottom item. Use for drawing line seperator only.
+     * iBottomIndex is not valid in some case becaue of iItems already changed.
+     * Not own.
+     */
+	CAknTreeItem* iBottomItem;	
     };
 
 
--- a/uifw/AvKon/aknhlist/src/akntree.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/aknhlist/src/akntree.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -780,6 +780,7 @@
 void CAknTree::GetMarkedItemsL( TAknTreeItemID aNode,
     RArray<TAknTreeItemID>& aMarkedItems ) const
     {
+    ::CleanupClosePushL(aMarkedItems);
     aMarkedItems.Reset();
     if ( aNode == KAknTreeIIDRoot )
         {
@@ -811,6 +812,7 @@
                 }
             }
         }
+	CleanupStack::Pop(&aMarkedItems);
     }
 
 
--- a/uifw/AvKon/aknhlist/src/akntreelist.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/aknhlist/src/akntreelist.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -402,22 +402,27 @@
     if ( item && item->Parent() && item->Parent()->IsNode() )
         {
         CAknTreeNode* node = item->Parent()->Node();
-        TBool wasMarked = node->IsMarked();
-        if ( node && node->IsMarkable() )
+        if (node)
             {
-            if ( node->AllChildrenMarked() )
+            TBool wasMarked = node->IsMarked();
+            
+            if (node->IsMarkable())
                 {
-                node->SetMarked( ETrue );
-                }            
-            else
+                if (node->AllChildrenMarked())
+                    {
+                    node->SetMarked(ETrue);
+                    }            
+                else
+                    {
+                    node->SetMarked(EFalse);
+                    }
+                }
+            
+            if (wasMarked != node->IsMarked())
                 {
-                node->SetMarked( EFalse );
+                Window().Invalidate(View().Rect());
                 }
             }
-        if ( wasMarked != node->IsMarked() )
-            {
-            Window().Invalidate( View().Rect() );
-            }
         }
     }
 
--- a/uifw/AvKon/aknhlist/src/akntreelistview.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/aknhlist/src/akntreelistview.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -2768,10 +2768,10 @@
 void CAknTreeListView::DrawItemsWithPhysics( const TRect& aRect ) const
     {
     TBool empty = IsEmpty();
+    TInt offset = Offset();  
 
 #ifdef RD_UI_TRANSITION_EFFECTS_LIST    
     CWindowGc& gc = iGc && !empty ? *iGc : SystemGc();
-    TInt offset = Offset();
 #else
     CWindowGc& gc = SystemGc();
 #endif
@@ -2834,11 +2834,6 @@
 
             if ( iItems[ii].Item() )
                 {
-                if ( !aRect.Intersects(drawRect) )
-                    {
-                    //invisible item yet
-                    continue;
-                    }
 
 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
                 TRect tfxDrawRect( drawRect );
@@ -2862,16 +2857,25 @@
                         clippingRect.iBr.iY = viewRect.iBr.iY;
                         }
                     }
+                // Set clipping rect.    
+                if ( clippingRect.Intersects( aRect ) )
+                    {
+                    clippingRect.Intersection( aRect );
+                    gc.SetClippingRect( clippingRect );
+                    }
+                else
+                    {
+                    //Draw nothing if no overlap between item rectangel and given rect.
+                    continue;
+                    }
                 
-                // Set clipping rect.    
-                gc.SetClippingRect( clippingRect );
-
                 if ( transApi )
                     {
                     transApi->StopDrawing();
                     }
 #endif
-                if ( ii < iBottomIndex )
+
+                if ( iItems[ii].Item() != iBottomItem )
                     {
                     TRect offsetRect( drawRect );
                     offsetRect.Move( 0, -offset );
@@ -3158,7 +3162,9 @@
 void CAknTreeListView::LongTapPointerEventL(
         const TPointerEvent& aPointerEvent)
     {
-    if ( iLongTapDetector && iItemActionMenu && iItemActionMenu->InitMenuL() )
+    if ( iLongTapDetector && iItemActionMenu 
+            && !( HasMarkedItemsL() && FocusedItem() 
+            && !FocusedItem()->IsMarked() ) && iItemActionMenu->InitMenuL() )
         {
         iLongTapDetector->PointerEventL( aPointerEvent );
         }
@@ -3246,7 +3252,8 @@
             {
             if (iItems[i].Item())   
                 {
-                iBottomIndex = iTree.VisibleItemIndex(iItems[i].Item());
+                iBottomItem = iItems[i].Item();
+                iBottomIndex = iTree.VisibleItemIndex( iBottomItem );
                 break;
                 }
             }
Binary file uifw/AvKon/conf/s60/avkon.confml has changed
--- a/uifw/AvKon/group/bld.inf	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/group/bld.inf	Tue Apr 27 16:55:05 2010 +0300
@@ -50,6 +50,24 @@
 mif2cdlindex.flm          /epoc32/tools/makefile_templates/s60/mif2cdlindex.flm
 mif2cdlindex.meta       /epoc32/tools/makefile_templates/s60/mif2cdlindex.meta
 
+../srcdata/avkonsystemsounds/volume_min.wav                  /epoc32/data/z/resource/avkonsystemsounds/volume_min.wav
+../srcdata/avkonsystemsounds/volume_max.wav                  /epoc32/data/z/resource/avkonsystemsounds/volume_max.wav
+../srcdata/avkonsystemsounds/battery_low.wav                  /epoc32/data/z/resource/avkonsystemsounds/battery_low.wav
+../srcdata/avkonsystemsounds/default_beep.wav                  /epoc32/data/z/resource/avkonsystemsounds/default_beep.wav
+../srcdata/avkonsystemsounds/battery_dead.wav                 /epoc32/data/z/resource/avkonsystemsounds/battery_dead.wav
+
+../srcdata/avkonsystemsounds/volume_min.wav                  /epoc32/release/winscw/udeb/z/resource/avkonsystemsounds/volume_min.wav
+../srcdata/avkonsystemsounds/volume_max.wav                  /epoc32/release/winscw/udeb/z/resource/avkonsystemsounds/volume_max.wav
+../srcdata/avkonsystemsounds/battery_low.wav                  /epoc32/release/winscw/udeb/z/resource/avkonsystemsounds/battery_low.wav
+../srcdata/avkonsystemsounds/default_beep.wav                  /epoc32/release/winscw/udeb/z/resource/avkonsystemsounds/default_beep.wav
+../srcdata/avkonsystemsounds/battery_dead.wav                  /epoc32/release/winscw/udeb/z/resource/avkonsystemsounds/battery_dead.wav
+
+../srcdata/avkonsystemsounds/volume_min.wav                  /epoc32/release/winscw/urel/z/resource/avkonsystemsounds/volume_min.wav
+../srcdata/avkonsystemsounds/volume_max.wav                  /epoc32/release/winscw/urel/z/resource/avkonsystemsounds/volume_max.wav
+../srcdata/avkonsystemsounds/battery_low.wav                  /epoc32/release/winscw/urel/z/resource/avkonsystemsounds/battery_low.wav
+../srcdata/avkonsystemsounds/default_beep.wav                  /epoc32/release/winscw/urel/z/resource/avkonsystemsounds/default_beep.wav
+../srcdata/avkonsystemsounds/battery_dead.wav                  /epoc32/release/winscw/urel/z/resource/avkonsystemsounds/battery_dead.wav
+
 PRJ_MMPFILES
 // Specify the .mmp files required for building the important component releasables.
 // Note that you should specify any .mmp files for test programs further down the file.
--- a/uifw/AvKon/rom/avkon.iby	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/rom/avkon.iby	Tue Apr 27 16:55:05 2010 +0300
@@ -42,6 +42,13 @@
 data=ZRESOURCE\aknpriv.rsc                       RESOURCE_FILES_DIR\aknpriv.rsc
 data=ZRESOURCE\smiley.rsc                        RESOURCE_FILES_DIR\smiley.rsc
 
+data=ZRESOURCE\avkonsystemsounds\volume_min.wav   RESOURCE_FILES_DIR\avkonsystemsounds\volume_min.wav
+data=ZRESOURCE\avkonsystemsounds\volume_max.wav   RESOURCE_FILES_DIR\avkonsystemsounds\volume_max.wav
+data=ZRESOURCE\avkonsystemsounds\default_beep.wav RESOURCE_FILES_DIR\avkonsystemsounds\default_beep.wav
+data=ZRESOURCE\avkonsystemsounds\battery_dead.wav RESOURCE_FILES_DIR\avkonsystemsounds\battery_dead.wav
+data=ZRESOURCE\avkonsystemsounds\battery_low.wav  RESOURCE_FILES_DIR\avkonsystemsounds\battery_low.wav
+
+
 #include "aknglobalui.iby"
 
 #endif
--- a/uifw/AvKon/src/AknAdaptiveSearchGrid.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/AknAdaptiveSearchGrid.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -124,8 +124,11 @@
     { 
     _AKNTRACE_FUNC_ENTER;
     CEikonEnv::Static()->EikAppUi()->RemoveFromStack( this );
-    delete iBgContextOfControlPane;
- 
+    if ( iBgContextOfControlPane )
+    	{
+		delete iBgContextOfControlPane;
+		iBgContextOfControlPane = NULL;
+    	}
     // Clear current region of AS
     iCurrentRegion.Clear();    
     iButtonArray.ResetAndDestroy();
@@ -161,9 +164,12 @@
         iPageIndicator = NULL;
         }
        
-    CAknWsEventMonitor* eventMonitor = iAppUi->EventMonitor();    
-    eventMonitor->Enable( EFalse ); 
-    eventMonitor->RemoveObserver( this ); 
+    if ( iAppUi )
+        {
+        CAknWsEventMonitor* eventMonitor = iAppUi->EventMonitor();  
+        eventMonitor->Enable( EFalse ); 
+        eventMonitor->RemoveObserver( this ); 
+        }
     _AKNTRACE_FUNC_EXIT;
     }
 
@@ -630,7 +636,7 @@
 // The position of the top left corner should be set in advance.
 // -----------------------------------------------------------------------------
 //
-void CAknAdaptiveSearchGrid::SetVisibilityL( TBool aVisible, TBool aSelectAll )
+void CAknAdaptiveSearchGrid::SetVisibilityL( TBool aVisible, TBool /*aSelectAll*/ )
     {
     _AKNTRACE( "[%s][%s] Visible : %d", "CAknAdaptiveSearchGrid", __FUNCTION__, aVisible );
     if ( aVisible )
@@ -1122,7 +1128,7 @@
 // This function is called whenever a control gains or loses focus.
 // -----------------------------------------------------------------------------
 // 
-void CAknAdaptiveSearchGrid::FocusChanged( TDrawNow aDrawNow )
+void CAknAdaptiveSearchGrid::FocusChanged( TDrawNow /*aDrawNow*/ )
     {
     if ( !iShown || IsNonFocusing() )
         {
@@ -1643,7 +1649,7 @@
         
 
 // -----------------------------------------------------------------------------
-// CCAknAdaptiveSearch::SaveFindPaneRect()
+// CAknAdaptiveSearch::SaveFindPaneRect()
 // When the rect of find pane is set, this functions will be notified
 // to record the size of it.
 // -----------------------------------------------------------------------------
@@ -1652,11 +1658,15 @@
     {
     //When width is zero, no need to deal with.
     if ( 0 == aRect.Size().iWidth )
+        {
         return;
+        }
     
     //The same size already is set. No need to do further process.
-    if ( aRect.Size().iWidth == iFindpaneRect.Size().iWidth )
+    if ( aRect == iFindpaneRect )
+        {
         return;    
+        }
 
     iFindpaneRect = aRect;
     iFindPaneSizeChanged = ETrue;
--- a/uifw/AvKon/src/AknAppUi.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/AknAppUi.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -1868,7 +1868,7 @@
 
     // This method call practically adds a shift modifier to hash key + joystick events.
     // This is because of marking in lists and editors when edit there is no edit key in device.
-    if (SimulateHashKeyMarkingEvent(aEvent))
+    if (SimulateHashKeyMarkingEventL(aEvent))
         {
         return;
         }
@@ -2099,7 +2099,7 @@
 // and ok key events, if hash key is simultaneously down. This is done because of making the 
 // edit key optional in the device. Therefore, hash key with joystick (or single hash press, 
 // see eiklbx.cpp) can be used for marking in lists and editors.    
-TBool CAknAppUi::SimulateHashKeyMarkingEvent(const TWsEvent& aEvent)
+TBool CAknAppUi::SimulateHashKeyMarkingEventL(const TWsEvent& aEvent)
     {
     TInt eventType = aEvent.Type();        
         
--- a/uifw/AvKon/src/AknCharMap.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/AknCharMap.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -216,22 +216,21 @@
 // Navi button class definition
 // ----------------------------------------------------------------------------
 //
-NONSHARABLE_CLASS(CAknSctNaviButton) : public CBase
+NONSHARABLE_CLASS(CAknSctNaviButton) : public CBase, public MCoeControlObserver
     {
     public:
-        static CAknSctNaviButton* NewL(
-            const CCoeControl& aParent,
-            TInt aButtonId,
-            TResourceReader& reader);
+        static CAknSctNaviButton* NewL(const CCoeControl& aParent, TInt aButtonId, TResourceReader& reader);
         ~CAknSctNaviButton();
 
     private:
         CAknSctNaviButton(TInt aButtonId);
-        void ConstructL(
-            const CCoeControl& aParent,
-            TResourceReader& reader);
+        void ConstructL(const CCoeControl& aParent, TResourceReader& reader);
+        
+    private: // from MCoeControlObserver
+        virtual void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType);
 
     public:
+        void SetObserver(MCoeControlObserver* aObserver);
         void SetFocused(TBool aState);
         void SetEnabled(TBool aState);
         TBool IsFocused();
@@ -239,6 +238,7 @@
 
     public:
         CAknButton* iButtonControl;
+        MCoeControlObserver* iObserver;
         TInt iButtonId;
         TBool iPressed;
         TBool iRepeat;
@@ -248,7 +248,7 @@
 // Table Navi class definition
 // ----------------------------------------------------------------------------
 //
-NONSHARABLE_CLASS(CAknSctTableNavi) : public CAknControl, public MAknSctFocusHandler
+NONSHARABLE_CLASS(CAknSctTableNavi) : public CAknControl, public MAknSctFocusHandler, public MCoeControlObserver
     {
     public:
         CAknSctTableNavi(CAknCharMap* aCharMap, CAknCharMapExtension* aExtension);
@@ -259,9 +259,11 @@
         CCoeControl* ComponentControl( TInt aIndex ) const;
         virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode);
         void ConstructFromResourceL(TResourceReader& aReader);
-        virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent);
         virtual TSize MinimumSize();
         virtual void SizeChanged();
+        
+    public: // from MCoeControlObserver
+        void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType);
 
     public: // from MAknSctFocusHandler
         virtual CCoeControl* FocusedControl();
@@ -272,14 +274,19 @@
 
     public:
         TInt TableCount();
+        void UpdateNextTableButtonL();
+        
+    private:
         void TableExitL();
-        static TInt DoTableExit(TAny* aThis);
-        void UpdateNextTableButtonL();
-
+        static TInt TableExitCallBackL(TAny* aThis);
+        void DoTableExitL();
+        
+        void NextTableL();
+        static TInt NextTableCallBackL(TAny* aThis);
+        void DoNextTableL();
+        
     private:
         TInt ButtonPosition(TInt aButtonIndex) const;
-        TInt SetStatusChanged();
-        void NextTableL();
 
     private:  // data
         TInt iButtonIndex;
@@ -556,6 +563,17 @@
     {
     iButtonControl = CAknButton::NewL(aReader);
     iButtonControl->SetContainerWindowL(aParent);
+    iButtonControl->SetObserver(this);
+    }
+
+void CAknSctNaviButton::SetObserver(MCoeControlObserver* aObserver)
+    {
+    iObserver = aObserver;
+    }
+
+void CAknSctNaviButton::HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType)
+    {
+    if(iObserver) iObserver->HandleControlEventL(aControl, aEventType);
     }
 
 CAknSctNaviButton::~CAknSctNaviButton()
@@ -742,15 +760,46 @@
 
 void CAknSctTableNavi::TableExitL()
     {
-    delete iIdle;
-    iIdle = 0;
-    iIdle = CIdle::NewL(CActive::EPriorityStandard);
-    iIdle->Start(TCallBack(DoTableExit, this));
-    }
-
-TInt CAknSctTableNavi::DoTableExit(TAny* aThis)
-    {
-    return ((CAknSctTableNavi*)aThis)->SetStatusChanged();
+    if(!iIdle)
+        {
+        iIdle = CIdle::NewL(CActive::EPriorityStandard);
+        }
+
+    iIdle->Cancel();
+    iIdle->Start(TCallBack(TableExitCallBackL, this));
+    }
+
+TInt CAknSctTableNavi::TableExitCallBackL(TAny* aThis)
+    {
+    ((CAknSctTableNavi*)aThis)->DoTableExitL();
+    return KErrNone;
+    }
+
+void CAknSctTableNavi::DoTableExitL()
+    {
+    iCharMap->SetStatusChanged(EAknCharSelectedTableExitButton);
+    }
+
+void CAknSctTableNavi::NextTableL()
+    {
+    if(!iIdle)
+        {
+        iIdle = CIdle::NewL(CActive::EPriorityStandard);
+        }
+
+    iIdle->Cancel();
+    iIdle->Start(TCallBack(NextTableCallBackL, this));
+    }
+
+TInt CAknSctTableNavi::NextTableCallBackL(TAny* aThis)
+    {
+    ((CAknSctTableNavi*)aThis)->DoNextTableL();
+    return KErrNone;
+    }
+
+void CAknSctTableNavi::DoNextTableL()
+    {
+    iCharMap->SetStatusChanged(EAknCharSelectedNextTableButton);
     }
 
 TInt CAknSctTableNavi::ButtonPosition(TInt aButtonIndex) const
@@ -759,17 +808,6 @@
     return (aButtonIndex==0) ? 0 : 1;
     }
 
-TInt CAknSctTableNavi::SetStatusChanged()
-    {
-    TRAPD(err, iCharMap->SetStatusChanged(EAknCharSelectedTableExitButton));
-    return err;
-    }
-
-void CAknSctTableNavi::NextTableL()
-    {
-    iCharMap->SetStatusChanged(EAknCharSelectedNextTableButton);
-    }
-
 void CAknSctTableNavi::ConstructFromResourceL(TResourceReader& aReader)
     {
     // Table navi buttons.
@@ -781,72 +819,12 @@
         TResourceReader buttonReader;
         iCoeEnv->CreateResourceReaderLC(buttonReader, resId);
         CAknSctNaviButton* buttonObj = CAknSctNaviButton::NewL(*this, buttonId, buttonReader);
+        buttonObj->SetObserver(this);
         iButtonArray.Append(buttonObj);
         CleanupStack::PopAndDestroy(); // buttonReader
         }
     }
 
-void CAknSctTableNavi::HandlePointerEventL(const TPointerEvent& aPointerEvent)
-    {
-    if (AknLayoutUtils::PenEnabled() && Rect().Contains(aPointerEvent.iPosition))
-        {
-        if (aPointerEvent.iType == TPointerEvent::EButton1Down)
-            {
-            iPressedButtonIndex = -1;
-            
-            for (TInt index = 0; index < iButtonArray.Count(); index++)
-                {
-                CAknSctNaviButton* buttonObj = iButtonArray[index];
-                if(buttonObj->IsEnabled())
-                    {
-                    TRect buttonRect = buttonObj->iButtonControl->Rect();
-                    if (buttonRect.Contains(aPointerEvent.iPosition))
-                        {
-                        iPressedButtonIndex = index;
-                        }
-                    }
-                }
-            }
-        else if (aPointerEvent.iType == TPointerEvent::EButton1Up)
-            {
-            if(iPressedButtonIndex >= 0)
-                {
-                CAknSctNaviButton* buttonObj = iButtonArray[iPressedButtonIndex];
-                if(buttonObj->IsEnabled())
-                    {
-                    iButtonIndex = iPressedButtonIndex;
-                    
-                    TRect buttonRect = buttonObj->iButtonControl->Rect();
-                    if (buttonRect.Contains(aPointerEvent.iPosition))
-                        {
-                        switch (buttonObj->iButtonId)
-                            {
-                            case EAknSctTableNaviExit:
-                                {
-                                iExtension->iKeyOkEvent = ETrue;
-                                TableExitL();
-                                }
-                                return;
-                                
-                            case EAknSctTableNaviSpecialChar:
-                            case EAknSctTableNaviEmotion:
-                                {
-                                NextTableL();
-                                }
-                                return;
-                                
-                            default:
-                                break;
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    
-    CCoeControl::HandlePointerEventL(aPointerEvent);
-    }
-
 TSize CAknSctTableNavi::MinimumSize()
     {
     return Rect().Size();
@@ -906,6 +884,41 @@
         }
     }
 
+void CAknSctTableNavi::HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType)
+    {
+    if(aEventType == EEventStateChanged)
+        {
+        for(TInt i=0; i<iButtonArray.Count(); i++)
+            {
+            CAknSctNaviButton* button = iButtonArray[i];
+            if(button->iButtonControl == aControl)
+                {
+                switch(button->iButtonId)
+                    {
+                    case EAknSctTableNaviExit:
+                        {
+                        iExtension->iKeyOkEvent = ETrue;
+                        TableExitL();
+                        }
+                        return;
+                        
+                    case EAknSctTableNaviSpecialChar:
+                    case EAknSctTableNaviEmotion:
+                        {
+                        NextTableL();
+                        }
+                        return;
+                        
+                    default:
+                        break;
+                    }
+            
+                break;
+                }
+            }
+        }
+    }
+
 
 void CAknSctTableNavi::UpdateNextTableButtonL()
     {
@@ -6616,8 +6629,6 @@
             iExtension->iHighlightVisible = EFalse;
             DrawCursor();
             }
-			
-        CCoeControl::HandlePointerEventL(aPointerEvent);
 
         // if Stylus is lifted we clear all flags.
         if (aPointerEvent.iType == TPointerEvent::EButton1Up)
@@ -6625,17 +6636,26 @@
             iExtension->iFlags &= (~EAknCharMapButton1DownInGrid);
             iExtension->iFlags &= (~EAknCharMapHasBeenScrolledByDrag);
             iExtension->iFlags &= (~EAknCharMapPressedDown);
-            if ( !iSBFrame )
-                {
-                return;
-                }
-            CEikScrollBar* vScrollBar = iSBFrame->VerticalScrollBar();
-            if(vScrollBar)
-                {
-                vScrollBar->HandlePointerEventL(aPointerEvent);
-                }
-            }
-        }
+            if ( iSBFrame )
+                {
+                CEikScrollBar* vScrollBar = iSBFrame->VerticalScrollBar();
+                if(vScrollBar)
+                    {
+                    vScrollBar->HandlePointerEventL(aPointerEvent);
+                    }
+                }
+            }
+        }
+    else
+        {
+        if(iExtension->iSingleClickEnabled)
+            {
+            iExtension->iHighlightVisible = EFalse;
+            DrawCursor();
+            }
+        }
+    
+    CCoeControl::HandlePointerEventL(aPointerEvent);
     }
 
 // -----------------------------------------------------------------------------
--- a/uifw/AvKon/src/AknIndicatorContainer.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/AknIndicatorContainer.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -1962,15 +1962,16 @@
 
         TInt uid = indicator->Uid().iUid;
 
-        if ( uid == EAknNaviPaneEditorIndicatorSecuredConnection ||
-             uid == EAknNaviPaneEditorIndicatorProgressBar       ||
-             uid == EAknNaviPaneEditorIndicatorWmlWaitGlobe      ||
-             uid == EAknNaviPaneEditorIndicatorGprs              ||
-             uid == EAknNaviPaneEditorIndicatorFileSize          ||
-             uid == EAknNaviPaneEditorIndicatorWaitBar           ||
-             uid == EAknNaviPaneEditorIndicatorWlanAvailable     ||
-             uid == EAknNaviPaneEditorIndicatorWlanActive        ||
-             uid == EAknNaviPaneEditorIndicatorWlanActiveSecure )
+        if ( uid == EAknNaviPaneEditorIndicatorGprs || 
+             uid == EAknNaviPaneEditorIndicatorWlanAvailable ||
+             uid == EAknNaviPaneEditorIndicatorWlanActive || 
+             uid == EAknNaviPaneEditorIndicatorWlanActiveSecure || 
+             (!isLandscape && 
+                     (uid  == EAknNaviPaneEditorIndicatorProgressBar ||
+                      uid  == EAknNaviPaneEditorIndicatorFileSize || 
+                      uid  == EAknNaviPaneEditorIndicatorWaitBar || 
+                      uid  == EAknNaviPaneEditorIndicatorSecuredConnection || 
+                      uid == EAknNaviPaneEditorIndicatorWmlWaitGlobe)))
             {
             // These indicators are not shown in this statuspane layout.
             indicator->SetExtent( TPoint( 0, 0 ), TSize( 0, 0 ) );
@@ -1981,6 +1982,16 @@
 
         if ( iLayoutOrientation == EVertical )
             {
+            if (uid == EAknNaviPaneEditorIndicatorProgressBar || uid
+                    == EAknNaviPaneEditorIndicatorFileSize || uid
+                    == EAknNaviPaneEditorIndicatorWaitBar || uid
+                    == EAknNaviPaneEditorIndicatorSecuredConnection || uid
+                    == EAknNaviPaneEditorIndicatorWmlWaitGlobe)
+                {
+                indicator->SetExtent(TPoint(0, 0), TSize(0, 0));
+                iIndicatorsShown++;
+                continue;
+                }
             // Highest priority indicator is put topmost.
             if ( height < indicator->IconSize().iHeight )
                 {
@@ -2022,6 +2033,112 @@
 
             TInt textIndicatorLeftOffset = KMinSpaceBetweenIconsInPixels;
 
+            ////////////////////////////////////////////////////////////////////////////
+            //small status pane
+            TRect smallStatusPaneRect;
+            AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStatusPane,
+                    smallStatusPaneRect);
+
+            // small statuspane, secure state indicator
+            TAknWindowLineLayout
+                    smallStatusSecureStateLayout =
+                            AknLayout::Small_status_pane_descendants_and_elements_Line_5();
+            TAknLayoutRect smallStatusSecureStateLayoutRect;
+            smallStatusSecureStateLayoutRect.LayoutRect(smallStatusPaneRect,
+                    smallStatusSecureStateLayout);
+            TRect smallStatusSecureStateRect(
+                    smallStatusSecureStateLayoutRect.Rect());
+
+            // small statuspane, wait pane
+            TAknWindowComponentLayout smallStatusWaitPaneLayout =
+                    AknLayoutScalable_Avkon::status_small_wait_pane(3);
+            TAknLayoutRect smallStatusWaitPaneLayoutRect;
+            smallStatusWaitPaneLayoutRect.LayoutRect(smallStatusPaneRect,
+                    smallStatusWaitPaneLayout);
+            TRect smallStatusWaitPaneRect(
+                    smallStatusWaitPaneLayoutRect.Rect());
+
+            // small statuspane, globe
+            TAknWindowComponentLayout smallStatusWmlGlobeLayout =
+                    AknLayoutScalable_Avkon::status_small_pane_g4(0);
+            TAknLayoutRect smallStatusWmlGlobeLayoutRect;
+            smallStatusWmlGlobeLayoutRect.LayoutRect(smallStatusPaneRect,
+                    smallStatusWmlGlobeLayout);
+            TRect smallStatusWmlGlobeRect(
+                    smallStatusWmlGlobeLayoutRect.Rect());
+
+            TInt waitBarIndicatorLeftOffset = smallStatusWaitPaneRect.iTl.iX;
+            TInt progressBarIndicatorLeftOffset = 0;
+            TInt wmlWaitGlobeLeftOffset = smallStatusWmlGlobeRect.iTl.iX;
+
+            TRect rectForMiddleIndicators(wmlWaitGlobeLeftOffset,
+                    containerRect.iTl.iY, wmlWaitGlobeLeftOffset,
+                    containerRect.iBr.iY);
+
+            if (AknLayoutUtils::LayoutMirrored())
+                {
+                wmlWaitGlobeLeftOffset = smallStatusPaneRect.iBr.iX
+                        - smallStatusWmlGlobeRect.iBr.iX;
+                waitBarIndicatorLeftOffset = smallStatusPaneRect.iBr.iX
+                        - smallStatusWaitPaneRect.iBr.iX;
+                }
+
+            if (uid == EAknNaviPaneEditorIndicatorProgressBar)
+                {
+                indicatorWidth = smallStatusWaitPaneRect.Width();
+                indicatorHeight = smallStatusWaitPaneRect.Height();                
+                verticalOffset = (containerRect.Height() - indicatorHeight)/ 2;
+                leftOffset = progressBarIndicatorLeftOffset;
+
+                textIndicatorOffsetNeeded = ETrue;
+                }
+            else if (uid == EAknNaviPaneEditorIndicatorFileSize)
+                {
+                verticalOffset = verticalOffsetForTextIndicator;
+
+                // need left offset in western, right offset in A&H layout.
+                if (AknLayoutUtils::LayoutMirrored())
+                    {
+                    rightOffset = textIndicatorLeftOffset;
+                    }
+                else
+                    {
+                    leftOffset = KMinSpaceBetweenIconsInPixels;
+                    }
+                }
+            else if (uid == EAknNaviPaneEditorIndicatorWmlWaitGlobe)
+                {
+                verticalOffset = (containerRect.Height()
+                        - indicator->IconSize().iHeight) / 2;
+                indicatorWidth = smallStatusWmlGlobeRect.Width();
+                }
+            else if (uid == EAknNaviPaneEditorIndicatorWaitBar)
+                {
+                indicatorWidth = smallStatusWaitPaneRect.Width();
+                indicatorHeight = smallStatusWaitPaneRect.Height();
+                verticalOffset = (containerRect.Height() - indicatorHeight)/ 2;
+                leftOffset = waitBarIndicatorLeftOffset;
+                textIndicatorOffsetNeeded = ETrue;
+                }
+            else if (uid == EAknNaviPaneEditorIndicatorSecuredConnection)
+                {
+                verticalOffset = (containerRect.Height()
+                        - smallStatusSecureStateRect.Height()) / 2;
+
+                // because icon bitmap does not contain enough space, increase offset as
+                // the layout spec states.
+                if (AknLayoutUtils::LayoutMirrored())
+                    {
+                    leftOffset = KMinSpaceBetweenIconsInPixels;
+                    }
+                else
+                    {
+                    rightOffset = KMinSpaceBetweenIconsInPixels;
+                    }
+                textIndicatorOffsetNeeded = EFalse;
+                progressBarIndicatorLeftOffset = 0;
+                }
+            ////////////////////////////////////////////////////////////////////////
             if ( uid == EAknNaviPaneEditorIndicatorMessageInfo    ||
                  uid == EAknNaviPaneEditorIndicatorWmlWindowsText ||
                  uid == EAknNaviPaneEditorIndicatorMessageLength )
@@ -2190,9 +2307,30 @@
             // Place indicators to the middle if any.
             if ( indicatorPosition == EMiddle )
                 {
-                // Not supported for now, always set size to zero.
-                indicator->SetExtent( TPoint( 0, 0 ), TSize( 0, 0 ) );
-                iIndicatorsShown++;
+                TRect requiredRect( rectForMiddleIndicators.iTl.iX,
+                        rectForMiddleIndicators.iTl.iY,
+                        rectForMiddleIndicators.iTl.iX + leftOffset
+                                + indicatorWidth + rightOffset,
+                        rectForMiddleIndicators.iBr.iY );
+
+                // check if indicator fits
+                if (( requiredRect.Intersects( rectForRightSideIndicators )
+                        || requiredRect.Intersects(rectForLeftSideIndicators ))
+                        || ( rectForMiddleIndicators.Width() != 0 ))
+                    {
+                    indicator->SetExtent(TPoint(0, 0), TSize(0, 0));
+                    iIndicatorsShown++;
+                    continue;
+                    }
+                else
+                    {
+                    indicator->SetExtent( TPoint(
+                            rectForMiddleIndicators.iTl.iX + leftOffset,
+                            verticalOffset ), TSize( indicatorWidth,
+                            indicatorHeight ));
+                    rectForMiddleIndicators.iTl.iX += rightOffset;
+                    rectForMiddleIndicators.iTl.iX += indicatorWidth;
+                    }
                 }
             }
 
--- a/uifw/AvKon/src/AknLayoutConfig.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/AknLayoutConfig.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -341,6 +341,8 @@
 												RArray<SAknScreenModeInfo>& aScreenInfoArray, 
 											    RArray<SHardwareStateInfo>& aHardwareStateArray)
 	{
+    ::CleanupClosePushL(aScreenInfoArray);
+    ::CleanupClosePushL(aHardwareStateArray);
 	// get state screen map
 #if defined(__WINS__)
     TInt screenMapResource = R_AKNPRIV_HARDWARE_STATE_SCREEN_MAP_EMUL;
@@ -387,11 +389,14 @@
 		}
 
 	CleanupStack::PopAndDestroy(); // reader's HBufC
+	CleanupStack::Pop(&aHardwareStateArray);
+	CleanupStack::Pop(&aScreenInfoArray);
 	}
 	
 void CAknLayoutConfig::GetKeyMapFromAknPrivL(CResourceFile* aResFile,
 											 RArray<SHardwareStateInfo>& aHardwareStateArray)
 	{
+    ::CleanupClosePushL(aHardwareStateArray);
 	// get the state key map
 #if defined(__WINS__)
     TInt hwMapResource = R_AKNPRIV_HARDWARE_STATE_KEY_MAP_EMUL;
@@ -416,6 +421,7 @@
         }
 
     CleanupStack::PopAndDestroy(); // reader's HBufC
+    CleanupStack::Pop(&aHardwareStateArray);
 	}
 
 TAknPrivSoftkeyLocation CAknLayoutConfig::GetLandscapeSoftkeyLocationFromAknPrivL(CResourceFile* aResFile)
@@ -444,6 +450,7 @@
 												RArray<SAknScreenModeInfo>& aScreenInfoArray, 
 												TAknPrivSoftkeyLocation aLandscapeSoftkeyLocation)
 	{
+	::CleanupClosePushL(aScreenInfoArray);
 	CEikonEnv* eikonEnv = CEikonEnv::Static();
 	CWsScreenDevice* dev = eikonEnv->ScreenDevice();
 
@@ -475,6 +482,7 @@
     	screenMode.iDisplayMode = dev->GetScreenModeDisplayMode(ii);
 		aScreenInfoArray.AppendL(screenMode);
 		}
+	CleanupStack::Pop(&aScreenInfoArray);
 	}
 
 //
--- a/uifw/AvKon/src/AknNoteDialog.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/AknNoteDialog.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -405,7 +405,7 @@
         CAknNoteAttributes* attr = ControlAttributes();
         if ( attr )
             {
-            RDebug::Print(_L("CAknNoteDialog allowing opt. draw, %d"), (TUint)this );            
+            _AKNTRACE( "[%s][%s] allowing opt. draw,0x%x", "CAknNoteDialog", "LayoutAndDraw", this );
             attr->AllowOptimizedDrawing();
             }
         }
@@ -857,12 +857,22 @@
         {
         CCoeControl* ctrl = GrabbingComponent();
         CCoeControl::HandlePointerEventL(aPointerEvent);
-        
-        if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
+        // Add tactile feedbacup when tap can close note.
+        if ( aPointerEvent.iType == TPointerEvent::EButton1Down )
+            {
+            if ( DialogFlags()&EEikDialogFlagCloseDialogWhenTapped )
+            	{
+                MTouchFeedback* feedback = MTouchFeedback::Instance();
+                if ( feedback )
+                    {
+                    feedback->InstantFeedback( ETouchFeedbackPopUp );
+                    }
+            	}
+            }
+        else if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
             {
             if ( DialogFlags()&EEikDialogFlagCloseDialogWhenTapped )
                 {
-                //Touch release gives pop-up effect if note can be dismissed.
                 if ( ctrl )
                     {
                     // if grabbingComponent and dialog has 'close dialog when 
@@ -872,11 +882,6 @@
                         StaticDeleteL( this );
                         }
                     
-                    MTouchFeedback* feedback = MTouchFeedback::Instance();
-                    if ( feedback )
-                        {
-                        feedback->InstantFeedback( ETouchFeedbackPopUp );
-                        }
                     }
                 }
             }
--- a/uifw/AvKon/src/AknPreviewPopUp.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/AknPreviewPopUp.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -78,6 +78,13 @@
 //
 CAknPreviewPopUp::~CAknPreviewPopUp()
     {
+
+    if ( IsVisible() )
+        {
+        iCloseMenu = ETrue;
+        iController.HidePopUp();
+        }
+		
     AKNTASHOOK_REMOVE();
     
     GfxTransEffect::Deregister( this );
--- a/uifw/AvKon/src/AknSctDialog.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/AknSctDialog.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -595,7 +595,7 @@
             case EKeyDownArrow:
                 {
                 TKeyResponse res = charmapControl->OfferKeyEventL(aKeyEvent, aModifiers);
-                RefreshTitleAndNavi();
+                RefreshTitleAndNaviL();
                 return res;
                 }
 
@@ -956,23 +956,16 @@
 //
 EXPORT_C void CAknCharMapDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent)
     {
-    if (!Rect().Contains( aPointerEvent.iPosition))
+    if(!Rect().Contains(aPointerEvent.iPosition))
         {
         if(aPointerEvent.iType == TPointerEvent::EButton1Down)
             {
-            TryExitL (EAknSoftkeyCancel);
+            TryExitL(EAknSoftkeyCancel);
             return;
             }
-         else if(aPointerEvent.iType == TPointerEvent::EButton1Up)
-            {
-            CAknCharMap* charMap = STATIC_CAST( CAknCharMap*, Control( EAknSCTQueryContentId ) );
-            charMap->HandlePointerEventL( aPointerEvent);
-            }
         }
-    else
-        {
-        CAknDialog::HandlePointerEventL(aPointerEvent);
-        }
+
+    CAknDialog::HandlePointerEventL(aPointerEvent);
     }
 
 void CAknCharMapDialog::SwitchTablesOrPagesL()
@@ -1007,10 +1000,10 @@
     CAknPopupHeadingPane* headingPane = STATIC_CAST(CAknPopupHeadingPane*, Control(EAknSCTQueryHeadingId));
     
     charmapControl->NextPageL();
-    RefreshTitleAndNavi();
+    RefreshTitleAndNaviL();
     }
 
-void CAknCharMapDialog::RefreshTitleAndNavi()
+void CAknCharMapDialog::RefreshTitleAndNaviL()
     {
     CAknCharMap* charmapControl = STATIC_CAST(CAknCharMap*, Control(EAknSCTQueryContentId));
     CAknPopupHeadingPane* headingPane = STATIC_CAST(CAknPopupHeadingPane*, Control(EAknSCTQueryHeadingId));
--- a/uifw/AvKon/src/AknSettingPage.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/AknSettingPage.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -1357,24 +1357,6 @@
  */
 EXPORT_C void CAknSettingPage::AttemptExitL(TBool aAccept)
 	{
-    if ( AknLayoutUtils::PenEnabled() )
-        {
-        MTouchFeedback* feedback = MTouchFeedback::Instance();
-        if ( feedback )
-            {
-            TTouchLogicalFeedback fbLogicalType = ETouchFeedbackPopUp;
-            if ( CAknTransitionUtils::TransitionsEnabled(
-                    AknTransEffect::EComponentTransitionsOff ) )
-                {
-                fbLogicalType = ETouchFeedbackDecreasingPopUp;
-                }
-            feedback->InstantFeedback(
-                                   this,
-                                   fbLogicalType,
-                                   ETouchFeedbackVibra,
-                                   TPointerEvent() );
-            }
-        }
 	if ( OkToExitL( aAccept ) )
 		{
 		DismissL( aAccept );
@@ -1409,6 +1391,25 @@
  */
 EXPORT_C void CAknSettingPage::DismissL(TBool aAccept)
 	{
+    if ( AknLayoutUtils::PenEnabled() )
+        {
+        MTouchFeedback* feedback = MTouchFeedback::Instance();
+        if ( feedback )
+            {
+            TTouchLogicalFeedback fbLogicalType = ETouchFeedbackPopUp;
+            if ( CAknTransitionUtils::TransitionsEnabled(
+                    AknTransEffect::EComponentTransitionsOff ) )
+                {
+                fbLogicalType = ETouchFeedbackDecreasingPopUp;
+                }
+            feedback->InstantFeedback(
+                                   this,
+                                   fbLogicalType,
+                                   ETouchFeedbackVibra,
+                                   TPointerEvent() );
+            }
+        }
+    
     AknItemActionMenuRegister::SetOverridingMenuBarOwnerL( NULL );
 
 	if ( aAccept )
--- a/uifw/AvKon/src/AknSmileyImage.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/AknSmileyImage.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -230,19 +230,19 @@
 
     TFileName smileyMifName;
     SmileyUtils::GetCustomizableResPath(smileyMifName, KSmileyMif);
-    
+
     if(iImageSkinItemId.iMinor > 0)
         {
         MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-        TRAP_IGNORE( AknsUtils::CreateColorIconL(skin, iImageSkinItemId, 
-                                               KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG19, 
-                                               iFrame, iFrameMask, 
-                                               smileyMifName, iImageMifPkgItemId, iImageMifPkgItemId, 
+        TRAPD(err, AknsUtils::CreateColorIconL(skin, iImageSkinItemId, 
+                                               KAknsIIDQsnTextColors,EAknsCIQsnTextColorsCG19, 
+                                               iFrame,iFrameMask, 
+                                               smileyMifName, iImageMifPkgItemId,iImageMifPkgItemId, 
                                                AKN_LAF_COLOR(215)));
         }
     else
         {
-        TRAP_IGNORE( AknIconUtils::CreateIconL(iFrame, iFrameMask, smileyMifName, iImageMifPkgItemId, iImageMifPkgItemId));
+        TRAPD(err, AknIconUtils::CreateIconL(iFrame,iFrameMask,smileyMifName,iImageMifPkgItemId,iImageMifPkgItemId));
         }
     
     if(iIsAnimation) // the first frame of animation svg is blank without correct content
@@ -258,7 +258,6 @@
         }
 
     AknIconUtils::SetSize(iFrame, iSize);
-    TUid i = iFrame->ExtendedBitmapType();
     }
 
 void CSmileyImage::DoRelease()
--- a/uifw/AvKon/src/AknSmileyModel.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/AknSmileyModel.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -289,7 +289,7 @@
             }
         else
             {
-            icon->LoadStillImageL(1); // 1 is for asynchronous
+            icon->LoadStillImageL();
             }
         }
     }
--- a/uifw/AvKon/src/Aknpopupform.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/Aknpopupform.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -596,6 +596,17 @@
                 {
                 ClearArea( Rect() );
                 UpdateScrollIndicatorL();
+                // if iNoOfEditorLines becomes small, firstly calculate the New PopupForm layout.
+				// Because position of PopupForm is related to last PoppupForm layout.
+				if ( iNoOfEditorLines < oldNoOfLines )
+					{
+					TSize size;
+				    if ( !AknLayoutUtils::LayoutMetricsSize( AknLayoutUtils::EScreen, size ) )
+				    	{
+						size = iCoeEnv->ScreenDevice()->SizeInPixels() ;
+				    	}
+					SetSizeAndPosition( PreferredSize( size ) );
+					}
                 LayoutAndDraw();
                 }
             else if ( IsActivated() )
@@ -2336,6 +2347,15 @@
     UpdateFlags( ctrlType, ETrue );
 
     CalculateNumberOfScreens();
+    // because of insert a control, iNoOfEditorLines of editor become small, 
+    // but position is calculated by previous size of editor,
+    // So firstly calculate editor layout.
+    TSize size;
+    if ( !AknLayoutUtils::LayoutMetricsSize( AknLayoutUtils::EScreen, size ) )
+    	{
+		size = iCoeEnv->ScreenDevice()->SizeInPixels() ;
+    	}
+	SetSizeAndPosition( PreferredSize( size ) );
     LayoutAndDraw();
     UpdateScrollIndicatorL();
 
--- a/uifw/AvKon/src/aknPopup.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/aknPopup.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -38,7 +38,6 @@
 #endif
 
 #include <AknTasHook.h>
-
 #include "aknPopup.h"
 #include "akntrace.h"
 #include "aknitemactionmenuregister.h"
@@ -304,8 +303,7 @@
     iListBox->SetBorder(TGulBorder::ENone);
 
     // Create extension class
-    if (!iPopupListExtension)
-        iPopupListExtension = new (ELeave) CAknPopupListExtension(); 
+    iPopupListExtension = new (ELeave) CAknPopupListExtension(); 
 
     CAknAppUi* appUi = static_cast<CAknAppUi*>( iEikonEnv->EikAppUi() );
     if ( appUi && appUi->IsSingleClickCompatible() )
@@ -421,6 +419,7 @@
         STATIC_CAST(CAknFilteredTextListBoxModel*,
                     ListBox()->Model())->Filter()->SetSearchField( NULL );
         FindBox()->Editor().SetFocus( EFalse );                    
+        __ASSERT_DEBUG( iPopupListExtension, Panic( EAknPanicNullPointer ) );
         delete iPopupListExtension->iSearchControl;
         iPopupListExtension->iSearchControl = NULL;
         }
@@ -670,6 +669,7 @@
     {
     _AKNTRACE_FUNC_ENTER;
     _AKNTRACE("ProcessCommandL: aCommandId=%d", aCommandId);
+	__ASSERT_DEBUG( iPopupListExtension, Panic( EAknPanicNullPointer ) );
     // Respond to softkey events
     switch (aCommandId)
         {
@@ -729,6 +729,7 @@
 EXPORT_C void CAknPopupList::HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType)
     {
     _AKNTRACE_FUNC_ENTER;
+	__ASSERT_DEBUG( iPopupListExtension, Panic( EAknPanicNullPointer ) );
     // Respond to events from listbox
     if (aListBox == iListBox)
         {
@@ -818,24 +819,7 @@
 EXPORT_C void CAknPopupList::AttemptExitL(TBool aAccept)
     {
     _AKNTRACE_FUNC_ENTER;
-    if ( AknLayoutUtils::PenEnabled() )
-        {
-        MTouchFeedback* feedback = MTouchFeedback::Instance();
-        if ( feedback )
-            {
-            TTouchLogicalFeedback fbLogicalType = ETouchFeedbackPopUp;
-            if ( CAknTransitionUtils::TransitionsEnabled(
-                    AknTransEffect::EComponentTransitionsOff ) )
-                {
-                fbLogicalType = ETouchFeedbackDecreasingPopUp;
-                }
-            feedback->InstantFeedback(
-                                   this,
-                                   fbLogicalType,
-                                   ETouchFeedbackVibra,
-                                   TPointerEvent() );
-            }
-        }
+	__ASSERT_DEBUG( iPopupListExtension, Panic( EAknPanicNullPointer ) );
     //EFTG-7HWDP6.
     if( FindBox()
         && !( FindBox()->Editor().AknEdwinFlags() & EAknEditorFlagTouchInputModeOpened )
@@ -860,6 +844,24 @@
         }
     else if( !(iPopupListExtension->iFlags & EPopupFepStartEvent) )
         {  
+        if ( AknLayoutUtils::PenEnabled() )
+            {
+            MTouchFeedback* feedback = MTouchFeedback::Instance();
+            if ( feedback )
+                {
+                TTouchLogicalFeedback fbLogicalType = ETouchFeedbackPopUp;
+                if ( CAknTransitionUtils::TransitionsEnabled(
+                        AknTransEffect::EComponentTransitionsOff ) )
+                    {
+                    fbLogicalType = ETouchFeedbackDecreasingPopUp;
+                    }
+                feedback->InstantFeedback(
+                                       this,
+                                       fbLogicalType,
+                                       ETouchFeedbackVibra,
+                                       TPointerEvent() );
+                }
+            }
 #ifdef RD_UI_TRANSITION_EFFECTS_POPUPS
         // no transition if accepted
         if( IsVisible() && GfxTransEffect::IsRegistered(this) && !aAccept )
@@ -949,6 +951,7 @@
     
     TInt softkeyHeight( KSoftkeyHeightUndefined );
 
+	__ASSERT_DEBUG( iPopupListExtension, Panic( EAknPanicNullPointer ) ); 
     if (!iPopupListExtension->iBgContext)
         {
         TRAP_IGNORE( iPopupListExtension->iBgContext = CAknsFrameBackgroundControlContext::NewL(
@@ -1115,7 +1118,8 @@
         }
     if (aId.iUid == MAknsControlContext::ETypeId)
         {
-        if (iPopupListExtension && iPopupListExtension->iBgContext)
+    	__ASSERT_DEBUG( iPopupListExtension, Panic( EAknPanicNullPointer ) );
+        if (iPopupListExtension->iBgContext)
             {
             return MAknsControlContext::SupplyMopObject(aId, iPopupListExtension->iBgContext);
             }
@@ -1169,6 +1173,7 @@
     
     if ( AknLayoutUtils::PenEnabled() )
         {
+    	__ASSERT_DEBUG( iPopupListExtension, Panic( EAknPanicNullPointer ) );
         iPopupListExtension->iFlags |= EPopupHandlingPointerEvent;
 
         TInt index;
@@ -1241,8 +1246,7 @@
     
 EXPORT_C TBool CAknPopupList::EnableFind(TBool /*aEnable*/)
     {
-    if (!iPopupListExtension)
-        return EFalse; // no extension class, failed
+	__ASSERT_DEBUG( iPopupListExtension, Panic( EAknPanicNullPointer ) );    
     if (!iPopupListExtension->iSearchControl)
         {
         CAknSearchField::TSearchFieldStyle flags = CAknSearchField::EPopupWindow;
@@ -1274,8 +1278,7 @@
     
 EXPORT_C TBool CAknPopupList::EnableAdaptiveFind(TBool /*aEnable*/)
     {
-    if (!iPopupListExtension)
-        return EFalse; // no extension class, failed
+	__ASSERT_DEBUG( iPopupListExtension, Panic( EAknPanicNullPointer ) );    
     if (!iPopupListExtension->iSearchControl)
         {
         CAknSearchField::TSearchFieldStyle flags = CAknSearchField::EPopupAdaptiveSearchWindow;
@@ -1308,9 +1311,8 @@
 
 EXPORT_C CAknSearchField* CAknPopupList::FindBox() const
     {
-    if (iPopupListExtension)
-        return iPopupListExtension->iSearchControl;
-    return NULL;
+	__ASSERT_DEBUG( iPopupListExtension, Panic( EAknPanicNullPointer ) );    
+    return iPopupListExtension->iSearchControl;
     }
 
 void CAknPopupList::RemoveFindFiltering()
@@ -1331,7 +1333,7 @@
     _AKNTRACE_FUNC_ENTER;
     if( aType == KEikDynamicLayoutVariantSwitch )
         {
-        
+    	__ASSERT_DEBUG( iPopupListExtension, Panic( EAknPanicNullPointer ) );
         //EFTG-7HWDP6. 
         //Tapping Edit'area can arouse the CAknPopupList::HandleResourceChange()
         //when portrait is initial model, and 'Full screen QWERTY keyboard' is default input method.
--- a/uifw/AvKon/src/aknbattery.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/aknbattery.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -70,12 +70,6 @@
     {
     AKNTASHOOK_REMOVE();
     
-    MTouchFeedback* feedback = MTouchFeedback::Instance();
-    if ( feedback )
-        {
-        feedback->RemoveFeedbackForControl( this );
-        }
-    
     AknsUtils::DeregisterControlPosition( this );
 
     delete iBatteryIconControl;
@@ -105,26 +99,6 @@
     iPrivateFlags = 0; // reset flags
     iDataObserver = new (ELeave) CAknBatteryDataObserver( this );
     iStatusPane = CEikStatusPaneBase::Current();
-    
-    MTouchFeedback* feedback = MTouchFeedback::Instance();
-    if ( feedback )
-        {
-        CFeedbackSpec* fbSpec = CFeedbackSpec::New();
-        if ( fbSpec )
-            {
-            fbSpec->AddFeedback( ETouchEventStylusDown,
-                                 ETouchFeedbackSensitiveButton );
-            fbSpec->AddFeedback( ETouchEventStylusUp,
-                                 ETouchFeedbackSensitiveButton,
-                                 ETouchFeedbackVibra );
-
-            feedback->SetFeedbackArea( this,
-                                       0,
-                                       Rect(),
-                                       fbSpec );
-            delete fbSpec; 
-            }        
-        }
     }
 
 
@@ -370,9 +344,6 @@
         else
             {
             feedback->EnableFeedbackForControl( this, ETrue );
-            feedback->ChangeFeedbackArea( this,
-                                          0,
-                                          parent );
             }
         }
     }
@@ -582,22 +553,18 @@
         }
 
     CEikStatusPaneBase* sp = CEikStatusPaneBase::Current();
-	if( sp )
+	if ( sp )
 	    {
         TInt statusPaneCurrentLayoutResourceId = sp->CurrentLayoutResId();
-        if(statusPaneCurrentLayoutResourceId == R_AVKON_STATUS_PANE_LAYOUT_POWER_OFF_RECHARGE
-                    || statusPaneCurrentLayoutResourceId == R_AVKON_STATUS_PANE_LAYOUT_POWER_OFF_RECHARGE_MIRRORED)
+        if ( statusPaneCurrentLayoutResourceId ==
+                 R_AVKON_STATUS_PANE_LAYOUT_POWER_OFF_RECHARGE ||
+             statusPaneCurrentLayoutResourceId ==
+                 R_AVKON_STATUS_PANE_LAYOUT_POWER_OFF_RECHARGE_MIRRORED )
             {
-            MTouchFeedback* feedback = MTouchFeedback::Instance();
-            if ( feedback )
-                {
-                feedback->RemoveFeedbackForControl( this );
-                }
-        
             AknsUtils::DeregisterControlPosition( this );
             return;
             }
-          }       
+        }
     // Get the rect of battery pane.
     TRect rect( Rect() );
 
@@ -611,6 +578,11 @@
                 {
                 // set flag that pointerdown was inside battery pane
                 iPrivateFlags |= EAknBatteryPaneButton1DownInBatteryRect;
+                MTouchFeedback* feedback = MTouchFeedback::Instance();
+                if ( feedback )
+                    {
+                    feedback->InstantFeedback( ETouchFeedbackSensitiveButton );
+                    }
                 }
             }
             break;
@@ -662,20 +634,14 @@
                      pointerUpInClockArea ||
                      pointerUpInIndicatorArea )
                     {
-                    if ( pointerUpInClockArea || pointerUpInIndicatorArea )
+                    MTouchFeedback* feedback = MTouchFeedback::Instance();
+                    if ( feedback )
                         {
-                        MTouchFeedback* feedback = MTouchFeedback::Instance();
-                        if ( feedback )
-                            {
-                            // The pointer down was received in another
-                            // control, so the tactile feedback must be
-                            // given directly.
-                            feedback->InstantFeedback(
-                                this,
-                                ETouchFeedbackSensitiveButton,
-                                ETouchFeedbackVibra,
-                                aPointerEvent );
-                            }
+                        feedback->InstantFeedback(
+                            this,
+                            ETouchFeedbackSensitiveButton,
+                            ETouchFeedbackVibra,
+                            aPointerEvent );
                         }
 
                     CAknSmallIndicator* indicatorNotifier =
--- a/uifw/AvKon/src/akndialog.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/akndialog.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -243,7 +243,10 @@
  */
 EXPORT_C void CAknDialog::DisplayMenuL() 
 	{
-	iMenuBar->TryDisplayMenuBarL();
+    if (iMenuBar)
+        {
+        iMenuBar->TryDisplayMenuBarL();
+        }
 	}
 
 /**
--- a/uifw/AvKon/src/akndiscreetpopupcontrol.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/akndiscreetpopupcontrol.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -454,7 +454,14 @@
         {
         _AKNTRACE( "CAknDiscreetPopupControl::NotifyObserverL(), tap event will be disposed." );
         // Play feedback if there is command associated with the popup
-        ImmediateFeedback( ETouchFeedbackSensitive );
+        if ( iFeedBack )
+            {
+            iFeedBack->InstantFeedback( this,
+                                        ETouchFeedbackSensitive,
+                                        ETouchFeedbackVibra,
+                                        TPointerEvent()
+                                      );
+            }
         iCommandObserver->ProcessCommandL( iCommand );
         }
     _AKNTRACE_FUNC_EXIT;
--- a/uifw/AvKon/src/akngrid.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/akngrid.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -660,6 +660,7 @@
             iSBFrame->VerticalScrollBar()->Size()).Contains ( aPointerEvent.iPosition ))
             {
             if ( !ScrollingDisabled()
+                && iExtension 
                 && iExtension->iFlags & EAknGridStateButton1DownInGrid )
                 {
                 if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
@@ -687,17 +688,25 @@
             switch (aPointerEvent.iType)
                 {
                 case TPointerEvent::EButton1Down:
-                    iExtension->iLastPoint = aPointerEvent.iPosition;
-                    if ( visibleItemsRect.Contains(aPointerEvent.iPosition) )
-                        {
-                        iExtension->iFlags |= EAknGridStateButton1DownInGrid;                
-                        }
+                	{
+                    if( iExtension )
+                      {
+                      iExtension->iLastPoint = aPointerEvent.iPosition;
+                      if ( visibleItemsRect.Contains(aPointerEvent.iPosition) )
+                          {
+                          iExtension->iFlags |= EAknGridStateButton1DownInGrid;
+                          }
+                      }
                     _AKNTRACE( "TPointerEvent::EButton1Down" );
                     break;
-
+                	}
+                	
                 case TPointerEvent::EButton1Up:
                     {
-                    iExtension->iFlags &= ~EAknGridStateButton1DownInGrid;
+                    if ( iExtension )
+                        {
+                        iExtension->iFlags &= ~EAknGridStateButton1DownInGrid;
+                        }
                     _AKNTRACE( "TPointerEvent::EButton1Up" );
                     break;
                     }
@@ -1087,7 +1096,8 @@
         }
         
     // With single click first key event enables highlight
-    if ( iExtension->iSingleClickEnabled
+    if ( iExtension 
+            && iExtension->iSingleClickEnabled
             && ItemDrawer()->Flags()
             &  CListItemDrawer::ESingleClickDisabledHighlight )
         {
@@ -1499,7 +1509,7 @@
     
     if ( AknLayoutUtils::PenEnabled() )
         {
-        if ( !(iExtension->iFlags & EAknGridStateButton1DownInGrid) )
+        if ( !( iExtension && iExtension->iFlags & EAknGridStateButton1DownInGrid) )
             {
             _AKNTRACE_FUNC_EXIT;
             return;
@@ -1515,8 +1525,8 @@
         CListBoxView::TSelectionMode selectionMode = CListBoxView::ENoSelection;
         //        CListBoxView::TSelectionMode selectionMode = (iListBoxFlags & EMultipleSelection) ? CListBoxView::EContiguousSelection : CListBoxView::ESingleSelection;
         // END OF SERIES60 LAF
-        TInt speed = iExtension->GetScrollingSpeed( pointerIsOverAnItem, itemIndex, 
-                                                    *gridView, aPointerPos );
+        TInt speed = iExtension ? iExtension->GetScrollingSpeed( pointerIsOverAnItem, itemIndex, 
+                                                    *gridView, aPointerPos ):0;
         
         TInt oldCurrentItemIndex = CurrentItemIndex();
         TRect currentItemRect(gridView->ItemPos(oldCurrentItemIndex), gridView->ItemSize(oldCurrentItemIndex));       
@@ -1860,7 +1870,7 @@
         if (vSbarModel.iScrollSpan-vSbarModel.iThumbPosition<vSbarModel.iThumbSpan)
             {
             vSbarModel.iThumbPosition=Max(0,vSbarModel.iScrollSpan-vSbarModel.iThumbSpan);
-            if ( !iExtension->iSingleClickEnabled )
+            if ( iExtension && !iExtension->iSingleClickEnabled )
                 {
                 // force a scroll if neccessary
                 gridView->MoveToItemIndexL( currentIndex, 
--- a/uifw/AvKon/src/aknlists.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/aknlists.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -4187,7 +4187,7 @@
     SetupStretchableListL( this,
                           AknLayoutScalable_Avkon::list_setting_pane( 0 ),
                           AknLayoutScalable_Avkon::list_setting_pane_vc( 0 ),
-                          EFalse );
+                          ETrue );
 
     SetSeparatorLinePosition( this, EAColumn );
     
@@ -4290,7 +4290,7 @@
     SetupStretchableListL( this,
                           AknLayoutScalable_Avkon::list_setting_number_pane( 0 ),
                           AknLayoutScalable_Avkon::list_setting_number_pane_vc( 0 ),
-                          EFalse );
+                          ETrue );
 
     SetSeparatorLinePosition( this, EABColumn );
     
--- a/uifw/AvKon/src/aknmessagequerycontrol.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/aknmessagequerycontrol.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -135,7 +135,7 @@
     TPtr message( msgBuf->Des() );
     if( iListQLayout )
         {
-        TruncateTextForListQLayout( message );
+        TruncateTextForListQLayoutL( message );
         iEdwin->SetTextL( &message );
         LayoutEditorL(); 
         }
@@ -798,7 +798,7 @@
     return grabbing;
     }
 
-void CAknMessageQueryControl::TruncateTextForListQLayout( TDes& aMessage )
+void CAknMessageQueryControl::TruncateTextForListQLayoutL( TDes& aMessage )
     {
     if( !iListQLayout )
         return;
@@ -829,7 +829,7 @@
         TPtr message( msgBuf->Des() );
         iEdwin->SetTextL( &message );
         LayoutEditorL(); 
-        TruncateTextForListQLayout( message );
+        TruncateTextForListQLayoutL( message );
         iEdwin->SetTextL( &message );
         CleanupStack::PopAndDestroy( msgBuf );  // After all usages of message        
         iNumberOfLines = iEdwin->TextLayout()->NumFormattedLines();
--- a/uifw/AvKon/src/aknview.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/aknview.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -226,11 +226,10 @@
         {
         
         if ( newFixedToolbar && newFixedToolbar->ToolbarFlags() & KAknToolbarDefault )
-        	{
-        	oldFixedToolbar->HandleResourceChange( KAknToolbarSetHiddenAndDrawBackground );
-        	return;
-        	}
-        
+            {
+            return;
+            }
+
         oldFixedToolbar->HandleResourceChange( KAknToolbarSetHidden );         
         }
 #endif 
--- a/uifw/AvKon/src/eikfrlb.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/eikfrlb.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -780,7 +780,7 @@
 #define ITEM_EXISTS_ONCE(x) (((x) > -1) && ((x) < iModel->NumberOfItems()))
 
 EXPORT_C void
-CFormattedCellListBoxView::Draw(const TRect* clipRect) const
+CFormattedCellListBoxView::Draw( const TRect* aClipRect ) const
     {
     _AKNTRACE_FUNC_ENTER;
     if ( RedrawDisabled() || !IsVisible() )
@@ -790,7 +790,7 @@
         return;
         }
 
-   if(clipRect && clipRect->IsEmpty())
+   if( aClipRect && aClipRect->IsEmpty() )
         {
         _AKNTRACE("CFormattedCellListBoxView::Draw return because clip rect is empty");
         _AKNTRACE_FUNC_EXIT;
@@ -798,10 +798,12 @@
         }
                 
     TInt i = iTopItemIndex;
-    CFormattedCellListBoxItemDrawer *itemDrawer = static_cast<CFormattedCellListBoxItemDrawer*>( iItemDrawer );
-    MAknsSkinInstance *skin = AknsUtils::SkinInstance();
+    CFormattedCellListBoxItemDrawer* itemDrawer =
+        static_cast<CFormattedCellListBoxItemDrawer*>( iItemDrawer );
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
     CCoeControl* control = itemDrawer->FormattedCellData()->Control();
-    MAknsControlContext *cc = AknsDrawUtils::ControlContext( control );
+    MAknsControlContext* cc = AknsDrawUtils::ControlContext( control );
+    CWindowGc* gc = itemDrawer->Gc();
     
     if ( !cc )
         {
@@ -810,16 +812,19 @@
     
     itemDrawer->SetTopItemIndex( iTopItemIndex );
 
-    if ( iModel->NumberOfItems() > 0 )
+    TBool transparencyEnabled = CAknEnv::Static()->TransparencyEnabled();
+    TInt numberOfItems = iModel->NumberOfItems();
+    
+    if ( numberOfItems > 0 )
         {
 		TBool drawingInitiated = ETrue;
 		
 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
         MAknListBoxTfxInternal* transApi =
-            CAknListLoader::TfxApiInternal( itemDrawer->Gc() );
+            CAknListLoader::TfxApiInternal( gc );
 #endif // RD_UI_TRANSITION_EFFECTS_LIST
 		
-		if ( CAknEnv::Static()->TransparencyEnabled() )
+		if ( transparencyEnabled )
 		    {
     		if ( iWin && iWin->GetDrawRect() == TRect::EUninitialized )
 	    		{
@@ -832,12 +837,14 @@
 
 	    	if ( !drawingInitiated )
 		    	{
-    			iWin->Invalidate( *clipRect );
-	    		iWin->BeginRedraw( *clipRect );
+    			iWin->Invalidate( *aClipRect );
+	    		iWin->BeginRedraw( *aClipRect );
 		    	}
 		    }
 
-        TInt lastPotentialItemIndex = Min( iModel->NumberOfItems(), iTopItemIndex + NumberOfItemsThatFitInRect( iViewRect ) );
+        TInt lastPotentialItemIndex =
+            Min( numberOfItems,
+                 iTopItemIndex + NumberOfItemsThatFitInRect( iViewRect ) );
 
         while ( i < lastPotentialItemIndex )      
             {
@@ -848,7 +855,7 @@
                 }
 #endif // RD_UI_TRANSITION_EFFECTS_LIST
 
-            itemDrawer->Gc()->SetClippingRect( iViewRect );
+            gc->SetClippingRect( iViewRect );
             
 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
             if ( transApi )
@@ -866,7 +873,7 @@
                 }
 #endif // RD_UI_TRANSITION_EFFECTS_LIST
 
-            itemDrawer->Gc()->CancelClippingRect();
+            gc->CancelClippingRect();
             
 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
             if ( transApi )
@@ -881,54 +888,42 @@
             {
             transApi->StartDrawing( MAknListBoxTfxInternal::EListView );
             }
+
         if ( i > iBottomItemIndex + 1 )
             {
             i = iBottomItemIndex + 1;
             }
-        TRect usedPortionOfViewRect( iViewRect.iTl+TSize(0,iVerticalOffset), TSize( iViewRect.Width(), ( i - iTopItemIndex ) * iItemHeight ) );
+
+        TRect usedPortionOfViewRect(
+            iViewRect.iTl + TSize( 0, iVerticalOffset ),
+            TSize( iViewRect.Width(), ( i - iTopItemIndex ) * iItemHeight ) );
 #else
         // clear the unused portion of the viewing area
-        TRect usedPortionOfViewRect( iViewRect.iTl.iX, iViewRect.iTl.iY + iVerticalOffset, iViewRect.Width(), ItemPos( lastPotentialItemIndex ).iY );
+        TRect usedPortionOfViewRect( iViewRect.iTl.iX,
+                                     iViewRect.iTl.iY + iVerticalOffset,
+                                     iViewRect.Width(),
+                                     ItemPos( lastPotentialItemIndex ).iY );
         
-        if ( clipRect )
+        if ( aClipRect )
             {
-            usedPortionOfViewRect.iBr.iX = clipRect->iBr.iX;
+            usedPortionOfViewRect.iBr.iX = aClipRect->iBr.iX;
             }
 
 #endif
 
-        // also clear area behind scroll bar.
-        // this is a terrible hack, which is unfortunately needed since layouts
-        // leave 2 pixel (in double res) wide margins to both sides of the
-        // scroll bar, and there is no other way to do this. This hack is
-        // only really valid for main pane lists, but it does not seem to
-        // break popup lists, popup field lists or setting page radiobutton
-        // lists.
-        // See also: eikslb.cpp, eikclb.cpp
-        TRect sbbg( iViewRect );   // whole area behind scroll bar
-        TRect margin( iViewRect ); // it gets even worse in mirrored layouts
+        // Also draw the area behind scroll bar.
+        TRect sbbg( iViewRect ); // whole area behind scroll bar
         
         if ( AknLayoutUtils::LayoutMirrored() )
             {
             _AKNTRACE("CFormattedCellListBoxView::Draw Layout mirrored");
             sbbg.iBr.iX = iViewRect.iBr.iX - itemDrawer->LafItemSize().iWidth;
-
-            // in mirrored layouts we also need to draw a margin slice in right
-            TRect mainPane;
-            AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane,
-                                               mainPane );
-            TAknLayoutRect listscrollAppPane;
-            listscrollAppPane.LayoutRect( mainPane,
-                                          AknLayoutScalable_Avkon::listscroll_app_pane( 0 ) );
-
-            TInt rMargin = mainPane.iBr.iX - listscrollAppPane.Rect().iBr.iX;
-            margin.iTl.iX = margin.iBr.iX - rMargin;
             }
         else
             {
             sbbg.iTl.iX = iViewRect.iTl.iX + itemDrawer->LafItemSize().iWidth;
             }
-        
+
         // Unused portion will be cleared only if listbox background is drawn.
         if ( itemDrawer->ColumnData()->IsBackgroundDrawingEnabled() ) 
             {
@@ -937,30 +932,29 @@
                 if ( !control->FindBackground() )
                     {
                     AknsDrawUtils::BackgroundBetweenRects( skin, 
-                                                       cc, 
-                                                       control, 
-                                                       *itemDrawer->Gc(), 
-                                                       iViewRect, 
-                                                       usedPortionOfViewRect );
+                                                           cc, 
+                                                           control, 
+                                                           *gc, 
+                                                           iViewRect, 
+                                                           usedPortionOfViewRect );
 
-                    AknsDrawUtils::Background( skin, cc, control, *itemDrawer->Gc(), sbbg );
-                
-                    if ( AknLayoutUtils::LayoutMirrored() )
+                    if ( !sbbg.IsEmpty() )
                         {
-                        AknsDrawUtils::Background( skin, cc, control, *itemDrawer->Gc(), margin );
+                        AknsDrawUtils::Background( skin,
+                                                   cc,
+                                                   control,
+                                                   *gc,
+                                                   sbbg );
                         }
                     }
                 }
             else
                 {
-                itemDrawer->Gc()->SetBrushColor( BackColor() );
-                DrawUtils::ClearBetweenRects( *itemDrawer->Gc(), iViewRect, usedPortionOfViewRect );
-                itemDrawer->Gc()->Clear( sbbg );
-                
-                if ( AknLayoutUtils::LayoutMirrored() )
-                    {
-                    itemDrawer->Gc()->Clear( margin );
-                    }
+                gc->SetBrushColor( BackColor() );
+                DrawUtils::ClearBetweenRects( *gc,
+                                              iViewRect,
+                                              usedPortionOfViewRect );
+                gc->Clear( sbbg );
                 }
             }
 
@@ -972,7 +966,7 @@
 #endif //RD_UI_TRANSITION_EFFECTS_LIST      
 
 
-		if ( CAknEnv::Static()->TransparencyEnabled() && !drawingInitiated )
+		if ( transparencyEnabled && !drawingInitiated )
 			{
 			iWin->EndRedraw();
 			}
--- a/uifw/AvKon/src/eikfrlbd.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/src/eikfrlbd.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -1308,20 +1308,19 @@
 
 EXPORT_C CCoeControl *CFormattedCellListBoxData::Control() const 
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     return iExtension->iControl;
     }
 
 EXPORT_C void CFormattedCellListBoxData::SetSeparatorLinePosition(TAknSeparatorLinePosition aPosition)
     {
-    if (iExtension)
-        iExtension->iSeparatorLinePosition = aPosition;
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    iExtension->iSeparatorLinePosition = aPosition;
     }
 EXPORT_C TAknSeparatorLinePosition CFormattedCellListBoxData::SeparatorLinePosition() const
     {
-    if (iExtension)
-        return iExtension->iSeparatorLinePosition;
-    else
-        return ENoLine;
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    return iExtension->iSeparatorLinePosition;
     }
 EXPORT_C CAknLayoutData *CFormattedCellListBoxData::LayoutData() const
     {
@@ -1341,11 +1340,13 @@
 
 EXPORT_C void CFormattedCellListBoxData::SetControl(CCoeControl *aControl)
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     iExtension->SetControl( aControl );
     }
 
 EXPORT_C MAknsControlContext* CFormattedCellListBoxData::SkinBackgroundContext() const
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     if (iExtension->iSkinEnabled)
         {
         if (iExtension->iPopupFrame)
@@ -1366,18 +1367,20 @@
 
 EXPORT_C void CFormattedCellListBoxData::SetSkinEnabledL(TBool aEnabled)
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     CListBoxData::SetSkinEnabledL(aEnabled);
     iExtension->iSkinEnabled = aEnabled;
     }
 
 EXPORT_C TBool CFormattedCellListBoxData::SkinEnabled() const
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     return iExtension->iSkinEnabled;
     }
 
 EXPORT_C void CFormattedCellListBoxData::SetSkinStyle(const TAknsItemID *id, const TRect &aTileRect)
     {
-
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     if (iExtension->iSkinControlContext)
         {
         iExtension->iSkinControlContext->SetTiledBitmap(*id);
@@ -1386,6 +1389,7 @@
     }
 EXPORT_C void CFormattedCellListBoxData::SetSkinParentPos(const TPoint &aPos)
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     if (iExtension->iSkinControlContext)
         {
         iExtension->iSkinControlContext->SetParentPos(aPos);
@@ -1393,6 +1397,7 @@
     }
 EXPORT_C void CFormattedCellListBoxData::SetBackgroundSkinStyle(const TAknsItemID *aId, const TRect &aRect)
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     if (iExtension->iSkinControlContext)
         {
         iExtension->iSkinControlContext->SetBitmap(*aId);
@@ -1401,6 +1406,7 @@
     }
 EXPORT_C void CFormattedCellListBoxData::SetListEndSkinStyle(const TAknsItemID *aListEndId, const TRect &aRect)
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     if (iExtension->iSkinControlContext)
         {
         iExtension->iSkinControlContext->SetBottomBitmap(*aListEndId);
@@ -1410,13 +1416,15 @@
 
 EXPORT_C void CFormattedCellListBoxData::SetSkinHighlightFrame(const TAknsItemID *aFrameId, const TAknsItemID *aFrameCenterId)
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     iExtension->iSkinHighlightFrameId = aFrameId;
     iExtension->iSkinHighlightFrameCenterId = aFrameCenterId;
     }
     
 EXPORT_C void CFormattedCellListBoxData::SetSkinPopupFrame(const TAknsItemID *aFrameId, const TAknsItemID *aFrameCenterId)
     {
-    if (iExtension && iExtension->iPopupFrame)
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    if ( iExtension->iPopupFrame)
         {
         iExtension->iPopupFrame->SetFrame(*aFrameId);
         iExtension->iPopupFrame->SetCenter(*aFrameCenterId);
@@ -1438,24 +1446,27 @@
     
 EXPORT_C void CFormattedCellListBoxData::SetSkinPopupFramePosition(const TRect &aOuterRect, const TRect &aInnerRect)
     {
-    if (iExtension && iExtension->iPopupFrame)
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    if ( iExtension->iPopupFrame)
         iExtension->iPopupFrame->SetFrameRects(aOuterRect, aInnerRect);
     }
 
 EXPORT_C void CFormattedCellListBoxData::UseLogicalToVisualConversion(
     TBool aUseConversion )
     {
-    if (iExtension)
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     iExtension->iUseLogicalToVisualConversion = aUseConversion;
     }
 
 void CFormattedCellListBoxData::CreatePictographInterfaceL()
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     iExtension->CreatePictographInterfaceL();
     }
 
 void CFormattedCellListBoxData::CreateMarqueeControlL()
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     TCallBack callBack(CFormattedCellListBoxDataExtension::RedrawEvent, iExtension->iControl);
     //iExtension->iMarquee = CAknMarqueeControl::NewL();
     iExtension->CreateMarqueeControlL();
@@ -1713,6 +1724,7 @@
 EXPORT_C void 
 CFormattedCellListBoxData::SetSubCellAlignmentL(TInt aSubCellIndex, CGraphicsContext::TTextAlign aAlign)
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     TInt index = 0;
     FindSubCellIndexOrAddL(index,aSubCellIndex);
     At(index).iAlign=aAlign;
@@ -1860,15 +1872,14 @@
 
 EXPORT_C TBool CFormattedCellListBoxData::RespectFocus() const
     {
-    if (iExtension)
-        return iExtension->iRespectFocus;
-    return EFalse;
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    return iExtension->iRespectFocus;
     }
 
 EXPORT_C void CFormattedCellListBoxData::SetRespectFocus(TBool aBool)
     {
-    if (iExtension)
-        iExtension->iRespectFocus = aBool;
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    iExtension->iRespectFocus = aBool;
     }
 
 EXPORT_C CFont* 
@@ -2262,6 +2273,7 @@
             aItemRect.iTl.iX, aItemRect.iTl.iY, aItemRect.iBr.iX, 
             aItemRect.iBr.iY);
     
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View();
     if (!view->ViewRect().Intersects(aItemRect))
         {
@@ -2330,6 +2342,8 @@
                                           TBool           aColorIcon,
                                           const TRect&    aGraphicRect ) const
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    
     // se also eikclbd.cpp ( sigh ).
     CFbsBitmap* bitmap( aIcon->Bitmap() );
     CFbsBitmap* mask( aIcon->Mask() );
@@ -2393,6 +2407,8 @@
             aItemRect.iTl.iX, aItemRect.iTl.iY, aItemRect.iBr.iX, 
             aItemRect.iBr.iY);
     
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    
     TRect textRect(aItemRect);
     const TColors *subcellColors = &aColors;
 
@@ -2439,7 +2455,7 @@
             ++ subcell;
             continue;
             }
-        if (!iExtension) break;
+
         if (iExtension->FindSLSubCellIndex(SCindex,subcell)!=0) break;
 
         if (UseSubCellColors(subcell))
@@ -2930,7 +2946,9 @@
 
 void CFormattedCellListBoxData::DrawDefaultHighlight(CWindowGc &aGc, const TRect &aItemRect, TBool aHighlight) const
     {
-    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_ENTER;    
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    
     // When this flag set, draw pressed down state and don't use animation.
     // There are several derived CListboxData in this file. All of them do  
     // this same thing.
@@ -3040,6 +3058,7 @@
 void CFormattedCellListBoxData::DrawPopupFrame(CWindowGc &aGc) const
     {
     _AKNTRACE_FUNC_ENTER;
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     CCoeControl* control = Control();
 
     if ( control )
@@ -3064,15 +3083,14 @@
     TInt aFirstIndex,
     TInt aSecondIndex )
     {
-    if ( iExtension ) 
-        {
-        iExtension->iFirstWordWrappedSubcellIndex = (TInt16)aFirstIndex;
-        iExtension->iSecondWordWrappedSubcellIndex = (TInt16)aSecondIndex;
-        }
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    iExtension->iFirstWordWrappedSubcellIndex = (TInt16)aFirstIndex;
+    iExtension->iSecondWordWrappedSubcellIndex = (TInt16)aSecondIndex;
     }
 
 EXPORT_C void CFormattedCellListBoxData::EnableMarqueeL(TBool aEnable)
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     // CreateMarqueeControlL does nothing if marquee already exists,
     // so let's just call it just in case.
     CreateMarqueeControlL();
@@ -3084,11 +3102,13 @@
 #ifdef __WINS__
 EXPORT_C const TBool CFormattedCellListBoxData::IsMarqueeOn()
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     return iExtension->IsMarqueeOn();
     }
 #else
 EXPORT_C TBool CFormattedCellListBoxData::IsMarqueeOn()
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     return iExtension->IsMarqueeOn();
     }
 #endif // __WINS__
@@ -3096,17 +3116,20 @@
 
 void CFormattedCellListBoxData::FocusGained()
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     iExtension->FocusGained();
     }
 
 void CFormattedCellListBoxData::FocusLost()
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     iExtension->FocusLost();
     }
 
 void CFormattedCellListBoxData::HandleResourceChange( TInt aType )
     {
     _AKNTRACE_FUNC_ENTER;
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     // Animation is skin dependent, whenever skin changes animation changes
     // too.
     if( KAknsMessageSkinChange == aType )
@@ -3140,9 +3163,8 @@
 //
 EXPORT_C const CAknsEffectAnim* CFormattedCellListBoxData::HighlightAnim() const
     {
-    if( iExtension )
-        return iExtension->iAnimation;
-    return NULL;
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    return iExtension->iAnimation;
     }
 
 // -----------------------------------------------------------------------------
@@ -3151,10 +3173,7 @@
 //
 EXPORT_C void CFormattedCellListBoxData::AboutToDrawHighlightAnim() const
     {
-    if( !iExtension )
-        {
-        return;
-        }
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     if( !iExtension->iAnimation || !iExtension->iControl )
         {
         return;
@@ -3183,10 +3202,8 @@
 EXPORT_C void CFormattedCellListBoxData::SetHighlightAnimBackgroundDrawer(
     MListBoxAnimBackgroundDrawer* aDrawer )
     {
-    if( iExtension )
-        {
-        iExtension->iHighlightBgDrawer = aDrawer;
-        }
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    iExtension->iHighlightBgDrawer = aDrawer;
     }
 
 // -----------------------------------------------------------------------------
@@ -3195,14 +3212,12 @@
 //
 EXPORT_C void CFormattedCellListBoxData::SetItemCellSize( const TSize& aSize )
     {
-    if( iExtension )
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    if( iExtension->iAnimSize != aSize )
         {
-        if( iExtension->iAnimSize != aSize )
-            {
-            iExtension->Play();
-            }
-        iExtension->iAnimSize = aSize;
+        iExtension->Play();
         }
+    iExtension->iAnimSize = aSize;
     }
 
 // -----------------------------------------------------------------------------
@@ -3211,11 +3226,8 @@
 //
 EXPORT_C TBool CFormattedCellListBoxData::HasHighlightAnim() const
     {
-    if( !iExtension )
-        return EFalse;
-    if( !iExtension->iAnimation )
-        return EFalse;
-    return ETrue;
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    return ( iExtension->iAnimation != NULL );
     }
 
 // -----------------------------------------------------------------------------
@@ -3225,9 +3237,7 @@
 EXPORT_C TBool CFormattedCellListBoxData::DrawHighlightAnim(
         CBitmapContext& aGc, const TRect& aRect ) const
     {
-    if( !iExtension )
-        return EFalse;
-
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     if( !iExtension->iAnimation )
         return EFalse;
 
@@ -3236,6 +3246,7 @@
 
 void CFormattedCellListBoxData::ResetMarquee()
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     if (iExtension->iMarquee)
         {
         iExtension->iMarquee->Reset();
@@ -3248,6 +3259,7 @@
 
 TInt CFormattedCellListBoxData::CurrentMarqueeItemIndex()
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     return iExtension->iCurrentItem;
     }
 
@@ -3255,6 +3267,7 @@
     {
     _AKNTRACE("CFormattedCellListBoxData::SetCurrentMarqueeItemIndex aIndex=%d",
             aIndex);
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     
     iExtension->iCurrentItem = aIndex;
     }
@@ -3262,6 +3275,7 @@
 void CFormattedCellListBoxData::SetCurrentItemIndex(TInt aIndex)
     {
     _AKNTRACE("CFormattedCellListBoxData::SetCurrentItemIndex aIndex=%d", aIndex);
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     if( iExtension->iCurrentRow != aIndex )
         {
         iExtension->iAnimFlags.Set( CFormattedCellListBoxDataExtension::EFlagUpdateBg );
@@ -3273,16 +3287,14 @@
     {
     _AKNTRACE("CFormattedCellListBoxData::SetCurrentlyDrawnItemIndex aIndex=%d", 
             aIndex);
-    if ( iExtension )
-        {
-        iExtension->iCurrentlyDrawnItemIndex = aIndex;
-        }
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    iExtension->iCurrentlyDrawnItemIndex = aIndex;
     }
 
 EXPORT_C const CFont* 
 CFormattedCellListBoxData::RowAndSubCellFont(TInt aRow,TInt aSubCellIndex) const
     {
-    if (!iExtension) return 0;
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     TInt index = 0;
     if (iExtension->FindRowAndSubCellIndex(index,aRow,aSubCellIndex)!=0)
         return 0;
@@ -3293,7 +3305,7 @@
                                                                TInt aSubCellIndex,
                                                                const CFont* aFont)
     {
-    if (!iExtension) return;
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     TInt index = 0;
     iExtension->FindRowAndSubCellIndexOrAddL(index,aRowIndex,aSubCellIndex);
     iExtension->At(index).iFont=aFont;
@@ -3305,6 +3317,7 @@
 */ 
 EXPORT_C void CFormattedCellListBoxData::SetDrawBackground(const TBool aDrawBackground)
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     iExtension->iDrawBackground = aDrawBackground;
     if( !aDrawBackground )
         {
@@ -3317,6 +3330,7 @@
 */ 
 TBool CFormattedCellListBoxData::IsBackgroundDrawingEnabled() const
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     return iExtension->iDrawBackground;
     }
 
@@ -3327,6 +3341,7 @@
 */ 
 void CFormattedCellListBoxData::SetDrawScrollbarBackground(const TBool aDrawBackground)
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     iExtension->iDrawScrollbarBackground = aDrawBackground;
     }
 
@@ -3335,6 +3350,7 @@
 */ 
 TBool CFormattedCellListBoxData::IsScrollbarBackgroundDrawingEnabled() const
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     return iExtension->iDrawScrollbarBackground;
     }
 
@@ -3342,6 +3358,7 @@
 EXPORT_C void CFormattedCellListBoxData::SetMarqueeParams(const TInt aLoops, const TInt aScrollAmount, 
                                                           const TInt aScrollDelay, const TInt aInterval)
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     if ( iExtension->iMarquee )
         {
         iExtension->iMarquee->SetLoops( aLoops );
@@ -3361,7 +3378,8 @@
 
 EXPORT_C void CFormattedCellListBoxData::SetSubCellIconSize(TInt aIndex, TSize aSize)
     {
-    if (iExtension && aIndex <= KMaxSubCellIndex && aIndex >= 0)
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    if ( aIndex <= KMaxSubCellIndex && aIndex >= 0)
         {
         iExtension->iSubCellIconSize[aIndex] = aSize;
         }
@@ -3369,7 +3387,8 @@
 
 TSize CFormattedCellListBoxData::GetSubCellIconSize(TInt aIndex)
     {
-    if (iExtension && aIndex <= KMaxSubCellIndex && aIndex >= 0)
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    if ( aIndex <= KMaxSubCellIndex && aIndex >= 0)
         {
         return iExtension->iSubCellIconSize[aIndex];
         }
@@ -3438,6 +3457,8 @@
 // extended skin support
 void CFormattedCellListBoxData::SetESSTextColor( TAknsQsnTextColorsIndex aIndex )
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    
     TRgb color;
     
     TInt error = AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
@@ -3454,6 +3475,7 @@
 // extended skin support
 void CFormattedCellListBoxData::SetESSHighlightedTextColor( TAknsQsnTextColorsIndex aIndex )
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     TRgb color;
     
     TInt error = AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
@@ -3470,7 +3492,7 @@
 void CFormattedCellListBoxData::SetGraphicSubCellL( TInt aSubCell,
                                                     const TAknWindowLineLayout &aGraphicLayout )
     {
-    if ( !iExtension ) return;
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     CEikFormattedCellListBox* list = static_cast<CEikFormattedCellListBox*>( iExtension->iControl );
     // this does happen with caknsetstyle, caknform(wide)style lists.
     // eventually they'll get here again with list!=0, so this check is enough
@@ -3519,7 +3541,7 @@
 void CFormattedCellListBoxData::SetTextSubCellL( TInt aSubCell,
                                                  const TAknTextLineLayout &aTextLayout )
     {
-    if (!iExtension) return;
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     CEikFormattedCellListBox* list = static_cast<CEikFormattedCellListBox*>( iExtension->iControl );
     // this does happen with caknsetstyle, caknform(wide)style lists.
     // eventually they'll get here again with list!=0, so this check is enough
@@ -3572,6 +3594,7 @@
                                                        const TAknTextLineLayout &aTextLayout,
                                                        TInt aAffectedSubCell)  
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     // iConditionValue of affected subcell (=text subcell, which has different layouts)
     // contains index of graphical subcell, which existence should be checked first.
     // This graphical subcell has in iConditionValue index of graphical subcell,
@@ -3581,8 +3604,6 @@
     // for compabitility - needed at least for text wrapping
     SetNotAlwaysDrawnSubCellL( aSubCell, ETrue );
 
-    if (!iExtension) return;
-
     TInt i = 0x01;
     i = i << aSubCell;
     iExtension->iConditionalCells = iExtension->iConditionalCells | i;
@@ -3639,50 +3660,40 @@
 //
 TBool CFormattedCellListBoxData::UsesScalableLayoutData() const
     {
-    if (iExtension)
-        return iExtension->iSimpleList;
-
-    return EFalse;
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    return iExtension->iSimpleList;
     }
 void CFormattedCellListBoxData::UseScalableLayoutData( TBool aUse )
     {
-    if ( iExtension )
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    if ( !aUse && iExtension->iSimpleList )
         {
-        if ( !aUse && iExtension->iSimpleList )
-            {
 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
-            CEikFormattedCellListBox* list = static_cast<CEikFormattedCellListBox*>( iExtension->iControl );
-            MAknListBoxTfxInternal* transApi =
-                CAknListLoader::TfxApiInternal( list->View()->ItemDrawer()->Gc() );
-            if ( transApi )
-                {
-                transApi->SetPosition( MAknListBoxTfxInternal::EListTLMargin, TPoint( 0, 0 ) );
-                transApi->SetPosition( MAknListBoxTfxInternal::EListBRMargin, TPoint( 0, 0 ) );
-                }
+        CEikFormattedCellListBox* list = static_cast<CEikFormattedCellListBox*>( iExtension->iControl );
+        MAknListBoxTfxInternal* transApi =
+            CAknListLoader::TfxApiInternal( list->View()->ItemDrawer()->Gc() );
+        if ( transApi )
+            {
+            transApi->SetPosition( MAknListBoxTfxInternal::EListTLMargin, TPoint( 0, 0 ) );
+            transApi->SetPosition( MAknListBoxTfxInternal::EListBRMargin, TPoint( 0, 0 ) );
+            }
 #endif
-            }
-        iExtension->iSimpleList = aUse;
         }
+    iExtension->iSimpleList = aUse;
     }
 
 EXPORT_C void CFormattedCellListBoxData::SetSubcellUnderlined( TBitFlags32 aUnderlinedCells )
     {
-    if ( iExtension )
-        {
-        iExtension->iUnderlineFlagSet = ETrue;
-        iExtension->iUnderlineFlags   = aUnderlinedCells;
-        }
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    iExtension->iUnderlineFlagSet = ETrue;
+    iExtension->iUnderlineFlags   = aUnderlinedCells;
     }
 
 void CFormattedCellListBoxData::SetUnderlineStyle( TListItemProperties aProperties,
                                                    CWindowGc& aGc,
                                                    TInt aSubCell ) const
     {
-    if ( !iExtension )
-        {
-        return;
-        }
-
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     if ( !iExtension->iUnderlineFlagSet )
         {
         // underlining is already either on or off and
@@ -3705,19 +3716,14 @@
 
 void CFormattedCellListBoxData::UseHighlightIconSwapping( TBool aUse )
     {
-    if ( iExtension )
-        {
-        iExtension->iUseHighligthIconSwapping = aUse;
-        }
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    iExtension->iUseHighligthIconSwapping = aUse;
     }
 
 TBool CFormattedCellListBoxData::UseHighlightIconSwapping() const
     {
-    if ( iExtension )
-        {
-        return iExtension->iUseHighligthIconSwapping;
-        }
-    return EFalse;
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    return iExtension->iUseHighligthIconSwapping;
     }
 
 // -----------------------------------------------------------------------------
@@ -3795,11 +3801,7 @@
 //
 void CFormattedCellListBoxData::ResetSLSubCellArray()
     {
-    if ( !iExtension )
-        {
-        return;
-        }
-
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     iExtension->iMarginRect = TRect::EUninitialized;
 
     UseScalableLayoutData( EFalse );
@@ -3817,11 +3819,7 @@
 TBool CFormattedCellListBoxData::StretchingEnabled() const
     {
 #ifdef RD_LIST_STRETCH    
-    if ( !iExtension )
-        {
-        return EFalse;
-        }
-        
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));        
     return iExtension->iStretchingEnabled;
 #else
     return EFalse;
@@ -3835,11 +3833,7 @@
 //
 void CFormattedCellListBoxData::EnableStretching( const TBool aEnabled )
     {
-    if ( !iExtension )
-        {
-        return;
-        }
-        
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));        
     iExtension->iStretchingEnabled = aEnabled;        
     }
 
@@ -3849,11 +3843,7 @@
 //
 void CFormattedCellListBoxData::HideSecondRow( const TBool aHide )
     {
-    if ( !iExtension )
-        {
-        return;
-        }
-        
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));        
     iExtension->iHideSecondRow = aHide;        
     }
 #endif // RD_LIST_STRETCH
@@ -3864,11 +3854,7 @@
 //
 TBool CFormattedCellListBoxData::SecondRowHidden() const
     {
-    if ( !iExtension )
-        {
-        return EFalse;
-        }
-        
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));        
     return iExtension->iHideSecondRow;        
     }
 
@@ -3878,10 +3864,7 @@
 //
 void CFormattedCellListBoxData::ToggleDropShadows( const TBool aEnable )
     {
-    if ( !iExtension )
-        {
-        return;
-        }
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     iExtension->iUseDropShadows = aEnable;
     }
 
@@ -3895,6 +3878,7 @@
     const TDesC& aText, 
     const TRect& aItemRect ) const
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     TInt subCell = 0;
     TInt subCell2;
     TInt subCellIndex;
@@ -4007,6 +3991,7 @@
 //
 void CFormattedCellListBoxData::SubCellsMightIntersect( const TBool aMightIntersect )
     {
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     iExtension->iSubCellsMightIntersect = aMightIntersect;
     }
 
@@ -4121,6 +4106,7 @@
                                              const TColors& aColors ) const
     {
     _AKNTRACE_FUNC_ENTER;
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     
     TRect aRect(aItemRect);
     const TColors *subcellColors = &aColors;
@@ -4350,7 +4336,7 @@
             {
             aGc.SetPenColor(subcellColors->iHighlightedText);
             aGc.SetBrushColor(subcellColors->iHighlightedBack); 
-            if ( skinEnabled && iExtension )
+            if ( skinEnabled )
                 {
                 if ( iExtension->iHighlightedTextColor != NULL )
                     {
@@ -4363,7 +4349,7 @@
             aGc.SetPenColor(subcellColors->iText);
             aGc.SetBrushColor(subcellColors->iBack);
             
-            if ( skinEnabled && iExtension )
+            if ( skinEnabled )
                 {
                 if ( iExtension->iTextColor != NULL )
                     {
@@ -4381,11 +4367,6 @@
             CGraphicsContext::TTextAlign align=sc->iAlign;
             if (!sc->iGraphics)
                 {
-                if ( !iExtension )
-                    {
-                    _AKNTRACE_FUNC_EXIT;
-                    return;
-                    }
                 const CFont* rowAndCellFont=RowAndSubCellFont(iExtension->iCurrentlyDrawnItemIndex,subcell);
                 const CFont* cellFont=sc->iBaseFont;
                 const CFont* tempFont=(cellFont) ? cellFont : font;
@@ -4539,28 +4520,27 @@
                     CGulIcon* icon=(*iIconArray)[index];
                     CFbsBitmap* bitmap=icon->Bitmap();
                     
-                    if ( iExtension )
+
+                    TInt w, h;
+                    TSize sz = bitmap->SizeInPixels();
+
+                    w = iExtension->iSubCellIconSize[subcell].iWidth;
+                    h = iExtension->iSubCellIconSize[subcell].iHeight;
+
+                    if (h != 0 && w != 0 && !( sz.iWidth == w || sz.iHeight == h ) )
                         {
-                        TInt w, h;
-                        TSize sz = bitmap->SizeInPixels();
-                        
-                        w = iExtension->iSubCellIconSize[subcell].iWidth;
-                        h = iExtension->iSubCellIconSize[subcell].iHeight;
-                        
-                        if (h != 0 && w != 0 && !( sz.iWidth == w || sz.iHeight == h ) )
-                            {
-                            AknIconUtils::SetSize( bitmap,
-                                                   iExtension->iSubCellIconSize[subcell],
-                                                   EAspectRatioPreservedAndUnusedSpaceRemoved );
-                            }
-                        else if ( sz.iWidth == 0 || sz.iHeight == 0 ) // check if size is set at all
-                            {
-                            // just in case fallback
-                            AknIconUtils::SetSize( bitmap,
-                                                   textRect.Size(),
-                                                   EAspectRatioPreservedAndUnusedSpaceRemoved );
-                            }
+                        AknIconUtils::SetSize( bitmap,
+                                               iExtension->iSubCellIconSize[subcell],
+                                               EAspectRatioPreservedAndUnusedSpaceRemoved );
                         }
+                    else if ( sz.iWidth == 0 || sz.iHeight == 0 ) // check if size is set at all
+                        {
+                        // just in case fallback
+                        AknIconUtils::SetSize( bitmap,
+                                               textRect.Size(),
+                                               EAspectRatioPreservedAndUnusedSpaceRemoved );
+                        }
+
                     
                     TSize size=bitmap->SizeInPixels();
                     
@@ -4625,33 +4605,30 @@
 
 void CFormattedCellListBoxData::SetClippedByWrap( TUint32 aClippedCells, TBool aUseClippedByWrap )
     {
-    if ( iExtension )
-        {
-        iExtension->iClippedByWrap = aClippedCells;
-        iExtension->iUseClippedByWrap = aUseClippedByWrap;
-        }
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    iExtension->iClippedByWrap = aClippedCells;
+    iExtension->iUseClippedByWrap = aUseClippedByWrap;
     }
 
 EXPORT_C TUint32 CFormattedCellListBoxData::CurrentItemTextWasClipped() const
     {
-    return iExtension ? iExtension->iClippedSubcells : 0;
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    return iExtension->iClippedSubcells;
     }
 
 
 
 TBool CFormattedCellListBoxData::KineticScrollingEnabled() const
     {
-    if ( iExtension )
-        {
-        return iExtension->iKineticScrolling;       
-        }
-    return EFalse;
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    return iExtension->iKineticScrolling;
     }
     
     
 CEikListBox* CFormattedCellListBoxData::ListBox() const
     {
-    if ( iExtension && iExtension->iControl )
+    __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
+    if ( iExtension->iControl )
         {
         return static_cast<CEikListBox*>( iExtension->iControl );
         }
@@ -4660,7 +4637,7 @@
 void CFormattedCellListBoxData::InitSmileyL()
     {
     __ASSERT_DEBUG( iExtension, Panic( EAknPanicObjectNotFullyConstructed ));
-    if ( iExtension && !iExtension->iSmileyMan )
+    if ( !iExtension->iSmileyMan )
         {
         iExtension->iSmileyMan = CAknSmileyManager::NewL( iExtension );
         }
--- a/uifw/AvKon/srcdata/AvkonSystemSounds.ra	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/srcdata/AvkonSystemSounds.ra	Tue Apr 27 16:55:05 2010 +0300
@@ -18,6 +18,13 @@
 // Avkon Default KeySounds
 //
 
+#define KVolumeMinSoundFile "z:\\resource\\avkonsystemsounds\\volume_min.wav"
+#define KVolumeMaxSoundFile "z:\\resource\\avkonsystemsounds\\volume_max.wav"
+#define KBatteryLowSoundFile "z:\\resource\\avkonsystemsounds\\battery_low.wav"
+#define KDefaultBeepSoundFile "z:\\resource\\avkonsystemsounds\\default_beep.wav"
+#define KBatteryRechargeSoundFile "z:\\resource\\avkonsystemsounds\\battery_dead.wav"
+
+
 RESOURCE AVKON_SOUND_INFO_LIST r_avkon_default_sound_list
 	{
 	list=
@@ -44,14 +51,15 @@
 			sid=EAvkonSIDConfirmationTone; 
 			priority=EAvkonConfirmationNotePriority; 
 			preference=EAvkonConfirmationNotePreference;
-			sequencelength=6;
-			sequence={0,17,10,118,17,11};
+			//sequencelength=6;
+			//sequence={0,17,10,118,17,11};
 			// 0x00 = 0  = OPCODE_SEQUENCE_START
 			// 0x11 = 17 = OPCODE_DURATION_UNIT
             // 0x0A = 10 = duration unit => tone duration is 10ms * tone_tick
 			// 0x76 = 118 => 118-64=54=AUD_TONE_RING_FREQ_F2	 = 1397Hz
 			// 0x11 = 17 = tone_tick = 170ms
 			// 0x0B = 11 = OPCODE_END 
+			file = KDefaultBeepSoundFile;
 			volume = 5;
 			},
 		AVKON_SOUND_INFO 
@@ -59,14 +67,15 @@
 			sid=EAvkonSIDErrorTone; 
 			priority=EAvkonErrorNotePriority;
 			preference=EAvkonErrorNotePreference;
-			sequencelength=6;
-			sequence={0,17,10,108,25,11};
+			//sequencelength=6;
+			//sequence={0,17,10,108,25,11};
 			// 0x00 = 0  = OPCODE_SEQUENCE_START
 			// 0x11 = 17 = OPCODE_DURATION_UNIT
 			// 0x0A = 10 = duration unit => tone duration is 10ms * tone_tick
 			// 0x6C = 108 => 108-64=44=AUD_TONE_RING_FREQ_G1	 = 784Hz
 			// 0x19 = 25 = tone_tick = 250ms
 			// 0x0B = 11 = OPCODE_END 
+			file = KDefaultBeepSoundFile;
 			volume = 5;
 			},
 		AVKON_SOUND_INFO 
@@ -74,14 +83,15 @@
 			sid=EAvkonSIDWarningTone; 
 			priority=EAvkonWarningNotePriority; 
 			preference=EAvkonWarningNotePreference;
-			sequencelength=6;
-			sequence={0,17,10,108,25,11};
+			//sequencelength=6;
+			//sequence={0,17,10,108,25,11};
 			// 0x00 = 0  = OPCODE_SEQUENCE_START
 			// 0x11 = 17 = OPCODE_DURATION_UNIT
 			// 0x0A = 10 = duration unit => tone duration is 10ms * tone_tick
 			// 0x6C = 108 => 108-64=44=AUD_TONE_RING_FREQ_G1	 = 784Hz
 			// 0x19 = 25 = tone_tick = 250ms
 			// 0x0B = 11 = OPCODE_END 
+			file = KDefaultBeepSoundFile;
 			volume = 5;
 			},
 
@@ -90,14 +100,15 @@
 			sid=EAvkonSIDVolumeMinTone; 
 			priority=EAvkonVolumeSettingTonesPriority; 
 			preference=EAknAudioPrefAudioVolumeMin;
-			sequencelength=6;
-			sequence={0,17,10,113,6,11};
+			//sequencelength=6;
+			//sequence={0,17,10,113,6,11};
 		   	// 0x00 = 0  = OPCODE_SEQUENCE_START
 			// 0x11 = 17 = OPCODE_DURATION_UNIT
 			// 0x0A = 10 = duration unit => tone duration is 10ms * tone_tick
 			// 0x71 = 113 => 113-64=49=AUD_TONE_RING_FREQ_C2	 = 1047Hz
 			// 0x06 = 6 = tone_tick = 60ms
 			// 0x0B = 11 = OPCODE_END
+			file = KVolumeMinSoundFile;
 			volume = 9;
 			},
 		AVKON_SOUND_INFO 
@@ -105,14 +116,15 @@
 			sid=EAvkonSIDVolumeMaxTone; 
 			priority=EAvkonVolumeSettingTonesPriority; 
 			preference=EAknAudioPrefAudioVolumeMax;
-			sequencelength=6;
-			sequence={0,17,10,122,6,11};
+			//sequencelength=6;
+			//sequence={0,17,10,122,6,11};
 		   	// 0x00 = 0  = OPCODE_SEQUENCE_START
 			// 0x11 = 17 = OPCODE_DURATION_UNIT
 			// 0x0A = 10 = duration unit => tone duration is 10ms * tone_tick
 			// 0x7A = 122 => 122-64=58=AUD_TONE_RING_FREQ_A3	 = 1760Hz
 			// 0x06 = 6 = tone_tick = 60ms
 			// 0x0B = 11 = OPCODE_END
+			file = KVolumeMaxSoundFile;
 			volume = 6;
 			},
 		AVKON_SOUND_INFO 
@@ -139,8 +151,8 @@
 			sid=EAvkonSIDBatteryLowTone; 
 			priority=EAvkonChargingTonesPriority; 
 			preference=EAknAudioPrefBatteryLow;
-			sequencelength=10;
-			sequence={0,17,10,104,15,102,22,99,30,11};
+			//sequencelength=10;
+			//sequence={0,17,10,104,15,102,22,99,30,11};
 		   	// 0x00 = 0  = OPCODE_SEQUENCE_START
 			// 0x11 = 17 = OPCODE_DURATION_UNIT
 			// 0x0A = 10 = duration unit => tone duration is 10ms * tone_tick
@@ -151,6 +163,7 @@
 			// 0x63 = 99 => 99-64=35=AUD_TONE_RING_FREQ_A1    = 440Hz
 			// 0x1E = 30 = tone_tick = 300ms
 			// 11 = OPCODE_END
+			file = KBatteryLowSoundFile;
 			volume = 5;
 			},
 		AVKON_SOUND_INFO 
@@ -207,14 +220,15 @@
 			sid=EAvkonSIDDefaultSound; 
 			priority=EAvkonLowLevelNotesPriority;
 			preference=EAknAudioPrefDefaultTone;
-			sequencelength=6;
-			sequence={0,17,10,118,10,11};
+			//sequencelength=6;
+			//sequence={0,17,10,118,10,11};
 		   	// 0x00 = 0  = OPCODE_SEQUENCE_START
 			// 0x11 = 17 = OPCODE_DURATION_UNIT
 			// 0x0A = 10 = duration unit => tone duration is 10ms * tone_tick
 			// 0x76 = 118 => 118-64=54=AUD_TONE_RING_FREQ_F2	 = 1397Hz
 			// 0x0A = 10 = tone_tick = 100ms
 			// 0x0B = 11 = OPCODE_END
+			file = KDefaultBeepSoundFile;
   			volume = 5;
 			},
 		AVKON_SOUND_INFO 
@@ -304,14 +318,15 @@
 			sid=EAvkonSIDPowerOffTone; 
 			priority=EAvkonPoweringTonesPriority;
 			preference=EAknAudioPrefPowerOff;
-			sequencelength=6;
-			sequence={0,17,10,118,10,11};
+			//sequencelength=6;
+			//sequence={0,17,10,118,10,11};
 			// 0x00 = 0  = OPCODE_SEQUENCE_START
 			// 0x11 = 17 = OPCODE_DURATION_UNIT
 			// 0x0A = 10 = duration unit => tone duration is 10ms * tone_tick
 			// 0x76 = 118 => 118-64=54=AUD_TONE_RING_FREQ_F2	 = 1397Hz
 			// 0x0A = 10 = tone_tick = 100ms
 			// 0x0B = 11 = OPCODE_END
+			file = KDefaultBeepSoundFile;
 			volume = 5;
 			},
 
@@ -320,14 +335,15 @@
 			sid=EAvkonSIDPowerOnTone; 
 			priority=EAvkonPoweringTonesPriority;
 			preference=EAknAudioPrefPowerOn;
-			sequencelength=6;
-			sequence={0,17,10,118,10,11};
+			//sequencelength=6;
+			//sequence={0,17,10,118,10,11};
 			// 0x00 = 0  = OPCODE_SEQUENCE_START
 			// 0x11 = 17 = OPCODE_DURATION_UNIT
 			// 0x0A = 10 = duration unit => tone duration is 10ms * tone_tick
 			// 0x76 = 118 => 118-64=54=AUD_TONE_RING_FREQ_F2	 = 1397Hz
 			// 0x0A = 10 = tone_tick = 100ms
 			// 0x0B = 11 = OPCODE_END
+			file = KDefaultBeepSoundFile;
 			volume = 5;
 			},
 		AVKON_SOUND_INFO 
@@ -335,8 +351,8 @@
 			sid=EAvkonSIDRechargeBatteryTone; 
 			priority=EAvkonChargingTonesPriority;
 			preference=EAknAudioPrefRechargeBattery;
-			sequencelength=12;
-			sequence={0,17,10,104,15,102,22,99,30,96,45,11};
+			//sequencelength=12;
+			//sequence={0,17,10,104,15,102,22,99,30,96,45,11};
 			// 0x00 = 0  = OPCODE_SEQUENCE_START
 			// 0x11 = 17 = OPCODE_DURATION_UNIT
 			// 0x0A = 10 = duration unit => tone duration is 10ms * tone_tick
@@ -349,6 +365,7 @@
 			// 0x60 = 96 => 96-64=32=AUD_TONE_RING_FREQ_G0    = 392Hz
 			// 0x2D = 45 = tone_tick = 450ms
 			// 0x0B = 11 = OPCODE_END
+			file = KBatteryRechargeSoundFile;
 			volume = 5;
 			},
 
Binary file uifw/AvKon/srcdata/AvkonSystemSounds/battery_dead.wav has changed
Binary file uifw/AvKon/srcdata/AvkonSystemSounds/battery_low.wav has changed
Binary file uifw/AvKon/srcdata/AvkonSystemSounds/default_beep.wav has changed
Binary file uifw/AvKon/srcdata/AvkonSystemSounds/volume_max.wav has changed
Binary file uifw/AvKon/srcdata/AvkonSystemSounds/volume_min.wav has changed
--- a/uifw/AvKon/srcdata/avkon.rss	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/AvKon/srcdata/avkon.rss	Tue Apr 27 16:55:05 2010 +0300
@@ -10202,4 +10202,39 @@
         };
     }
 
+RESOURCE DIALOG r_avkon_special_character_table_dialog_for_lockcode_symbol_input
+    {
+    flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
+    buttons = r_avkon_softkeys_select_cancel__select;
+    items=
+        {
+	DLG_LINE
+	    {
+	    type = EAknCtPopupHeadingPane;
+	    id = EAknSCTQueryHeadingId;
+	    control = AVKON_HEADING
+		{
+		label = qtn_pop_up_select_character;
+		headinglayout = r_avkon_sct_list_heading_pane;
+		};
+	    },
+	DLG_LINE
+	    {
+	    type = EAknCtSpecialCharacterMap;
+	    id = EAknSCTQueryContentId;
+	    control = SPECIAL_CHAR_TABLE
+		{
+		contents =
+		    {
+		    SCT_CHAR_SET
+			{
+			id = EAknSCTLowerCase;
+			chars = qtn_sct_special_characters_lockcode;
+			}
+		    };
+		};
+	    }
+	};
+    }
+
 // End of File
--- a/uifw/EikStd/coctlsrc/AknClearer.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/EikStd/coctlsrc/AknClearer.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -295,30 +295,28 @@
         iExtension->iBgContext->SetLayerImage( n, KAknsIIDNone );                
         }            
 
-    TBool widescreenPaneUsed(
-        R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL ==
-            AVKONENV->StatusPaneResIdForCurrentLayout(
-                R_AVKON_STATUS_PANE_LAYOUT_USUAL ) ||
-        R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE ==
-            AVKONENV->StatusPaneResIdForCurrentLayout(
-                R_AVKON_STATUS_PANE_LAYOUT_IDLE ) );
+    CAknEnv* aknEnv = AVKONENV;
+    
+    TInt usualSpLayout =
+        aknEnv->StatusPaneResIdForCurrentLayout(
+            R_AVKON_STATUS_PANE_LAYOUT_USUAL );
+    
+    TInt idleSpLayout =
+        aknEnv->StatusPaneResIdForCurrentLayout(
+            R_AVKON_STATUS_PANE_LAYOUT_IDLE );
+    
+    TBool widescreenPaneUsed =
+        ( usualSpLayout == R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL ) ||
+        ( idleSpLayout  == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE );
     
     // Check that if in landscape mode statuspane is changed to stacon pane
     TBool staconPaneUsedInLandscape = 
-        ( ( R_AVKON_STATUS_PANE_LAYOUT_USUAL !=
-                AVKONENV->StatusPaneResIdForCurrentLayout(
-                    R_AVKON_STATUS_PANE_LAYOUT_USUAL ) ) &&
-          ( R_AVKON_STATUS_PANE_LAYOUT_USUAL_MIRRORED !=
-                AVKONENV->StatusPaneResIdForCurrentLayout(
-                    R_AVKON_STATUS_PANE_LAYOUT_USUAL ) ) );
+        ( usualSpLayout != R_AVKON_STATUS_PANE_LAYOUT_USUAL ) &&
+        ( usualSpLayout != R_AVKON_STATUS_PANE_LAYOUT_USUAL_MIRRORED );
 
     TBool flatStatuspaneusedInLandscape =
-        ( R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT ==
-            AVKONENV->StatusPaneResIdForCurrentLayout(
-                R_AVKON_STATUS_PANE_LAYOUT_USUAL ) );
-        ( R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT ==
-            AVKONENV->StatusPaneResIdForCurrentLayout(
-                R_AVKON_STATUS_PANE_LAYOUT_USUAL ) );
+        ( usualSpLayout == R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT ) ||
+        ( usualSpLayout == R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT );
     
 
     // TRect application_window = iAvkonAppUi->ApplicationRect();
@@ -485,7 +483,7 @@
             CEikStatusPaneBase* statusPane = CEikStatusPaneBase::Current();
             if (statusPane)
                 {
-                TInt currentStatusPaneLayoutResId = AVKONENV->StatusPaneResIdForCurrentLayout(statusPane->CurrentLayoutResId());
+                TInt currentStatusPaneLayoutResId = aknEnv->StatusPaneResIdForCurrentLayout(statusPane->CurrentLayoutResId());
 
                 staconPaneRight = ((currentStatusPaneLayoutResId == R_AVKON_STACON_PANE_LAYOUT_USUAL_SOFTKEYS_RIGHT) ||
                                    (currentStatusPaneLayoutResId == R_AVKON_STACON_PANE_LAYOUT_EMPTY_SOFTKEYS_RIGHT) ||
--- a/uifw/EikStd/coctlsrc/EIKEDWIN.CPP	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/EikStd/coctlsrc/EIKEDWIN.CPP	Tue Apr 27 16:55:05 2010 +0300
@@ -1576,7 +1576,7 @@
     CreateLayoutL(globalText);
     SetHeightForNumOfLinesL();
     DoCreateCustomDrawL();
-    if ( iEdwinExtension->iSmiley )
+    if ( iEdwinExtension && iEdwinExtension->iSmiley )
         {
         TextLayout()->SetCustomWrap( iEdwinExtension->iSmileyWrap );
         }
@@ -1817,7 +1817,7 @@
         }
     if (iEdwinUserFlags&EDisplayOnly)
         return EKeyWasConsumed;
-    if ( iEdwinExtension->iDrawInvoked == CEikEdwinExtension::ENotDraw )
+    if ( iEdwinExtension && iEdwinExtension->iDrawInvoked == CEikEdwinExtension::ENotDraw )
         {
         PerformRecordedOperationL();
         }
@@ -2164,7 +2164,7 @@
                 formatChange=formatHasChanged;
                 }
             }
-        if ( reportChange && iEdwinExtension->iSmiley )
+        if ( reportChange && iEdwinExtension && iEdwinExtension->iSmiley )
             {
             ConvertTextForSmileyL( TCursorSelection( cursorPos, cursorPos ), 
                 ETrue );          
@@ -2222,7 +2222,7 @@
             {
             TInt pos=DeleteHighlightL(formatHasChanged);
             TRAPD(err,iText->InsertL(pos,character));
-            if ( iEdwinExtension->iSmiley )
+            if ( iEdwinExtension && iEdwinExtension->iSmiley )
                 {
                 iEdwinExtension->iSmiley->HandleInsertL( pos, 1 );
                 ConvertTextForSmileyL( TCursorSelection( pos, pos ), ETrue );
@@ -2246,7 +2246,7 @@
             {
             iText->InsertL(CursorPos(),character);
             ClearUndo();
-            if ( iEdwinExtension->iSmiley )
+            if ( iEdwinExtension && iEdwinExtension->iSmiley )
                 {
                 TInt cursorPos( CursorPos() );
                 iEdwinExtension->iSmiley->HandleInsertL( cursorPos, 1 );
@@ -2267,7 +2267,7 @@
         {
         ReportEdwinEventL( MEikEdwinObserver::EEventTextUpdate );
         DoReportEventL( MCoeControlObserver::EEventStateChanged );
-        if ( iEdwinExtension->iSmiley )
+        if ( iEdwinExtension && iEdwinExtension->iSmiley )
             {            
             TInt docPos( CursorPos() );
             iEdwinExtension->iSmiley->HandleSetCursor( docPos, 
@@ -2278,7 +2278,7 @@
                 }
             }
         }
-    if (navigation)
+    if ( navigation && iEdwinExtension )
         { 
         iEdwinExtension->iThumbPos = KErrNotFound;
         ReportEdwinEventL(MEikEdwinObserver::EEventNavigation);
@@ -2382,7 +2382,7 @@
              }
          }
     
-    if ( iEdwinExtension->iDrawInvoked == CEikEdwinExtension::ENotDraw )
+    if ( iEdwinExtension && iEdwinExtension->iDrawInvoked == CEikEdwinExtension::ENotDraw )
         {
         PerformRecordedOperationL();
         }
@@ -2472,8 +2472,11 @@
             }
         
         TBool shouldReturn( EFalse );
-        iEdwinExtension->iPhysicsHandler->HandleKineticScrolling(
-            aPointerEvent, shouldReturn );
+        if ( iEdwinExtension )
+        	{
+			iEdwinExtension->iPhysicsHandler->HandleKineticScrolling(
+                aPointerEvent, shouldReturn );
+        	}
         
         if ( shouldReturn )
             {
@@ -2533,7 +2536,7 @@
             } 
         } // Kinetic scrolling not enabled  
     
-    if ( iEdwinExtension->iPtSuppressor->SuppressPointerEvent( aPointerEvent ) )
+    if ( iEdwinExtension && iEdwinExtension->iPtSuppressor->SuppressPointerEvent( aPointerEvent ) )
         {
         return;
         }
@@ -2676,7 +2679,7 @@
             iEdwinInternalFlags&=(~ELeftDownInViewRect);
 
             // We can't open cut-copy-paste menu if dragging started
-            if ( IsReadOnly() && IsSelectionVisible() && !( iEdwinUserFlags&ENoAutoSelection ) && !( kineticScrollingEnabled
+            if ( IsReadOnly() && IsSelectionVisible() && IsFocused() && !( kineticScrollingEnabled
                 && iEdwinExtension->iPhysicsHandler->DraggingStarted() ) )
                 {
                 iEdwinFepSupport->iFeedback->InstantFeedback(
@@ -3058,7 +3061,7 @@
     DoCreateCustomDrawL(); //  Done after TextView is created so that optimized drawer is constructed
 
     // Create the required formatters according to the editor set-up
-    if ( IsPurePhoneNumberEditor() )
+    if ( IsPurePhoneNumberEditor() && iEdwinExtension )
         {
         if ( phoneNumberGroupingSupported )
             {            
@@ -3067,14 +3070,14 @@
             iEdwinExtension->CreatePurePhoneNumberFormatterL( *iLayout, *iText );
             }
         }
-    else // Make approximation that all other editors have no matches indicator functionality
+    else if ( iEdwinExtension )// Make approximation that all other editors have no matches indicator functionality
         {
         iEdwinExtension->CreateNoMatchesIndicatorFormatterL( *iLayout );
         }
 
     // Rich text editors that have been configured for phone number grouping
     if (iEdwinInternalFlags&ERichText && iEdwinInternalFlags&EPhoneNumberGrouping &&
-        phoneNumberGroupingSupported )
+        phoneNumberGroupingSupported && iEdwinExtension )
         {        
         CAknEdwinState* edwinState = STATIC_CAST( CAknEdwinState*, iEdwinFepSupport->State(KNullUid) );            
         edwinState->SetFlags( edwinState->Flags() | EAknEditorFlagNumberGrouping );                
@@ -3082,7 +3085,7 @@
         }
 
     // Install the custom formatter system if needed
-    if ( iEdwinExtension->FormExtendedInferfaceProvider() )
+    if ( iEdwinExtension && iEdwinExtension->FormExtendedInferfaceProvider() )
         TextLayout()->SetInterfaceProvider( iEdwinExtension->FormExtendedInferfaceProvider() );
 
     UpdateScrollBarsL();
@@ -3220,7 +3223,10 @@
         SetCursorVisibilityL( ETrue );
         }
     // View size changed, Initialize physics here
-    iEdwinExtension->InitPhysicsL();        
+    if ( iEdwinExtension )
+    	{
+		iEdwinExtension->InitPhysicsL();   
+    	}
     }
 
 EXPORT_C TInt CEikEdwin::CountComponentControls() const
@@ -3245,7 +3251,7 @@
     if (!iTextView)
         return;
     const TInt chars=iText->DocumentLength();
-    if ( iEdwinExtension->iSmiley && !iEdwinExtension->iDisableConvertInFormat )
+    if ( iEdwinExtension && iEdwinExtension->iSmiley && !iEdwinExtension->iDisableConvertInFormat )
         {        
         if ( chars > KFullFormatLengthForSmiley )
             {
@@ -3302,7 +3308,7 @@
     if (!iTextView)
         return;
     const TInt chars=iText->DocumentLength();
-    if ( iEdwinExtension->iSmiley && !iEdwinExtension->iDisableConvertInFormat )
+    if ( iEdwinExtension && iEdwinExtension->iSmiley && !iEdwinExtension->iDisableConvertInFormat )
         {        
         if ( chars > KFullFormatLengthForSmiley )
             {
@@ -3376,7 +3382,7 @@
         for (TInt ii=0;ii<count;ii++)
             (*iObserverArray)[ii]->HandleEdwinEventL(this,aEventType);
         }
-    if ( aEventType == MEikEdwinObserver::EEventTextUpdate )
+    if ( aEventType == MEikEdwinObserver::EEventTextUpdate && iEdwinExtension )
         {
         iEdwinExtension->iExtendedInputCapabilities->ReportEventL( 
                 CAknExtendedInputCapabilities::
@@ -3432,7 +3438,7 @@
     // CTextView::SetDocPosL will cause textview to be drawn. This could happen 
     // before the drawing of editor. So adding following codes to postpone the action to
     // first drawing of editor.
-    if ( iEdwinExtension->iDrawInvoked == CEikEdwinExtension::ENotDraw )
+    if ( iEdwinExtension && iEdwinExtension->iDrawInvoked == CEikEdwinExtension::ENotDraw )
         {
         iEdwinExtension->iTempCursorPos = aDocPos;
         iEdwinExtension->iTempSelect = aSelect;
@@ -3452,7 +3458,7 @@
         CreateTextViewL();
     TInt oldPos( CursorPos() );
     TInt docPos( aDocPos );
-    if ( iEdwinExtension->iSmiley )
+    if ( iEdwinExtension && iEdwinExtension->iSmiley )
         {
         iEdwinExtension->iSmiley->HandleSetCursor( oldPos, docPos );
         }
@@ -3475,7 +3481,8 @@
             TRAP_IGNORE( edwinState->ReportAknEdStateEventL( MAknEdStateObserver::EAknCursorPositionChanged ) );
             }
         }
-        
+	// scrollbar:thumb is displayed on the top when editor set cursor position.
+    iEdwinExtension->iThumbPos = KErrNotFound;    
     UpdateVertScrollBarThumbL();
     UpdateHorizScrollBarThumb();
     }
@@ -3496,7 +3503,7 @@
         }
     if (!iTextView)
         CreateTextViewL();
-    if ( iEdwinExtension->iDrawInvoked == CEikEdwinExtension::ENotDraw )
+    if ( iEdwinExtension && iEdwinExtension->iDrawInvoked == CEikEdwinExtension::ENotDraw )
         {        
         iEdwinExtension->iTempCursorPos = aCursorPos;
         iEdwinExtension->iTempAnchorPos = aAnchorPos;
@@ -3510,7 +3517,10 @@
     TCursorSelection select( aCursorPos, aAnchorPos );    
     HandleSelectionForSmiley( select );
     iTextView->SetSelectionL( select );
-    iEdwinExtension->iThumbPos =  KErrNotFound;
+    if ( iEdwinExtension )
+    	{
+		iEdwinExtension->iThumbPos =  KErrNotFound;
+    	}
 
     if ( iEdwinFepSupport )
         {
@@ -3618,7 +3628,10 @@
     else
         CCoeControl::SetContainerWindowL(aParent);
 
-    iEdwinExtension->EnablePhysicsL();
+    if ( iEdwinExtension )
+    	{
+		iEdwinExtension->EnablePhysicsL();
+    	}
     }
 
 EXPORT_C void CEikEdwin::SetContainerWindowL()
@@ -3627,7 +3640,10 @@
     if (!OwnsWindow())
         CreateWindowL();
 
-    iEdwinExtension->EnablePhysicsL();   
+    if ( iEdwinExtension )
+    	{
+		iEdwinExtension->EnablePhysicsL();
+    	}   
     }
 
 EXPORT_C TCoeInputCapabilities CEikEdwin::InputCapabilities() const
@@ -3688,7 +3704,7 @@
     {
     __ASSERT_DEBUG(aLayDoc,Panic(EEikPanicEdwinNoText));
 
-    if ((iEdwinUserFlags&EAvkonEditor))
+    if ( iEdwinUserFlags&EAvkonEditor && iEdwinExtension )
         {
         iLayout=CTextLayout::NewL(aLayDoc,KMaxTInt); // supply real wrapping width later
         iLayout->SetCustomWrap(&(iEdwinExtension->TextWrapper()));
@@ -3863,7 +3879,7 @@
 
 EXPORT_C void CEikEdwin::TrappedDraw(const TRect& aViewRect) const
     {
-    if ( iEdwinExtension->iDrawInvoked == CEikEdwinExtension::ENotDraw )
+    if ( iEdwinExtension && iEdwinExtension->iDrawInvoked == CEikEdwinExtension::ENotDraw )
         {
         CEikEdwin* edwin( const_cast<CEikEdwin*>( this ) );
         edwin->iEdwinExtension->iDrawInvoked = CEikEdwinExtension::EDrawing;
@@ -3984,7 +4000,7 @@
         }
     TInt oldCursor( CursorPos() );
     TPoint movePoint=iTextView->MoveCursorL( aMovement, aSelect );
-    if ( iEdwinExtension->iSmiley )
+    if ( iEdwinExtension && iEdwinExtension->iSmiley )
         {
         TCursorSelection select( 0, 0 );
         if ( AdjustCursorForSmileyL( oldCursor, select ) )
@@ -4021,7 +4037,7 @@
     // Before scrolling into blank space was allowed, but this eventually
     // causes a panic at CTextView::ScrollDisplayL().
     const TInt move=iTextView->ScrollDisplayL(aMovement,CTextLayout::EFDisallowScrollingBlankSpace);
-    if (move)
+    if ( move && iEdwinExtension )
         {
         iEdwinExtension->iThumbPos = KErrNotFound;
         switch (aMovement)
@@ -4076,7 +4092,7 @@
 EXPORT_C TInt CEikEdwin::CursorPos() const
     {
     __ASSERT_DEBUG(iTextView,Panic(EEikPanicEdwinNoView));
-    if ( iEdwinExtension->iDrawInvoked == CEikEdwinExtension::ENotDraw && 
+    if ( iEdwinExtension && iEdwinExtension->iDrawInvoked == CEikEdwinExtension::ENotDraw && 
         iEdwinExtension->iTempCursorPos != KErrNotFound )
         {
         return iEdwinExtension->iTempCursorPos;
@@ -4092,7 +4108,7 @@
     {
     __ASSERT_DEBUG(iTextView,Panic(EEikPanicEdwinNoView));
     TCursorSelection selection( 0, 0 );
-    if ( iEdwinExtension->iDrawInvoked == CEikEdwinExtension::ENotDraw && 
+    if ( iEdwinExtension && iEdwinExtension->iDrawInvoked == CEikEdwinExtension::ENotDraw && 
         iEdwinExtension->iTempCursorPos != KErrNotFound && 
         iEdwinExtension->iTempAnchorPos != KErrNotFound )
         {
@@ -4152,7 +4168,7 @@
             STATIC_CAST(CRichText*,iText)->CancelInsertCharFormat();
         aChanged=iText->DeleteL(aSelection.LowerPos(),length);
         }
-    if ( iEdwinExtension->iSmiley )
+    if ( iEdwinExtension && iEdwinExtension->iSmiley )
         { 
         iEdwinExtension->iSmiley->HandleDeleteL( aSelection.LowerPos(), length );
         }
@@ -4184,7 +4200,7 @@
     	{
         SetAknEditorFlags( edwinState->Flags() | EAknEditorFlagTextCursorVisible );
     	}
-    else
+    else if ( iEdwinExtension )
     	{
     	SetAknEditorFlags( edwinState->Flags() & ~EAknEditorFlagTextCursorVisible );
     	
@@ -4405,7 +4421,7 @@
         select.iCursorPos = iTextLimit;
         }
     TBool hasSmiley( EFalse );
-    if ( iEdwinExtension->iSmiley )
+    if ( iEdwinExtension && iEdwinExtension->iSmiley )
         {
         hasSmiley = iEdwinExtension->iSmiley->HasSmileyIconsInText();
         }
@@ -4491,7 +4507,7 @@
         AknTextUtils::ReplaceCharacters(segmBufPtr, KLineBreakCharacter,
                       TChar(CEditableText::EParagraphDelimiter));
 	    iText->InsertL(oldLength+segmStart,*segmBuf);
-	    if ( iEdwinExtension->iSmiley )
+	    if ( iEdwinExtension && iEdwinExtension->iSmiley )
 	        {
 	        iEdwinExtension->iSmiley->HandleInsertL( oldLength+segmStart, 
 	            insertLength );	        
@@ -4505,7 +4521,7 @@
 	    
 	    CleanupStack::PopAndDestroy(segmBuf);
         TRAP(err,iText->DeleteL(0,oldLength));
-        if ( iEdwinExtension->iSmiley )
+        if ( iEdwinExtension && iEdwinExtension->iSmiley )
             {
             iEdwinExtension->iSmiley->HandleDeleteL( 0, oldLength );
             ConvertTextForSmileyL( TCursorSelection( 0, 
@@ -4515,7 +4531,7 @@
     else
         {
         iText->Reset(); // Duplicates previous behaviour where null pointer argument reset text object
-        if ( iEdwinExtension->iSmiley )
+        if ( iEdwinExtension && iEdwinExtension->iSmiley )
             {
             iEdwinExtension->iSmiley->HandleDeleteL( 0, 
                 iText->DocumentLength() );
@@ -4524,9 +4540,15 @@
 
     CheckRemovePictures(0,iText->DocumentLength());
     CheckValidityOfChars(0,iText->DocumentLength());
-    iEdwinExtension->iDisableConvertInFormat = ETrue;
-    SetAmountToFormatL(ETrue); // performs formatting
-    iEdwinExtension->iDisableConvertInFormat = EFalse;
+    if ( iEdwinExtension )
+    	{
+		iEdwinExtension->iDisableConvertInFormat = ETrue;
+		}
+	SetAmountToFormatL(ETrue); // performs formatting
+	if ( iEdwinExtension )
+    	{
+		iEdwinExtension->iDisableConvertInFormat = EFalse;
+    	}
 	// Update cursor position as CursorWidth() needs that.
     if (IsReadyToDraw())
         {        
@@ -4556,7 +4578,10 @@
             iCcpuSupport->HandleSelectionChangeL();
             }
         }
-    iEdwinExtension->iThumbPos = KErrNotFound;
+    if ( iEdwinExtension )
+    	{
+		iEdwinExtension->iThumbPos = KErrNotFound;
+    	}
     if (IsReadyToDraw())
         {
         UpdateScrollBarsL();
@@ -4567,7 +4592,7 @@
 
 EXPORT_C TCursorSelection CEikEdwin::Selection()    const
     {
-    if ( iEdwinExtension->iDrawInvoked == CEikEdwinExtension::ENotDraw && 
+    if ( iEdwinExtension && iEdwinExtension->iDrawInvoked == CEikEdwinExtension::ENotDraw && 
         iEdwinExtension->iTempCursorPos != KErrNotFound && 
         iEdwinExtension->iTempAnchorPos != KErrNotFound )
         {        
@@ -4622,7 +4647,7 @@
         TRAPD(err,undoneLength=iText->PasteFromStoreL(iUndoStore->Store(),iUndoStore->Dictionary(),lower))
         const TInt cursorPos=iUndoStore->OldCursorPos();
         iTextView->SetPendingSelection(TCursorSelection(cursorPos,cursorPos));
-        if ( iEdwinExtension->iSmiley )
+        if ( iEdwinExtension && iEdwinExtension->iSmiley )
             {
             iEdwinExtension->iSmiley->HandleInsertL( lower, undoneLength );
             ConvertTextForSmileyL( TCursorSelection( lower, undoneLength ), ETrue );
@@ -4700,7 +4725,7 @@
     iText->ImportTextFileL(cursorPos,aFileName,aTextOrganisation);
     TInt insertLength( iText->DocumentLength() - oldLength );
     CheckValidityOfChars( oldLength, insertLength );
-    if ( iEdwinExtension->iSmiley )
+    if ( iEdwinExtension && iEdwinExtension->iSmiley )
         {
         iEdwinExtension->iSmiley->HandleInsertL( cursorPos, insertLength );
         ConvertTextForSmileyL( TCursorSelection( cursorPos, 
@@ -4818,14 +4843,14 @@
         // If we have deleted some text and previous position (before delete) is
         // out of current editor content, we must move back to inside content.
         TInt formattedHeight( iLayout->FormattedHeightInPixels() );
-        if ( prevEndPosition > formattedHeight )
+        if ( prevEndPosition > formattedHeight && iEdwinExtension )
            {
            TInt movement( prevEndPosition - formattedHeight );   
            iEdwinExtension->iPhysicsHandler->MoveScrollIndex( movement );
            }
         }
     
-    if (reportChange)
+    if ( reportChange && iEdwinExtension )
         {
         iEdwinExtension->iThumbPos = KErrNotFound;
         ReportEdwinEventL( MEikEdwinObserver::EEventTextUpdate );
@@ -4876,7 +4901,7 @@
     CPlainText* text( iText );
     TInt start( selection.LowerPos() );
     HBufC* buf( NULL );
-    if ( iEdwinExtension->iSmiley )
+    if ( iEdwinExtension && iEdwinExtension->iSmiley )
         {
         buf = ExtractTextLC( selection );
         text = CPlainText::NewL();
@@ -4888,7 +4913,7 @@
         text->InsertL( start, *buf );                
         }
     text->CopyToStoreL(aStore, aDict, start, selection.Length() );
-    if ( iEdwinExtension->iSmiley )
+    if ( iEdwinExtension && iEdwinExtension->iSmiley )
         {
         CleanupStack::PopAndDestroy( text );    
         CleanupStack::PopAndDestroy( buf );
@@ -4927,7 +4952,7 @@
     iTextView->SetPendingSelection(TCursorSelection(higher,higher));
     selection.iAnchorPos=selection.LowerPos();
     selection.iCursorPos=selection.iAnchorPos+pastedLength;
-    if ( iEdwinExtension->iSmiley )
+    if ( iEdwinExtension && iEdwinExtension->iSmiley )
         {
         iEdwinExtension->iSmiley->HandleInsertL( selection.LowerPos(), 
             selection.Length() );
@@ -5621,9 +5646,13 @@
     
     TRect viewRect( AdjustedViewRect() );
     const TInt formattedLines = Max(1, iLayout->NumFormattedLines());
-    const TInt formattedHeight = iLayout->FormattedHeightInPixels();    
-    const TBool formattedHeightchanged( formattedHeight != iEdwinExtension->iRecordFormattedHeight );
-    iEdwinExtension->iRecordFormattedHeight = formattedHeight;
+    const TInt formattedHeight = iLayout->FormattedHeightInPixels(); 
+	const TBool formattedHeightchanged( iEdwinExtension && 
+		( formattedHeight != iEdwinExtension->iRecordFormattedHeight ) );
+    if ( iEdwinExtension )
+    	{
+        iEdwinExtension->iRecordFormattedHeight = formattedHeight;
+    	}
     const TInt viewRectHeight = viewRect.Height();
     const TInt totalChars = iText->DocumentLength();    
     const TInt formattedLength = Min( totalChars, iLayout->FormattedLength() );
@@ -5639,8 +5668,11 @@
         if ( !iLayout->IsFormattingBand() )
             {                        
             aVertModel.iThumbSpan = viewRectHeight;
-            aVertModel.iScrollSpan = formattedHeight;            
-            aVertModel.iThumbPosition = iEdwinExtension->iThumbPos;   
+            aVertModel.iScrollSpan = formattedHeight; 
+            if ( iEdwinExtension )
+            	{
+				aVertModel.iThumbPosition = iEdwinExtension->iThumbPos;  
+            	} 
             if ( aVertModel.iThumbPosition == KErrNotFound || formattedHeightchanged )
                 {
                 if ( bottomPos == totalChars )
@@ -5673,7 +5705,10 @@
             aVertModel.iThumbSpan = bottomPos - topPos;
             aVertModel.iScrollSpan = totalChars;        
             aVertModel.iThumbPosition = topPos;
-            iEdwinExtension->iThumbPos = topPos;
+            if ( iEdwinExtension )
+            	{
+				iEdwinExtension->iThumbPos = topPos;
+            	}
             }
         return;
         }
@@ -5831,7 +5866,7 @@
         static_cast< const TAknDoubleSpanScrollBarModel* >
             ( iSBFrame->CEikScrollBarFrame::VerticalScrollBar()->Model() );
 
-    if ( !iEdwinExtension->iUseRateScroll )
+    if ( iEdwinExtension && ( !iEdwinExtension->iUseRateScroll ) )
         {
         aVertModel.iScrollSpan = heightBeforeFormat + formattedHeight
             + heightAfterFormat;
@@ -5840,7 +5875,7 @@
 
     // Rate scrolling
 
-    if ( iEdwinExtension->iUseRateScroll )
+    if ( iEdwinExtension && iEdwinExtension->iUseRateScroll )
         {
         TInt heightAboveView = formattedHeightAboveView + heightBeforeFormat;
         TInt heightBelowView = formattedHeightBelowView + heightAfterFormat;
@@ -5893,7 +5928,7 @@
             }
         }
     
-    if ( iEdwinExtension->iUseRateScroll )
+    if ( iEdwinExtension && iEdwinExtension->iUseRateScroll )
         {
         aVertModel.iThumbPosition = anchorThumbPos;
         }
@@ -5901,7 +5936,10 @@
         {
         aVertModel.iThumbPosition = approxTopVisibleLine * avgLineHeight;
         }
-    iEdwinExtension->iScrollbarPosition = aVertModel.iThumbPosition; 
+    if ( iEdwinExtension )
+    	{
+		iEdwinExtension->iScrollbarPosition = aVertModel.iThumbPosition; 
+    	}
     }
 
 // ---------------------------------------------------------------------------
@@ -5921,7 +5959,11 @@
     TInt thumbSpaceAbove = aScrollBar->ThumbPosition();
     TInt thumbSpaceBelow = curScrollSpan - curThumbSpan - thumbSpaceAbove;
 
-    TInt moveOffset = thumbSpaceAbove - iEdwinExtension->iScrollbarPosition;
+    TInt moveOffset = 0;
+    if ( iEdwinExtension )
+    	{
+		moveOffset = thumbSpaceAbove - iEdwinExtension->iScrollbarPosition;
+    	}
 
     const TInt formattedLines = Max( 1, iLayout->NumFormattedLines() );
     const TInt formattedHeight = iLayout->FormattedHeightInPixels();
@@ -5959,7 +6001,6 @@
         {
         return;
         }
-    iEdwinExtension->iScrollbarPosition = thumbSpaceAbove;
 
     // If scrollbar thumb is moved to the beginning or end of scrollbar,
     // ensure that also editor content is moved also exactly to the beginning
@@ -5975,12 +6016,16 @@
         textMovePixels -= KAdditionalPixels;
         }
     
-    iEdwinExtension->iScrolledByScrollBar = ETrue;
-    
-    // Actual scrolling is done by calling MoveScrollIndex
-    iEdwinExtension->iPhysicsHandler->MoveScrollIndex( -textMovePixels );
-    
-    iEdwinExtension->iScrolledByScrollBar = EFalse;
+    if ( iEdwinExtension )
+    	{
+        iEdwinExtension->iScrollbarPosition = thumbSpaceAbove;
+        iEdwinExtension->iScrolledByScrollBar = ETrue;
+        
+        // Actual scrolling is done by calling MoveScrollIndex
+        iEdwinExtension->iPhysicsHandler->MoveScrollIndex( -textMovePixels );
+        
+        iEdwinExtension->iScrolledByScrollBar = EFalse;
+    	}
     }
 
 EXPORT_C void CEikEdwin::HandleScrollEventL(CEikScrollBar* aScrollBar,TEikScrollEvent aEventType)
@@ -6102,7 +6147,7 @@
                 TInt bottomPos( iTextView->XyPosToDocPosL( viewRect.iBr ) );
                 TInt visibleRange( bottomPos - topPos );
                 
-                if ( thumbPosition != thumbSpan )                
+                if ( thumbPosition != thumbSpan && iEdwinExtension )                
                     {   
                     TInt scrollRange( totalChars - visibleRange );
                     docPos = ( TInt )( ( TInt64 )( thumbPosition ) * scrollRange
@@ -6128,7 +6173,10 @@
                 docPos = totalChars;
                 yPos = viewRect.iBr.iY;
                 }
-            iEdwinExtension->iThumbPos = thumbPosition;
+            if ( iEdwinExtension )
+            	{
+				iEdwinExtension->iThumbPos = thumbPosition;
+            	}
             TViewYPosQualifier yPosQ;
             yPosQ.SetMakeLineFullyVisible();            
             iTextView->SetViewL( docPos, yPos, yPosQ,
@@ -6499,7 +6547,7 @@
                 {
                 TRAP_IGNORE( iText->DeleteL(aStartPos,1));
                 }
-            if ( iEdwinExtension->iSmiley )
+            if ( iEdwinExtension && iEdwinExtension->iSmiley )
                 {
                 iEdwinExtension->iSmiley->HandleDeleteL( aStartPos, 1 );
                 }
@@ -6650,12 +6698,14 @@
         {
     case KEikDynamicLayoutVariantSwitch:
         {
-        if ( KineticScrollingEnabled() )
+        if ( KineticScrollingEnabled() && iEdwinExtension )
             {
             iEdwinExtension->iPhysicsHandler->DisableDragging();
             }
-        
-        iEdwinExtension->iThumbPos = KErrNotFound;
+        if ( iEdwinExtension )
+        	{
+			iEdwinExtension->iThumbPos = KErrNotFound;
+        	}
         SizeChanged();
         if ( !IsReadOnly() && !IsNonFocusing() 
                 && !( iEdwinUserFlags & EDisplayOnly )
@@ -6898,13 +6948,13 @@
     else
         {
         formatChanged=iText->DeleteL(lowerPos,length);
-        if ( iEdwinExtension->iSmiley )
+        if ( iEdwinExtension && iEdwinExtension->iSmiley )
             {
             iEdwinExtension->iSmiley->HandleDeleteL( lowerPos, length );
             }
         }
     iText->InsertL(aInsertPos,aText);
-    if ( iEdwinExtension->iSmiley )
+    if ( iEdwinExtension && iEdwinExtension->iSmiley )
         {
         iEdwinExtension->iSmiley->HandleInsertL( aInsertPos, aText.Length() );
         ConvertTextForSmileyL( TCursorSelection( aInsertPos, 
@@ -7387,7 +7437,11 @@
         edwinState = STATIC_CAST(CAknEdwinState*, iEdwinFepSupport->State(KNullUid));
         }
 
-    CAknPictographInterface* pictographInterface = iEdwinExtension->PictographInterface();
+    CAknPictographInterface* pictographInterface = NULL;
+    if ( iEdwinExtension )
+    	{
+		pictographInterface = iEdwinExtension->PictographInterface();
+    	}
     if (edwinState)
         {
         if (FeatureManager::FeatureSupported(KFeatureIdJapanese))
@@ -7963,7 +8017,10 @@
 
 EXPORT_C void CEikEdwin::SetPictographAnimationCallBack( TCallBack& aCallBack )
     {
-    iEdwinExtension->SetPictoCallBack( aCallBack );
+	if ( iEdwinExtension )
+		{
+		iEdwinExtension->SetPictoCallBack( aCallBack );
+		}
     }
 
 const TCallBack& CEikEdwin::PictographAnimationCallBack() const
@@ -8095,7 +8152,11 @@
     
 void CEikEdwin::SetVKBStatus()
     {
-    TUint cap = iEdwinExtension->iExtendedInputCapabilities->Capabilities();
+	TUint cap = 0;
+    if ( iEdwinExtension )
+		{
+		cap = iEdwinExtension->iExtendedInputCapabilities->Capabilities();
+		}
     if ( iEdwinUserFlags & EAvkonDisableVKB )
         {
         cap |= CAknExtendedInputCapabilities::EInputEditorDisableVKB;    
@@ -8103,8 +8164,11 @@
     else
         {
         cap &= ~CAknExtendedInputCapabilities::EInputEditorDisableVKB;
-        }   
-    iEdwinExtension->iExtendedInputCapabilities->SetCapabilities( cap );
+        } 
+    if ( iEdwinExtension )
+    	{
+		iEdwinExtension->iExtendedInputCapabilities->SetCapabilities( cap );
+    	}
     }
     
 void CEikEdwin::ScrollViewToCursorLineL()
@@ -8136,7 +8200,7 @@
 
 void CEikEdwin::PerformRecordedOperationL()
     {
-    if ( iEdwinExtension->iDrawInvoked == CEikEdwinExtension::ENotDraw ||
+    if ( iEdwinExtension && iEdwinExtension->iDrawInvoked == CEikEdwinExtension::ENotDraw ||
         iEdwinExtension->iDrawInvoked == CEikEdwinExtension::EDrawing )
         {        
         if ( iEdwinExtension->iDrawInvoked == CEikEdwinExtension::ENotDraw )
@@ -8195,8 +8259,8 @@
         UpdateScrollBarsL();
         scroll = ETrue ;
         }
-    if ( scroll && iEdwinExtension->iDrawInvoked != 
-        CEikEdwinExtension::EDrawing )
+    if ( scroll && iEdwinExtension && 
+    		iEdwinExtension->iDrawInvoked != CEikEdwinExtension::EDrawing )
         {
         ReportEdwinEventL( MEikEdwinObserver::EEventNavigation );
         }
@@ -8227,7 +8291,7 @@
 // for smiley support
 void CEikEdwin::EnableSmileySupportL( TBool aEnableSmiley )
     {
-    if ( aEnableSmiley && !AknLayoutUtils::LayoutMirrored() )
+    if ( aEnableSmiley && !AknLayoutUtils::LayoutMirrored() && iEdwinExtension )
         {
         if ( !iEdwinExtension->iSmiley )
             {
@@ -8244,7 +8308,7 @@
             TextLayout()->SetCustomWrap( iEdwinExtension->iSmileyWrap );
             }
         }    
-    else
+    else if ( iEdwinExtension )
         {
         delete iEdwinExtension->iSmiley;
         iEdwinExtension->iSmiley = NULL;
@@ -8257,7 +8321,12 @@
 
 TBool CEikEdwin::IsSmileyEnabled() const
     {
-    return ( iEdwinExtension->iSmiley != NULL );
+    TBool ret = EFalse; 
+    if ( iEdwinExtension )
+        {
+        ret = ( iEdwinExtension->iSmiley != NULL );
+        }
+    return ret;
     }
 
 void CEikEdwin::DrawSmileyInTextL( RRegion& rgn, const TRect& aDrawRect, 
@@ -8288,7 +8357,7 @@
         TInt smileyWidth( aFont.TextWidthInPixels( KSmileyString ) );
         for ( TInt i( 0 ); i < text.Length(); i++ )
             {
-            if ( CSmileyManager::IsSmileyCode( text[i] ) )
+            if ( iEdwinExtension && CSmileyManager::IsSmileyCode( text[i] ) )
                 {
                 TInt x( pt.iX + aFont.TextWidthInPixels( text.Left( i ) ) );
                 TRect clipRect( x, aDrawRect.iTl.iY, x + smileyWidth, 
@@ -8304,7 +8373,7 @@
 
 void CEikEdwin::ConvertVisibleTextForSmileyL( TBool aTextToCode )
     {
-    if ( !iEdwinExtension->iSmiley && !iTextView )
+    if ( iEdwinExtension && !iEdwinExtension->iSmiley && !iTextView )
         {
         return;
         }
@@ -8315,7 +8384,7 @@
 void CEikEdwin::ConvertTextForSmileyL( TCursorSelection aSelect, 
     TBool aTextToCode, TBool aRedraw )
     {    
-    if ( iEdwinExtension->iSmiley && !iEdwinExtension->iInlineEditing )
+    if ( iEdwinExtension && iEdwinExtension->iSmiley && !iEdwinExtension->iInlineEditing )
         {
         if ( aTextToCode )
             {
@@ -8387,7 +8456,7 @@
 
 void CEikEdwin::ConvertSmileyIconToTextL( TInt aStartPos, TDes& aText )
     {
-    if ( iEdwinExtension->iSmiley )
+    if ( iEdwinExtension && iEdwinExtension->iSmiley )
         {
         iEdwinExtension->iSmiley->ConvertTextForSmileyL( aStartPos,
             aText, EFalse );
@@ -8396,7 +8465,7 @@
 
 void CEikEdwin::ExtendedRangeForSmiley( TCursorSelection& aSelect )
     { 
-    if ( iEdwinExtension->iSmiley )
+    if ( iEdwinExtension && iEdwinExtension->iSmiley )
         {
         TInt textLength( TextLength() );
         TInt start = aSelect.LowerPos() - CSmileyManager::KMaxLength;
@@ -8416,7 +8485,7 @@
 
 TBool CEikEdwin::ConvertSmileyForDeleteL( TInt aDocPos, TBool aBackSpace )
     {
-    if ( !iEdwinExtension->iSmiley || ( aDocPos == 0 && aBackSpace ) || 
+    if ( iEdwinExtension && !iEdwinExtension->iSmiley || ( aDocPos == 0 && aBackSpace ) || 
         ( aDocPos == TextLength() && !aBackSpace ) )
         {
         return EFalse;
@@ -8454,7 +8523,7 @@
 
 void CEikEdwin::ConvertSmileyForDeleteL( const TCursorSelection &aSelect )
     {
-    if ( !iEdwinExtension->iSmiley )
+    if ( iEdwinExtension && !iEdwinExtension->iSmiley )
         {
         return;
         }
@@ -8485,7 +8554,10 @@
     TBool ret( EFalse );
     TCursorSelection select( Selection() );
     TInt cursor( select.iCursorPos );
-    iEdwinExtension->iSmiley->HandleSetCursor( aOldCursor, cursor );
+    if ( iEdwinExtension )
+    	{
+		iEdwinExtension->iSmiley->HandleSetCursor( aOldCursor, cursor );
+    	}
     if ( cursor != select.iCursorPos )
         {
         if ( select.iAnchorPos == select.iCursorPos )
@@ -8509,7 +8581,7 @@
     TBool aSelect )
     {
     TBool ret( EFalse );
-    if ( iEdwinExtension->iSmiley )
+    if ( iEdwinExtension && iEdwinExtension->iSmiley )
         {
         TInt oldPos( CursorPos() );
         TInt curPos( oldPos );
@@ -8533,14 +8605,14 @@
 
 void CEikEdwin::SetSelectionVisibilityL( TBool aIsVisable )
     {
-    if ( iEdwinExtension->iSmiley && !aIsVisable )
+    if ( iEdwinExtension && iEdwinExtension->iSmiley && !aIsVisable )
         {
         iTextView->SetSelectionVisibilityL( aIsVisable );
         HandleSelectionForSmiley( TCursorSelection( 0, 0 ) );
         }
     else 
         {
-        if ( iEdwinExtension->iSmiley )
+        if ( iEdwinExtension && iEdwinExtension->iSmiley )
             {
             HandleSelectionForSmiley( Selection() );
             }
@@ -8606,7 +8678,7 @@
         {
         // We can't move enough, we have exceeded the border
         // (at the beginning or end of the document)
-        if ( aPixelsToScroll != 0 )
+        if ( aPixelsToScroll != 0 && iEdwinExtension )
             {
             if ( aPixelsToScroll < 0 )
                 {
@@ -8630,7 +8702,7 @@
             }
         }
        
-    if ( scrolledPixels != 0 )
+    if ( scrolledPixels != 0 && iEdwinExtension )
         {
         iEdwinExtension->iScrolledDelta = scrolledPixels;
         TRAP_IGNORE( UpdateVertScrollBarThumbL() );
@@ -8658,21 +8730,24 @@
     // After that we have to move to mode where we use ScrollDisplayPixelsL
     // to detect if we exceed border again.
     TBool adjustScrolling( EFalse );
-    if ( aPixelsToScroll > 0  && iEdwinExtension->iEndBorderExceeded )
-        {
-        if ( aPixelsToScroll > - iEdwinExtension->iPixelsOutOfBorder )
-            {
-            adjustScrolling = ETrue;
-            }
-        }
-    else if ( aPixelsToScroll < 0 &&  iEdwinExtension->iStartBorderExceeded )
-        {
-        if ( aPixelsToScroll < - iEdwinExtension->iPixelsOutOfBorder )
-            {            
-            adjustScrolling = ETrue;
-            }
-        }
-    
+    if ( iEdwinExtension )
+    	{
+		if ( aPixelsToScroll > 0  && iEdwinExtension->iEndBorderExceeded )
+			{
+			if ( aPixelsToScroll > - iEdwinExtension->iPixelsOutOfBorder )
+				{
+				adjustScrolling = ETrue;
+				}
+			}
+		else if ( aPixelsToScroll < 0 &&  iEdwinExtension->iStartBorderExceeded )
+			{
+			if ( aPixelsToScroll < - iEdwinExtension->iPixelsOutOfBorder )
+				{            
+				adjustScrolling = ETrue;
+				}
+			}
+    	}
+
     if ( adjustScrolling )
         {
         // we are scrolling over the border, calculate how many
@@ -8685,23 +8760,26 @@
     // We are out of borders. Call scrolling function that supports bounce-effect
     TRAP_IGNORE( iTextView->ScrollDisplayPixelsNoLimitBorderL( aPixelsToScroll ) );
 
-    // Update variable that tells how near the border we are.
-    iEdwinExtension->iPixelsOutOfBorder += aPixelsToScroll;
-               
-    if ( iEdwinExtension->iStartBorderExceeded
-        && iEdwinExtension->iPixelsOutOfBorder <= 0 )
-        {
-        // We are inside borders, reset flag and tell to caller
-        iEdwinExtension->iStartBorderExceeded = EFalse;
-        aEndOfBounce = ETrue;
-        }
-    else if ( iEdwinExtension->iEndBorderExceeded
-        && iEdwinExtension->iPixelsOutOfBorder >= 0 )
-        {
-        // we are inside borders, reset flag and tell to caller
-        iEdwinExtension->iEndBorderExceeded = EFalse;
-        aEndOfBounce = ETrue;
-        }
+    if ( iEdwinExtension )
+    	{
+		// Update variable that tells how near the border we are.
+		iEdwinExtension->iPixelsOutOfBorder += aPixelsToScroll;
+				   
+		if ( iEdwinExtension->iStartBorderExceeded
+			&& iEdwinExtension->iPixelsOutOfBorder <= 0 )
+			{
+			// We are inside borders, reset flag and tell to caller
+			iEdwinExtension->iStartBorderExceeded = EFalse;
+			aEndOfBounce = ETrue;
+			}
+		else if ( iEdwinExtension->iEndBorderExceeded
+			&& iEdwinExtension->iPixelsOutOfBorder >= 0 )
+			{
+			// we are inside borders, reset flag and tell to caller
+			iEdwinExtension->iEndBorderExceeded = EFalse;
+			aEndOfBounce = ETrue;
+			}
+    	}
           
     if ( aPixelsToScroll != 0 )
         {
@@ -8719,7 +8797,12 @@
 //
 TInt CEikEdwin::PixelsOutOfBorder() const
     {
-    return iEdwinExtension->iPixelsOutOfBorder;
+    TInt ret = 0;
+    if ( iEdwinExtension )
+        {
+        ret = iEdwinExtension->iPixelsOutOfBorder;
+        }
+    return ret;
     }
 
 // ---------------------------------------------------------------------------
@@ -8736,7 +8819,10 @@
     // If aEnable is EFalse, Position scrolling mode is in use.
     // If aEnable is ETrue, Rate scrolling mode is in use.
     
-    iEdwinExtension->iUseRateScroll = aEnable;
+	if ( iEdwinExtension )
+		{
+		iEdwinExtension->iUseRateScroll = aEnable;
+		}
     }
 
 // ---------------------------------------------------------------------------
@@ -8746,7 +8832,7 @@
 void CEikEdwin::StoreCursorState()
     {
     CAknEdwinState* state( EditorState() );
-    if ( state && state->Flags() & EAknEditorFlagTextCursorVisible )
+    if ( iEdwinExtension && state && state->Flags() & EAknEditorFlagTextCursorVisible )
         {
         TRAP_IGNORE( SetCursorVisibilityL( EFalse ) );
         iEdwinExtension->iCursorWasVisible = ETrue;
@@ -8759,7 +8845,7 @@
 //
 void CEikEdwin::RestoreCursorState()
     {
-    if ( iEdwinExtension->iCursorWasVisible )
+    if ( iEdwinExtension && iEdwinExtension->iCursorWasVisible )
         {
         TRAP_IGNORE( SetCursorVisibilityL( ETrue ) );
         iEdwinExtension->iCursorWasVisible = EFalse;
@@ -8792,7 +8878,8 @@
         window.BeginRedraw( viewRect );
         gc.Activate( window );
     
-        if ( !AknsDrawUtils::DrawBackground( 
+        if ( iEdwinExtension && 
+        		!AknsDrawUtils::DrawBackground( 
                 iEdwinExtension->iSkinInstance, 
                 SkinBackgroundControlContext(),
                 this,
@@ -8822,18 +8909,21 @@
 
 void CEikEdwin::HandleSelectionForSmiley( TCursorSelection aSelect )
     {
-    if ( !iEdwinExtension->iSmiley )
-        {
-        return;
-        }
-    if ( iCustomDrawer )
-        {
-        iEdwinExtension->iSmiley->SetHighlightColor( 
-            iCustomDrawer->SystemColor( TLogicalRgb::ESystemSelectionBackgroundIndex, 
-                KRgbWhite ) );
-        }
-    iEdwinExtension->iSmiley->HandleSelection( aSelect.LowerPos(), 
-        aSelect.Length() );
+	if ( iEdwinExtension )
+		{
+		if ( !iEdwinExtension->iSmiley )
+	        {
+	        return;
+	        }
+	    if ( iCustomDrawer )
+	        {
+	        iEdwinExtension->iSmiley->SetHighlightColor( 
+	            iCustomDrawer->SystemColor( TLogicalRgb::ESystemSelectionBackgroundIndex, 
+	                KRgbWhite ) );
+	        }
+	    iEdwinExtension->iSmiley->HandleSelection( aSelect.LowerPos(), 
+	        aSelect.Length() );
+		}
     }
 
 // ---------------------------------------------------------------------------
--- a/uifw/EikStd/coctlsrc/EIKLBX.CPP	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/EikStd/coctlsrc/EIKLBX.CPP	Tue Apr 27 16:55:05 2010 +0300
@@ -2887,7 +2887,7 @@
         TEikScrollBarFrameLayout layout;
         CreateScrollBarFrameLayout(layout);
         TBool sizeChanged=iSBFrame->TileL(&hSbarModel, &vSbarModel, clientRect, inclusiveRect, layout);
-        if (iListBoxExt->UpdateScrollBarsColors())
+        if ( iListBoxExt && iListBoxExt->UpdateScrollBarsColors() )
             UpdateScrollBarsColors();
         if (!sizeChanged)
             return;
@@ -3014,11 +3014,7 @@
         _AKNTRACE_FUNC_EXIT;
         return;
         }
-    if( !iListBoxExt )
-        {
-        _AKNTRACE_FUNC_EXIT;
-        return;
-        }
+    
     CEikButtonGroupContainer *bgc;
     CCoeControl* MSK( NULL );
     CEikCba* cba( NULL );
@@ -3056,16 +3052,22 @@
         // marking still works even MSK isn't changed
         if ( err )
             {
-            iListBoxExt->iSelectionModeEnabled = EFalse;
+            if ( iListBoxExt )
+                {
+                iListBoxExt->iSelectionModeEnabled = EFalse;
+                }
             _AKNTRACE_FUNC_EXIT;
             return;
             }
         cba->DrawNow();
-        iListBoxExt->iSelectionModeEnabled = ETrue;
+        if ( iListBoxExt )
+            {
+            iListBoxExt->iSelectionModeEnabled = ETrue;
+            }
         }
 
     // remove stacked MSK
-    if( !aEnable && iListBoxExt->iSelectionModeEnabled )
+    if( !aEnable && iListBoxExt && iListBoxExt->iSelectionModeEnabled )
         {
         if( ( MSK && cba->ControlId( MSK ) == EAknSoftkeyMark ) ||
             ( MSK && cba->ControlId( MSK ) == EAknSoftkeyUnmark ) )
@@ -3074,11 +3076,13 @@
             }
         iListBoxExt->iSelectionModeEnabled = EFalse; // just in case
         }
-        
-    TInt count = iListBoxExt->iSelectionObservers.Count();
-    for ( int i=0; i < count; i++ )
-        {
-        iListBoxExt->iSelectionObservers[i]->SelectionModeChanged( this, aEnable );
+    if ( iListBoxExt )
+        {
+        TInt count = iListBoxExt->iSelectionObservers.Count();
+        for ( int i=0; i < count; i++ )
+            {
+            iListBoxExt->iSelectionObservers[i]->SelectionModeChanged( this, aEnable );
+            }
         }
     _AKNTRACE_FUNC_EXIT;
     }
@@ -3098,7 +3102,7 @@
     iView->ClearFlags(CListBoxView::EItemCountModified);
 
 
-    if ( iListBoxExt->iLongTappedItem != KErrNotFound )
+    if ( iListBoxExt && iListBoxExt->iLongTappedItem != KErrNotFound )
         {
         iListBoxExt->EnableHighlight( EFalse );
         }
@@ -3394,7 +3398,8 @@
             {
             selectionMode = CListBoxView::ENoSelection;
             UpdateMarkUnmarkMSKL();
-            if (IsSelectionMarkKeys(code, aKeyEvent.iScanCode, iListBoxExt->iWesternVariant)) 
+            if ( iListBoxExt 
+                 && IsSelectionMarkKeys( code, aKeyEvent.iScanCode, iListBoxExt->iWesternVariant ) ) 
                 {
                 __KeyDebug(ETrue, "SelectionMarkKey")
                 View()->ClearSelectionAnchorAndActiveIndex();
@@ -3405,7 +3410,7 @@
 
     // CAknGrid marking is implemeted in avkon.dll. But we still need to disable short
     // hash mark in here.
-    if ( iListBoxFlags & EMultipleSelection && 
+    if ( iListBoxExt && iListBoxFlags & EMultipleSelection && 
          iListBoxFlags & EShiftEnterMarks && aType == EEventKeyUp )
         {
         if ( aKeyEvent.iScanCode == EStdKeyLeftArrow ||
@@ -3617,7 +3622,8 @@
                     }
                 }
 		
-            if ( ScrollingDisabled() || ( !iListBoxExt->MovePhysicsCursorL( moveto, selectionMode ) ) )
+            if ( ScrollingDisabled() 
+                || ( iListBoxExt && !iListBoxExt->MovePhysicsCursorL( moveto, selectionMode ) ) )
                 {
                 iView->MoveCursorL(moveto, selectionMode);
                 }
@@ -3666,7 +3672,8 @@
                     }
                 }
 
-            if ( ScrollingDisabled() || ( !iListBoxExt->MovePhysicsCursorL( moveto, selectionMode ) ) )
+            if ( ScrollingDisabled() 
+                || ( iListBoxExt && !iListBoxExt->MovePhysicsCursorL( moveto, selectionMode ) ) )
                 {
                 iView->MoveCursorL(moveto, selectionMode);
                 }
@@ -3751,7 +3758,7 @@
     //
     if(switchMSK)
         {
-        if( selectionMode == CListBoxView::EDisjointMarkSelection )
+        if( iListBoxExt && selectionMode == CListBoxView::EDisjointMarkSelection )
             {
              // if hash and either up or down pressed -> no short marking
             iListBoxExt->iShortHashMark = EFalse;
@@ -3810,7 +3817,7 @@
     // only if a markable list is active, otherwise the simulated event might open 
     // the selected item, which we don't want.    
     if((iListBoxFlags & EMultipleSelection) && (iListBoxFlags & EShiftEnterMarks) &&
-        iListBoxExt->iWesternVariant &&
+        iListBoxExt && iListBoxExt->iWesternVariant &&
         iListBoxExt->iAknFepHashKeySelection && 
         iListBoxExt->iQwertyMode == EFalse && 
         aType == EEventKeyUp && aKeyEvent.iScanCode == EStdKeyHash &&
@@ -3912,10 +3919,17 @@
         case MEikListBoxObserver::EEventPanningStarted:
             {
             iItemDrawer->SetFlags( CListItemDrawer::EDisableMarquee );
-            if ( aEvent == MEikListBoxObserver::EEventFlickStarted )
-                iListBoxExt->SetFlickOngoing( ETrue );
-            else            
-                iListBoxExt->SetPanningOngoing( ETrue );
+            if ( iListBoxExt )
+                { 
+                if ( aEvent == MEikListBoxObserver::EEventFlickStarted )
+                    {
+                    iListBoxExt->SetFlickOngoing( ETrue );
+                    }
+                else 
+                    {
+                    iListBoxExt->SetPanningOngoing( ETrue );
+                    }
+                }
             break;
             }
             
@@ -3923,15 +3937,17 @@
         case MEikListBoxObserver::EEventPanningStopped:
             {
             iItemDrawer->ClearFlags( CListItemDrawer::EDisableMarquee );
-            if ( aEvent == MEikListBoxObserver::EEventFlickStopped )
-                {
-                iListBoxExt->SetFlickOngoing( EFalse );
-                }
-            else 
-                {
-                iListBoxExt->SetPanningOngoing( EFalse );
-                }
-            
+            if ( iListBoxExt )
+                { 
+                if ( aEvent == MEikListBoxObserver::EEventFlickStopped )
+                    {   
+                    iListBoxExt->SetFlickOngoing( EFalse );                    
+                    }
+                else 
+                    {
+                    iListBoxExt->SetPanningOngoing( EFalse );
+                    }
+                }            
             break;
             }
         }
@@ -3980,7 +3996,7 @@
 EXPORT_C void CEikListBox::HandlePhysicsScrollEventL( TInt aDeltaPixels )
     {    
     _AKNTRACE_FUNC_ENTER;
-    if ( iListBoxExt->iPhysics )
+    if ( iListBoxExt && iListBoxExt->iPhysics )
         {
         iListBoxExt->InitPhysicsL();
         
@@ -3995,7 +4011,7 @@
 EXPORT_C void CEikListBox::HandleScrollEventL(CEikScrollBar* aScrollBar,TEikScrollEvent aEventType)
     {
     _AKNTRACE_FUNC_ENTER;
-    if ( iListBoxExt->iSingleClickEnabled )
+    if ( iListBoxExt && iListBoxExt->iSingleClickEnabled )
         {
         iListBoxExt->EnableHighlight( EFalse );
         iView->DrawItem( iView->CurrentItemIndex() );
@@ -4138,17 +4154,17 @@
                 }
 #endif
             
-        if ( iListBoxExt->iPhysics )
+        if ( iListBoxExt && iListBoxExt->iPhysics )
             {
             iListBoxExt->InitPhysicsL();
             TInt deltaPixels = newThumbPos;
     
 #ifdef _DEBUG
-            RDebug::Print( _L( "CListBox::HandleScrollEventL, deltaPixels = %d" ), deltaPixels );
+                RDebug::Print( _L( "CListBox::HandleScrollEventL, deltaPixels = %d" ), deltaPixels );
 #endif // _DEBUG
             
             TPoint newPosition( iListBoxExt->iViewPosition.iX, deltaPixels + iView->ViewRect().Height() / 2 );
-            iListBoxExt->ViewPositionChanged( newPosition );
+            iListBoxExt->ViewPositionChanged( newPosition );            
             }
         else
             {
@@ -4170,7 +4186,9 @@
         // If the event has changed thumb position, then update scroll bar
         // unless physics is used. In that case thumb is updated via 
         // CEikListBox::ScrollView.
-        if ( AknLayoutUtils::PenEnabled() && newThumbPos != newThumbPosBeforeCorrecting && !iListBoxExt->iPhysics )
+        if ( AknLayoutUtils::PenEnabled() 
+             && newThumbPos != newThumbPosBeforeCorrecting 
+             && iListBoxExt && !iListBoxExt->iPhysics )
             {
             UpdateScrollBarThumbs();
             }
@@ -4189,7 +4207,6 @@
         return;
         }
     
-    CheckCreateExtensionL();
     if (!(iListBoxFlags & ELeftDownInViewRect))
         {
         _AKNTRACE_FUNC_EXIT;
@@ -5364,7 +5381,7 @@
         // switch off selection (marking) mode when we lose focus
         // this also corrects situation, where FEP-menu is launched
         // and thus listbox doesn't receive shift up event
-        if (NULL != iListBoxExt)
+        if ( iListBoxExt )
             {
             if ((iListBoxFlags & EMultipleSelection) && (iListBoxFlags & EShiftEnterMarks))
                 {
@@ -5384,9 +5401,9 @@
         iView->SetEmphasized(EFalse);
         iView->HideMatcherCursor();
         
-        if (iItemEditor && 
-            (iListBoxFlags & EPaintedSelection) && 
-            (NULL != iListBoxExt && iListBoxExt->ReasonForFocusLost() == EFocusLostToExternalControl))
+        if ( iItemEditor && 
+            ( iListBoxFlags & EPaintedSelection ) && 
+            ( iListBoxExt && iListBoxExt->ReasonForFocusLost() == EFocusLostToExternalControl ) )
             {
             iView->DeselectItem(CurrentItemIndex());
             }
@@ -5738,7 +5755,7 @@
         
         if ( iView )
             {
-            iView->SetItemOffsetInPixels( 0 );
+            iView->SetItemOffsetInPixels( 0 );            
             }
         
         // make sure that highlight is removed and long tap is canceled 
@@ -5985,9 +6002,15 @@
             {
             rect.iTl.iX += iItemDrawer->MarkColumn() + iItemDrawer->MarkGutter();
             }
-        iListBoxExt->SetReasonForFocusLost(EFocusLostToInternalEditor);
+        if ( iListBoxExt )
+            {
+            iListBoxExt->SetReasonForFocusLost(EFocusLostToInternalEditor);
+            }
         itemEditor->StartEditingL(*this,rect,index,aMaxLength);
-        iListBoxExt->SetReasonForFocusLost(EFocusLostToExternalControl);
+        if ( iListBoxExt )
+            {
+            iListBoxExt->SetReasonForFocusLost(EFocusLostToExternalControl);
+            }
         ReportListBoxEventL( MEikListBoxObserver::EEventEditingStarted );
         }
     _AKNTRACE_FUNC_EXIT;
@@ -6115,18 +6138,21 @@
 EXPORT_C void CEikListBox::DisableScrolling( TBool aDisabled )
     {
     _AKNTRACE_FUNC_ENTER;
-    iListBoxExt->iScrollingDisabled = aDisabled;
-    iView->iExtension->iScrollingDisabled = aDisabled;
-    
-    if ( aDisabled && iListBoxExt->iPhysics )
-        {
-        delete iListBoxExt->iPhysics;
-        iListBoxExt->iPhysics = NULL;
-        iView->SetItemOffsetInPixels( 0 );
-        }
-    else if ( !aDisabled && !iListBoxExt->iPhysics && CAknPhysics::FeatureEnabled() )
-        {
-        iListBoxExt->iPhysics = CAknPhysics::NewL( *iListBoxExt, this);      
+    if ( iListBoxExt )
+        {
+        iListBoxExt->iScrollingDisabled = aDisabled;
+        iView->iExtension->iScrollingDisabled = aDisabled;
+        
+        if ( aDisabled && iListBoxExt->iPhysics )
+            {
+            delete iListBoxExt->iPhysics;
+            iListBoxExt->iPhysics = NULL;
+            iView->SetItemOffsetInPixels( 0 );
+            }
+        else if ( !aDisabled && !iListBoxExt->iPhysics && CAknPhysics::FeatureEnabled() )
+            {
+            iListBoxExt->iPhysics = CAknPhysics::NewL( *iListBoxExt, this);      
+            }
         }
     _AKNTRACE_FUNC_EXIT;
     }
@@ -6138,19 +6164,29 @@
 //
 EXPORT_C TBool CEikListBox::ScrollingDisabled()
     {
-    return !iListBoxExt->iPhysics || iListBoxExt->iScrollingDisabled;
+    if ( iListBoxExt )
+        {
+        return !iListBoxExt->iPhysics || iListBoxExt->iScrollingDisabled;
+        }
+    else
+        {
+        return ETrue;
+        }
     }
 
 
 EXPORT_C void CEikListBox::SetPointerEventFilterDisabledL( const CArrayFix<TInt>& aItemIndexes )
     {
     _AKNTRACE_FUNC_ENTER;
-    iListBoxExt->iMutiTappingItems.Reset();
-
-    for(TInt i=0; i<aItemIndexes.Count(); i++ )
-        {
-        iListBoxExt->iMutiTappingItems.InsertInOrderL( aItemIndexes.At(i) ); 
-        }   
+    if ( iListBoxExt )
+        {
+        iListBoxExt->iMutiTappingItems.Reset();
+    
+        for(TInt i=0; i<aItemIndexes.Count(); i++ )
+            {
+            iListBoxExt->iMutiTappingItems.InsertInOrderL( aItemIndexes.At(i) ); 
+            } 
+        }
     _AKNTRACE_FUNC_EXIT;
     }
 
@@ -6206,8 +6242,8 @@
 //
 EXPORT_C void CEikListBox::DisableSingleClick( TBool aDisabled )
     {
-    _AKNTRACE_FUNC_ENTER;
-    if ( aDisabled && iListBoxExt->iSingleClickEnabled )
+    _AKNTRACE_FUNC_ENTER;    
+    if ( aDisabled && iListBoxExt && iListBoxExt->iSingleClickEnabled )
         {
         iListBoxExt->DisableSingleClick(); 
         }
@@ -6235,11 +6271,11 @@
 //
 EXPORT_C TBool CEikListBox::IsHighlightEnabled()
     {
-    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_ENTER;	
     TBool enabled( EFalse ); 
     if ( !( iItemDrawer->Flags() & CListItemDrawer::EDisableHighlight ) )
         {
-        if ( iListBoxExt->iSingleClickEnabled )
+        if ( iListBoxExt && iListBoxExt->iSingleClickEnabled )
             {
             enabled = !( iItemDrawer->Flags()
                 & CListItemDrawer::ESingleClickDisabledHighlight ); 
@@ -6258,9 +6294,9 @@
 	_AKNTRACE_FUNC_ENTER;
 #ifdef _DEBUG
 	RDebug::Print( _L( "CEikListBox::ScrollView, aOffset = %d, aDrawNow = %d" ), aOffset, aDrawNow );
-#endif // _DEBUG
-
-	if ( aOffset != 0 )
+#endif // _DEBUG	
+	
+	if ( iListBoxExt && aOffset != 0 )
 	    {
         TInt itemHeight = iView->ItemHeight();
         TInt viewHeight = iView->ViewRect().Size().iHeight;
@@ -6334,7 +6370,10 @@
         TRect rect(Rect());
         
         // list position changed
-        iListBoxExt->iBackgroundDrawingSuppressed = ETrue;
+        if ( iListBoxExt )
+            {
+            iListBoxExt->iBackgroundDrawingSuppressed = ETrue;
+            }
         UpdateScrollBarThumbs();
         DrawNow();
         if (iSBFrame && iSBFrame->VerticalScrollBar() && !iSBFrame->VerticalScrollBar()->OwnsWindow())
@@ -6345,7 +6384,10 @@
                 iSBFrame->DrawScrollBarsNow();                
                 }
             }
-        iListBoxExt->iBackgroundDrawingSuppressed = EFalse;
+        if ( iListBoxExt )
+            {
+            iListBoxExt->iBackgroundDrawingSuppressed = EFalse;
+            }
         }        
     _AKNTRACE_FUNC_EXIT;
 	}
@@ -6617,7 +6659,8 @@
     _AKNTRACE_FUNC_ENTER;
     TInt oldCurrentItemIndex = iView->CurrentItemIndex();
 
-    if ( iListBoxExt->iReportDelayedPenDown && !iListBoxExt->iScrolling )
+    if ( iListBoxExt && iListBoxExt->iReportDelayedPenDown 
+        && !iListBoxExt->iScrolling )
         {
 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
         if ( aItemIndex != oldCurrentItemIndex )
@@ -6640,14 +6683,14 @@
             iListBoxExt->iDelayedPointerDownEvent );
         }
 
-    if ( iListBoxExt->iDelayedMultiselection )
+    if ( iListBoxExt && iListBoxExt->iDelayedMultiselection )
         {
         iItemDrawer->SetFlags( CListItemDrawer::EPressedDownState );
         }
     
     iView->SetItemIndex( aItemIndex );
 
-    if ( iListBoxExt->iMarkableListMarking )
+    if ( iListBoxExt && iListBoxExt->iMarkableListMarking )
         {
         if ( iListBoxExt->iMarkableListShiftKeyPressed )
            {
@@ -6677,7 +6720,7 @@
     iView->DrawItem( oldCurrentItemIndex );
     iView->DrawItem( aItemIndex );
     
-    if ( iListBoxExt->iDelayedMultiselection )
+    if ( iListBoxExt && iListBoxExt->iDelayedMultiselection )
         {
         iListBoxFlags |= EStateChanged;
         Buffer()->iPressedIndex = aItemIndex;
--- a/uifw/EikStd/coctlsrc/EIKMENUP.CPP	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/EikStd/coctlsrc/EIKMENUP.CPP	Tue Apr 27 16:55:05 2010 +0300
@@ -2287,7 +2287,7 @@
         numItemsInPane = iItemArray->Count();
         }
 
-    if ( iExtension->iSct )
+    if ( iExtension && iExtension->iSct )
         {
         numItemsInPane++;
         }
@@ -3766,7 +3766,7 @@
         {
         TPointerEvent ptrEvent;
         ptrEvent.iType = TPointerEvent::EButton1Up;
-        menubar->HandlePointerEventL( ptrEvent );
+        TRAP_IGNORE( menubar->HandlePointerEventL( ptrEvent ) );
         }
     else
         {
@@ -4284,6 +4284,7 @@
             else
                 {
                 // Clicked out side submenu, parent handles this
+                iExtension->iDownOnMenuArea = EFalse;
                 if ( iOwner )
                     {
                     iExtension->CalculateParentEvent(aPointerEvent, parentEvent);                                        
@@ -4381,7 +4382,7 @@
                 iExtension->EnableHighlight( EFalse );
                 }    
                          
-            if ( iExtension->iPanningActive )
+            if ( iExtension->iPanningActive && iExtension->iDownOnMenuArea )
                 {
                 TPoint delta( 
                     0, iExtension->iPrevPoint.iY - aPointerEvent.iPosition.iY );
@@ -4435,20 +4436,6 @@
                                 CloseCascadeMenu();
                                 }
                             }
-                        else
-                            {
-                            TInt oldSelected = iSelectedItem;
-                            // update highlight to new item
-                            if ( oldSelected != ii )
-                                {
-                                iExtension->iPressedDown = EFalse;
-                                }
-                            TRect screenRect( TPoint( KMinTInt, KMinTInt ),
-                                    TPoint( KMaxTInt, KMaxTInt ) );
-                            TRect repeatRect( screenRect.iTl.iX, item->iPos,
-                                    screenRect.iBr.iX, item->iPos
-                                            + iItemHeight );
-                            }
                         // item found, break                      
                         break;
                         }
@@ -5104,7 +5091,7 @@
             }
         else
             {
-            DoUpdateScrollBarL();
+            TRAP_IGNORE( DoUpdateScrollBarL() );
             }        
         }
     _AKNTRACE_FUNC_EXIT;
@@ -5383,7 +5370,7 @@
                     pointerEvent.iType = TPointerEvent::EButton1Up;
                     // Sending a up event to scroll bar for dehighlighting 
                     // the scroll bar.
-                    verScrollBar->HandlePointerEventL(pointerEvent);   
+                    TRAP_IGNORE ( verScrollBar->HandlePointerEventL(pointerEvent) );   
                     iSBFrame->DrawScrollBarsDeferred();
                     ClaimPointerGrab( EFalse );
                     }
--- a/uifw/EikStd/coctlsrc/aknitemactionmenu.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/EikStd/coctlsrc/aknitemactionmenu.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -510,7 +510,7 @@
             }
         }
     // Inform collection that submenu was closed
-    if ( iStates.Find( informState ) != KErrNotFound ) 
+    if ( informState && iStates.Find( informState ) != KErrNotFound ) 
         {
         informState->ItemActionMenuClosed();
         }
--- a/uifw/EikStd/coctlsrc/aknstyluspopupmenu.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/EikStd/coctlsrc/aknstyluspopupmenu.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -119,7 +119,10 @@
 //
 CAknStylusPopUpMenu::~CAknStylusPopUpMenu()
     {
-    iContent->SetObserver(NULL);
+    if ( iContent )
+        {
+        iContent->SetObserver(NULL);
+        }
     if ( iIsDeleted )
         {
         *iIsDeleted = ETrue;
--- a/uifw/EikStd/coctlsrc/akntoolbarextensionview.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/EikStd/coctlsrc/akntoolbarextensionview.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -487,13 +487,24 @@
                         *button, EColorControlBackground, KRgbWhite ) );
                     TRAP_IGNORE( AknLayoutUtils::OverrideControlColorL( 
                         *button, EColorButtonText, KRgbBlack ) );
+                    }               
+                else 
+                    {
+                    //Reset the pressed down text color when get the skin change message and 
+                    // KAknTbExtensionDsaMode isn't used.
+                    TRgb pressDownColor;
+                    if ( AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), 
+                            pressDownColor, KAknsIIDQsnTextColors, 
+                            EAknsCIQsnTextColorsCG11 ) == KErrNone )
+                        {
+                        TRAP_IGNORE( AknLayoutUtils::OverrideControlColorL( *button, 
+                                    EColorButtonTextPressed, pressDownColor ) );                        
+                        }               
                     }
                 }
             }
         }
 
-
-
     // Remember to check here if iSelectedItem still is in iVisibleItems, and if 
     // not then do something. 
     if ( ( aType == KAknsMessageSkinChange || 
@@ -770,8 +781,22 @@
         cell_tb_ext_pane_t1( useOutline ? 0 : 1 ).LayoutLine().FontId() );
 
     aButton.SetTextFont( font ); 
-    aButton.SetTextColorIds( KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG60 );
-
+    aButton.SetTextColorIds( KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG20 );
+    
+    
+    //Using CAknButton default frame if KAknTbExtensionTransparent 
+    //and KAknTbExtensionDsaMode are not defined.
+    if ( !( iExtension->ExtensionFlags() & KAknTbExtensionTransparent  ||
+            iExtension->ExtensionFlags() & KAknTbExtensionDsaMode ) ) 
+        {
+        aButton.SetFrameAndCenterIds(
+                KAknsIIDQsnFrButtonNormal, KAknsIIDQsnFrButtonCenterNormal,
+                KAknsIIDQsnFrButtonPressed, KAknsIIDQsnFrButtonCenterPressed,
+                KAknsIIDQsnFrButtonInactive, KAknsIIDQsnFrButtonCenterInactive, 
+                KAknsIIDQsnFrGrid, KAknsIIDQsnFrGridCenter,
+                KAknsIIDQsnFrButtonInactive, KAknsIIDQsnFrButtonCenterInactive );
+        }
+    
     if ( iExtension->ExtensionFlags() & KAknTbExtensionDsaMode )
         {
         AknLayoutUtils::OverrideControlColorL( aButton, 
@@ -779,6 +804,18 @@
         AknLayoutUtils::OverrideControlColorL( aButton, 
             EColorButtonText, KRgbBlack );
         }
+    else
+        {
+        //Reset the pressed down text color when get the skin change message and 
+        // KAknTbExtensionDsaMode isn't used.
+        TRgb pressDownColor;
+        if ( AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), pressDownColor, 
+                KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG11 ) == KErrNone )
+            {
+            AknLayoutUtils::OverrideControlColorL( aButton, 
+                    EColorButtonTextPressed, pressDownColor );        
+            }
+        }
     }
 
 
--- a/uifw/EikStd/coctlsrc/eikspmod.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/EikStd/coctlsrc/eikspmod.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -1484,7 +1484,7 @@
                         if ( aLayoutId == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT_NO_SOFTKEYS )
                             {
                             layout =
-                                aknLayoutScalable_Avkon.navi_pane( 10 ).LayoutLine();
+                                aknLayoutScalable_Avkon.navi_pane( 2 ).LayoutLine();
                             }
                         else
                             {
@@ -1504,7 +1504,7 @@
                         if ( aLayoutId == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT_NO_SOFTKEYS )
                             {
                             layout =
-                                aknLayoutScalable_Avkon.title_pane( 12 ).LayoutLine();
+                                aknLayoutScalable_Avkon.title_pane( 2 ).LayoutLine();
                             }
                         else
                             {
@@ -1515,8 +1515,17 @@
                         }
                     case EEikStatusPaneUidIndic:
                         {
-                        layout =
-                            aknLayoutScalable_Avkon.uni_indicator_pane( 5 ).LayoutLine();
+                        if (aLayoutId
+                                == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT_NO_SOFTKEYS)
+                            {
+                            layout
+                                    = aknLayoutScalable_Avkon.uni_indicator_pane( 1 ).LayoutLine();
+                            }
+                        else
+                            {
+                            layout
+                                    = aknLayoutScalable_Avkon.uni_indicator_pane( 5 ).LayoutLine();
+                            }
                         break;
                         }
                     case EEikStatusPaneUidBattery:
--- a/uifw/EikStd/dlgsrc/EIKDIALG.CPP	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/EikStd/dlgsrc/EIKDIALG.CPP	Tue Apr 27 16:55:05 2010 +0300
@@ -1917,104 +1917,133 @@
  */
 EXPORT_C void CEikDialog::TryExitL(TInt aButtonId)
     {
-	_AKNTRACE_FUNC_ENTER;
-	_AKNTRACE("iDialogFlags = %d, buttonId = %d", iDialogFlags, aButtonId);
-    if ( iDialogFlags & EEikDialogFlagNoUserExit )
+    _AKNTRACE("CEikDialog::TryExitL iDialogFlags = %d, buttonId = %d", iDialogFlags, aButtonId);
+    if (iDialogFlags & EEikDialogFlagNoUserExit)
         {
-		return;
+        return;
         }
         
     // use delayed exit if pointer event handling is in progress
-    if ( Extension()->iPublicFlags.IsSet( CEikDialogExtension::EDelayedExit ) )
+    if (Extension()->iPublicFlags.IsSet(CEikDialogExtension::EDelayedExit))
         {
         Extension()->iButtonId = aButtonId;
         Extension()->StartDelayedExit();
+        
         _AKNTRACE("CEikDialog::TryExitL return with delayedExit");
         return;
         }
 
-    TBool effectTriggered = EFalse;
-    
-        TBool effectButton = aButtonId == EEikBidCancel
-                          || aButtonId == EAknSoftkeyExit
-                          || aButtonId == EAknSoftkeyBack
-                          || aButtonId == EAknSoftkeyNo;
+    TBool effectButton = aButtonId == EEikBidCancel
+                      || aButtonId == EAknSoftkeyExit
+                      || aButtonId == EAknSoftkeyBack
+                      || aButtonId == EAknSoftkeyNo;
 #ifdef RD_UI_TRANSITION_EFFECTS_POPUPS
-        effectButton =    effectButton
-                          || aButtonId == EAknSoftkeyClose
-                          || aButtonId == EAknSoftkeyDone
-                          || aButtonId == EAknSoftkeyOk;
+    effectButton =    effectButton
+                      || aButtonId == EAknSoftkeyClose
+                      || aButtonId == EAknSoftkeyDone
+                      || aButtonId == EAknSoftkeyOk;
 #endif
-    CAknAppUi* aknAppUi = static_cast<CAknAppUi*>( iEikonEnv->EikAppUi() );
-        if (GfxTransEffect::IsRegistered(this) && IsVisible() && effectButton
+
+    TBool effectTriggered = EFalse;
+    CAknAppUi* aknAppUi = static_cast<CAknAppUi*>(iEikonEnv->EikAppUi());
+    
+    if (!(iDialogFlags & EEikDialogFlagDelayEffects)
+        && GfxTransEffect::IsRegistered(this) && IsVisible() && effectButton
 #ifdef RD_UI_TRANSITION_EFFECTS_POPUPS        
-        && !(iDialogFlags&EEikDialogFlagSleeping)
+        && !(iDialogFlags & EEikDialogFlagSleeping)
 #endif
-            && (!aknAppUi->IsFullScreenApp() || aknAppUi->IsForeground())
+        && (!aknAppUi->IsFullScreenApp() || aknAppUi->IsForeground())
         && !IsBlankScreenDisplayed()
-         )
-            {
+        )
+        {
         CAknTransitionUtils::SetAllParents(this);
         GfxTransEffect::Begin(this, KGfxControlDisappearAction);
         GfxTransEffect::NotifyExternalState(ECaptureComponentsBegin, (const TDesC8*)this);
         TRect demarcation;
-        CAknTransitionUtils::GetDemarcation(CAknTransitionUtils::EPopup,
-                                            demarcation);
+        CAknTransitionUtils::GetDemarcation(CAknTransitionUtils::EPopup, demarcation);
         GfxTransEffect::SetDemarcation(this, demarcation);
         effectTriggered = ETrue;
         }
 
-    if (aButtonId!=EEikBidCancel)
+    if (aButtonId != EEikBidCancel)
+        {
         PrepareForFocusTransitionL();
-    else if (!(iDialogFlags&EEikDialogFlagNotifyEsc))
+        }
+    else if (!(iDialogFlags & EEikDialogFlagNotifyEsc))
+        {
         goto finished;
+        }
+    
     if (!OkToExitL(aButtonId))
+        {
+        if (effectTriggered)
             {
-        if ( effectTriggered )
-            {
-            GfxTransEffect::NotifyExternalState( ECaptureComponentsAbort,
-                                                 ( const TDesC8* ) this );
-            GfxTransEffect::Abort( this );
-            }
-            _AKNTRACE_FUNC_EXIT;
-            return;
+            GfxTransEffect::NotifyExternalState(ECaptureComponentsAbort, (const TDesC8*)this);
+            GfxTransEffect::Abort(this);
             }
         
-        if (aButtonId != EEikBidCancel)
+        _AKNTRACE("CEikDialog::TryExitL return with OkToExitL false");
+        return;
+        }
+        
+    if (aButtonId != EEikBidCancel)
+        {
         GetAutoValues();
+        }
+
 finished:
+
     if (iExitConfirmed)
-        *iExitConfirmed=((MappedCommandId( aButtonId ) ==EEikBidCancel)? 0: aButtonId);
+        {
+        *iExitConfirmed = MappedCommandId(aButtonId) == EEikBidCancel ? 0 : aButtonId;
+        }
 
     // Remove content observer in order to prevent unnecessary layout 
     // calculations in dialog shutdown.
-    EnableContentObserver( EFalse );
-
-    if (iDialogFlags&EEikDialogFlagSleeping)
+    EnableContentObserver(EFalse);
+
+    if (iDialogFlags & EEikDialogFlagSleeping)
+        {
         ExitSleepingDialog();
+        }
     else
         {
         // Remove content observer in order to prevent unnecessary layout 
         // calculations in dialog shutdown.
-        EnableContentObserver( EFalse );
-
-        if ( effectTriggered )
-                        {
-                MakeVisible(EFalse);
-                CAknTransitionUtils::MakeVisibleSubComponents( this,
-                                        CAknTransitionUtils::EForceInvisible );
-
-                GfxTransEffect::NotifyExternalState(ECaptureComponentsEnd, (const TDesC8*)this);
-                GfxTransEffect::End(this);
+        EnableContentObserver(EFalse);
+        
+        // The dialog is asked to postpone the effect after OkToExitL.
+        if ((iDialogFlags & EEikDialogFlagDelayEffects) && !effectTriggered)
+            {
+            if (GfxTransEffect::IsRegistered(this) && IsVisible() && effectButton
+                && (!aknAppUi->IsFullScreenApp() || aknAppUi->IsForeground())
+                && !IsBlankScreenDisplayed()
+                )
+                {
+                TRect demarcation;
+                CAknTransitionUtils::SetAllParents(this);
+                GfxTransEffect::Begin(this, KGfxControlDisappearAction);
+                GfxTransEffect::NotifyExternalState(ECaptureComponentsBegin, (const TDesC8*)this);
+                CAknTransitionUtils::GetDemarcation(CAknTransitionUtils::EPopup, demarcation);
+                GfxTransEffect::SetDemarcation(this, demarcation);
+                effectTriggered = ETrue;
                 }
-            else
-                {
-                MakeVisible(EFalse);
-                CAknTransitionUtils::MakeVisibleSubComponents( this,
-                                        CAknTransitionUtils::EForceInvisible );
-                GfxTransEffect::NotifyExternalState( ECaptureComponentsAbort,
-                                                 ( const TDesC8* ) this );
-                GfxTransEffect::Abort(this);
+            }
+
+        if (effectTriggered)
+            {
+            MakeVisible(EFalse);
+            CAknTransitionUtils::MakeVisibleSubComponents(this, CAknTransitionUtils::EForceInvisible);
+            GfxTransEffect::NotifyExternalState(ECaptureComponentsEnd, (const TDesC8*)this);
+            GfxTransEffect::End(this);
+            }
+        else
+            {
+            // Why we need abort the effect here ??
+            MakeVisible(EFalse);
+            CAknTransitionUtils::MakeVisibleSubComponents(this, CAknTransitionUtils::EForceInvisible);
+            GfxTransEffect::NotifyExternalState(ECaptureComponentsAbort, (const TDesC8*)this);
+            GfxTransEffect::Abort(this);
             }
         delete(this);
         }
--- a/uifw/EikStd/srvuiinc/eikkeysoundserver.h	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/EikStd/srvuiinc/eikkeysoundserver.h	Tue Apr 27 16:55:05 2010 +0300
@@ -266,7 +266,6 @@
     virtual void MapcPlayComplete(TInt aError);
     virtual void DoPlay();
 private:
-    void LoadAudioDataL(RFs& aFs, const TDesC& aFileName, TDes8& aDes);
     void DoSetVolume(CMdaAudioPlayerUtility* aAudioPlayer);
 
     // From MMdaObjectStateChangeObserver
@@ -274,11 +273,10 @@
         TInt aErrorCode);
 public:
     CMdaAudioPlayerUtility* iAudioPlayer;
-    HBufC8* iAudioData;
 private:
     TBool iPlaying;
     TBool iPrepared;
-    CMdaServer* iMdaServer;
+    TFileName iFileName;
     };
 
 
--- a/uifw/EikStd/srvuisrc/eikkeysoundserver.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/EikStd/srvuisrc/eikkeysoundserver.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -314,6 +314,11 @@
         aPlaySelf = ETrue;
         }
 
+	if(!iATSoundServerAPI)
+        {
+    	aPlaySelf = ETrue;
+    	}
+
     if(!aPlaySelf && iATSoundServerAPI)
         {
         TAudioThemeEvent event = static_cast<TAudioThemeEvent>(aSid);
@@ -425,7 +430,10 @@
     RemoveSids(iClientUid);
     if (iHasLockedContext)
         {
-        iServer->SetContextLocked(EFalse);
+        if( iServer )
+            {
+            iServer->SetContextLocked(EFalse);
+            }
         }
     if (iOwnsDefaultSounds)
         {
@@ -1120,56 +1128,16 @@
 CAknFileSoundInfo::~CAknFileSoundInfo()
     {
     delete iAudioPlayer;
-    delete iAudioData;
     }
 
 void CAknFileSoundInfo::InitL(const TDesC& aFileName, CMdaServer* aMdaServer)
     {
     LOGTEXT(_L("CAknFileSoundInfo::InitL() - Filename:"));
     LOGTEXT(aFileName);
-
-    iMdaServer = aMdaServer;
-
-    delete iAudioData;
-    iAudioData = NULL;
-
-    RFs fsSession;
-    User::LeaveIfError( fsSession.Connect() );
-    CleanupClosePushL(fsSession);
-
-    TEntry entry;
-    User::LeaveIfError(fsSession.Entry(aFileName, entry));
-    TInt fileSize = entry.iSize;
-
-    LOGTEXT1(_L(" CAknFileSoundInfo::InitL() - File size:%d"), fileSize);
-
-    iAudioData = HBufC8::NewMaxL(fileSize);
-
-    TPtr8 dataPtr = iAudioData->Des();
-    LoadAudioDataL(fsSession, aFileName, dataPtr);
-
-    CleanupStack::PopAndDestroy();   // fsSession
-
+    iFileName = aFileName;
     LOGTEXT(_L(" CAknFileSoundInfo::InitL() - Exit"));
     }
 
-
-void CAknFileSoundInfo::LoadAudioDataL(RFs& aFs, const TDesC& aFileName, TDes8& aDes)
-    {
-    RDebug::Print(_L("CAknFileSoundInfo::LoadAudioDataL()."));
-
-    RFile file;
-    User::LeaveIfError( file.Open(aFs, aFileName,EFileRead|EFileShareAny) );
-    CleanupClosePushL(file);
-    TInt error = file.Read(aDes, aDes.Length());
-    file.Close();
-    CleanupStack::Pop();    //file
-    User::LeaveIfError(error);
-
-    LOGTEXT(_L(" CAknFileSoundInfo::LoadAudioDataL() - Exit"));
-    }
-
-
 void CAknFileSoundInfo::PlayL()
     {
     LOGTEXT(_L("CAknFileSoundInfo::PlayL()."));
@@ -1179,9 +1147,7 @@
     Stop();
 
     // Create audio player. DoPlay() will be called in all circumstances.
-    iAudioPlayer = CMdaAudioPlayerUtility::NewDesPlayerReadOnlyL(
-        *iAudioData, *this, iPriority, (TMdaPriorityPreference)iPreference, iMdaServer);
-
+    iAudioPlayer = CMdaAudioPlayerUtility::NewFilePlayerL(iFileName, *this);
     LOGTEXT(_L(" CAknFileSoundInfo::PlayL() - Exit"));
     }
 
--- a/uifw/eikctl/src/EIKCLB.CPP	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/eikctl/src/EIKCLB.CPP	Tue Apr 27 16:55:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 1997-2010 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"
@@ -812,25 +812,27 @@
 EXPORT_C void
 CColumnListBoxView::Draw( const TRect* aRect ) const
     {
-
-    if (RedrawDisabled() || !IsVisible())
+    if ( RedrawDisabled() || !IsVisible() )
         {
         return;
         }
 
-    TInt i=0;
+    TInt i = 0;
 
-    CColumnListBoxItemDrawer* lbi = (CColumnListBoxItemDrawer*)ItemDrawer();
-    CEikListBox* listbox = static_cast<CEikListBox*>( lbi->ColumnData()->Control() );
-    MAknsSkinInstance *skin = AknsUtils::SkinInstance();
-    MAknsControlContext *cc = AknsDrawUtils::ControlContext( listbox );
+    CColumnListBoxItemDrawer* lbi =
+        static_cast<CColumnListBoxItemDrawer*>( ItemDrawer() );
+    CEikListBox* listbox =
+        static_cast<CEikListBox*>( lbi->ColumnData()->Control() );
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    MAknsControlContext* cc = AknsDrawUtils::ControlContext( listbox );
 
     if ( !cc )
         {
         cc = lbi->ColumnData()->SkinBackgroundContext();
         }
 
-    // draw the whole background at once, this is faster than drawing it in separate items
+    // Draw the whole background at once, this is faster than drawing
+    // it in separate items.
     if ( listbox && listbox->BackgroundDrawingSuppressed() )
         {
 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
@@ -856,9 +858,10 @@
         }
 
     TInt firstPotentialItemIndex = iTopItemIndex;
-    TInt lastPotentialItemIndex = iTopItemIndex + NumberOfItemsThatFitInRect(iViewRect);
+    TInt lastPotentialItemIndex =
+        iTopItemIndex + NumberOfItemsThatFitInRect( iViewRect ) - 1;
 
-    if (iModel->NumberOfItems() == 0)
+    if ( iModel->NumberOfItems() == 0 )
         {
         // Empty
         }
@@ -866,15 +869,15 @@
         {
         if ( lastPotentialItemIndex > iBottomItemIndex )
             {
-            // Fix for EAAA-797CKC
             lastPotentialItemIndex = iBottomItemIndex;
             }
+
         ITEM_EXISTS_BEGIN;
-        for (i = firstPotentialItemIndex; i <= lastPotentialItemIndex; i++)
+        for ( i = firstPotentialItemIndex; i <= lastPotentialItemIndex; i++ )
             {
-            if (ITEM_EXISTS(i))
+            if ( ITEM_EXISTS( i ) )
                 {
-                DrawItem(i);
+                DrawItem( i );
                 }
             else
                 {
@@ -885,7 +888,8 @@
 
     if ( listbox && !listbox->BackgroundDrawingSuppressed() )
         {
-        // clear the unused portion of the viewing area (this handles drawing the vertical line too :)
+        // Clear the unused portion of the viewing area
+        // (this handles drawing the vertical line too :)
 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
         MAknListBoxTfxInternal* transApi = CAknListLoader::TfxApiInternal( iGc );
 
@@ -895,32 +899,16 @@
             }
 #endif // RD_UI_TRANSITION_EFFECTS_LIST
 
-        TRect usedPortionOfViewRect( iViewRect.iTl + TSize( 0, iVerticalOffset ), TSize( iViewRect.Width(), ( i - iTopItemIndex ) * iItemHeight ) );
+        TRect usedPortionOfViewRect(
+            iViewRect.iTl + TSize( 0, iVerticalOffset ),
+            TSize( iViewRect.Width(), ( i - iTopItemIndex ) * iItemHeight ) );
 
-        // also clear area behind scroll bar.
-        // this is a terrible hack, which is unfortunately needed since layouts
-        // leave 2 pixel (in double res) wide margins to both sides of the
-        // scroll bar, and there is no other way to do this. This hack is
-        // only really valid for main pane lists, but it does not seem to
-        // break popup lists, popup field lists or setting page radiobutton
-        // lists.
-        TRect sbbg( iViewRect );   // whole area behind scroll bar
-        TRect margin( iViewRect ); // it gets even worse in mirrored layouts
+        // Also draw the area behind scroll bar.
+        TRect sbbg( iViewRect ); // whole area behind scroll bar
 
         if ( AknLayoutUtils::LayoutMirrored() )
             {
             sbbg.iBr.iX = iViewRect.iBr.iX - lbi->LafItemSize().iWidth;
-
-            // in mirrored layouts we also need to draw a margin slice in right
-            TRect mainPane;
-            AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane,
-                                               mainPane );
-            TAknLayoutRect listscrollAppPane;
-            listscrollAppPane.LayoutRect( mainPane,
-                                          AknLayoutScalable_Avkon::listscroll_app_pane( 0 ) );
-
-            TInt rMargin = mainPane.iBr.iX - listscrollAppPane.Rect().iBr.iX;
-            margin.iTl.iX = margin.iBr.iX - rMargin;
             }
         else
             {
@@ -937,22 +925,19 @@
                                                    iViewRect,
                                                    usedPortionOfViewRect );
 
-            AknsDrawUtils::Background( skin, cc, listbox, *iGc, sbbg );
-
-            if ( AknLayoutUtils::LayoutMirrored() )
+            if ( !sbbg.IsEmpty() )
                 {
-                AknsDrawUtils::Background( skin, cc, listbox, *iGc, margin );
+                AknsDrawUtils::Background( skin, cc, listbox, *iGc, sbbg );
                 }
             }
         else
             {
             iGc->SetBrushColor( BackColor() );
             DrawUtils::ClearBetweenRects( *iGc, iViewRect, usedPortionOfViewRect );
-            iGc->Clear( sbbg );
-
-            if ( AknLayoutUtils::LayoutMirrored() )
+            
+            if ( !sbbg.IsEmpty() )
                 {
-                iGc->Clear( margin );
+                iGc->Clear( sbbg );
                 }
             }
 
--- a/uifw/eikctl/src/EIKMFNE.CPP	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/eikctl/src/EIKMFNE.CPP	Tue Apr 27 16:55:05 2010 +0300
@@ -1611,7 +1611,7 @@
     if ( !ConsumesUpAndDownKeys() && (code==EKeyDownArrow || code==EKeyUpArrow))
         return EKeyWasNotConsumed;
 
-    if ((aType==EEventKey) && (iCurrentField!=ENullIndex) && 
+    if ((aType==EEventKey) && (iCurrentField!=ENullIndex) && iExtension &&
         ( aKeyEvent.iRepeats == 0 || code == EKeyLeftArrow || 
             code == EKeyRightArrow || code == EKeyDownArrow || code == EKeyUpArrow ) )
         {
@@ -1741,7 +1741,7 @@
     {
     const CFont& font=*Font();
     TBool drawAllFields = ETrue;
-    if (aHandleDeHighlight)
+    if ( aHandleDeHighlight && iExtension )
         {
         iFields[iCurrentField]->HandleDeHighlight(font, *iEikonEnv, aDataAltered, aError);
         iExtension->iValidateValueCallBack.CallBack();
@@ -1843,7 +1843,7 @@
             return;
             }
         }
-    if ( aAlignment >= ELayoutAlignNone && iExtension )
+    if ( aAlignment >= ELayoutAlignNone )
         {
         iAlignment = aAlignment;
         TUint capabilities = iExtension->
@@ -2439,7 +2439,7 @@
             {
             if (i>=aFirstField)
                 {
-                if (focused && ( iExtension->iHighlightAll || ( i == iCurrentField 
+                if (focused && iExtension && ( iExtension->iHighlightAll || ( i == iCurrentField 
                     && iFields[i]->HighlightType() == CEikMfneField::EInverseVideo
                     && iFields[i]->FieldText().Length() > 0 ) ) && !isEmpty )
                     {
@@ -2696,12 +2696,15 @@
     GetCursorInfo( cursorPosition, cursorHeight, cursorWidth, cursorAscent );
 
     iEikonEnv->DrawCursor(this, cursorPosition, cursorWidth, cursorAscent, cursorHeight);
-    iExtension->iCursorShown = ETrue;
+    if ( iExtension )
+    	{
+        iExtension->iCursorShown = ETrue;
+    	}
     }
 
 void CEikMfne::HideCursor()
     {
-    if ( iExtension->iCursorShown )
+    if ( iExtension && iExtension->iCursorShown )
         {
         iEikonEnv->HideCursor(this);
         iExtension->iCursorShown = EFalse;
@@ -4577,7 +4580,7 @@
 EXPORT_C void CEikMfne::MakeVisible( TBool aVisible )
     {
     CEikBorderedControl::MakeVisible( aVisible );
-    if ( !aVisible && iExtension->iCursorShown )
+    if ( !aVisible && iExtension && iExtension->iCursorShown )
         {
         HideCursor();
         }
--- a/uifw/eikctl/src/EIKSECED.CPP	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/eikctl/src/EIKSECED.CPP	Tue Apr 27 16:55:05 2010 +0300
@@ -230,6 +230,7 @@
     TBool iWindowSet;
     TBool iLaunchPenInputAutomatic;
     TBool iPartialScreenInput;
+    TBool iLockQuerySCT;
     };
 
 EXPORT_C void CEikSecretEditor::AknSetFont(const CFont &aFont)
@@ -582,16 +583,18 @@
     gc.UseFont(iFont);
 
     TSize size=iBorder.SizeDelta();
-
-    if ( iRevealSecretText )
-        {
-        gc.DrawText( iSecCharArr->Des(), iExtension->iTextRect, 
-            iAscent, iAlign, 0 );
-        }
-    else
-        {
-        gc.DrawText(iBuf, iExtension->iTextRect, iAscent, iAlign, 0);
-        }
+    if ( iExtension )
+    	{
+		if ( iRevealSecretText )
+			{
+			gc.DrawText( iSecCharArr->Des(), iExtension->iTextRect, 
+				iAscent, iAlign, 0 );
+			}
+		else
+			{
+			gc.DrawText(iBuf, iExtension->iTextRect, iAscent, iAlign, 0);
+			}
+    	}
         
     gc.DiscardFont();    
     }
@@ -623,11 +626,14 @@
 
 void CEikSecretEditor::ReportUpdate()
     {
-    TRAP_IGNORE (
-        iExtension->iExtendedInputCapabilities->ReportEventL(
-        CAknExtendedInputCapabilities::MAknEventObserver::EControlContentUpdatedInternally,
-        NULL );
-        )
+	if ( iExtension )
+		{
+        TRAP_IGNORE (
+            iExtension->iExtendedInputCapabilities->ReportEventL(
+            CAknExtendedInputCapabilities::MAknEventObserver::EControlContentUpdatedInternally,
+            NULL );
+            )
+		}
     }
 
 EXPORT_C void CEikSecretEditor::AppendCharacterL( TInt aKeyCode )
@@ -728,7 +734,7 @@
     TBool oldShown = iRevealSecretText;
     iRevealSecretText = aReveal;
 
-    if ( !COMPARE_BOOLS( oldShown, iRevealSecretText ) )
+    if ( !COMPARE_BOOLS( oldShown, iRevealSecretText ) && iExtension )
         {
         TInt caps = iExtension->iExtendedInputCapabilities->Capabilities();
         if ( iRevealSecretText )
@@ -784,12 +790,11 @@
     
 EXPORT_C void CEikSecretEditor::HandlePointerEventL(const TPointerEvent& aPointerEvent) 
     { 
-    if ( iFepState )
+    if ( iFepState && iExtension )
         {
         if ( aPointerEvent.iType == TPointerEvent::EButton1Down )
             {
-            if ( iExtension 
-              && iExtension->iFeedback )
+            if ( iExtension->iFeedback )
                 {
                 // tactile feedback is always given on down event
                 iExtension->iFeedback->InstantFeedback( this, ETouchFeedbackEdit );
@@ -809,9 +814,9 @@
                 }
             }
         else if ( aPointerEvent.iType == TPointerEvent::EButton1Up && 
-            iExtension && !iExtension->iDisablePenInput)
+                  !iExtension->iDisablePenInput )
             {
-            if (iExtension && iExtension->iFeedback)
+            if ( iExtension->iFeedback )
                 {
                 // Edit feedback is given if PenInput will open on up event
                 iExtension->iFeedback->InstantFeedback( this,
@@ -1049,7 +1054,26 @@
                     ret = KErrGeneral;
                     }
                 break;
-
+            case ELockQuerySCT:
+                {
+                if ( iExtension )
+                    {
+                    iExtension->iLockQuerySCT = aFeatureParam;
+                    CAknEdwinState* edwinState = STATIC_CAST( CAknEdwinState*,State(KNullUid) );
+                    if ( iExtension->iLockQuerySCT && edwinState )
+                        {
+                        edwinState->SetSpecialCharacterTableResourceId(
+                                R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG_FOR_LOCKCODE_SYMBOL_INPUT );
+                        TRAP_IGNORE( edwinState->ReportAknEdStateEventL( 
+                            MAknEdStateObserver::EAknEdwinStateEventStateUpdate ) );
+                        }
+                    }
+                else
+                    {
+                    ret = KErrGeneral;
+                    }
+                }
+                break;
             default:
                 ret = KErrNotSupported;
                 break;
@@ -1101,7 +1125,18 @@
                     ret = KErrGeneral;
                     }
                 break;
-
+            case ELockQuerySCT:
+                {
+                if ( iExtension )
+                    {
+                    aFeatureParam = iExtension->iLockQuerySCT;
+                    }
+                else
+                    {
+                    ret = KErrGeneral;
+                    }
+                }
+                break;
             default:
                 ret = KErrNotSupported;
                 break;
@@ -1119,7 +1154,8 @@
         {
         EDisablePenInput,
         ELaunchPenInputAutomatic,
-        EPartialScreenInput
+        EPartialScreenInput,
+        ELockQuerySCT       
         };
         
     TBool ret = EFalse;
@@ -1137,28 +1173,31 @@
     }
 
 void CEikSecretEditor::SetCursorFormat()
-    {    
-    iExtension->iCursor.iType = TTextCursor::ETypeRectangle;        
-    iExtension->iCursor.iFlags = 0;    
-    iExtension->iCursor.iHeight = AknLayoutUtils::CursorHeightFromFont( 
-        iFont->FontSpecInTwips() );
-    iExtension->iCursor.iAscent = AknLayoutUtils::CursorAscentFromFont( 
-        iFont->FontSpecInTwips() );
-    iExtension->iCursor.iWidth  = AknLayoutUtils::CursorWidthFromFont ( 
-        iFont->FontSpecInTwips() );
-    iExtension->iCursor.iColor = KRgbWhite;
-    if ( !iExtension->iWindowSet )
-        {
-#ifdef RD_UI_TRANSITION_EFFECTS_PHASE2
-        CRedirectionListener* listener = ( CRedirectionListener* )
-        CAknTransitionUtils::GetData( (TInt) this );
-        listener->SetWindows( &( iCoeEnv->RootWin() ), DrawableWindow() );
-#else           
-        iExtension->iWg = &( iCoeEnv->RootWin() );
-        iExtension->iWindow = DrawableWindow();
-#endif
-        iExtension->iWindowSet = ETrue;
-        }
+    { 
+	if ( iExtension )
+		{
+		iExtension->iCursor.iType = TTextCursor::ETypeRectangle;        
+		iExtension->iCursor.iFlags = 0;    
+		iExtension->iCursor.iHeight = AknLayoutUtils::CursorHeightFromFont( 
+			iFont->FontSpecInTwips() );
+		iExtension->iCursor.iAscent = AknLayoutUtils::CursorAscentFromFont( 
+			iFont->FontSpecInTwips() );
+		iExtension->iCursor.iWidth  = AknLayoutUtils::CursorWidthFromFont ( 
+			iFont->FontSpecInTwips() );
+		iExtension->iCursor.iColor = KRgbWhite;
+		if ( !iExtension->iWindowSet )
+			{
+	#ifdef RD_UI_TRANSITION_EFFECTS_PHASE2
+			CRedirectionListener* listener = ( CRedirectionListener* )
+			CAknTransitionUtils::GetData( (TInt) this );
+			listener->SetWindows( &( iCoeEnv->RootWin() ), DrawableWindow() );
+	#else           
+			iExtension->iWg = &( iCoeEnv->RootWin() );
+			iExtension->iWindow = DrawableWindow();
+	#endif
+			iExtension->iWindowSet = ETrue;
+			}
+		}
     }
 
 TPoint CEikSecretEditor::CursorPos()
@@ -1170,18 +1209,21 @@
         iFont->TextWidthInPixels( *iSecCharArr ) : 
         iFont->CharWidthInPixels( KSecretChar ) * pos );
     TInt x;
-    if ( iAlign == CGraphicsContext::ELeft )
-    	{
-        x = iExtension->iTextRect.iTl.iX + textWidth;
-    	}
-    else if (iAlign == CGraphicsContext::ECenter)
+    if ( iExtension )
     	{
-        x = iExtension->iTextRect.iTl.iX +
-            (iExtension->iTextRect.Width() + textWidth) / 2;
-    	}
-    else
-    	{
-    	x = iExtension->iTextRect.iBr.iX;
+		if ( iAlign == CGraphicsContext::ELeft )
+			{
+			x = iExtension->iTextRect.iTl.iX + textWidth;
+			}
+		else if (iAlign == CGraphicsContext::ECenter )
+			{
+			x = iExtension->iTextRect.iTl.iX +
+				(iExtension->iTextRect.Width() + textWidth) / 2;
+			}
+		else
+			{
+			x = iExtension->iTextRect.iBr.iX;
+			}
     	}
     TInt y( Rect().iTl.iY + iAscent );    
     return TPoint( x, y );
@@ -1248,21 +1290,24 @@
 
 void CEikSecretEditor::UpdateCursor()
     {
-#ifdef RD_UI_TRANSITION_EFFECTS_PHASE2
-    CRedirectionListener* listener = ( CRedirectionListener* )
-        CAknTransitionUtils::GetData( (TInt) this );
-    listener->UpdateCursor( iExtension->iCursor );
-#else
-    if ( iExtension->iCursorEnabled )
-        {                
-        if ( iExtension->iWindow )
-            {            
-            iExtension->iWg->SetTextCursor( *iExtension->iWindow, CursorPos(), 
-                iExtension->iCursor );            
+    if ( iExtension )
+        {
+    #ifdef RD_UI_TRANSITION_EFFECTS_PHASE2
+        CRedirectionListener* listener = ( CRedirectionListener* )
+            CAknTransitionUtils::GetData( (TInt) this );
+        listener->UpdateCursor( iExtension->iCursor );
+    #else
+        if ( iExtension->iCursorEnabled )
+            {                
+            if ( iExtension->iWindow )
+                {            
+                iExtension->iWg->SetTextCursor( *iExtension->iWindow, CursorPos(), 
+                    iExtension->iCursor );            
+                }
+            iExtension->iCursorEnabled = ETrue;
             }
-        iExtension->iCursorEnabled = ETrue;
+    #endif   
         }
-#endif       
     }
 
 EXPORT_C void CEikSecretEditor::FocusChanged( TDrawNow /*aDrawNow*/ )
--- a/uifw/ganes/BWINS/ganesu.def	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/ganes/BWINS/ganesu.def	Tue Apr 27 16:55:05 2010 +0300
@@ -114,4 +114,6 @@
 	?SetItemToOpenedState@CHgVgMediaWall@@QAEXH@Z @ 113 NONAME ; void CHgVgMediaWall::SetItemToOpenedState(int)
 	?SetOpenedItemRect@CHgVgMediaWall@@QAEXABVTRect@@@Z @ 114 NONAME ; void CHgVgMediaWall::SetOpenedItemRect(class TRect const &)
 	?SetMenuProviderL@CHgScroller@@QAEXPAVMObjectProvider@@@Z @ 115 NONAME ; void CHgScroller::SetMenuProviderL(class MObjectProvider *)
+	?SetToolbarVisibility@CHgGrid@@QAEXH@Z @ 116 NONAME ; void CHgGrid::SetToolbarVisibility(int)
+	?SetFirstIndexOnScreen@CHgScroller@@QAEXH@Z @ 117 NONAME ; void CHgScroller::SetFirstIndexOnScreen(int)
 
--- a/uifw/ganes/EABI/ganesu.def	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/ganes/EABI/ganesu.def	Tue Apr 27 16:55:05 2010 +0300
@@ -169,4 +169,6 @@
 	_ZN14CHgVgMediaWall17SetOpenedItemRectERK5TRect @ 168 NONAME
 	_ZN14CHgVgMediaWall20SetItemToOpenedStateEi @ 169 NONAME
 	_ZN11CHgScroller16SetMenuProviderLEP15MObjectProvider @ 170 NONAME
+	_ZN11CHgScroller21SetFirstIndexOnScreenEi @ 171 NONAME
+	_ZN7CHgGrid20SetToolbarVisibilityEi @ 172 NONAME
 
--- a/uifw/ganes/src/HgGrid.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/ganes/src/HgGrid.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -91,7 +91,8 @@
 CHgGrid::CHgGrid( 
         TInt aItemCount, 
         CGulIcon* aDefaultIcon )
-: CHgScroller( aItemCount, aDefaultIcon )
+: CHgScroller( aItemCount, aDefaultIcon ),
+  iToolbarVisible( ETrue )
     {
     // No implementation required
     }
@@ -351,34 +352,43 @@
     {
     // Count number of visible rows
     // First is checked if 3x4 or 4x3 items fits to the grid.
-    TInt variety = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0;
+
+    TInt mainVariety = iToolbarVisible ? 0 : 1;
+    TInt gridVariety = iToolbarVisible ? 0 : 2;
+    TInt cellVariety = iToolbarVisible ? 0 : 4;
 
-    TAknLayoutScalableParameterLimits limits = cell_gallery2_pane_ParamLimits(variety);
+    if( Layout_Meta_Data::IsLandscapeOrientation() )
+        {
+        ++gridVariety;
+        ++cellVariety;
+        }
+    
+    TAknLayoutScalableParameterLimits limits = cell_gallery2_pane_ParamLimits(cellVariety);
     iCols = limits.LastColumn() + 1;
     iRows = limits.LastRow() + 1;
     
     iLayoutData->ChangeCols( iCols );
     
-    iLayoutData->SetBaseLayout(main_gallery2_pane(0));
-    iLayoutData->SetItemLayout(grid_gallery2_pane(variety));
-    iLayoutData->SetIconLayout(cell_gallery2_pane_g2(variety));        
+    iLayoutData->SetBaseLayout(main_gallery2_pane(mainVariety));
+    iLayoutData->SetItemLayout(grid_gallery2_pane(gridVariety));
+    iLayoutData->SetIconLayout(cell_gallery2_pane_g2(cellVariety));        
     
     if( iLandscapeScrolling )
         {
         for(TInt i = 0; i < iRows; ++i)
             {
-            iLayoutData->SetColumnLayout(i, cell_gallery2_pane(variety, 0, i));            
+            iLayoutData->SetColumnLayout(i, cell_gallery2_pane(cellVariety, 0, i));            
             }
         }
     else
         {
         for(TInt i = 0; i < iCols; ++i)
             {
-            iLayoutData->SetColumnLayout(i, cell_gallery2_pane(variety, i, 0));            
+            iLayoutData->SetColumnLayout(i, cell_gallery2_pane(cellVariety, i, 0));            
             }
         }
-    iLayoutData->SetFirstIndicatorLayout(cell_gallery2_pane_g5(variety));
-    iLayoutData->SetSecondIndicatorLayout(cell_gallery2_pane_g4(variety));
+    iLayoutData->SetFirstIndicatorLayout(cell_gallery2_pane_g5(cellVariety));
+    iLayoutData->SetSecondIndicatorLayout(cell_gallery2_pane_g4(cellVariety));
     
     TAknLayoutRect gridAppPane;
     TAknLayoutRect gridItem;
@@ -808,4 +818,14 @@
     
     }
 
+// -----------------------------------------------------------------------------
+// CHgGrid::SetToolbarVisibility()
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CHgGrid::SetToolbarVisibility( TBool aToolbarVisible )
+    {
+    iToolbarVisible = aToolbarVisible;
+    HandleSizeChanged();
+    }
+
 // End of File
--- a/uifw/ganes/src/HgScroller.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/ganes/src/HgScroller.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -173,7 +173,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// CHgScroller::RefreshScreen()
+// CHgScroller::FirstIndexOnScreen()
 // -----------------------------------------------------------------------------
 //
 EXPORT_C TInt CHgScroller::FirstIndexOnScreen()
@@ -182,7 +182,16 @@
     }
 
 // -----------------------------------------------------------------------------
-// CHgScroller::RefreshScreen()
+// CHgScroller::SetFirstIndexOnScreen()
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CHgScroller::SetFirstIndexOnScreen( TInt aFirstIndexOnScreen )
+    {
+    FitTopItemToView( aFirstIndexOnScreen );
+    }
+
+// -----------------------------------------------------------------------------
+// CHgScroller::ItemsOnScreen()
 // -----------------------------------------------------------------------------
 //
 EXPORT_C TInt CHgScroller::ItemsOnScreen()
@@ -191,7 +200,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// CHgScroller::RefreshScreen()
+// CHgScroller::SelectedIndex()
 // -----------------------------------------------------------------------------
 //
 EXPORT_C TInt CHgScroller::SelectedIndex()
@@ -200,7 +209,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// CHgScroller::RefreshScreen()
+// CHgScroller::SetSelectedIndex()
 // -----------------------------------------------------------------------------
 //
 EXPORT_C void CHgScroller::SetSelectedIndex( TInt aIndex )
@@ -292,6 +301,7 @@
 //
 EXPORT_C void CHgScroller::GetMarkedItemsL( RArray<TInt>& aIndexes )
     {
+    ::CleanupClosePushL(aIndexes);
     for(TInt i = 0; i < iItems.Count(); ++i)
         {
         if(iItems[i]->Flags() & CHgItem::EHgItemFlagMarked )
@@ -299,6 +309,7 @@
             aIndexes.AppendL( i );
             }
         }
+    CleanupStack::Pop(&aIndexes);
     }
 
 // -----------------------------------------------------------------------------
@@ -610,6 +621,21 @@
     if( iScrollbar )
         {
         sbHandles = iScrollbar->HandlePointerEventL( aEvent );
+        
+        if(  sbHandles 
+                && iPhysics 
+                && iPhysics->OngoingPhysicsAction() == CAknPhysics::EAknPhysicsActionFlicking )
+            {
+            iPhysics->StopPhysics();
+            iScrollbar->Reset();
+            MTouchFeedback* feedback = MTouchFeedback::Instance();
+            if ( feedback )
+                {
+                feedback->InstantFeedback( this, ETouchFeedbackList, aEvent );
+                }
+            return sbHandles;
+            }
+        
         if ( sbHandles && !iScrollbar->IsStatic() )
             {
             MTouchFeedback* feedback = MTouchFeedback::Instance();
@@ -634,7 +660,7 @@
                     feedback->StartFeedback( this, 
                                              ETouchContinuousSlider, 
                                              &aEvent, 
-                                             KIntensity, // intensity 50%
+                                             KIntensity, // intensity
                                              timeout );
                     }
                 }
@@ -745,8 +771,6 @@
 //
 void CHgScroller::HandleUpEventL( const TPointerEvent& aEvent )
     {
-    MTouchFeedback* feedback = MTouchFeedback::Instance();
-    TTouchFeedbackType type = ETouchFeedbackVibra;
     if( iPanning )
         {
         // enable physics
@@ -754,17 +778,14 @@
         if(iLandscapeScrolling && AknLayoutUtils::LayoutMirrored())
             drag = -drag;
         iPhysics->StartPhysics(drag, iStartTime);
-        if ( feedback && iPhysics->OngoingPhysicsAction() == CAknPhysics::EAknPhysicsActionFlicking )
-            {
-            feedback->InstantFeedback( this, ETouchFeedbackFlick, type, aEvent );
-            }
         }
     else
         {
         HandleSelectionL();
+        MTouchFeedback* feedback = MTouchFeedback::Instance();
         if ( feedback && iSelectedIndex != KErrNotFound )
             {
-            feedback->InstantFeedback( this, ETouchFeedbackList, type, aEvent );
+            feedback->InstantFeedback( this, ETouchFeedbackList, ETouchFeedbackVibra, aEvent );
             }
         }
     }
@@ -1016,6 +1037,9 @@
 //
 void CHgScroller::ScrollBarPositionChanged( const TPoint& aNewPosition )
     {
+    if( iPhysics->OngoingPhysicsAction() == CAknPhysics::EAknPhysicsActionFlicking )
+        return;
+    
     iViewPosition = aNewPosition;
     iPhysics->StopPhysics();
     
@@ -1088,8 +1112,8 @@
         iCurrentRow = newRow;
         
         TBool needsFeedback = 
-                ( iCurrentRow >= 0 && iCurrentRow <= iItems.Count() )
-                || ( iItems.Count() - iCurrentRow > ItemsOnScreen() );
+                ( CurrentIndex() > 0 && CurrentIndex() <= iItems.Count() )
+                || ( iItems.Count() - CurrentIndex() > ItemsOnScreen() );
         
         TInt action = iPhysics->OngoingPhysicsAction();
         if( action !=  CAknPhysics::EAknPhysicsActionNone && needsFeedback )
--- a/uifw/ganes/src/HgVgMediaWall.cpp	Wed Apr 14 16:14:00 2010 +0300
+++ b/uifw/ganes/src/HgVgMediaWall.cpp	Tue Apr 27 16:55:05 2010 +0300
@@ -66,8 +66,10 @@
 using namespace AknTouchGestureFw;
 using namespace HgVgConstants;
 
-#ifdef SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION
-    #define MEDIAWALL_ORIENTATION_FIX
+#ifndef __WINSCW__
+    #ifdef SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION
+        #define MEDIAWALL_ORIENTATION_FIX
+    #endif
 #endif
 
 // ============================ MEMBER FUNCTIONS ===============================
@@ -433,6 +435,8 @@
     {
     iRect = Rect();
     
+    SetConstantsForStyle();
+    
     if(iDelayedInit && !iDelayedInit->IsActive())
         iDelayedInit->Start(0, 1000000, TCallBack(DelayedInit, this));
 
@@ -1229,7 +1233,9 @@
     
     // reload images to ive
     ReloadItemsImages();
-        
+
+    ClearFlags(EHgVgMediaWallUninitialized);
+
     // draw using openvg
     DrawNow();
     
@@ -1246,6 +1252,10 @@
     // make sure we are not animating
     HandleTransitionAnimationStop();
     
+    // cancel the initialization
+    if(iDelayedInit)
+        iDelayedInit->Cancel();
+    
     if (iAnimationTimer->IsActive())
         {
         if (iAnimationState == EHgVgMediaWallAnimationStateOpening)
@@ -1590,6 +1600,10 @@
     
     iScrollBar->SetViewPosition( TPoint(iSelectedIndex, 0) );
     
+#ifdef MEDIAWALL_ORIENTATION_FIX
+    iScrollBar->EnableLandscapeRendering( iMediaWallStyle == CHgVgMediaWall::EHgVgMediaWallStyleCoverflowFullScreen );
+#endif
+    
     }
 
 // ---------------------------------------------------------------------------
@@ -1646,7 +1660,26 @@
             User::Leave(KErrNotSupported);
             } break;
         }
-        
+    
+    if( iOpenedItemRect != TRect() )
+        {
+        iRenderer->SetFlippedRect( iOpenedItemRect );
+        }
+    else
+        {
+        // set some default flipped rect for opening animation
+        if(iMediaWallStyle == EHgVgMediaWallStyleGrid)
+            {
+            iRenderer->SetFlippedRect(iRect);
+            }
+        else
+            {
+            iRenderer->SetFlippedRect(TRect(TPoint(iRect.Center().iX - iRect.Height() / 2,
+                    iRect.Center().iY - iRect.Height() / 2),
+                    TSize(iRect.Height(), iRect.Height())));
+            }
+        }
+
     // load default icon
     InitDefaultIconL();
 
@@ -2317,9 +2350,10 @@
 //
 EXPORT_C void CHgVgMediaWall::SetOpenedItemRect(const TRect& aRect)
     {
+    iOpenedItemRect = aRect;
     if (iRenderer)
         {
-        iRenderer->SetFlippedRect(aRect);
+        iRenderer->SetFlippedRect(iOpenedItemRect);
         }
     }
 
@@ -2381,15 +2415,6 @@
 //
 void CHgVgMediaWall::InitMediaWallFullScreenLandscapeL()
     {
-                
-    // set some factors to mediawall fullscreen mode specific values
-    iCameraZoomFactor = KMediaWallFullScreenCameraZoomFactor;
-    iCameraRotationFactor = KMediaWallFullScreenCameraRotationFactor;            
-    iItemsOnScreen = KMediaWallFullScreenItemsOnScreen;
-    iSpringVelocityToAnimationFactor = KMediaWallFullScreenSpringVelocityToAnimationFactor;
-    iItemsToMoveOnFullScreenDrag = KMediaWallFullScreenItemsToMoveOnFullScreenDrag;
-    iRowCount = KMediaWallFullScreenRowCount;
-    
     // get front rectange from layout
     TAknLayoutRect frontRect;
     frontRect.LayoutRect( iRect, AknLayoutScalable_Apps::cf0_flow_pane_g1(0) );
@@ -2398,11 +2423,6 @@
     iRenderer = CHgVgMediaWallRenderer::NewL(KMaxCoversVisible, iRect, frontRect.Rect(), 
             KMediaWallFullScreenZOffset);
 
-    // set some default flipped rect for opening animation
-    iRenderer->SetFlippedRect(TRect(TPoint(iRect.Center().iX - iRect.Height() / 2,
-            iRect.Center().iY - iRect.Height() / 2),
-            TSize(iRect.Height(), iRect.Height())));
-
     // in full screen, enable blurring on flip/zoom
     iRenderer->EnableBlurOnFlip(ETrue, KDefaultBlurDeviation, 
             KDefaultBlurDeviation);
@@ -2415,12 +2435,6 @@
     
     InitScrollBarL(EFalse);
 
-    iSpring->SetConstants(
-            KMediaWallFullScreenSpringK, 
-            KMediaWallFullScreenSpringDamping, 
-            KMediaWallFullScreenSpringMaxVelocity, 
-            KPositionSnap, KMinSpringVelocity);    
-
 #ifdef MEDIAWALL_ORIENTATION_FIX    
     iRenderer->EnableLandscapeMode(ETrue);
     iAlbumLabel->EnableLandscapeRendering(ETrue);
@@ -2440,15 +2454,6 @@
 //
 void CHgVgMediaWall::InitMediaWallTBonePortraitL()
     {
-    
-    // set some factors to mediawall fullscreen mode specific values
-    iCameraZoomFactor = KMediaWallTBoneCameraZoomFactor;
-    iCameraRotationFactor = KMediaWallTBoneCameraRotationFactor;            
-    iItemsOnScreen = KMediaWallTBoneItemsOnScreen;
-    iSpringVelocityToAnimationFactor = KMediaWallTBoneSpringVelocityToAnimationFactor;
-    iItemsToMoveOnFullScreenDrag = KMediaWallTBoneItemsToMoveOnFullScreenDrag;
-    iRowCount = KMediaWallTBoneRowCount;
-    
     // get front rectange from layout
     TAknLayoutRect frontRect;
     frontRect.LayoutRect( iRect, AknLayoutScalable_Apps::cf0_flow_pane_g1(0) );
@@ -2456,20 +2461,10 @@
     iRenderer = CHgVgMediaWallRenderer::NewL(KMaxCoversVisible, iRect, frontRect.Rect(), 
             KMediaWallTBoneZOffset);
                 
-    iRenderer->SetFlippedRect(TRect(TPoint(iRect.Center().iX - iRect.Height() / 2,
-            iRect.Center().iY - iRect.Height() / 2),
-            TSize(iRect.Height(), iRect.Height())));
-    
     InitLabelsL(0);
     
     InitPopupL(0);
     
-    iSpring->SetConstants(
-            KMediaWallTBoneSpringK, 
-            KMediaWallTBoneSpringDamping, 
-            KMediaWallTBoneSpringMaxVelocity, 
-            KPositionSnap, KMinSpringVelocity);
-        
     }
 
 void CHgVgMediaWall::InitMediaWallGridLandscapeL()
@@ -2482,19 +2477,9 @@
     frontRect = TRect(TPoint(iRect.Center().iX - size.iWidth/2, iRect.Center().iY - 45 + 90), 
             size);
                 
-    iCameraZoomFactor = KMediaWallGridCameraZoomFactor;
-    iCameraRotationFactor = KMediaWallGridCameraRotationFactor;            
-    iItemsOnScreen = KMediaWallGridItemsOnScreen;
-    iSpringVelocityToAnimationFactor = KMediaWallGridSpringVelocityToAnimationFactor;
-    iItemsToMoveOnFullScreenDrag = KMediaWallGridItemsToMoveOnFullScreenDrag;
-    iRowCount = KMediaWallGridRowCount;
-    iOpeningAnimationType = EHgVgOpeningAnimationZoomIn;
-    
     iRenderer = CHgVgMediaWallRenderer::NewL((KMaxCoversVisible+1) * KMediaWallGridRowCount, 
             iRect, frontRect, KMediaWallGridZOffset);
     
-    iRenderer->SetFlippedRect(iRect);
-                                        
     InitButtonsL();
     
     InitScrollBarL(EFalse);
@@ -2507,12 +2492,6 @@
             iRect.Center().iY - lsize.iHeight / 2), lsize), 
             &ScreenFont( TCoeFont( KMediaWallGridPopupFontSize, TCoeFont::EPlain )));
     
-    iSpring->SetConstants(
-            KMediaWallGridSpringK, 
-            KMediaWallGridSpringDamping, 
-            KMediaWallGridSpringMaxVelocity, 
-            KPositionSnap, 
-            KMinSpringVelocity);
     }
 
 
@@ -2570,6 +2549,74 @@
     return KErrNone;
     }
 
+// -----------------------------------------------------------------------------
+// CHgVgMediaWall::SetConstantsForStyle()
+// -----------------------------------------------------------------------------
+//
+void CHgVgMediaWall::SetConstantsForStyle()
+    {
+    switch (iMediaWallStyle)
+        {
+        case EHgVgMediaWallStyleCoverflowFullScreen:
+            {
+            // set some factors to mediawall fullscreen mode specific values
+            iCameraZoomFactor = KMediaWallFullScreenCameraZoomFactor;
+            iCameraRotationFactor = KMediaWallFullScreenCameraRotationFactor;            
+            iItemsOnScreen = KMediaWallFullScreenItemsOnScreen;
+            iSpringVelocityToAnimationFactor = KMediaWallFullScreenSpringVelocityToAnimationFactor;
+            iItemsToMoveOnFullScreenDrag = KMediaWallFullScreenItemsToMoveOnFullScreenDrag;
+            iRowCount = KMediaWallFullScreenRowCount;
+
+            iSpring->SetConstants(
+                    KMediaWallFullScreenSpringK, 
+                    KMediaWallFullScreenSpringDamping, 
+                    KMediaWallFullScreenSpringMaxVelocity, 
+                    KPositionSnap, KMinSpringVelocity);    
+
+            } break;
+        
+        case EHgVgMediaWallStyleCoverflowTBonePortrait:
+            {
+            // set some factors to mediawall tbone mode specific values
+            iCameraZoomFactor = KMediaWallTBoneCameraZoomFactor;
+            iCameraRotationFactor = KMediaWallTBoneCameraRotationFactor;            
+            iItemsOnScreen = KMediaWallTBoneItemsOnScreen;
+            iSpringVelocityToAnimationFactor = KMediaWallTBoneSpringVelocityToAnimationFactor;
+            iItemsToMoveOnFullScreenDrag = KMediaWallTBoneItemsToMoveOnFullScreenDrag;
+            iRowCount = KMediaWallTBoneRowCount;
+
+            iSpring->SetConstants(
+                    KMediaWallTBoneSpringK, 
+                    KMediaWallTBoneSpringDamping, 
+                    KMediaWallTBoneSpringMaxVelocity, 
+                    KPositionSnap, KMinSpringVelocity);
+                
+            } break;
+        
+        case EHgVgMediaWallStyleGrid:
+            {
+            // set some factors to mediawall grid mode specific values
+            iCameraZoomFactor = KMediaWallGridCameraZoomFactor;
+            iCameraRotationFactor = KMediaWallGridCameraRotationFactor;            
+            iItemsOnScreen = KMediaWallGridItemsOnScreen;
+            iSpringVelocityToAnimationFactor = KMediaWallGridSpringVelocityToAnimationFactor;
+            iItemsToMoveOnFullScreenDrag = KMediaWallGridItemsToMoveOnFullScreenDrag;
+            iRowCount = KMediaWallGridRowCount;
+            iOpeningAnimationType = EHgVgOpeningAnimationZoomIn;
+
+            iSpring->SetConstants(
+                    KMediaWallGridSpringK, 
+                    KMediaWallGridSpringDamping, 
+                    KMediaWallGridSpringMaxVelocity, 
+                    KPositionSnap, 
+                    KMinSpringVelocity);
+            
+            } break;
+        default: 
+            {
+            } break;
+        }
+    }
 
 
 // End of File