Revision: 201019 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 25 May 2010 12:58:19 +0300
branchRCL_3
changeset 25 941195f2d488
parent 23 3d340a0166ff
child 27 d304fad47bf4
child 29 a8834a2e9a96
Revision: 201019 Kit: 2010121
classicui_plat/extended_input_capabilities_api/inc/aknextendedinputcapabilities.h
classicui_plat/extended_notifiers_api/inc/aknkeylocknotifier.h
classicui_plat/extended_options_menu_api/inc/akncollection.h
classicui_plat/extended_options_menu_api/inc/aknitemactionmenu.h
classicui_plat/ganes_api/inc/ganes/HgScroller.h
classicui_plat/ganes_api/inc/ganes/HgVgMediaWall.h
classicui_pub/application_framework_api/inc/AknAppUi.h
classicui_pub/buttons_api/inc/eikcba.h
classicui_pub/common_file_dialogs_api/inc/AknCommonDialogsDynMem.h
classicui_pub/dialogs_api/inc/EIKDIALG.H
classicui_pub/editors_api/inc/EIKEDWIN.H
classicui_pub/generic_button_api/inc/AknButton.h
classicui_pub/generic_button_api/tsrc/conf/tctestsdkgenericbutton.cfg
classicui_pub/generic_button_api/tsrc/conf/ui_testsdkgenericbutton.cfg
classicui_pub/generic_button_api/tsrc/inc/testsdkgenericbutton.h
classicui_pub/generic_button_api/tsrc/src/testsdkgenericbutton.cpp
classicui_pub/generic_button_api/tsrc/src/testsdkgenericbuttonblocks.cpp
classicui_pub/hierarchical_lists_api/inc/akntreelist.h
classicui_pub/lists_api/inc/EIKCLBD.H
classicui_pub/lists_api/inc/aknmarkingmodeobserver.h
classicui_pub/lists_api/inc/eikfrlbd.h
classicui_pub/options_menu_api/inc/EIKMENUP.H
classicui_pub/queries_api/inc/aknlistquerydialog.h
classicui_pub/stylus_popup_menu_api/inc/aknstyluspopupmenu.h
classicui_pub/ui_framework_definitions_api/inc/EIKON.HRH
classicui_pub/ui_framework_definitions_api/inc/avkon.hrh
commonuis/CommonDialogs/group/CommonDialogs.rss
commonuis/CommonDialogs/group/iconlist.txt
commonuis/CommonDialogs/inc/caknmemoryselectionmodelmultidrive.h
commonuis/CommonDialogs/loc/commondialogs.loc
commonuis/CommonDialogs/src/caknmemoryselectiondialogmultidrive.cpp
commonuis/CommonDialogs/src/caknmemoryselectionmodelmultidrive.cpp
commonuis/CommonUi/CenRep/keys_commonui.xls
commonuis/CommonUi/conf/commonui.confml
lafagnosticuifoundation/animation/tef/TFrames.cpp
psln/Group/101F8770.xml
psln/Rss/Psln.rss
psln/Src/PslnScreenSaverView.cpp
psln/Src/PslnUi.cpp
psln/pslnengine/src/PslnModel.cpp
uifw/AknGlobalUI/OldStyleNotif/Src/aknkeylocknotifier.cpp
uifw/AknGlobalUI/notpisrc/aknnotpi.rss
uifw/AvKon/aknhlist/inc/akntreelistview.h
uifw/AvKon/aknhlist/src/akntreelistview.cpp
uifw/AvKon/aknphysics/src/aknphysics.cpp
uifw/AvKon/inc/AknPreviewPopUp.h
uifw/AvKon/src/AknAdaptiveSearchGrid.cpp
uifw/AvKon/src/AknAppUi.cpp
uifw/AvKon/src/AknCharMap.cpp
uifw/AvKon/src/AknCheckBoxSettingPage.cpp
uifw/AvKon/src/AknIndicatorContainer.cpp
uifw/AvKon/src/AknNoteDialog.cpp
uifw/AvKon/src/AknPhedView.cpp
uifw/AvKon/src/AknPreviewPopUp.cpp
uifw/AvKon/src/AknQueryDialog.cpp
uifw/AvKon/src/AknSettingPage.cpp
uifw/AvKon/src/AknViewAppUi.cpp
uifw/AvKon/src/aknindicatordataobserver.cpp
uifw/AvKon/src/aknlistquerydialog.cpp
uifw/AvKon/src/aknsfld.cpp
uifw/AvKon/src/aknutils.cpp
uifw/AvKon/src/eikfrlbd.cpp
uifw/AvKon/srcdata/avkon.rss
uifw/AvKon/tsrc/bc/S60_SDK3.0/bctestbuttons/src/bctestbuttonscase.cpp
uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/group/bctestmixmcl.mmp
uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/inc/bctestmixmclgeneralcase.h
uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/src/bctestmixmclgeneralcase.cpp
uifw/AvKon/tsrc/bc/bctestlauncher/inc/bctestapplication.h
uifw/AvKon/tsrc/bc/bctestlauncher/src/bctestrunner.cpp
uifw/AvKon/tsrc/bc/script/codetest_script/output/api_table.bak.xml
uifw/AvKon/tsrc/bc/script/codetest_script/output/api_table.xml
uifw/EikStd/EABI/EIKCOCTLU.DEF
uifw/EikStd/bwins/EIKCOCTLU.DEF
uifw/EikStd/coctlsrc/AknButton.cpp
uifw/EikStd/coctlsrc/AknClearer.cpp
uifw/EikStd/coctlsrc/EIKCOCTL.MMP
uifw/EikStd/coctlsrc/EIKEDWIN.CPP
uifw/EikStd/coctlsrc/EIKLBX.CPP
uifw/EikStd/coctlsrc/EIKMENUB.CPP
uifw/EikStd/coctlsrc/EIKMENUP.CPP
uifw/EikStd/coctlsrc/EIKSCRLB.CPP
uifw/EikStd/coctlsrc/aknitemactionmenu.cpp
uifw/EikStd/coctlsrc/aknmarkingmode.cpp
uifw/EikStd/coctlsrc/aknstyluspopupmenu.cpp
uifw/EikStd/coctlsrc/akntoolbarextensionview.cpp
uifw/EikStd/coctlsrc/eikcba.cpp
uifw/EikStd/coctlsrc/eikspane.cpp
uifw/EikStd/coctlsrc/eikspmod.cpp
uifw/EikStd/dlgsrc/EIKDIALG.CPP
uifw/EikStd/dlgsrc/EIKDPAGE.CPP
uifw/EikStd/srvuisrc/EIKSRVUI.CPP
uifw/EikStd/srvuisrc/eikkeysoundserver.cpp
uifw/eikctl/src/EIKCLB.CPP
uifw/eikctl/src/EIKCLBD.CPP
uifw/eikctl/src/EIKMFNE.CPP
uifw/ganes/inc/HgConstants.h
uifw/ganes/src/HgGrid.cpp
uifw/ganes/src/HgScroller.cpp
uifw/ganes/src/HgVgEGL.cpp
uifw/ganes/src/HgVgMediaWall.cpp
--- a/classicui_plat/extended_input_capabilities_api/inc/aknextendedinputcapabilities.h	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_plat/extended_input_capabilities_api/inc/aknextendedinputcapabilities.h	Tue May 25 12:58:19 2010 +0300
@@ -148,7 +148,9 @@
             /** Signals observer (FEP) to open a stylus menu with ccpu
                 options.
                 Parameter not used. */
-            EOpenStylusMenuCcpu
+            EOpenStylusMenuCcpu,
+            /** Close pen input (VKB or HWR), parameter not used */
+            EClosePenInputRequest
             };
             
         /**
--- a/classicui_plat/extended_notifiers_api/inc/aknkeylocknotifier.h	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_plat/extended_notifiers_api/inc/aknkeylocknotifier.h	Tue May 25 12:58:19 2010 +0300
@@ -136,6 +136,8 @@
     // For screen lock
     void CapturePointerEvents();
     void UnCapturePointerEvents();
+	// whether Silder-key exists
+    TBool HasSliderKey();
 
 private:
     CEikButtonGroupContainer* iKeyLockCba;
--- a/classicui_plat/extended_options_menu_api/inc/akncollection.h	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_plat/extended_options_menu_api/inc/akncollection.h	Tue May 25 12:58:19 2010 +0300
@@ -57,7 +57,11 @@
         /**
          * Collection is view-only (no highlight ever).
          */
-        EStateViewOnly                = 0x00000008
+        EStateViewOnly                = 0x00000008, 
+        /**
+         * Collection has marked items. 
+         */
+        EStateMarkedItems             = 0x00000010 
         };
 
     /**
@@ -91,6 +95,7 @@
      * @param  aExtensionId  Extension id. 
      * @param  a0            First extension method parameter.
      * @param  a1            Second extension method parameter.
+     * @return Error code
      */    
     virtual TInt CollectionExtension(
             TUint aExtensionId, TAny*& a0, TAny* a1 ) = 0;
@@ -123,7 +128,7 @@
         /**
          * Collection is in multiple marking mode.
          */
-        EStateMarkingMode     = 0x00000001,
+        EStateMarkingMode             = 0x00000001,
         /**
          * Collection has marked items.
          */
--- a/classicui_plat/extended_options_menu_api/inc/aknitemactionmenu.h	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_plat/extended_options_menu_api/inc/aknitemactionmenu.h	Tue May 25 12:58:19 2010 +0300
@@ -230,6 +230,14 @@
      * @return Marking mode handler.
      */
     CAknMarkingMode& MarkingMode();
+    
+    /**
+     * Returns ETrue if collection has marked items.
+     * 
+     * @internal
+     * @return ETrue if collection has marked items.
+     */
+    TBool CollectionHasMarkedItems();
 
 private:
 
--- a/classicui_plat/ganes_api/inc/ganes/HgScroller.h	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_plat/ganes_api/inc/ganes/HgScroller.h	Tue May 25 12:58:19 2010 +0300
@@ -516,6 +516,8 @@
     TSelectionMode iSelectionMode;
     
     CPeriodic* iKeyScrollingTimer; // Timer for key scrolling, own.
+    TInt iOldWinPos;
+
     };
 
 #endif /*HGSCROLLER_H_*/
--- a/classicui_plat/ganes_api/inc/ganes/HgVgMediaWall.h	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_plat/ganes_api/inc/ganes/HgVgMediaWall.h	Tue May 25 12:58:19 2010 +0300
@@ -683,6 +683,11 @@
      */
     void SetConstantsForStyle();
 
+    /**
+     * 
+     */
+    TBool SearchItem( TChar& aFirstLetter );
+
 protected:
     CHgScrollBufferManager* iManager; // Own
     
--- a/classicui_pub/application_framework_api/inc/AknAppUi.h	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_pub/application_framework_api/inc/AknAppUi.h	Tue May 25 12:58:19 2010 +0300
@@ -105,7 +105,14 @@
          *
          * @since S60 5.2
          */
-        EAknSingleClickCompatibleFlag           = 0x01000000
+        EAknSingleClickCompatibleFlag           = 0x01000000,
+        
+        /**
+         * Application disables animation background
+         *
+         * @since S60 5.2
+         */
+        EAknDisableAnimationBackgroundFlag = 0x02000000
         };
 
     public:
@@ -169,7 +176,8 @@
         // Since 5.0
         EAknTouchCompatible = EAknTouchCompatibleFlag,
         // Since 5.2
-        EAknSingleClickCompatible = EAknSingleClickCompatibleFlag
+        EAknSingleClickCompatible = EAknSingleClickCompatibleFlag, 
+        EAknDisableAnimationBackground = EAknDisableAnimationBackgroundFlag
         };
     enum TKeyEventFlag
         {
--- a/classicui_pub/buttons_api/inc/eikcba.h	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_pub/buttons_api/inc/eikcba.h	Tue May 25 12:58:19 2010 +0300
@@ -956,11 +956,11 @@
     void UpdateMultipleMarkingSoftkey();
     
     /**
-     * Checks wheter softkey command change is allowed.
+     * Checks whether softkey command change is allowed.
      * 
      * @return ETrue if softkey command change is allowed.
      */    
-    TBool CommandChangeAllowed();
+    TBool CommandChangeAllowed() const;
 
 private: // new methods
 
--- a/classicui_pub/common_file_dialogs_api/inc/AknCommonDialogsDynMem.h	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_pub/common_file_dialogs_api/inc/AknCommonDialogsDynMem.h	Tue May 25 12:58:19 2010 +0300
@@ -131,7 +131,16 @@
         * Removable external memory card
         *
         */
-        EMemoryTypeMMCExternal = 0x00000010
+        EMemoryTypeMMCExternal = 0x00000010,
+
+        /*
+         * EMemoryTypeMMCExternalInDevice 
+         * Removable external memory card, but memory type which is 
+         * DriveInfo::EDriveUsbMemory is not included.
+         * Do not use EMemoryTypeMMCExternalInDevice  and EMemoryTypeMMCExternal
+         * at the same time. If doing so, EMemoryTypeMMCExternalInDevice works.
+         * */
+        EMemoryTypeMMCExternalInDevice = 0x00000020
 
         };
 
--- a/classicui_pub/dialogs_api/inc/EIKDIALG.H	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_pub/dialogs_api/inc/EIKDIALG.H	Tue May 25 12:58:19 2010 +0300
@@ -61,6 +61,7 @@
 
 // constant definitions
 const TInt KAknMediatorFacade(0x10275076);
+const TUid KExIfTactileFeedbackUid = {0x2000B494};
 
 
 class CEikMover;
--- a/classicui_pub/editors_api/inc/EIKEDWIN.H	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_pub/editors_api/inc/EIKEDWIN.H	Tue May 25 12:58:19 2010 +0300
@@ -490,6 +490,11 @@
          * Not own.
          */
         MAknsSkinInstance* iSkinInstance;
+        
+        /**
+		 * Record enableSmiley is supported.
+		 */
+		TBool iEnableSmileySupported;
         };
 
 public:
--- a/classicui_pub/generic_button_api/inc/AknButton.h	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_pub/generic_button_api/inc/AknButton.h	Tue May 25 12:58:19 2010 +0300
@@ -353,7 +353,30 @@
          * created by owning Button
          */
         void SetGeneratedDimmedIcon( TBool aDimmedIconCreatedByButton );
+        
+        /**
+         * Tells if frame update is needed, it is needed when the flag 
+         * KAknButtonStateHasLatchedFrame has changed. 
+         * @return ETrue if flag KAknButtonStateHasLatchedFrame has changed.
+         */
+        TBool FlagsChanged();
 
+        /**
+         * Frame has been updated. No need to update anymore. 
+         */
+        void ResetFlagsChanged();
+
+        /**
+         * Checks if text has changed. 
+         * @return ETrue is state's text has changed. 
+         */
+        TBool TextChanged(); 
+        
+        /**
+         * Visual text has been updated, so iTextChanged can be set to EFalse.
+         */
+        void ResetTextChanged(); 
+        
         friend class CAknButton;
 
     protected: // data
@@ -1163,6 +1186,17 @@
         */
         TRect TouchArea() const;
 
+        /**
+        * Enables or disables tactile feedback for button. By default it is 
+        * enabled. Should be used to temporarily prevent updating of tactile 
+        * feedback area for performance reasons when button is moved 
+        * constantly.
+        *
+        * @param aEnable, ETrue to enable, EFalse to disable 
+        * @since S60 5.2
+        */
+        IMPORT_C void EnableFeedback( TBool aEnable ); 
+
     protected: // Constructors
 
         /**
@@ -1305,6 +1339,12 @@
         void DrawTextButton( CWindowGc& aGc ) const;
 
         /**
+         * Continues drawing of the button which has text. Called from 
+         * DrawTextButton and DrawTextAndIconButton
+         */
+        void DrawText( CWindowGc& aGc, TRect& aTextRect ) const;
+
+        /**
          * Continues drawing of the button which has only an icon in it.
          */
         void DrawIconButton( CWindowGc& aGc ) const;
@@ -1430,6 +1470,24 @@
          * @param aNewIndex New state index
          */
         void SetStateIndexL( TInt aNewIndex );
+        
+        /**
+         * Sets frame IDs for background context. This is called when there
+         * are possible changes in frame ids. 
+         */
+        void SetFrameIDs() const; 
+
+        /**
+         * Sets frame rects for background context. This is called when
+         * button's size changes 
+         */
+        void SetFrameRects(); 
+
+        /**
+         * Converts text to visual and clips it. This is called when there
+         * are possible changes in visual text.
+         */
+        void ConvertTextToVisualAndClip() const; 
 
     protected: // Data
 
--- a/classicui_pub/generic_button_api/tsrc/conf/tctestsdkgenericbutton.cfg	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_pub/generic_button_api/tsrc/conf/tctestsdkgenericbutton.cfg	Tue May 25 12:58:19 2010 +0300
@@ -455,4 +455,7 @@
 run testscripter c:\testframework\ui_testsdkgenericbutton.cfg 90
 [Endtest]
 
-
+[Test]
+title TestGBEnableFeedbackL
+run testscripter c:\testframework\ui_testsdkgenericbutton.cfg 91
+[Endtest]
--- a/classicui_pub/generic_button_api/tsrc/conf/ui_testsdkgenericbutton.cfg	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_pub/generic_button_api/tsrc/conf/ui_testsdkgenericbutton.cfg	Tue May 25 12:58:19 2010 +0300
@@ -637,5 +637,9 @@
 delete test
 [Endtest] 
 
-
-
+[Test]
+title TestGBEnableFeedbackL
+create testsdkgenericbutton test
+test TestGBEnableFeedbackL
+delete test
+[Endtest] 
--- a/classicui_pub/generic_button_api/tsrc/inc/testsdkgenericbutton.h	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_pub/generic_button_api/tsrc/inc/testsdkgenericbutton.h	Tue May 25 12:58:19 2010 +0300
@@ -727,26 +727,19 @@
      * @return Symbian OS error code.
      */
     virtual TInt TestGBHideHelpL( CStifItemParser& aItem );
+    /**
+     * TestGBEnableFeedbackL test function for testing the EnableFeedback
+     * function
+     * @since S60 5.2
+     * @param aItem never used
+     * @return Symbian OS error code.
+     */
+    virtual TInt TestGBEnableFeedbackL( CStifItemParser& aItem );
     
     /**
      * Method used to log version of test class
      */
     void SendTestClassVersion();
-    
-        /**
-     * Turn off ScreenSaver
-     * @since S60 5.0
-     * @return Symbian OS error code.
-     */
-    void TurnOffScreenSaver();
-
-    /**
-     * Restore ScreenSaver
-     * @since S60 5.0
-     * @return Symbian OS error code.
-     */
-    void RestoreScreenSaver();
-
 
 private: 
 
--- a/classicui_pub/generic_button_api/tsrc/src/testsdkgenericbutton.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_pub/generic_button_api/tsrc/src/testsdkgenericbutton.cpp	Tue May 25 12:58:19 2010 +0300
@@ -22,7 +22,6 @@
  */
 #include <stiftestinterface.h>
 #include <settingserverclient.h>
-#include <screensaverinternalpskeys.h>
 #include <e32property.h>
 #include <coemain.h>
 
@@ -85,11 +84,15 @@
                           CStifLogger::EFile,
                           EFalse );
     
-    iOffset = CCoeEnv::Static()->AddResourceFileL(_L("C:\\resource\\testsdkgenericbutton.rsc"));
+    TRAPD ( err, iOffset = CCoeEnv::Static()->AddResourceFileL(
+            _L("C:\\resource\\testsdkgenericbutton.rsc") ) );
+    if ( KErrNone != err )
+        {
+        _LIT ( KGenericbuttonRsc, "Z:\\resource\\testsdkgenericbutton.rsc" );
+        iOffset = CCoeEnv::Static()->AddResourceFileL( KGenericbuttonRsc );
+        }
     
     SendTestClassVersion();
-    
-    TurnOffScreenSaver();
     }
 
 // -----------------------------------------------------------------------------
@@ -117,8 +120,6 @@
     delete iLog; 
 
     CCoeEnv::Static()->DeleteResourceFile( iOffset );
-
-    RestoreScreenSaver();
     }
 
 //-----------------------------------------------------------------------------
@@ -153,32 +154,6 @@
     {
     return ( CScriptBase* ) CTestSDKGENERICBUTTON::NewL( aTestModuleIf );
     }
-
-// -----------------------------------------------------------------------------
-// Turn off ScreenSaver
-// -----------------------------------------------------------------------------
-//
-void CTestSDKGENERICBUTTON::TurnOffScreenSaver()
-    {
-    TInt err1 = RProperty::Get( KPSUidScreenSaver, KScreenSaverAllowScreenSaver, 
-        iOldScreenSaverProperty );
-    TInt err2 = RProperty::Set( KPSUidScreenSaver, KScreenSaverAllowScreenSaver, 
-        KScreenSaverAllowScreenSaver );    
-    RDebug::Printf( "screensaver property=%d err1=%d err2=%d\n", 
-        iOldScreenSaverProperty, err1, err2 );
-    }
-
-// -----------------------------------------------------------------------------
-// Restore ScreenSaver
-// -----------------------------------------------------------------------------
-//
-void CTestSDKGENERICBUTTON::RestoreScreenSaver()
-    {
-    RProperty::Set( KPSUidScreenSaver, KScreenSaverAllowScreenSaver, 
-        iOldScreenSaverProperty );
-    User::ResetInactivityTime();
-    }
-
 //End file
 
 
--- a/classicui_pub/generic_button_api/tsrc/src/testsdkgenericbuttonblocks.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_pub/generic_button_api/tsrc/src/testsdkgenericbuttonblocks.cpp	Tue May 25 12:58:19 2010 +0300
@@ -167,6 +167,7 @@
         ENTRY( "TestGBGetCurrentIconL", CTestSDKGENERICBUTTON::TestGBGetCurrentIconL ),
         ENTRY( "TestGBShowHelpLL", CTestSDKGENERICBUTTON::TestGBShowHelpLL ),
         ENTRY( "TestGBHideHelpL", CTestSDKGENERICBUTTON::TestGBHideHelpL ),
+        ENTRY( "TestGBEnableFeedbackL", CTestSDKGENERICBUTTON::TestGBEnableFeedbackL ),
         // [test cases entries]
 
         };
@@ -2307,6 +2308,29 @@
     }
 
 // -----------------------------------------------------------------------------
+// CTestSDKGENERICBUTTON::TestGBEnableFeedbackL
+// -----------------------------------------------------------------------------
+//
+TInt CTestSDKGENERICBUTTON::TestGBEnableFeedbackL ( CStifItemParser& /*aItem*/ )
+    {
+    CTestButton* button = CTestButton::NewL();
+    CleanupStack::PushL( button );
+    button->ConstructFromResourceL( R_BUTTON );
+
+    button->EnableFeedback ( EFalse );
+    button->MakeVisible( ETrue );
+    button->SetDimmed( ETrue );
+
+    button->EnableFeedback ( ETrue );
+    button->MakeVisible( ETrue );
+    button->SetDimmed( ETrue );
+
+    CleanupStack::PopAndDestroy( button );
+
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
 // CTestSDKGENERICBUTTON::TestGBChangeStateL
 // -----------------------------------------------------------------------------
 //
--- a/classicui_pub/hierarchical_lists_api/inc/akntreelist.h	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_pub/hierarchical_lists_api/inc/akntreelist.h	Tue May 25 12:58:19 2010 +0300
@@ -24,12 +24,12 @@
 #include <w32std.h>
 #include <akntreelistobserver.h>
 #include <AknIconUtils.h> // TScaleMode
-#include <aknmarkingmodeobserver.h>
 
 class CAknTree;
 class CAknTreeListView;
 class MAknCustomTreeOrdering;
 class TAknsItemID;
+class MAknMarkingModeObserver;
 
 /** Flag to indicate that hierarchical list is looping. */
 const TUint32 KAknTreeListLooping = 0x0001;
@@ -1154,6 +1154,7 @@
 
     /**
      * Marking mode observer
+     * Not own
      */
     MAknMarkingModeObserver* iMarkingModeObserver; 
     };
--- a/classicui_pub/lists_api/inc/EIKCLBD.H	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_pub/lists_api/inc/EIKCLBD.H	Tue May 25 12:58:19 2010 +0300
@@ -448,6 +448,18 @@
     IMPORT_C void SetColumnUnderlined( TBitFlags32 aUnderlinedColumns );
 
 private:
+    /**
+      * Draws check boxes in marking mode
+      * 
+      * @param aProperties Item properties
+      * @param aGc Graphics context
+      * @param aItemRect Item area
+      * @internal
+      */
+    void DrawMarkingModeIcons( const TListItemProperties& aProperties,
+                               CWindowGc& aGc,
+                               TRect& aItemRect ) const;
+private:
     struct SColumn
         {
         TInt iColumn; // Must be first entry
--- a/classicui_pub/lists_api/inc/aknmarkingmodeobserver.h	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_pub/lists_api/inc/aknmarkingmodeobserver.h	Tue May 25 12:58:19 2010 +0300
@@ -34,7 +34,7 @@
     /**
      * This method is called when marking mode is activated or deactivated.
      * 
-     * @param aActivated @c ETrue if marking mode was activate, @c EFalse
+     * @param aActivated @c ETrue if marking mode was activated, @c EFalse
      *                   if marking mode was deactivated.
      */
     virtual void MarkingModeStatusChanged( TBool aActivated ) = 0;
--- a/classicui_pub/lists_api/inc/eikfrlbd.h	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_pub/lists_api/inc/eikfrlbd.h	Tue May 25 12:58:19 2010 +0300
@@ -985,6 +985,17 @@
                            const TRect& aItemRect,
                            TBool aHighlight,
                            const TColors& aColors ) const;
+    /**
+    * Draws check boxes in marking mode
+    * 
+    * @param aProperties Item properties
+    * @param aGc Graphics context
+    * @param aItemRect Item area
+    * @internal
+    */
+    void DrawMarkingModeIcons( TListItemProperties& aProperties,
+                               CWindowGc& aGc,
+                               TRect& aItemRect ) const;
 
     /**
     * @internal helper
--- a/classicui_pub/options_menu_api/inc/EIKMENUP.H	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_pub/options_menu_api/inc/EIKMENUP.H	Tue May 25 12:58:19 2010 +0300
@@ -929,6 +929,14 @@
      * Enables the default highlight in menu
      */
     void SetDefaultHighlight();
+
+    /**
+     * Updates flag which is used for hiding mark and unmark -commands from 
+     * submenus. This is called with ETrue when collection has marked items. 
+     *
+     * @param aHide ETrue to hide, EFalse to show
+     */
+    void HideMarkAndUnmark( TBool aHide );
     
 private:
     enum { EInvalidCurrentSize=0x01, EBackgroundFaded=0x02 };
@@ -1014,6 +1022,14 @@
 	 * @return Item height.
      */
     TInt CalculateItemHeight() const;
+    
+    /**
+     * Cleans the internal pointer which is used 
+     * to track object deletion.
+     * 
+     * @param aParam Pointer to options menu object.
+     */
+    static void CleanLocalRef( TAny* aParam );
 
 protected: // from CoeControl
 
--- a/classicui_pub/queries_api/inc/aknlistquerydialog.h	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_pub/queries_api/inc/aknlistquerydialog.h	Tue May 25 12:58:19 2010 +0300
@@ -282,13 +282,6 @@
          */
         IMPORT_C CAknSearchField* FindBox() const;
         
-    private:
-        /**
-        * Returns whether the left softkey is shown
-        * @return ETrue If the left softkey is shown
-        */
-        TBool IsLeftSoftkeyShown();
-        
     public:
         /** 
          * Sets the tone for the dialog.
--- a/classicui_pub/stylus_popup_menu_api/inc/aknstyluspopupmenu.h	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_pub/stylus_popup_menu_api/inc/aknstyluspopupmenu.h	Tue May 25 12:58:19 2010 +0300
@@ -212,6 +212,14 @@
      */
     void RemoveController();
     
+    /**
+     * Cleans the internal pointer which is used 
+     * to track object deletion.
+     * 
+     * @param aParam Pointer to stylus menu object.
+     */
+    static void CleanLocalRef( TAny* aParam );
+    
 private: // data
 
     /**
--- a/classicui_pub/ui_framework_definitions_api/inc/EIKON.HRH	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_pub/ui_framework_definitions_api/inc/EIKON.HRH	Tue May 25 12:58:19 2010 +0300
@@ -59,7 +59,12 @@
  */
 #define EEikCbaFlagSemiTransparent      0x100
 
-
+/**
+ * Button group app msk icon flag. This flag can be set with CBA resource
+ * or by using CEikCba::SetButtonGroupFlags(TInt) method. CBA using 
+ * control_pane_g4(0) to draw the window rect
+ */
+#define EEikCbaFlagAppMskIcon           0x200
 // EIKBUTB.HRH
 //
 //
--- a/classicui_pub/ui_framework_definitions_api/inc/avkon.hrh	Tue May 11 16:27:42 2010 +0300
+++ b/classicui_pub/ui_framework_definitions_api/inc/avkon.hrh	Tue May 25 12:58:19 2010 +0300
@@ -1753,18 +1753,13 @@
     EAknFepDualLanguageSettingDualInputSecondary
     };
 
-enum TAknSctTableNaviButtons
+enum TAknSctPageNaviButtons
     {
     EAknSctTableNaviExit = 0,
+    EAknSctPageNaviPrevPage,
+    EAknSctPageNaviNextPage,
     EAknSctTableNaviSpecialChar,
     EAknSctTableNaviEmotion,
-    EAknSctTableNaviLastId
-    };
-
-enum TAknSctPageNaviButtons
-    {
-    EAknSctPageNaviPrevPage = 0,
-    EAknSctPageNaviNextPage,
     EAknSctPageNaviLastId
     };
 
--- a/commonuis/CommonDialogs/group/CommonDialogs.rss	Tue May 11 16:27:42 2010 +0300
+++ b/commonuis/CommonDialogs/group/CommonDialogs.rss	Tue May 25 12:58:19 2010 +0300
@@ -235,6 +235,26 @@
     buf = qtn_mem_named_memory_card_setting_list;
     }
 
+RESOURCE TBUF R_CFD_QTN_MEMC_USB_AVAILABLE_SINGLE_LIST
+    {
+    buf = qtn_memc_usb_available_single_list;
+    }
+
+RESOURCE TBUF R_CFD_QTN_MEMC_USB_UNAVAILABLE_SINGLE_LIST
+    {
+    buf = qtn_memc_usb_unavailable_single_list;
+    }
+
+RESOURCE TBUF R_CFD_QTN_MEMC_USB_AVAILABLE_DOUBLE
+    {
+    buf = qtn_memc_usb_available_double;
+    }
+
+RESOURCE TBUF R_CFD_QTN_MEMC_USB_UNAVAILABLE_DOUBLE
+    {
+    buf = qtn_memc_usb_unavailable_double;
+    }
+
 // ---------------------------------------------------------
 //
 //    Softkey texts from AVKON.LOC
--- a/commonuis/CommonDialogs/group/iconlist.txt	Tue May 11 16:27:42 2010 +0300
+++ b/commonuis/CommonDialogs/group/iconlist.txt	Tue May 25 12:58:19 2010 +0300
@@ -18,4 +18,5 @@
 /c8,1   qgn_prop_am_sis.bmp
 /c8,1 	qgn_prop_folder_empty.bmp
 /c8,1   qgn_prop_file_swf_small.bmp
-/c8,1	qgn_prop_usb_memc_sub.svg
\ No newline at end of file
+/c8,1   qgn_prop_usb_memc.svg
+/c8,1   qgn_prop_usb_memc_sub.svg
--- a/commonuis/CommonDialogs/inc/caknmemoryselectionmodelmultidrive.h	Tue May 11 16:27:42 2010 +0300
+++ b/commonuis/CommonDialogs/inc/caknmemoryselectionmodelmultidrive.h	Tue May 25 12:58:19 2010 +0300
@@ -148,6 +148,8 @@
         ETextRemoteDrive,
         ETextInternalMassStorage,
         ETextInternalMassStorageUnavailable,
+        ETextUSBDefaultName,
+        ETextUSBUnavailable,
         ETextMMCNamed,
         ETextCount // Count of the localized texts - must remain last!
         };
--- a/commonuis/CommonDialogs/loc/commondialogs.loc	Tue May 11 16:27:42 2010 +0300
+++ b/commonuis/CommonDialogs/loc/commondialogs.loc	Tue May 25 12:58:19 2010 +0300
@@ -210,7 +210,7 @@
 
 //d:Text for USB Memory (no name) in memory selection
 //l:list_single_graphic_pane_t1_cp2
-#define qtn_memc_USB_available_single_list "%U USB memory"
+#define qtn_memc_usb_available_single_list "%U USB memory"
 
 //d:Text for USB Memory in  memory selection when USB memory is unavilable
 //l:list_single_graphic_pane_t1_cp2
@@ -218,7 +218,7 @@
 
 //d:Text for USB Memory (no name) in memory selection
 //l:list_double_large_graphic_pane_t1_cp2
-#define qtn_memc_USB_available_double "%U USB memory"
+#define qtn_memc_usb_available_double "%U USB memory"
 
 //d:Text for USB Memory in memory selection when USB memory is unavilable
 //l:list_double_large_graphic_pane_t1_cp2
--- a/commonuis/CommonDialogs/src/caknmemoryselectiondialogmultidrive.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/commonuis/CommonDialogs/src/caknmemoryselectiondialogmultidrive.cpp	Tue May 25 12:58:19 2010 +0300
@@ -619,9 +619,9 @@
             EMbmAknmemorycarduiQgn_prop_mmc_non_mask );
         //For external USB Driver
         AknCFDUtility::AppendSkinnedImageToArrayL( *eikEnv, *aIconArray,
-            skin, KAknsIIDQgnPropFmgrUsbMemcSub, KCommonDialogsBitmapFile,
-            EMbmCommondialogsQgn_prop_usb_memc_sub,
-            EMbmCommondialogsQgn_prop_usb_memc_sub_mask );
+            skin, KAknsIIDQgnPropUsbMemc, KCommonDialogsBitmapFile,
+            EMbmCommondialogsQgn_prop_usb_memc,
+            EMbmCommondialogsQgn_prop_usb_memc_mask );
         }
     _LOG1( "[CAknMemorySelectionDialog] aIconArray count=%d",
            aIconArray->Count() );
--- a/commonuis/CommonDialogs/src/caknmemoryselectionmodelmultidrive.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/commonuis/CommonDialogs/src/caknmemoryselectionmodelmultidrive.cpp	Tue May 25 12:58:19 2010 +0300
@@ -303,6 +303,18 @@
             resource = R_CFD_QTN_MEMC_REMOTE_DRIVE;
             break;
             }
+        case ETextUSBDefaultName:
+            {
+            // qtn.memc.usb.available.single.list
+            resource = R_CFD_QTN_MEMC_USB_AVAILABLE_SINGLE_LIST;
+            break;
+            }
+        case ETextUSBUnavailable:
+            {
+            // qtn.memc.usb.unavailable.single.list
+            resource = R_CFD_QTN_MEMC_USB_UNAVAILABLE_SINGLE_LIST;
+            break;
+            }
         }
     return resource;
     }
@@ -353,6 +365,13 @@
             resource = R_CFD_QTN_MEMC_REMOTE_DRIVE;
             break;
             }
+        case ETextUSBDefaultName:
+        case ETextUSBUnavailable:
+            {
+            // qtn.memc.usb.available.single.list
+            resource = R_CFD_QTN_MEMC_USB_AVAILABLE_SINGLE_LIST;
+            break;
+            }
         }
     return resource;
     }
@@ -380,13 +399,6 @@
             resource = R_CFD_QTN_MEM_MASS_STORAGE_DOUBLE_LIST;
             break;
             }
-        case ETextInternalMassStorageUnavailable:
-            {
-            // Unavailable:qtn.memc.mmc.unavailable.double
-            // Only for second row
-            resource = R_CFD_QTN_MEMC_MMC_UNAVAILABLE_DOUBLE;
-            break;
-            }
         case ETextMMCNamed:
             {
             // If MMC's name is given.
@@ -407,18 +419,27 @@
             resource = R_CFD_QTN_MEMC_MMC_LOCKED_DOUBLE;
             break;
             }
-        case ETextMMCUnavailable:
-            {
-            // qtn.memc.mmc.unavailable.double
-            resource = R_CFD_QTN_MEMC_MMC_UNAVAILABLE_DOUBLE;
-            break;
-            }
         case ETextRemoteDrive:
             {
             // TODO: To be checked because of missing data in UI spec.
             resource = R_CFD_QTN_MEMC_REMOTE_DRIVE_DOUBLE_LIST;
             break;
             }
+        case ETextUSBDefaultName:
+            {
+            // qtn.memc.usb.available.double
+            resource = R_CFD_QTN_MEMC_USB_AVAILABLE_DOUBLE;
+            break;
+            }
+        case ETextMMCUnavailable:
+        case ETextUSBUnavailable:
+        case ETextInternalMassStorageUnavailable:
+            {
+            // Unavailable:qtn.memc.mmc.unavailable.double
+            // Only for second row
+            resource = R_CFD_QTN_MEMC_MMC_UNAVAILABLE_DOUBLE;
+            break;
+            }
         }
     return resource;
 
@@ -959,7 +980,7 @@
                     {
                     StringLoader::Format(
                         textString,
-                        *iLocStringArray[ ETextInternalMassStorage ],
+                        *iLocStringArray[ ETextUSBDefaultName ],
                         KNoIndex,
                         driveUnit.Name()
                         );
@@ -969,7 +990,7 @@
                 {
                 StringLoader::Format(
                     textString,
-                    *iLocStringArray[ ETextInternalMassStorageUnavailable ],
+                    *iLocStringArray[ ETextUSBUnavailable ],
                     KNoIndex,
                     driveUnit.Name()
                     );
@@ -1001,7 +1022,7 @@
                 {
                 StringLoader::Format(
                     itemString,
-                    *iLocStringArray[ ETextInternalMassStorage ],
+                    *iLocStringArray[ ETextUSBDefaultName ],
                     KNoIndex,
                     driveUnit.Name()
                     );
@@ -1034,7 +1055,7 @@
                 // Use default drive description
                 StringLoader::Format(
                     textString,
-                    *iLocStringArray[ ETextInternalMassStorage ],
+                    *iLocStringArray[ ETextUSBDefaultName ],
                     KNoIndex,
                     driveUnit.Name()
                     );
@@ -1066,8 +1087,7 @@
             else
                 {
                 itemString.Append(
-                    *iLocStringArray[
-                        ETextInternalMassStorageUnavailable ] );
+                    *iLocStringArray[ ETextUSBUnavailable ] );
                 }
             break;
             }
@@ -1321,6 +1341,21 @@
                 driveNumber = TDriveNumber( i );
                 rootPath.Zero();
                 memoryType = AknCFDUtility::DriveMemoryTypeL( driveNumber );
+                if ( memoryType == AknCommonDialogsDynMem::EMemoryTypeMMCExternal &&
+                        ( iIncludedMedias & AknCommonDialogsDynMem::EMemoryTypeMMCExternalInDevice ) )
+                    {
+                    // Hide usb memory
+                    TCFDDriveInfo info;
+                    AknCFDUtility::DriveInfoL( driveNumber, info );
+                    if ( info.iStatus & DriveInfo::EDriveUsbMemory )
+                        {
+                        continue;
+                        }
+                    else
+                        {
+                        memoryType = AknCommonDialogsDynMem::EMemoryTypeMMCExternalInDevice;
+                        }
+                    }
                 if( memoryType & iIncludedMedias )
                     {
                     User::LeaveIfError(
@@ -1368,6 +1403,21 @@
             if (drive)
                 {
                 memoryType = AknCFDUtility::DriveMemoryTypeL( driveNumber );
+                if ( memoryType == AknCommonDialogsDynMem::EMemoryTypeMMCExternal &&
+                        ( iIncludedMedias & AknCommonDialogsDynMem::EMemoryTypeMMCExternalInDevice ) )
+                    {
+                    // Hide usb memory
+                    TCFDDriveInfo info;
+                    AknCFDUtility::DriveInfoL( driveNumber, info );
+                    if ( info.iStatus & DriveInfo::EDriveUsbMemory )
+                        {
+                        continue;
+                        }
+                    else
+                        {
+                        memoryType = AknCommonDialogsDynMem::EMemoryTypeMMCExternalInDevice;
+                        }
+                    }
                 if( memoryType & iIncludedMedias )
                     {
                     User::LeaveIfError(
Binary file commonuis/CommonUi/CenRep/keys_commonui.xls has changed
Binary file commonuis/CommonUi/conf/commonui.confml has changed
--- a/lafagnosticuifoundation/animation/tef/TFrames.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/lafagnosticuifoundation/animation/tef/TFrames.cpp	Tue May 25 12:58:19 2010 +0300
@@ -265,8 +265,9 @@
 	iTransSpriteAnimWin->Window()->Invalidate();
 	iFrameWin->Window()->Invalidate();
 	iTransFrameWin->Window()->Invalidate();
-	Ws().Flush();
+	Ws().Finish();
 	WaitForRedrawsToFinish();
+    Ws().Finish();
 	
 	// Start the animations:
 	TAnimationConfig config;
@@ -288,17 +289,27 @@
 				break;
 			}
 		iBasicAnimations[frame]->Start(config);
+		Wait(KFramesFrameLength);
+	    Ws().Finish();
+	    WaitForRedrawsToFinish();
+	    
 		iSpriteAnimations[frame]->Start(config);
+		Wait(KFramesFrameLength);
+	    Ws().Finish();
+	    WaitForRedrawsToFinish();
 		}
 	
 	// Why * 4? because we seem to go very slowly?
 	Wait(KFramesFrameLength * iBasicAnimations.Count() * 4);
-
-	// Verify output:
+	Ws().Finish();
 	WaitForRedrawsToFinish();
-	ANIMTESTRECT(TRect(iBasicAnimWinPosition, iWinSize), TRect(iFrameWinPosition, iWinSize));
+    Ws().Finish();
+    
+    // When verifying output,
+    // Should have at least one animation frame drawn 
+    ANIMTESTRECT(TRect(iBasicAnimWinPosition, TSize(KFramesWindowHeight,KFramesWindowHeight)), TRect(iFrameWinPosition, TSize(KFramesWindowHeight,KFramesWindowHeight)));
 	if(!(aFlags & ENoSprites))
-		ANIMTESTRECT(TRect(iSpriteAnimWinPosition, iWinSize), TRect(iFrameWinPosition, iWinSize));
+		ANIMTESTRECT(TRect(iSpriteAnimWinPosition, TSize(KFramesWindowHeight,KFramesWindowHeight)), TRect(iFrameWinPosition, TSize(KFramesWindowHeight,KFramesWindowHeight)));
 	}
 /**
 	@SYMTestCaseID UIF-animation-TFrames-TestFramesL2
--- a/psln/Group/101F8770.xml	Tue May 11 16:27:42 2010 +0300
+++ b/psln/Group/101F8770.xml	Tue May 25 12:58:19 2010 +0300
@@ -7,9 +7,9 @@
 
 <PowerSaveModeConfig>
     <Setting mode="1"><!-- PSM mode Full PSM -->
-        <SetItem key="2" type="0" value="1"></SetItem>
+        <SetItem key="2" type="0" value="4"></SetItem>
     </Setting>
     <Setting mode="2"><!-- PSM mode Partial PSM-->
-				<SetItem key="2" type="0" value="1"></SetItem>
-		</Setting>
+        <SetItem key="2" type="0" value="4"></SetItem>
+    </Setting>
 </PowerSaveModeConfig>
--- a/psln/Rss/Psln.rss	Tue May 11 16:27:42 2010 +0300
+++ b/psln/Rss/Psln.rss	Tue May 25 12:58:19 2010 +0300
@@ -243,9 +243,7 @@
     {
     items =
         {
-        LBUF { txt = qtn_sanim_object_none; },
-        LBUF { txt = qtn_sanim_object_date; },
-        LBUF { txt = qtn_sanim_object_text; }
+        LBUF { txt = qtn_sanim_object_none; }
         };
     }
 
--- a/psln/Src/PslnScreenSaverView.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/psln/Src/PslnScreenSaverView.cpp	Tue May 25 12:58:19 2010 +0300
@@ -48,7 +48,7 @@
 
 // CONSTANTS
 // Number of default system screensavers.
-const TInt KPslnSystemScreenSavers = 3;
+const TInt KPslnSystemScreenSavers = 1;
 // Value in PubSub when screensaver preview is off.
 const TInt KPslnScreenSaverPreviewOff = 0;
 
@@ -203,7 +203,7 @@
         TInt newDefault = iModel->CurrentPropertyIndexL( KPslnScreenSettingId );
         if ( newDefault == KErrNotFound )
             {
-            // If no default found, assume that date is default.
+            // If no default found, assume that None is default.
             newDefault = 0;
             iModel->SetCurrentPropertyTypeL(
                 KPslnScreenSettingId,
--- a/psln/Src/PslnUi.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/psln/Src/PslnUi.cpp	Tue May 25 12:58:19 2010 +0300
@@ -1076,12 +1076,12 @@
 
             PSLN_TRACE_DEBUG("CPslnUi::ActivateSkinL directly");
             shownote = iModel->ActivateSkinL( skinIndex );
-            ShowProgressBarL();
 
             if ( shownote )
                 {
                 PSLN_TRACE_DEBUG("CPslnUi::ActivateSkinL skin activated");
                 SetStateOn( EPslnSkinActivated );
+                ShowProgressBarL();
                 }
             else
                 {
--- a/psln/pslnengine/src/PslnModel.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/psln/pslnengine/src/PslnModel.cpp	Tue May 25 12:58:19 2010 +0300
@@ -424,12 +424,6 @@
     // Add descriptors for system screensavers
     iScreensaverFilenameArr =
         new (ELeave) CDesC16ArrayFlat( KPslnSsArrayGranularity );
-    iScreensaverFilenameArr->AppendL( KPslnScreenSaverTypeDateTime );
-    iScreensaverFilenameArr->AppendL( KPslnScreenSaverTypeText );
-
-    // System screensavers have no capabilities
-    User::LeaveIfError( iScreensaverCapsArr.Append( EFalse ) );
-    User::LeaveIfError( iScreensaverCapsArr.Append( EScpCapsConfigure ) );
 
     if ( IsSupportScreenSaverNoneOption() )
         {
--- a/uifw/AknGlobalUI/OldStyleNotif/Src/aknkeylocknotifier.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AknGlobalUI/OldStyleNotif/Src/aknkeylocknotifier.cpp	Tue May 25 12:58:19 2010 +0300
@@ -991,11 +991,7 @@
 
     TBool touchEnabled( AknLayoutUtils::PenEnabled() );
 
-	TBool hasSlider(iHardwareSupport != EKeyguardDefaultHardware);
-    if( FeatureManager::FeatureSupported( KFeatureIdFfPowerKeyAsKeyguard ) )
-    {
-	hasSlider = ETrue;  // the only purpose is to display empty sotkeys
-	}
+    TBool hasSlider = HasSliderKey();
     iKeyLockCba = CEikButtonGroupContainer::NewL(
                     CEikButtonGroupContainer::ECba,
                     CEikButtonGroupContainer::EHorizontal,
@@ -1157,8 +1153,8 @@
         {
         SendMessageToSysAp( EEikKeyLockEnabled );
         }
-
-    if ( !AknLayoutUtils::PenEnabled() || iHardwareSupport == EKeyguardDefaultHardware)
+    TBool hasSliderKey = HasSliderKey();
+    if ( !AknLayoutUtils::PenEnabled() || !hasSliderKey)
         {
         iKeyLockCba->MakeVisible( ETrue );
         }
@@ -1190,7 +1186,7 @@
         DisplayLockedNote();
         }
 
-    if ( !AknLayoutUtils::PenEnabled() || iHardwareSupport == EKeyguardDefaultHardware)
+    if ( !AknLayoutUtils::PenEnabled() || !hasSliderKey)
         {
         ShowKeylockCba();
         }
@@ -2071,6 +2067,16 @@
         }
     }
 
+TBool CAknKeyLockControl::HasSliderKey()
+    {
+    TBool hasSlider(iHardwareSupport != EKeyguardDefaultHardware);
+    if( FeatureManager::FeatureSupported( KFeatureIdFfPowerKeyAsKeyguard ) )
+        {
+        hasSlider = ETrue;  // the only purpose is to display empty sotkeys
+        }
+    return hasSlider;
+    }
+
 
 // ===========================================================================
 // class CAknKeyLockNotifierSubject
@@ -2379,6 +2385,7 @@
     {
     if ( IsKeyLockEnabled() )
         {
+        iKeyLockControl->AutolockEnabled( EFalse );
         iKeyLockControl->DisableKeylock();
         }
     }
--- a/uifw/AknGlobalUI/notpisrc/aknnotpi.rss	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AknGlobalUI/notpisrc/aknnotpi.rss	Tue May 25 12:58:19 2010 +0300
@@ -810,6 +810,7 @@
     layout         = EGeneralLayout;
     singular_label = qtn_battc_unplug;
     plural_label   = "";
+    animation = R_QGN_NOTE_INFO_ANIM;
     }
     
 // ---------------------------------------------------------------------------
--- a/uifw/AvKon/aknhlist/inc/akntreelistview.h	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/aknhlist/inc/akntreelistview.h	Tue May 25 12:58:19 2010 +0300
@@ -29,7 +29,6 @@
 #include <akntreelistobserver.h>
 #include <akncollection.h>
 #include <aknlongtapdetector.h>
-#include <aknmarkingmodeobserver.h>
 
 #include "akntreeobserver.h"
 #include "akntreelistviewitem.h"
@@ -1113,9 +1112,6 @@
      */
     CAknTreeItem* iPreviouslyFocusedItem;
 
-    TBool iIsPressedDownState;
-    
-    TBool iIsDragged;
     
     /**
      * Physics handler. Used only when physics feature is enabled.
@@ -1123,10 +1119,6 @@
      */
     CAknTreeListPhysicsHandler* iPhysicsHandler;
 
-    /**
-     * ETrue if physics view should be adjusted according to top item.
-     */
-    TBool iScrollPhysicsTop;
 
     /**
     * Pointer to tfx redirect gc for effects
@@ -1150,10 +1142,6 @@
 	*/
 	TInt iBottomIndex;
 	
-	/**
-	 * Whether or not mirrored layout is currently in use.
-	 */
-	TBool iMirroredLayoutInUse;
 	
     /**
      * Remember pointer to bottom item. Use for drawing line seperator only.
@@ -1162,16 +1150,17 @@
      */
 	CAknTreeItem* iBottomItem;	
 
-	/**
-	 * Whether marking mode is activated or not.
-	 */
-	TBool iMarkingMode;
 	
 	/**
 	 * Array for marking mode icons.
 	 * Own.
 	 */
     CAknIconArray* iMarkingIconArray;
+    
+    /**
+     * Ordinal position of window, before stylus menu is opened.
+     */
+    TInt iOldWinPos;
     };
 
 #endif // C_AKNTREELISTVIEW_H
--- a/uifw/AvKon/aknhlist/src/akntreelistview.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/aknhlist/src/akntreelistview.cpp	Tue May 25 12:58:19 2010 +0300
@@ -29,6 +29,7 @@
 #include <AknIconArray.h>
 #include <avkon.mbg>
 #include <gulicon.h>
+#include <aknmarkingmodeobserver.h>
 #include "akntreelistview.h"
 #include "akntree.h"
 #include "akntreelist.h"
@@ -52,8 +53,8 @@
 // Number of additional items to draw
 const TInt KAdditionalItems = 2;
 
-// Space for check box in marking mode
-const TInt KCheckBoxOffset = 30;
+// Number of icons in marking mode icon array
+const TInt KMarkingModeIconArraySize = 2;
 
 // Tree list view flag definitions.
 enum TAknTreeListViewFlags
@@ -73,7 +74,11 @@
     EFlagSaveFocusAfterSorting,
     EFlagSingleClickEnabled,
     EFlagHighlightEnabled, // Is highlight drawing enabled
-    EFlagIgnoreButtonUpEvent // Up event ignored (when styluspopup menu open)
+    EFlagIsPressedDownState,
+    EFlagIsDragged,
+    EFlagScrollPhysicsTop, // Physics view adjusted according to top item
+    EFlagMirroredLayoutInUse, // Mirrored layout in use
+    EFlagMarkingMode // Marking mode activated    
     };
 
 
@@ -482,7 +487,7 @@
 //     
 void CAknTreeListView::SelectItem( CAknTreeItem* aSelectedItem )
     {
-    if ( iMarkingMode )
+    if ( iFlags.IsSet( EFlagMarkingMode ) )
         {
         if ( aSelectedItem->IsMarkable() )
             {
@@ -518,7 +523,14 @@
 //     
 void CAknTreeListView::SetPressedDownState( const TBool& aPressedDown )
     {
-    iIsPressedDownState = aPressedDown;
+    if ( aPressedDown )
+        {
+        iFlags.Set( EFlagIsPressedDownState );
+        }
+    else
+        {
+        iFlags.Clear( EFlagIsPressedDownState );
+        }
     }
     
 
@@ -833,7 +845,14 @@
 
         case KEikDynamicLayoutVariantSwitch:
             {
-            iMirroredLayoutInUse = AknLayoutUtils::LayoutMirrored();
+            if ( AknLayoutUtils::LayoutMirrored() )
+                {
+                iFlags.Set( EFlagMirroredLayoutInUse );
+                }
+            else
+                {
+                iFlags.Clear( EFlagMirroredLayoutInUse );
+                }
 
             CAknTreeItem* focusedItem( FocusedItem() );
             if ( focusedItem )
@@ -852,8 +871,11 @@
                         {
                         index = iItems.Count() - 1;
                         }
-    
-                    SetFocusedItem( focusedItem, index, ETrue );
+
+                    if( HighlightEnabled() )
+                        {
+                        SetFocusedItem( focusedItem, index, ETrue );
+                        }
                     }
                 else
                     {
@@ -891,7 +913,9 @@
             
         case KAknMessageFocusLost:
             {
-            if ( HighlightEnabled() )
+            if ( SingleClickEnabled() && HighlightEnabled() &&
+                 ( iOldWinPos == KErrNotFound || 
+                   iOldWinPos == DrawableWindow()->OrdinalPosition() ) )
                 {
                 EnableHighlight( EFalse );
                 // Redraw item
@@ -918,12 +942,6 @@
 //
 void CAknTreeListView::HandlePointerEventL( const TPointerEvent& aPointerEvent )
     {
-    if ( iFlags.IsSet( EFlagIgnoreButtonUpEvent ) 
-         && aPointerEvent.iType == TPointerEvent::EButton1Up )
-        {
-        return;
-        }
-    
     if ( GrabbingComponent() )
         {
         iPhysicsHandler->ResetEventBlockingStatus();
@@ -932,7 +950,6 @@
         {
         if( aPointerEvent.iType == TPointerEvent::EButton1Down )  
             {
-            iFlags.Clear( EFlagIgnoreButtonUpEvent );
             iPreviouslyFocusedItem = FocusedItem(); 
             }
 
@@ -980,7 +997,7 @@
         }
 
     TInt thumbPosition = aScrollBar->ThumbPosition();
-    if ( iMirroredLayoutInUse &&
+    if ( iFlags.IsSet( EFlagMirroredLayoutInUse ) &&
          aScrollBar != iScrollbarFrame->VerticalScrollBar() )
         {
         const TEikScrollBarModel* model = aScrollBar->Model();
@@ -1269,13 +1286,13 @@
       iStylusDownItemIndex( -1 ),
       iAnimationIID( KAknsIIDQsnAnimList ),
       iIndentionWidth( -1 ),
-      iPhysicsHandler( NULL ),
-      iScrollPhysicsTop( ETrue )
+      iPhysicsHandler( NULL )
       #ifdef RD_UI_TRANSITION_EFFECTS_LIST
       ,iGc(NULL)
       #endif //RD_UI_TRANSITION_EFFECTS_LIST
       ,iItemActionMenu( NULL ),
-      iLongTapDetector( NULL )       
+      iLongTapDetector( NULL ),
+      iOldWinPos( KErrNotFound )
     {
     if ( static_cast<CAknAppUi*>( 
             iCoeEnv->AppUi() )->IsSingleClickCompatible() )
@@ -1285,6 +1302,7 @@
   
     iFlags.Set( EFlagStructureLines );
     iFlags.Set( EFlagIndention );
+    iFlags.Set( EFlagScrollPhysicsTop );
     }
 
 
@@ -1322,8 +1340,8 @@
                                                             &iItems );
         }
 
-    iIsPressedDownState = EFalse;
-    iIsDragged = EFalse;
+    iFlags.Clear( EFlagIsPressedDownState );   
+    iFlags.Clear( EFlagIsDragged );
     iItemActionMenu = CAknItemActionMenu::RegisterCollectionL( *this, this );
 
     if ( iItemActionMenu )
@@ -1339,8 +1357,14 @@
         {
         EnableHighlight( ETrue );
         }
-    
-    iMirroredLayoutInUse = AknLayoutUtils::LayoutMirrored();
+    if ( AknLayoutUtils::LayoutMirrored() )
+        {
+        iFlags.Set( EFlagMirroredLayoutInUse );
+        }
+    else
+        {
+        iFlags.Clear( EFlagMirroredLayoutInUse );
+        }
     LoadMarkingIconsL();
     }
 
@@ -1673,7 +1697,7 @@
     CAknTreeItem* item = FocusedItem();
     if ( item )
         {
-        if ( iMarkingMode )
+        if ( iFlags.IsSet( EFlagMarkingMode ) )
             {
             if ( item->IsMarkable() )
                 {
@@ -1694,7 +1718,7 @@
 //
 void CAknTreeListView::HandleRightArrowKeyEvent()
     {
-    if ( iMirroredLayoutInUse )
+    if ( iFlags.IsSet( EFlagMirroredLayoutInUse ) )
         {
         AscendFocus();
         }
@@ -1711,7 +1735,7 @@
 //
 void CAknTreeListView::HandleLeftArrowKeyEvent()
     {
-    if ( iMirroredLayoutInUse )
+    if ( iFlags.IsSet( EFlagMirroredLayoutInUse ) )
         {
         DescendFocus();
         }
@@ -2025,10 +2049,12 @@
         iterator.SetCurrent( first );
         iterator.Previous();
         }
-
-    if ( iMarkingMode )
+    if ( iFlags.IsSet( EFlagMarkingMode ) )    
+
         {
-        itemRect.iBr.iX -= KCheckBoxOffset;
+        itemRect.iBr.iX -= 
+                AknLayoutScalable_Avkon::list_double_graphic_pane_t1( 
+                        0 ).LayoutLine().il;
         }
 
     // Update items and their rectangles.
@@ -2090,9 +2116,10 @@
             iScrollbarFrame->DrawBackground( EFalse, EFalse );
             }
             
+        iPhysicsHandler->UpdateScrollIndex( 
+                iFlags.IsSet( EFlagScrollPhysicsTop ) );
+        iFlags.Set( EFlagScrollPhysicsTop );
     
-        iPhysicsHandler->UpdateScrollIndex( iScrollPhysicsTop );
-        iScrollPhysicsTop = ETrue;
         
         // Get values for horizontal scrollbar.
         TInt hThumbPos = iViewLevel;
@@ -2108,8 +2135,8 @@
             hThumbSpan = a/b;
             hScrollSpan = Max( hThumbPos + hThumbSpan, c/b );
             }
-
-        if ( iMirroredLayoutInUse )
+        if ( iFlags.IsSet( EFlagMirroredLayoutInUse ) )
+
             {
             hThumbPos = hScrollSpan - ( hThumbPos + hThumbSpan );
             }
@@ -2817,6 +2844,9 @@
     CWindowGc& gc = SystemGc();
 #endif
 
+    TInt checkBoxOffset = 
+            AknLayoutScalable_Avkon::list_double_graphic_pane_t1( 
+                    0 ).LayoutLine().il;                                         
 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
     MAknListBoxTfxInternal* transApi = CAknListLoader::TfxApiInternal( &gc );
     if ( !empty && transApi )
@@ -2867,28 +2897,22 @@
                                    textColor, 
                                    KAknsIIDQsnTextColors,
                                    EAknsCIQsnTextColorsCG6 );
-
-        if ( iMarkingMode && iMarkingIconArray && iMarkingIconArray->Count()== 2 )
+        if ( iFlags.IsSet( EFlagMarkingMode ) 
+                && iMarkingIconArray 
+                && iMarkingIconArray->Count() == KMarkingModeIconArraySize  )
+
             {
             // Set sizes for marking icon bitmaps
             TRect drawRect; 
-            if ( iItems.Count() > 0 ) 
-                {
-                drawRect = iItems[0].Rect();
-                drawRect.iBr.iX += KCheckBoxOffset;
-                }
+            drawRect = iItems[0].Rect();
 
             // Rect for the marking icon
             TRect iconRect = RectFromLayout( drawRect,
                     AknLayoutScalable_Avkon::list_single_graphic_pane_g1( 0 ) );
-            iconRect.Move( 0, -offset );
-            
-            gc.SetPenColor( textColor );
-            gc.SetPenStyle( CGraphicsContext::ESolidPen );
             
             for ( TInt ii = 0; ii < iMarkingIconArray->Count(); ++ii )
                 {
-                CGulIcon* icon = (*iMarkingIconArray)[ii];
+                CGulIcon* icon = ( *iMarkingIconArray )[ii];            
                 CFbsBitmap* bitmap = icon->Bitmap();
 
                 if ( bitmap )
@@ -2910,9 +2934,9 @@
             {
             TRect drawRect( iItems[ii].Rect() );
 
-            if ( iMarkingMode )
+            if ( iFlags.IsSet( EFlagMarkingMode ) )
                 {
-                drawRect.iBr.iX += KCheckBoxOffset;
+                drawRect.iBr.iX += checkBoxOffset;                    
                 }
 
             if ( iItems[ii].Item() )
@@ -2958,14 +2982,17 @@
                     }
 #endif
 
-                if ( iMarkingMode && iMarkingIconArray && iMarkingIconArray->Count()== 2 )
+                if ( iFlags.IsSet( EFlagMarkingMode ) && iMarkingIconArray 
+                        && iMarkingIconArray->Count() == 
+                                KMarkingModeIconArraySize )
                     {
                     // Rect for the marking icon
                     TRect iconRect = RectFromLayout( drawRect,
                         AknLayoutScalable_Avkon::list_single_graphic_pane_g1( 0 ) );
             
                     iconRect.Move( 0, -offset );
-                    CGulIcon* icon = (*iMarkingIconArray)[1]; // unchecked
+                    // unchecked icon
+                    CGulIcon* icon = ( *iMarkingIconArray )[1];                    
 
                     TBool marked = ( iItems[ii].Item()->IsMarked() );
                     if ( marked )
@@ -2989,10 +3016,10 @@
                     AknListUtils::DrawSeparator( gc, offsetRect, textColor, skin );
                     }
 
-                if ( iMarkingMode )
+                if ( iFlags.IsSet( EFlagMarkingMode ) )
                     {
-                    gc.SetOrigin( TPoint( KCheckBoxOffset, 0 ) );
-                    drawRect.iBr.iX -= KCheckBoxOffset;
+                    gc.SetOrigin( TPoint( checkBoxOffset, 0 ) );
+                    drawRect.iBr.iX -= checkBoxOffset;                
                     }
 
                 TBool focused = ( FocusedItem() &&
@@ -3014,7 +3041,8 @@
                         tfxHighlightRect.Move( 0, -offset );
 #endif //RD_UI_TRANSITION_EFFECTS_LIST
 
-                    if ( iIsPressedDownState || !DrawAnimation( gc, highlightRect ) )
+                    if ( iFlags.IsSet( EFlagIsPressedDownState ) 
+                            || !DrawAnimation( gc, highlightRect ) )
                         {
 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
                         if ( transApi )
@@ -3025,8 +3053,9 @@
                             transApi->StartDrawing( MAknListBoxTfxInternal::EListHighlight );
                             }
 #endif //RD_UI_TRANSITION_EFFECTS_LIST
-
-                        DrawHighlight( gc, highlightRect, iIsPressedDownState );
+                        DrawHighlight( gc, highlightRect, 
+                                iFlags.IsSet( EFlagIsPressedDownState ) );
+
 
 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
                         if ( transApi )
@@ -3057,7 +3086,7 @@
                     }
 #endif //RD_UI_TRANSITION_EFFECTS_LIST
 
-                if ( iMarkingMode )
+                if ( iFlags.IsSet( EFlagMarkingMode ) )
                     {
                     TBool marked = iItems[ii].Item()->IsMarked();
                     if ( marked )
@@ -3089,7 +3118,7 @@
                 }
 #endif //RD_UI_TRANSITION_EFFECTS_LIST
 
-                if ( iMarkingMode )
+                if ( iFlags.IsSet( EFlagMarkingMode ) )
                     {
                     gc.SetOrigin( TPoint( 0, 0 ) );
                     }
@@ -3183,7 +3212,7 @@
                 item = iterator.Previous();
                 }
             }
-        iScrollPhysicsTop = EFalse;
+        iFlags.Clear( EFlagScrollPhysicsTop );
         }
         
     }
@@ -3268,7 +3297,12 @@
         {
         state |= MAknCollection::EStateMultipleSelection;        
         }
-
+    TBool markedItems( EFalse );
+    TRAP_IGNORE( markedItems = HasMarkedItemsL() );
+    if ( markedItems )
+        {
+        state |= MAknCollection::EStateMarkedItems; 
+        }
     return state;
     }
 
@@ -3278,7 +3312,7 @@
 //
 void CAknTreeListView::ItemActionMenuClosed()
     {
-    iFlags.Clear( EFlagIgnoreButtonUpEvent );
+    iOldWinPos = KErrNotFound;
     EnableHighlight( EFalse );
     DrawDeferred();
     }
@@ -3305,7 +3339,7 @@
 //
 void CAknTreeListView::SetMultipleMarkingState( TBool aActive )
     {
-    if ( iMarkingMode != aActive )
+    if ( iFlags.IsSet( EFlagMarkingMode ) != aActive )
         {
         if ( !aActive )
             {
@@ -3318,7 +3352,19 @@
             }
         
         EnableMarking( aActive );
-        iMarkingMode = aActive;
+        if ( aActive )
+            {
+            iFlags.Set( EFlagMarkingMode );
+            }
+        else
+            {
+            iFlags.Clear( EFlagMarkingMode );
+            }
+        if ( aActive )
+            {
+            // Expand all items when entering marking mode
+            iTree.Expand(); 
+            }
         LayoutView();
         DrawDeferred();
 
@@ -3338,7 +3384,7 @@
     {
     TUint state( 0 );
 
-    if ( iMarkingMode )
+    if ( iFlags.IsSet( EFlagMarkingMode ) )
         {
         state |= MAknMarkingCollection::EStateMarkingMode;
 
@@ -3363,7 +3409,8 @@
 //
 void CAknTreeListView::MarkCurrentItemL()
     {
-    if ( iMarkingMode && FocusedItem() && FocusedItem()->IsMarkable() )
+    if ( iFlags.IsSet( EFlagMarkingMode ) && FocusedItem() && 
+            FocusedItem()->IsMarkable() )    
         {
         MarkItem( FocusedItem(), ETrue, ETrue );
         }
@@ -3376,7 +3423,7 @@
 //
 void CAknTreeListView::MarkAllL()
     {
-    if ( iMarkingMode )
+    if ( iFlags.IsSet( EFlagMarkingMode ) )
         {
         TAknTreeIterator iterator = iTree.Iterator();
         CAknTreeItem* item = NULL;
@@ -3400,7 +3447,7 @@
 //
 void CAknTreeListView::UnmarkAll()
     {
-    if ( iMarkingMode )
+    if ( iFlags.IsSet( EFlagMarkingMode ) )
         {
         TAknTreeIterator iterator = iTree.Iterator();
         CAknTreeItem* item = NULL;
@@ -3463,8 +3510,9 @@
         const TPoint& /*aPenEventLocation*/,
         const TPoint& aPenEventScreenLocation)
     {
-    iFlags.Set( EFlagIgnoreButtonUpEvent );
     iItemActionMenu->ShowMenuL( aPenEventScreenLocation, 0 );
+    iOldWinPos = DrawableWindow()->OrdinalPosition();
+    IgnoreEventsUntilNextPointerUp();
     }
 
 // ---------------------------------------------------------------------------
@@ -3505,11 +3553,7 @@
     iList.GetMarkedItemsL( selection );
     TInt count( selection.Count() );
     CleanupStack::PopAndDestroy( &selection );
-    if ( count > 0 )
-         {
-         return ETrue;
-         }
-    return EFalse;
+    return ( count > 0 );
     }
 
 
@@ -3586,7 +3630,8 @@
     {
     if ( !iMarkingIconArray )
         {
-        iMarkingIconArray = new ( ELeave ) CAknIconArray( 2 );
+        iMarkingIconArray = new ( ELeave ) 
+            CAknIconArray( KMarkingModeIconArraySize ); 
         }
     else
         {
--- a/uifw/AvKon/aknphysics/src/aknphysics.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/aknphysics/src/aknphysics.cpp	Tue May 25 12:58:19 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009, 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"
@@ -931,6 +931,7 @@
 void CAknPhysics::DrawViewInCurrentPosition()
     {
     NotifyViewPositionChanged( iObserver.ViewPosition(), ETrue );
+    iPanningDrawOmitted = EFalse;
     }
 
 // --------------------------------------------------------------------------
--- a/uifw/AvKon/inc/AknPreviewPopUp.h	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/inc/AknPreviewPopUp.h	Tue May 25 12:58:19 2010 +0300
@@ -207,6 +207,13 @@
         * @param aRect Rect to draw.
         */
         void DrawBackground( CWindowGc& aGc, const TRect& aRect ) const;
+             
+        /**
+         * Cleans the internal pointer which is used 
+         * to track object deletion.
+         * @param aParam Pointer to preview popup object.
+         */
+        static void CleanLocalRef( TAny* aParam );
         
     private: // Data
     
@@ -242,6 +249,10 @@
         
         // It is true when user clicks the popup, transfer pointer up event to its child control
         TBool iAllowUpEvent;
+        
+        // Stores the local variable address, which is used
+        // to mark whether this object has been deleted
+        TBool* iIsDeleted;
 
     };
 
--- a/uifw/AvKon/src/AknAdaptiveSearchGrid.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/src/AknAdaptiveSearchGrid.cpp	Tue May 25 12:58:19 2010 +0300
@@ -534,9 +534,20 @@
          const TRect& aRect ) const 
     {
     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-    MAknsControlContext* cc = AknsDrawUtils::ControlContext( this ); 
-    aGc.SetBrushColor( KRgbWhite );
-    aGc.SetPenColor( KRgbBlack );
+
+    TRgb color;
+    TInt error = AknsUtils::GetCachedColor(skin, color, KAknsIIDFsTextColors, 
+        		   EAknsCIFsTextColorsCG3 );
+    if( error == KErrNone )
+        {
+        aGc.SetBrushColor( color );
+        aGc.SetPenColor( color );
+        }
+    else
+        {
+        aGc.SetBrushColor( KRgbWhite );
+        aGc.SetPenColor( KRgbBlack );
+        }
     aGc.SetBrushStyle( CGraphicsContext::ESolidBrush );
     aGc.DrawRect( aRect );   
     }
--- a/uifw/AvKon/src/AknAppUi.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/src/AknAppUi.cpp	Tue May 25 12:58:19 2010 +0300
@@ -1410,6 +1410,12 @@
         {
         AknsUtils::SetAvkonHighlightAnimationEnabledL( EFalse );
         }
+    
+    if (( aAppUiFlags & EAknDisableAnimationBackground ) != 0)
+        {
+        AknsUtils::SetAnimationBackgroundDisabledL( ETrue );
+        
+        }
 
 #ifdef RD_SCALABLE_UI_V2
     if ( CAknTouchPane* tp = TouchPane() )
--- a/uifw/AvKon/src/AknCharMap.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/src/AknCharMap.cpp	Tue May 25 12:58:19 2010 +0300
@@ -94,8 +94,6 @@
 const TUint KHistoryEmptyChar = CEditableText::ETabCharacter;
 const TUint KHistoryEmptyCharForDisplay = CEditableText::ESpace;
 
-const TInt KAknSctRadioOn = 1;
-const TInt KAknSctRadioOff = 0;
 const TInt KAreaIdRecent = 0;
 const TInt KAreaIdMain   = 1;
 const TInt KAreaIdTail   = 2;
@@ -245,60 +243,6 @@
     };
 
 // ----------------------------------------------------------------------------
-// Table Navi class definition
-// ----------------------------------------------------------------------------
-//
-NONSHARABLE_CLASS(CAknSctTableNavi) : public CAknControl, public MAknSctFocusHandler, public MCoeControlObserver
-    {
-    public:
-        CAknSctTableNavi(CAknCharMap* aCharMap, CAknCharMapExtension* aExtension);
-        ~CAknSctTableNavi();
-
-    public:  // from CCoeControl
-        TInt CountComponentControls() const;
-        CCoeControl* ComponentControl( TInt aIndex ) const;
-        virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode);
-        void ConstructFromResourceL(TResourceReader& aReader);
-        virtual TSize MinimumSize();
-        virtual void SizeChanged();
-        
-    public: // from MCoeControlObserver
-        void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType);
-
-    public: // from MAknSctFocusHandler
-        virtual CCoeControl* FocusedControl();
-        virtual TBool EnterControl(TInt aX, TInt aY);
-        virtual void MoveFocus(TInt aX, TInt aY);
-        virtual TBool ExitWithKey(TInt aKeycode);
-        virtual TBool LeaveControl();
-
-    public:
-        TInt TableCount();
-        void UpdateNextTableButtonL();
-        
-    private:
-        void TableExitL();
-        static TInt TableExitCallBackL(TAny* aThis);
-        void DoTableExitL();
-        
-        void NextTableL();
-        static TInt NextTableCallBackL(TAny* aThis);
-        void DoNextTableL();
-        
-    private:
-        TInt ButtonPosition(TInt aButtonIndex) const;
-
-    private:  // data
-        TInt iButtonIndex;
-        RPointerArray<CAknSctNaviButton> iButtonArray;
-        CAknCharMap* iCharMap;
-        CAknCharMapExtension* iExtension;
-        CIdle *iIdle;
-        
-        TInt iPressedButtonIndex;
-    };
-
-// ----------------------------------------------------------------------------
 // Navigator class definition
 // ----------------------------------------------------------------------------
 //
@@ -331,8 +275,21 @@
         virtual TBool ExitWithKey(TInt aKeycode);
         virtual TBool LeaveControl();
 
+    public:
+        void UpdateNextTableButtonL();
+        TInt LastButton() const;
+        
     private:
+        void MoveFocus(TBool aInternalMove, TInt aX, TInt aY );
         TBool IsNextButton() const;
+        TBool CalcNextStep( TUint aKey, TInt& aX, TInt& aY );
+        void TableExitL();
+        static TInt TableExitCallBackL(TAny* aThis);
+        void DoTableExitL();
+        
+        void NextTableL();
+        static TInt NextTableCallBackL(TAny* aThis);
+        void DoNextTableL();
 
     private:  // data
         TInt iButtonIndex;
@@ -340,8 +297,8 @@
         CAknCharMap* iCharMap;
         CAknCharMapExtension* iExtension;
         CEikLabel* iTitle;
+        CIdle *iIdle;
     };
-
 // ----------------------------------------------------------------------------
 // Category button class defintion
 // ----------------------------------------------------------------------------
@@ -377,60 +334,27 @@
 // Radio button class defintion
 // ----------------------------------------------------------------------------
 //
-class CAknSctRadioButton : public CAknControl, public MAknSctFocusHandler
-    {
-    public:
-        enum TAknSctRadioButtonFlags
-            {
-            EAknSctRadioButtonResize = 0x1,
-            EAknSctRadioButtonEnd
-            };
+// stay for BC
+class CAknSctRadioButton : public CAknControl
+    {
     public:
         CAknSctRadioButton();
-        CAknSctRadioButton(CAknCharMap* aCharMap,
-                           CAknCharMapExtension* aExtension);
         ~CAknSctRadioButton();
-    public: // from MAknSctFocusHandler
-        virtual CCoeControl* FocusedControl();
-        virtual TBool EnterControl(TInt aX, TInt aY);
-        virtual void MoveFocus(TInt aX, TInt aY);
-        virtual TBool ExitWithKey(TInt aKeycode);
-        virtual TBool LeaveControl();
-
-    public:  // from CCoeControl
-        TInt CountComponentControls() const;
-        CCoeControl* ComponentControl( TInt aIndex ) const;
-        virtual TKeyResponse OfferKeyEventL(
-            const TKeyEvent& aKeyEvent, TEventCode);
-        void ConstructFromResourceL(TResourceReader& aReader);
-
-        /**
-         * This function handles pointer events directed at the charmapdialog.
-         * @param aPointerEvent The pointer event directed at the charmapdialog.
-         */
-        virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent);
-
-        virtual TSize MinimumSize();
-        virtual void SizeChanged();
-        virtual void Draw(const TRect& aRect) const;
-
-    public:  // New function
-        // The number of Buttons
-        inline TInt Count() const;
-
-        void SetCurrentCategory(TInt aCategory);
-        void SetValidSctCase(TInt aSctCase);
-        void RemoveInvalidButton();
 
     private:  // data
         RPointerArray<CAknSctCategoryButton> iButtonArray;
-        MCoeControlObserver* iObserver;
-        TInt iFlags;
-        CAknCharMapExtension* iExtension;
-        CAknCharMap* iCharMap;
-        TInt iButtonIndex;
-        TInt iEntryIndex;
     };
+
+CAknSctRadioButton::CAknSctRadioButton()
+    {
+    }
+
+CAknSctRadioButton::~CAknSctRadioButton()
+    {
+    iButtonArray.ResetAndDestroy();
+    iButtonArray.Close();
+    }
+
 // end of CAknSctRadioButton class definition
 
 // ----------------------------------------------------------------------------
@@ -497,15 +421,11 @@
         // FeatureManager
         TBool iPictographsBuffer;         // ETrue means Picto is valid.
         TBool iPictographsBufferGrouping; // ETrue means Picto grouping is valid.
-        TBool iJapaneseSctUi;       // Title and Softkey for Japanese varinat
-        TBool iHasCategoryButtonUi; // Has Category button UI
-        CAknSctRadioButton* iRadioButton;
         TInt  iCurrentCategory;     // defined enum TAknSCTCategoryButton on avkon.hrh
 
         // QHD layout.
         CAknCharMap* iCharMapProxy;
         MAknSctFocusHandler* iFocusHandler;
-        CAknSctTableNavi* iTableNavi;
         CAknSctPageNavi* iPageNavi;
         HBufC* iEntryBuf;
         CEikLabel* iCategoryTitle;
@@ -540,6 +460,9 @@
         * Is keyboard event
         */
         TBool iKeyBrdEvent;
+        
+    private:
+        CAknSctRadioButton iForBCDoNotUse;
     };
 
 // ----------------------------------------------------------------------------
@@ -603,518 +526,6 @@
     }
 
 // ----------------------------------------------------------------------------
-// Table navi class implementation
-// ----------------------------------------------------------------------------
-//
-CAknSctTableNavi::CAknSctTableNavi(CAknCharMap* aCharMap, CAknCharMapExtension* aExtension) : 
-iCharMap(aCharMap), iExtension(aExtension)
-    {
-    }
-
-CAknSctTableNavi::~CAknSctTableNavi()
-    {
-    if (iButtonArray.Count())
-        {
-        iButtonArray.ResetAndDestroy();
-        }
-    iButtonArray.Close();
-    delete iIdle;
-    }
-
-TInt CAknSctTableNavi::CountComponentControls() const
-    {
-    return iButtonArray.Count();
-    }
-
-CCoeControl* CAknSctTableNavi::ComponentControl( TInt aIndex ) const
-    {
-    CCoeControl* rtn;
-    if (aIndex < iButtonArray.Count())
-        {
-        rtn = iButtonArray[aIndex]->iButtonControl;
-        }
-    else
-        {
-        rtn = NULL;
-        }
-    return rtn;
-    }
-
-TKeyResponse CAknSctTableNavi::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aModifiers)
-    {
-    CAknSctNaviButton* buttonObj = iButtonArray[iButtonIndex];
-    buttonObj->iButtonControl->OfferKeyEventL(aKeyEvent,aModifiers);
-    TKeyResponse response = EKeyWasNotConsumed;
-    TUint code=aKeyEvent.iCode;
-    switch (code)
-        {
-        case EKeyEnter:
-        case EKeyOK:
-            {
-            switch (buttonObj->iButtonId)
-                {
-                case EAknSctTableNaviExit:
-                    {
-                    iExtension->iKeyOkEvent = ETrue;
-                    TableExitL();
-                    response = EKeyWasConsumed;
-                    }
-                    break;
-                // add all supported table types here.
-                case EAknSctTableNaviSpecialChar:
-                case EAknSctTableNaviEmotion:
-                    {
-                    NextTableL();
-                    response = EKeyWasConsumed;
-                    }
-                    break;
-                default:
-                    break;
-                }
-            }
-            break;
-        case EKeyLeftArrow:
-        case '4':
-            {
-            MoveFocus(-1,0);
-            response = EKeyWasConsumed;
-            }
-            break;
-        case EKeyRightArrow:
-        case '6':
-            {
-            MoveFocus(1,0);
-            response = EKeyWasConsumed;
-            }
-            break;
-        case EKeyUpArrow:
-        case '2':
-            {
-            response = EKeyWasConsumed;
-            if ((iButtonIndex==0) && !Layout_Meta_Data::IsLandscapeOrientation())
-                {
-                // Left page button.
-                if (iExtension->iPageNavi && iExtension->iPageNavi->EnterControl(0,0))
-                    {
-                    LeaveControl();
-                    }
-                }
-            else
-                {
-                // Last radio button.
-                if ((iButtonIndex==0) && iExtension->iRadioButton)
-                    {
-                    if (iExtension->iRadioButton->EnterControl(0,iExtension->iRadioButton->Count()-1))
-                        {
-                        LeaveControl();
-                        }
-                    break;
-                    }
-
-                // Grid bottom row.
-                TInt xPos = ButtonPosition(iButtonIndex);
-                if (iCharMap->ColMax(0) > iCharMap->ColMax(xPos))
-                    {
-                    xPos = iCharMap->RowMax(iCharMap->ColMax(0));
-                    }
-
-                if (iExtension->EnterControl(xPos,iCharMap->ColMax(xPos)))
-                    {
-                    LeaveControl();
-                    break;
-                    }
-                }
-            }
-            break;
-            
-        case EKeyDownArrow:
-        case '8':
-            {
-            response = EKeyWasConsumed;
-            
-            // First radio button.
-            if ((iButtonIndex==0) && iExtension->iRadioButton)
-                {
-                if (iExtension->iRadioButton->EnterControl(0,0))
-                    {
-                    LeaveControl();
-                    }
-                break;
-                }
-            
-            // Grid top row.
-            TInt xPos = ButtonPosition(iButtonIndex);
-            if (iExtension->EnterControl(xPos,iCharMap->ColMin(xPos)))
-                {
-                LeaveControl();
-                break;
-                }
-            }
-            break;
-            
-        default:
-            break;
-        }
-    return response;
-    }
-
-void CAknSctTableNavi::TableExitL()
-    {
-    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
-    {
-    // buttons behind the 1th are behavior as one button
-    return (aButtonIndex==0) ? 0 : 1;
-    }
-
-void CAknSctTableNavi::ConstructFromResourceL(TResourceReader& aReader)
-    {
-    // Table navi buttons.
-    TInt counts = aReader.ReadInt16();
-    for (TInt i = 0; i < counts; i++)
-        {
-        TInt buttonId = aReader.ReadInt16();
-        TInt resId = aReader.ReadInt32();
-        TResourceReader buttonReader;
-        iCoeEnv->CreateResourceReaderLC(buttonReader, resId);
-        CAknSctNaviButton* buttonObj = CAknSctNaviButton::NewL(*this, buttonId, buttonReader);
-        buttonObj->SetObserver(this);
-        iButtonArray.Append(buttonObj);
-        CleanupStack::PopAndDestroy(); // buttonReader
-        }
-    }
-
-TSize CAknSctTableNavi::MinimumSize()
-    {
-    return Rect().Size();
-    }
-
-void CAknSctTableNavi::SizeChanged()
-    {
-    if (iButtonArray.Count()>0)
-        {
-
-        TInt ctrlVariety = 2;
-        TInt cellVariety = 1;
-        if(!iCharMap->IsJapaneseSctUi())
-            {
-            ctrlVariety = (iCharMap->TableCount()>1) ? 0 : 1;
-            cellVariety = 0;
-            }
-        
-        TAknLayoutRect cellLayRect, buttonLayRect;
-        TRect buttonRect;
-
-        // Table exit.
-        cellLayRect.LayoutRect(Rect(), AknLayoutScalable_Avkon::cell_graphic2_control_pane(ctrlVariety,0));
-        buttonLayRect.LayoutRect(cellLayRect.Rect(), AknLayoutScalable_Avkon::bg_button_pane_cp05(cellVariety));
-        buttonRect = buttonLayRect.Rect();
-
-        TAknLayoutRect iconLayRect;
-        iconLayRect.LayoutRect(buttonRect, AknLayoutScalable_Avkon::cell_graphic2_control_pane_g1(cellVariety));
-        TSize iconSize = iconLayRect.Rect().Size();
-
-        CAknSctNaviButton* buttonObj = iButtonArray[0];
-        buttonObj->iButtonControl->SetRect(buttonRect);
-        buttonObj->iButtonControl->SetHighlightRect(buttonRect);
-        buttonObj->iButtonControl->SetIconScaleMode(EAspectRatioPreserved);
-        buttonObj->iButtonControl->SetIconSize(iconSize);
-        buttonObj->SetEnabled(ETrue);
-
-        // Table change.
-        if (iCharMap->TableCount() > 1)
-            {
-            cellLayRect.LayoutRect(Rect(), AknLayoutScalable_Avkon::cell_graphic2_control_pane(ctrlVariety,1));
-            buttonLayRect.LayoutRect(cellLayRect.Rect(), AknLayoutScalable_Avkon::bg_button_pane_cp05(cellVariety));
-            buttonRect = buttonLayRect.Rect();
-            
-            for (TInt i(1); i<iButtonArray.Count(); i++)
-                {
-                CAknSctNaviButton* buttonObj = iButtonArray[i];
-                buttonObj->iButtonControl->SetRect(buttonRect);
-                buttonObj->iButtonControl->SetHighlightRect(buttonRect);
-                buttonObj->iButtonControl->SetIconScaleMode(EAspectRatioPreserved);
-                buttonObj->iButtonControl->SetIconSize(iconSize);
-                buttonObj->SetEnabled(ETrue);
-                }
-            }
-
-        TRAP_IGNORE(UpdateNextTableButtonL());
-        }
-    }
-
-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()
-    {
-    
-    TBool isFocused = EFalse;
-    
-    // table switch buttons stay in one place.
-    for(TInt index(1); index<iButtonArray.Count(); index++)
-        {
-        CAknSctNaviButton* buttonObj = iButtonArray[index];
-        if(buttonObj->IsEnabled())
-            {
-            isFocused = buttonObj->IsFocused();
-            }
-        }
-    
-    // fresh focused button
-    for (TInt index(1); index<iButtonArray.Count(); index++)
-        {
-        CAknSctNaviButton* buttonObj = iButtonArray[index];
-        if (iCharMap->TableCount() > 1)
-            {
-            switch (iCharMap->NextTableCase())
-                {
-                case EAknCharMapTableSpecialChar:
-                    {
-                    TBool isShown = EFalse;
-                    if(iExtension->IsShowingEmotion())
-                        {
-                        isShown = (buttonObj->iButtonId==EAknSctTableNaviSpecialChar);
-                        }
-                    else
-                        {
-                        isShown = (buttonObj->iButtonId==EAknSctTableNaviEmotion);
-                        }
-                    buttonObj->SetEnabled(isShown);
-                    buttonObj->SetFocused(isShown && isFocused);
-                    if(isShown && isFocused)
-                        {
-                        iButtonIndex = index;
-                        }
-                    }
-                    break;
-
-                default:
-                    buttonObj->SetEnabled(EFalse);
-                    break;
-                }
-            }
-        else
-            {
-            buttonObj->SetEnabled(EFalse);
-            }
-        }
-    }
-
-CCoeControl* CAknSctTableNavi::FocusedControl()
-    {
-    return this;
-    }
-
-TBool CAknSctTableNavi::EnterControl(TInt aX, TInt /*aY*/)
-    {
-    if (IsVisible())
-        {
-        if ((aX >= 0) && (aX < iButtonArray.Count()))
-            {
-            TInt index = aX;
-            if (AknLayoutUtils::LayoutMirrored()) // reverse.
-                {
-                index = (iButtonArray.Count() - 1) - aX;
-                }
-
-            index = ButtonPosition(index);
-
-            for(; index<iButtonArray.Count(); index++)
-                {
-                CAknSctNaviButton* buttonObj = iButtonArray[index];
-                if (buttonObj->IsEnabled())
-                    {
-                    iButtonIndex = index;
-                    iExtension->iFocusHandler = this;
-                    buttonObj->SetFocused(ETrue);
-                    return ETrue;
-                    }
-                }
-            }
-        }
-    return EFalse;
-    }
-
-void CAknSctTableNavi::MoveFocus(TInt aX, TInt /*aY*/)
-    {
-    TInt delta = aX;
-    if (AknLayoutUtils::LayoutMirrored()) // reverse.
-        {
-        delta = -aX;
-        }
-
-    TInt buttonIndex = iButtonIndex + delta;
-
-    // loop until find next position
-    for (TInt i = 0; i < iButtonArray.Count(); i++)
-        {
-
-        if (buttonIndex > iButtonArray.Count() - 1) // goto Next control
-            {
-            if (!Layout_Meta_Data::IsLandscapeOrientation())
-                {
-                // First radio button.
-                if (iExtension->iRadioButton)
-                    {
-                    if (iExtension->iRadioButton->EnterControl(0,0))
-                        {
-                        LeaveControl();
-                        }
-                    break;
-                    }
-                // Grid start.
-                if (iExtension->EnterControl(0,iCharMap->ColMin(0)))
-                    {
-                    LeaveControl();
-                    }
-                }
-            else
-                {
-                // Left page button.
-                if (iExtension->iPageNavi &&
-                    iExtension->iPageNavi->EnterControl(0,0))
-                    {
-                    LeaveControl();
-                    }
-                }
-            break;
-            }
-
-        else if (buttonIndex < 0) // goto Prev control
-            {
-            if (!Layout_Meta_Data::IsLandscapeOrientation())
-                {
-                // Right page button.
-                if (iExtension->iPageNavi &&
-                    iExtension->iPageNavi->EnterControl(1,0))
-                    {
-                    LeaveControl();
-                    }
-                }
-            else
-                {
-                // Grid end.
-                TInt posY = iCharMap->ColMax(0);
-                if (iExtension->EnterControl(iCharMap->RowMax(posY),posY))
-                    {
-                    LeaveControl();
-                    }
-                }
-            break;
-            }
-
-        if (iButtonArray[buttonIndex]->IsEnabled()) // goto next button in This control
-            {
-            CAknSctNaviButton* buttonObj;
-            buttonObj = iButtonArray[iButtonIndex];
-            buttonObj->SetFocused(EFalse);
-            iButtonIndex = buttonIndex;
-            buttonObj = iButtonArray[iButtonIndex];
-            buttonObj->SetFocused(ETrue);
-            break;
-            }
-        
-        buttonIndex += (delta < 0) ? -1 : 1; // get next position
-        }
-    }
-
-TBool CAknSctTableNavi::LeaveControl()
-    {
-    for (TInt i = 0; i < iButtonArray.Count(); i++ )
-        {
-        iButtonArray[i]->SetFocused(EFalse);
-        }
-    return ETrue;
-    }
-
-TBool CAknSctTableNavi::ExitWithKey(TInt /*aKeycode*/)
-    {
-    if (iButtonArray[iButtonIndex]->iButtonId != EAknSctTableNaviExit)
-        {
-        return EFalse;
-        }
-    else
-        {
-        return ETrue;
-        }
-    }
-
-// ----------------------------------------------------------------------------
 // Page Navi class implementation
 // ----------------------------------------------------------------------------
 //
@@ -1134,6 +545,7 @@
         }
     iButtonArray.Close();
     delete iTitle;
+    delete iIdle;
     }
 
 TInt CAknSctPageNavi::CountComponentControls() const
@@ -1182,6 +594,12 @@
             {
             switch (buttonObj->iButtonId)
                 {
+                case EAknSctTableNaviExit:
+                    {
+                    iExtension->iKeyOkEvent = ETrue;
+                    TableExitL();
+                    }
+                    break;
                 case EAknSctPageNaviPrevPage:
                     {
                     iCharMap->PrevPageL();
@@ -1192,6 +610,13 @@
                     iCharMap->NextPageL();
                     }
                     break;
+                // add all supported table types here.
+                case EAknSctTableNaviSpecialChar:
+                case EAknSctTableNaviEmotion:
+                    {
+                    NextTableL();
+                    }
+                    break;
                 default:
                     return EKeyWasConsumed;
                 }
@@ -1202,110 +627,18 @@
             break;
         case EKeyLeftArrow:
         case '4':
-            {
-            MoveFocus(-1,0);
-            response = EKeyWasConsumed;
-            }
-            break;
         case EKeyRightArrow:
         case '6':
-            {
-            MoveFocus(1,0);
-            response = EKeyWasConsumed;
-            }
-            break;
         case EKeyUpArrow:
         case '2':
-            {
-            response = EKeyWasConsumed;
-            if (!Layout_Meta_Data::IsLandscapeOrientation())
-                {
-                if (iExtension->iRadioButton && !IsNextButton())
-                    {
-                    // Last radio button.
-                    if (iExtension->iRadioButton->EnterControl(
-                        0,iExtension->iRadioButton->Count()-1))
-                        {
-                        LeaveControl();
-                        }
-                    break;
-                    }
-                }
-            TInt xPos;
-            if (!Layout_Meta_Data::IsLandscapeOrientation())
-                {
-                xPos = IsNextButton() ? iCharMap->MaxCols() - 1 : 0;
-                }
-            else
-                {
-                if (IsNextButton())
-                    {
-                    xPos = iCharMap->MaxCols() - 1;
-                    }
-                else
-                    {
-                    xPos = !iExtension->iRadioButton ?
-                        iCharMap->TableCount() : iCharMap->MaxCols()-2;
-                    }
-                }
-            if (iCharMap->ColMax(0) > iCharMap->ColMax(xPos))
-                {
-                xPos = iCharMap->RowMax(iCharMap->ColMax(0));
-                }
-            // Grid bottom row.
-            if (iExtension->EnterControl(xPos,iCharMap->ColMax(xPos)))
-                {
-                LeaveControl();
-                break;
-                }
-            }
-            break;
         case EKeyDownArrow:
         case '8':
             {
+            TInt gridX;
+            TInt gridY;
+            TBool gridInvolved = CalcNextStep( code, gridX, gridY );
+            MoveFocus( !gridInvolved, gridX, gridY );
             response = EKeyWasConsumed;
-            if (!Layout_Meta_Data::IsLandscapeOrientation())
-                {
-                if (!IsNextButton())
-                    {
-                    // First table button.
-                    if (iExtension->iTableNavi &&
-                        iExtension->iTableNavi->EnterControl(0,0))
-                        {
-                        LeaveControl();
-                        break;
-                        }
-                    }
-                else
-                    {
-                    // Grid top row.
-                    TInt xPos = iCharMap->MaxCols() - 1;
-                    if (iExtension->EnterControl(xPos,iCharMap->ColMin(xPos)))
-                        {
-                        LeaveControl();
-                        break;
-                        }
-                    }
-                }
-            else
-                {
-                TInt xPos;
-                if (IsNextButton())
-                    {
-                    xPos = iCharMap->MaxCols() - 1;
-                    }
-                else
-                    {
-                    xPos = !iExtension->iRadioButton ?
-                        iCharMap->TableCount() : iCharMap->MaxCols() - 2;
-                    }
-                // Grid top row.
-                if (iExtension->EnterControl(xPos,iCharMap->ColMin(xPos)))
-                    {
-                    LeaveControl();
-                    break;
-                    }
-                }
             }
             break;
         default:
@@ -1314,6 +647,176 @@
     return response;
     }
 
+TBool CAknSctPageNavi::CalcNextStep( TUint aKey, TInt& aX, TInt& aY )
+	{
+	TBool landscape = Layout_Meta_Data::IsLandscapeOrientation();
+	TBool mirrored = AknLayoutUtils::LayoutMirrored();
+	TBool emotionEnabled = iExtension->IsEmotionEnabled();
+	TInt scPages = iCharMap->PageCount();
+	
+	aX = 0;
+	aY = 0;
+	TInt xOffset = 0;
+	TInt yOffset = 0;
+	
+	// Simplify key events to two variants
+	switch ( aKey )
+		{
+        case EKeyLeftArrow:
+        case '4':
+        	{
+        	xOffset = -1;
+        	}
+        	break;
+        case EKeyRightArrow:
+        case '6':
+        	{
+        	xOffset = 1;
+        	}
+        	break;
+        case EKeyDownArrow:
+        case '8':
+        	{
+        	yOffset = 1;
+        	}
+        	break;
+        case EKeyUpArrow:
+        case '2':
+        	{
+        	yOffset = -1;
+        	}
+        	break;
+        default:
+        	break;
+		}
+
+	TInt runtimeIndex = iButtonIndex;
+	if ( !emotionEnabled )
+        {
+	    // SC/Emotion unabled, button regrouped!
+        if ( ( mirrored && iButtonIndex == EAknSctPageNaviPrevPage && xOffset != 1 )
+          || ( !mirrored && iButtonIndex == EAknSctPageNaviNextPage && xOffset != -1) )
+        	{
+            runtimeIndex = iExtension->IsShowingEmotion()?EAknSctTableNaviSpecialChar:EAknSctTableNaviEmotion;
+        	}
+        }
+    // calculate when moving from PageNavi to grid, the column position
+    switch ( runtimeIndex ) 
+    	{
+    	case EAknSctTableNaviExit:
+    		{
+    		aX = 0;
+            if ( ( !mirrored && xOffset == -1 ) || ( mirrored && xOffset == 1 ) )
+            	{
+                // Grid end
+                aY = iCharMap->ColMax(0);
+                aX = iCharMap->RowMax( aY );
+                return ETrue;
+            	}
+            else if ( mirrored && xOffset == -1 && scPages >= 2 )
+            	{
+                xOffset = EAknSctPageNaviNextPage;
+            	}
+            else if ( scPages < 2 
+                    && ( ( !mirrored && xOffset == 1 ) || ( mirrored && xOffset == -1 ) ) )
+                {
+                if ( !emotionEnabled )
+                    {
+                    // Grid start
+                    aX = 0;
+                    aY = iCharMap->ColMin( aX );
+                    return ETrue;
+                    }
+                else
+                    {
+                    xOffset = LastButton();
+                    }
+                }
+            else
+            	{
+                xOffset = EAknSctTableNaviExit + xOffset;
+            	}
+    		}
+    		break;
+    	case EAknSctPageNaviPrevPage:
+    		{
+    		aX = mirrored ? iCharMap->MaxCols()-2 : 1;
+    		if ( mirrored && xOffset == -1 )
+    			{
+    		    xOffset = LastButton();
+    			}
+    		else
+    			{
+    		    xOffset = xOffset + EAknSctPageNaviPrevPage;
+    			}
+    		}
+    		break;
+    	case EAknSctPageNaviNextPage:
+    		{
+    		aX = mirrored ? 1 : iCharMap->MaxCols()-2;
+    		if ( mirrored && xOffset == 1 )
+    			{
+    		    xOffset = 0;
+    			}
+    		else if ( !mirrored && xOffset == 1 )
+    			{
+    		    xOffset = LastButton();
+    			}
+    		else
+    			{
+    		    xOffset = EAknSctPageNaviNextPage + xOffset;
+    			}
+    		}
+    		break;
+    	case EAknSctTableNaviSpecialChar:
+    	case EAknSctTableNaviEmotion:
+    		{
+    		aX = iCharMap->MaxCols()-1;
+            if ( ( !mirrored && xOffset == 1 ) || ( mirrored && xOffset == -1 ) )
+            	{
+                // Grid start
+                aX = 0;
+                aY = iCharMap->ColMin( aX );
+                return ETrue;
+                }
+            else if ( scPages < 2 
+                    && ( ( !mirrored && xOffset == -1 ) || ( mirrored && xOffset == 1 ) ) )
+                {
+                xOffset = EAknSctTableNaviExit;
+                }
+            else if ( mirrored && xOffset == 1 )
+            	{
+                xOffset = EAknSctPageNaviPrevPage;
+            	}
+            else
+            	{
+                xOffset = EAknSctPageNaviNextPage;
+            	}
+    		}
+    		break;
+    	default:
+    		break;
+    	}
+    
+    if ( yOffset == 1 )
+    	{
+        // DOWN
+        aY = iCharMap->ColMin( aX );
+        return ETrue;
+    	}
+    else if ( yOffset == -1 )
+    	{
+        // and UP
+        aY = iCharMap->ColMax( aX );
+        return ETrue;
+    	}
+
+    // Return False means it's internal moving focus within Page Navi
+    aX = xOffset;
+    aY = 0;
+    return EFalse;
+	}
+
 TBool CAknSctPageNavi::IsNextButton() const
     {
     if (iButtonIndex < iButtonArray.Count() && iButtonArray[iButtonIndex])
@@ -1350,7 +853,6 @@
         for (TInt index=0; index < iButtonArray.Count(); index++)
             {
             CAknSctNaviButton* buttonObj = iButtonArray[index];
-            TRect buttonRect = buttonObj->iButtonControl->Rect();
             if (buttonObj->iButtonControl == aControl)
                 {
                 if (buttonObj->IsEnabled() && buttonObj->iPressed)
@@ -1364,14 +866,14 @@
                             iCharMap->PrevPageL();
                             UpdatePageTitleL();
                             }
-                            break;
+                            return;
                         case EAknSctPageNaviNextPage:
                             {
                             buttonObj->iRepeat = ETrue; // Set button repeat.
                             iCharMap->NextPageL();
                             UpdatePageTitleL();
                             }
-                            break;
+                            return;
                         default:
                             break;
                         }
@@ -1392,13 +894,19 @@
                 CAknSctNaviButton* buttonObj = iButtonArray[index];
                 buttonObj->iPressed = EFalse;
                 buttonObj->iRepeat = EFalse;
+                TInt buttonIndex = buttonObj->iButtonId;
                 TRect buttonRect = buttonObj->iButtonControl->Rect();
-                if (buttonRect.Contains(aPointerEvent.iPosition))
+                if ( buttonRect.Contains(aPointerEvent.iPosition))
                     {
                     if (buttonObj->IsEnabled())
                         {
-                        buttonObj->iButtonControl->SetButtonFlags(KAknButtonKeyRepeat);
                         buttonObj->iPressed = ETrue; // Set button pressed.
+                        if ( buttonIndex == EAknSctPageNaviPrevPage 
+                          || buttonIndex == EAknSctPageNaviNextPage )
+                            {
+                            // Only Prev/Next button can repeat
+                            buttonObj->iButtonControl->SetButtonFlags( KAknButtonKeyRepeat );
+                            }
                         }
                     }
                 }
@@ -1430,6 +938,18 @@
                                     UpdatePageTitleL();
                                     }
                                     break;
+                                case EAknSctTableNaviExit:
+                                    {
+                                    iExtension->iKeyOkEvent = ETrue;
+                                    TableExitL();
+                                    }
+                                    break;
+                                case EAknSctTableNaviSpecialChar:
+                                case EAknSctTableNaviEmotion:
+                                    {
+                                    NextTableL();
+                                    }
+                                    break;
                                 default:
                                     break;
                                 }
@@ -1452,59 +972,111 @@
 void CAknSctPageNavi::SizeChanged()
     {
 
-    TAknLayoutRect pageButtonLayRect;
-    TInt pageVariate = !iCharMap->IsJapaneseSctUi() ? ((iCharMap->TableCount() > 1) ? 0 : 1) : 2;
-                       
+    TAknLayoutRect pageButtonLayRect, buttonLayRect;
+    TInt cellVar = Layout_Meta_Data::IsLandscapeOrientation()? 3 : 2;
+    TInt bgVar = 2;
+    TBool landScape = Layout_Meta_Data::IsLandscapeOrientation();       
+    TBool emotionEnabled = ETrue;
+    TBool mirrored = AknLayoutUtils::LayoutMirrored();
     CAknSctNaviButton* buttonObj;
     TRect rect;
 
-    buttonObj = iButtonArray[0];
+    if ( iExtension )
+    	{
+        emotionEnabled = iExtension->IsEmotionEnabled();
+    	}
+    
+    // Prev button
+    buttonObj = iButtonArray[1];
     buttonObj->iButtonControl->SetButtonFlags(0);
-    if (!AknLayoutUtils::LayoutMirrored())
-        {
-        buttonObj->iButtonId = EAknSctPageNaviPrevPage;
-        pageButtonLayRect.LayoutRect(Rect(),AknLayoutScalable_Avkon::bg_button_pane_cp10(pageVariate));
-        }
+    TInt col = 0;
+    if ( !landScape )
+    	{
+        col = mirrored ? ( !emotionEnabled?4:3 ) : 1;
+    	}
     else
-        {
-        buttonObj->iButtonId = EAknSctPageNaviNextPage;
-        pageButtonLayRect.LayoutRect(Rect(),AknLayoutScalable_Avkon::bg_button_pane_cp11(pageVariate));
-        }
-    rect = pageButtonLayRect.Rect();
+    	{
+        col = mirrored ? ( !emotionEnabled?6:5 ) : 1;
+    	}
+    pageButtonLayRect.LayoutRect( Rect(), AknLayoutScalable_Avkon::cell_graphic2_control_pane(cellVar,col) );
+    buttonLayRect.LayoutRect( pageButtonLayRect.Rect(), AknLayoutScalable_Avkon::bg_button_pane_cp05(bgVar));
+    rect = buttonLayRect.Rect();
     buttonObj->iButtonControl->SetRect(rect);
     buttonObj->iButtonControl->SetHighlightRect(rect);
-    TAknLayoutRect pageButtonIconLayRect;
-    pageButtonIconLayRect.LayoutRect(pageButtonLayRect.Rect(), AknLayoutScalable_Avkon::graphic2_pages_pane_g1(pageVariate));
-    buttonObj->iButtonControl->SetIconScaleMode(EAspectRatioPreserved);
-    TSize iconSize = pageButtonIconLayRect.Rect().Size();
+    
+    // ...Prev button icon
+    TAknLayoutRect iconLayRect;
+    iconLayRect.LayoutRect(rect, AknLayoutScalable_Avkon::cell_graphic2_control_pane_g1(bgVar));
+    TSize iconSize = iconLayRect.Rect().Size();
     buttonObj->iButtonControl->SetIconSize(iconSize);
-
-    buttonObj = iButtonArray[1];
+    
+    // Next button
+    buttonObj = iButtonArray[2];
     buttonObj->iButtonControl->SetButtonFlags(0);
-    if (!AknLayoutUtils::LayoutMirrored())
-        {
-        buttonObj->iButtonId = EAknSctPageNaviNextPage;
-        pageButtonLayRect.LayoutRect(Rect(), AknLayoutScalable_Avkon::bg_button_pane_cp11(pageVariate));
-        }
+    if ( !landScape )
+    	{
+        col = mirrored ? 1 : ( !emotionEnabled?4:3 );
+    	}
     else
-        {
-        buttonObj->iButtonId = EAknSctPageNaviPrevPage;
-        pageButtonLayRect.LayoutRect(Rect(), AknLayoutScalable_Avkon::bg_button_pane_cp10(pageVariate));
-        }
-    rect = pageButtonLayRect.Rect();
+    	{
+        col = mirrored ? 1 : ( !emotionEnabled?6:5 );
+    	}
+    pageButtonLayRect.LayoutRect( Rect(), AknLayoutScalable_Avkon::cell_graphic2_control_pane(cellVar,col) );
+    buttonLayRect.LayoutRect( pageButtonLayRect.Rect(), AknLayoutScalable_Avkon::bg_button_pane_cp05(bgVar));
+    rect = buttonLayRect.Rect();
+    buttonObj->iButtonControl->SetRect(rect);
+    buttonObj->iButtonControl->SetHighlightRect(rect);
+    
+    // ...Next button icon
+    buttonObj->iButtonControl->SetIconSize(iconSize);
+    
+    // Exit button
+    buttonObj = iButtonArray[0];
+    buttonObj->iButtonControl->SetButtonFlags(0);
+    pageButtonLayRect.LayoutRect( Rect(), AknLayoutScalable_Avkon::cell_graphic2_control_pane(cellVar,0) );
+    buttonLayRect.LayoutRect( pageButtonLayRect.Rect(), AknLayoutScalable_Avkon::bg_button_pane_cp05(bgVar));
+    rect = buttonLayRect.Rect();
     buttonObj->iButtonControl->SetRect(rect);
     buttonObj->iButtonControl->SetHighlightRect(rect);
-    buttonObj->iButtonControl->SetIconScaleMode(EAspectRatioPreserved);
+    
+    // ...Exit button icon
     buttonObj->iButtonControl->SetIconSize(iconSize);
-
+    
+    // Emotion/Special-char button
+    col = landScape? 6 : 4;
+    pageButtonLayRect.LayoutRect( Rect(), AknLayoutScalable_Avkon::cell_graphic2_control_pane(cellVar,col) );
+    buttonLayRect.LayoutRect( pageButtonLayRect.Rect(), AknLayoutScalable_Avkon::bg_button_pane_cp05(bgVar));
+    rect = buttonLayRect.Rect();
+    for ( TInt i = 3; i < iButtonArray.Count();i++ )
+        {
+        buttonObj = iButtonArray[i];
+        buttonObj->iButtonControl->SetButtonFlags(0);
+        buttonObj->iButtonControl->SetRect(rect);
+        buttonObj->iButtonControl->SetHighlightRect(rect);
+        
+        // ...its icon
+        buttonObj->iButtonControl->SetIconSize(iconSize);
+        }
+    TRAP_IGNORE(UpdateNextTableButtonL());
+    
     // Page text.
-    TRect parentRect = Rect();
-    AknLayoutUtils::LayoutLabel(iTitle, parentRect, AknLayoutScalable_Avkon::graphic2_pages_pane_t1(pageVariate).LayoutLine());
+    col = landScape? 3 : 2;
+    pageButtonLayRect.LayoutRect(Rect(), AknLayoutScalable_Avkon::cell_graphic2_control_pane(cellVar,col));
+    TAknTextComponentLayout textlayout = AknLayoutScalable_Avkon::cell_graphic2_control_pane_t1();
+    TRect titleRect( pageButtonLayRect.Rect() );
+    if ( !emotionEnabled )
+        {
+        // start complex dynamic logic to locate title rect when emotion is unable
+        TInt orientation = mirrored ? -1 : 1;
+        TInt newLeft = titleRect.iTl.iX + orientation*rect.Width()/2;
+        TPoint titleTL( newLeft, titleRect.iTl.iY );
+        titleRect.SetRect( titleTL, titleRect.Size() );
+        }
+    AknLayoutUtils::LayoutLabel(iTitle, titleRect, textlayout.LayoutLine());
 
     // Page text color
     TAknLayoutText textLayout;
-    textLayout.LayoutText(parentRect, AknLayoutScalable_Avkon::graphic2_pages_pane_t1(pageVariate));
-    TRect textRect = textLayout.TextRect();
+    textLayout.LayoutText( titleRect, textlayout );
     TRgb color = textLayout.Color();
     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
     if (skin)
@@ -1522,10 +1094,16 @@
 
 void CAknSctPageNavi::UpdatePageTitleL() const
     {
+    TInt pages = iCharMap->PageCount();
+    if ( pages < 2 )
+        {
+        iTitle->MakeVisible( EFalse );
+        return;
+        }
     CArrayFix<TInt>* numbers = new(ELeave)CArrayFixFlat<TInt>(2);
-    CleanupStack::PushL(numbers);
-    numbers->AppendL(iCharMap->CurrentPage());
-    numbers->AppendL(iCharMap->PageCount());
+    CleanupStack::PushL( numbers );
+    numbers->AppendL( iCharMap->CurrentPage() );
+    numbers->AppendL( pages );
     HBufC* page =
         StringLoader::LoadL(
             R_AVKON_SPECIAL_CHARACTERS_PAGE_INDICATOR, *numbers, iEikonEnv);
@@ -1542,6 +1120,7 @@
 
 TBool CAknSctPageNavi::EnterControl(TInt aX, TInt /*aY*/)
     {
+	// Note, the button index is fixed on spite of mirrored case
     if (IsVisible())
         {
         if ((aX >= 0) && (aX < iButtonArray.Count()))
@@ -1550,10 +1129,6 @@
             buttonObj = iButtonArray[iButtonIndex];
             buttonObj->SetFocused(EFalse);
             TInt index = aX;
-            if (AknLayoutUtils::LayoutMirrored()) // reverse.
-                {
-                index = iButtonArray.Count() - 1 - aX;
-                }
             buttonObj = iButtonArray[index];
             if (buttonObj->IsEnabled())
                 {
@@ -1567,132 +1142,25 @@
     return EFalse;
     }
 
-void CAknSctPageNavi::MoveFocus(TInt aX, TInt /*aY*/)
-    {
-    TInt delta = aX;
-    TInt buttonIndex = iButtonIndex + delta;
-    for (TInt i = 0; i < iButtonArray.Count(); i++)
-        {
-        if (buttonIndex > iButtonArray.Count() - 1) // Next control.
-            {
-            if (!AknLayoutUtils::LayoutMirrored())
-                {
-                if (!Layout_Meta_Data::IsLandscapeOrientation())
-                    {
-                    // First table button.
-                    if (iExtension->iTableNavi &&
-                        iExtension->iTableNavi->EnterControl(0,0))
-                        {
-                        LeaveControl();
-                        break;
-                        }
-                    }
-                else
-                    {
-                    // First radio button.
-                    if (iExtension->iRadioButton &&
-                        iExtension->iRadioButton->EnterControl(0,0))
-                        {
-                        LeaveControl();
-                        break;
-                        }
-                    // Grid start.
-                    TInt yPos = iCharMap->ColMin(0);
-                    if (iExtension->EnterControl(iCharMap->RowMin(yPos),yPos))
-                        {
-                        LeaveControl();
-                        break;
-                        }
-                    }
-                }
-            else
-                {
-                if (!Layout_Meta_Data::IsLandscapeOrientation())
-                    {
-                    // Grid end.
-                    TInt yPos = iCharMap->ColMax(0);
-                    if (iExtension->EnterControl(iCharMap->RowMax(yPos),yPos))
-                        {
-                        LeaveControl();
-                        break;
-                        }
-                    }
-                else
-                    {
-                    // Last table button.
-                    TInt xPos = iCharMap->TableCount() - 1;
-                    if (iExtension->iTableNavi &&
-                        iExtension->iTableNavi->EnterControl(xPos,0))
-                        {
-                        LeaveControl();
-                        break;
-                        }
-                    }
-                }
-            break;
-            }
-        else if (buttonIndex < 0) // Prev control
-            {
-            if (!AknLayoutUtils::LayoutMirrored())
-                {
-                if (!Layout_Meta_Data::IsLandscapeOrientation())
-                    {
-                    // Grid end.
-                    TInt yPos = iCharMap->ColMax(0);
-                    if (iExtension->EnterControl(iCharMap->RowMax(yPos),yPos))
-                        {
-                        LeaveControl();
-                        break;
-                        }
-                    }
-                else
-                    {
-                    // Last table button.
-                    if (iExtension->iTableNavi && 
-                        iExtension->iTableNavi->EnterControl(iCharMap->TableCount()-1,0))
-                        {
-                        LeaveControl();
-                        break;
-                        }
-                    }
-                }
-            else
-                {
-                if (!Layout_Meta_Data::IsLandscapeOrientation())
-                    {
-                    // First table button.
-                    if (iExtension->iTableNavi &&
-                        iExtension->iTableNavi->EnterControl(0,0))
-                        {
-                        LeaveControl();
-                        break;
-                        }
-                    }
-                else
-                    {
-                    // Grid start.
-                    TInt yPos = iCharMap->ColMin(0);
-                    if (iExtension->EnterControl(iCharMap->RowMin(yPos),yPos))
-                        {
-                        LeaveControl();
-                        break;
-                        }
-                    }
-                }
-            }
-
-        if (iButtonArray[buttonIndex]->IsEnabled()) // This control
-            {
-            CAknSctNaviButton* buttonObj;
-            buttonObj = iButtonArray[iButtonIndex];
-            buttonObj->SetFocused(EFalse);
-            iButtonIndex = buttonIndex;
-            buttonObj = iButtonArray[iButtonIndex];
-            buttonObj->SetFocused(ETrue);
-            break;
-            }
-        buttonIndex += (delta < 0) ? -1 : 1;
-        }
+void CAknSctPageNavi::MoveFocus(TInt aX, TInt aY )
+    {
+    (void)aX;
+    (void)aY;
+    }
+
+void CAknSctPageNavi::MoveFocus(TBool aInternalMove, TInt aX, TInt aY )
+    {
+    if ( aInternalMove )
+    	{
+        EnterControl( aX, 0 );
+    	}
+    else
+    	{
+        if (iExtension->EnterControl( aX, aY ) )
+            {
+            LeaveControl();
+            }
+    	}
     }
 
 TBool CAknSctPageNavi::LeaveControl()
@@ -1709,6 +1177,136 @@
     return EFalse;
     }
 
+
+void CAknSctPageNavi::TableExitL()
+    {
+    if(!iIdle)
+        {
+        iIdle = CIdle::NewL(CActive::EPriorityStandard);
+        }
+
+    iIdle->Cancel();
+    iIdle->Start(TCallBack(TableExitCallBackL, this));
+    }
+
+TInt CAknSctPageNavi::TableExitCallBackL(TAny* aThis)
+    {
+    ((CAknSctPageNavi*)aThis)->DoTableExitL();
+    return KErrNone;
+    }
+
+void CAknSctPageNavi::DoTableExitL()
+    {
+    iCharMap->SetStatusChanged(EAknCharSelectedTableExitButton);
+    }
+
+void CAknSctPageNavi::NextTableL()
+    {
+    if(!iIdle)
+        {
+        iIdle = CIdle::NewL(CActive::EPriorityStandard);
+        }
+
+    iIdle->Cancel();
+    iIdle->Start(TCallBack(NextTableCallBackL, this));
+    }
+
+TInt CAknSctPageNavi::NextTableCallBackL(TAny* aThis)
+    {
+    ((CAknSctPageNavi*)aThis)->DoNextTableL();
+    return KErrNone;
+    }
+
+void CAknSctPageNavi::DoNextTableL()
+    {
+    iCharMap->SetStatusChanged(EAknCharSelectedNextTableButton);
+    }
+
+void CAknSctPageNavi::UpdateNextTableButtonL()
+    {
+    
+    TBool isFocused = EFalse;
+    
+    // table switch buttons stay in one place.
+    for(TInt index(3); index<iButtonArray.Count(); index++)
+        {
+        CAknSctNaviButton* buttonObj = iButtonArray[index];
+        if(buttonObj->IsEnabled())
+            {
+            isFocused = buttonObj->IsFocused();
+            }
+        }
+    
+    // fresh focused button
+    for (TInt index(1); index<iButtonArray.Count(); index++)
+        {
+        CAknSctNaviButton* buttonObj = iButtonArray[index];
+        if ( index == EAknSctPageNaviPrevPage 
+               || index == EAknSctPageNaviNextPage )
+        	{
+            // No need to display Prev/Next
+            if ( iCharMap->PageCount() < 2 )
+                {
+                buttonObj->SetEnabled(EFalse);
+                }
+            continue;
+        	}
+        if (iCharMap->TableCount() > 1)
+            {
+            switch (iCharMap->NextTableCase())
+                {
+                case EAknCharMapTableSpecialChar:
+                    {
+                    TBool isShown = EFalse;
+                    if(iExtension->IsShowingEmotion())
+                        {
+                        isShown = (buttonObj->iButtonId==EAknSctTableNaviSpecialChar);
+                        }
+                    else
+                        {
+                        isShown = (buttonObj->iButtonId==EAknSctTableNaviEmotion);
+                        }
+                    buttonObj->SetEnabled(isShown);
+                    buttonObj->SetFocused(isShown && isFocused);
+                    if(isShown && isFocused)
+                        {
+                        iButtonIndex = index;
+                        }
+                    }
+                    break;
+
+                default:
+                    buttonObj->SetEnabled(EFalse);
+                    break;
+                }
+            }
+        else
+            {
+            buttonObj->SetEnabled(EFalse);
+            }
+        }
+    }
+
+TInt CAknSctPageNavi::LastButton() const
+    {
+    TBool emotionEnable = iExtension->IsEmotionEnabled();
+    if ( emotionEnable )
+    	{
+        return iExtension->IsShowingEmotion()?EAknSctTableNaviSpecialChar:EAknSctTableNaviEmotion;
+    	}
+    else if ( iCharMap->PageCount() < 2 && !emotionEnable )
+        {
+        // Only one page, must have no SC/Emotion also, left Exit only.
+        return EAknSctTableNaviExit;
+        }
+    else
+    	{
+        // emotion doesn't support, no SC/Emotion icon then
+        TBool mirrored = AknLayoutUtils::LayoutMirrored();
+        return mirrored ? EAknSctPageNaviPrevPage : EAknSctPageNaviNextPage;
+    	}
+    }
+
 // ----------------------------------------------------------------------------
 // Category button class implementation
 // ----------------------------------------------------------------------------
@@ -1758,680 +1356,6 @@
 
 
 // ----------------------------------------------------------------------------
-// Radio button class implementation
-// ----------------------------------------------------------------------------
-//
-CAknSctRadioButton::CAknSctRadioButton()
-    {
-    }
-
-CAknSctRadioButton::CAknSctRadioButton(
-    CAknCharMap* aCharMap,
-    CAknCharMapExtension* aExtension)
-    :iExtension(aExtension),
-    iCharMap(aCharMap)
-    {
-    }
-
-CAknSctRadioButton::~CAknSctRadioButton()
-    {
-    iButtonArray.ResetAndDestroy();
-    iButtonArray.Close();
-    }
-
-TInt CAknSctRadioButton::CountComponentControls() const
-    {
-    return iButtonArray.Count();
-    }
-
-CCoeControl* CAknSctRadioButton::ComponentControl( TInt aIndex ) const
-    {
-    if (aIndex < iButtonArray.Count())
-        {
-        return iButtonArray[aIndex]->iButtonControl;
-        }
-    return NULL;
-    }
-
-TKeyResponse CAknSctRadioButton::OfferKeyEventL(
-    const TKeyEvent& aKeyEvent,
-    TEventCode /*aModifiers*/)
-    {
-    TKeyResponse responce = EKeyWasNotConsumed;
-    TUint code=aKeyEvent.iCode;
-    switch (code)
-        {
-        case EKeyEnter:
-        case EKeyOK:
-            {
-            if (AknLayoutUtils::PenEnabled())
-                {
-                // Grid.
-                TInt yPos = iCharMap->ColMin(0);
-                TInt xPos = iCharMap->RowMin(yPos);
-                if (iExtension->EnterControl(xPos,yPos))
-                    {
-                    CAknButton* buttonCtrlObj;
-                    TInt currentIndex;
-                    TInt newIndex;
-                    for (TInt index=0; index < iButtonArray.Count(); index++)
-                        {
-                        buttonCtrlObj = iButtonArray[index]->iButtonControl;
-                        currentIndex = buttonCtrlObj->StateIndex();
-                        if (index == iButtonIndex)
-                            {
-                            newIndex = KAknSctRadioOn;
-                            }
-                        else
-                            {
-                            newIndex = KAknSctRadioOff;
-                            }
-                        if (currentIndex != newIndex)
-                            {
-                            buttonCtrlObj->SetCurrentState(newIndex, ETrue);
-                            if (newIndex == KAknSctRadioOn)
-                                {
-                                iExtension->iCurrentCategory =
-                                    iButtonArray[index]->iButtonId;
-                                iCharMap->SetStatusChanged(EAknCharChangedCategory);
-                                }
-                            }
-                        }
-                    LeaveControl();
-                    }
-                }
-            responce = EKeyWasConsumed;
-            }
-            break;
-        case EKeyLeftArrow:
-        case '4':
-            {
-            responce = EKeyWasConsumed;
-            if (AknLayoutUtils::PenEnabled())
-                {
-                TInt yPos = iButtonIndex - 1;
-                if (iCharMap->RowMax(yPos) < 0)
-                    {
-                    if (Layout_Meta_Data::IsLandscapeOrientation())
-                        {
-                        if (iExtension->iRadioButton)
-                            {
-                            // Right page button.
-                            if (iExtension->iPageNavi &&
-                                iExtension->iPageNavi->EnterControl(1,0))
-                                {
-                                LeaveControl();
-                                break;
-                                }
-                            }
-                        }
-                    // Next button up.
-                    MoveFocus(0,-1);
-                    break;
-                    }
-                else
-                    {
-                    //Previous row end.
-                    TInt xPos = iCharMap->RowMax(yPos);
-                    if (iExtension->EnterControl(xPos,yPos))
-                        {
-                        LeaveControl();
-                        break;
-                        }
-                    }
-                break;
-                }
-            // Move by grid.
-            iCharMap->TakeFocus();
-            TInt xPos = iCharMap->CursorPos().iX;
-            TInt yPos = iCharMap->CursorPos().iY;
-            if (xPos == 0)
-                {
-                iCharMap->MoveFocus(-1,0);
-                }
-            iCharMap->ShowFocus();
-            }
-            break;
-        case EKeyRightArrow:
-        case '6':
-            {
-            responce = EKeyWasConsumed;
-            if (AknLayoutUtils::PenEnabled())
-                {
-                TInt yPos = iButtonIndex;
-                if (iCharMap->RowMax(yPos) < 0)
-                    {
-                    // Next button down.
-                    MoveFocus(0,1);
-                    break;
-                    }
-                else
-                    {
-                    // 1st cell in the row.
-                    if (iExtension->EnterControl(0,yPos))
-                        {
-                        LeaveControl();
-                        break;
-                        }
-                    }
-                break;
-                }
-            // Move by grid.
-            iCharMap->TakeFocus();
-            TInt xPos = iCharMap->CursorPos().iX;
-            TInt yPos = iCharMap->CursorPos().iY;
-            if (xPos == iCharMap->RowMax(yPos))
-                {
-                iCharMap->MoveFocus(1,0);
-                }
-            iCharMap->ShowFocus();
-            }
-            break;
-        case EKeyDownArrow:
-        case '8':
-            {
-            MoveFocus(0, 1);
-            responce = EKeyWasConsumed;
-            }
-            break;
-        case EKeyUpArrow:
-        case '2':
-            {
-            MoveFocus(0,-1);
-            responce = EKeyWasConsumed;
-            }
-            break;
-        default:
-            break;
-        }
-    return responce;
-    }
-
-void CAknSctRadioButton::ConstructFromResourceL(TResourceReader& aReader)
-    {
-    TInt counts = aReader.ReadInt16();
-    TResourceReader reader;
-    TInt categorybutton_id;
-    TInt sctcase_id;
-    TInt resId;
-    CAknSctCategoryButton* buttonObj;
-    TBool allowCreation;
-
-    for (TInt index=0; index < counts; index++)
-        {
-        allowCreation = EFalse;
-        // button id
-        categorybutton_id = aReader.ReadInt16();
-        sctcase_id = aReader.ReadInt16();
-        switch (categorybutton_id)
-            {
-            case EAknSCTCategoryButtonHalfCase:
-            case EAknSCTCategoryButtonFullCase:
-                allowCreation = ETrue;
-                break;
-            case EAknSCTCategoryButtonPicto:
-                if (iExtension->iPictographsBuffer)
-                    {
-                    allowCreation = ETrue;
-                    }
-                break;
-            case EAknSCTCategoryButtonPicto1:
-            case EAknSCTCategoryButtonPicto2:
-                if (iExtension->iPictographsBuffer &&
-                    iExtension->iPictographsBufferGrouping)
-                    {
-                    allowCreation = ETrue;
-                    }
-                break;
-            default:
-                break;
-            }
-
-        if (allowCreation)
-            {
-            // read the button resource
-            resId = aReader.ReadInt32();
-            iCoeEnv->CreateResourceReaderLC( reader, resId );
-            // create Category button object
-            buttonObj = CAknSctCategoryButton::NewL(
-                *this, reader, categorybutton_id, sctcase_id);
-            // Append button
-            iButtonArray.Append(buttonObj);
-            CleanupStack::PopAndDestroy(); // reader
-            }
-        else
-            {
-            // Skip data
-            resId = aReader.ReadInt32();
-            }
-        }
-
-    }
-
-void CAknSctRadioButton::HandlePointerEventL(const TPointerEvent& aPointerEvent)
-    {
-    TRect rect(Rect());
-    if (AknLayoutUtils::PenEnabled() && rect.Contains(aPointerEvent.iPosition))
-        {
-        if (aPointerEvent.iType == TPointerEvent::EButton1Down)
-            {
-            CAknButton* buttonCtrlObj;
-            TRect rectButton;
-            TInt currentIndex;
-            TInt newIndex;
-            for (TInt index=0; index < iButtonArray.Count(); index++)
-                {
-                buttonCtrlObj = iButtonArray[index]->iButtonControl;
-                rectButton = buttonCtrlObj->Rect();
-                currentIndex = buttonCtrlObj->StateIndex();
-
-                if (rectButton.Contains(aPointerEvent.iPosition))
-                    {
-                    newIndex = KAknSctRadioOn;
-                    }
-                else
-                    {
-                    newIndex = KAknSctRadioOff;
-                    }
-                if (currentIndex != newIndex)
-                    {
-                    buttonCtrlObj->SetCurrentState(newIndex, ETrue);
-                    if (newIndex == KAknSctRadioOn)
-                        {
-                        if (AknLayoutUtils::PenEnabled())
-                            {
-                            iButtonIndex = index;
-                            }
-                        iExtension->iCurrentCategory =
-                            iButtonArray[index]->iButtonId;
-                        iCharMap->SetStatusChanged(EAknCharChangedCategory);
-                        }
-                    }
-                }
-            }
-        else if (aPointerEvent.iType == TPointerEvent::EDrag)
-            {
-            }
-        else if (aPointerEvent.iType == TPointerEvent::EButton1Up)
-            {
-            }
-        }
-    else
-        {
-        CCoeControl::HandlePointerEventL(aPointerEvent);
-        }
-    }
-
-TSize CAknSctRadioButton::MinimumSize()
-    {
-    TAknLayoutRect oneButtonLayRect;
-    if (!AknLayoutUtils::PenEnabled())
-        {
-        TAknLayoutScalableParameterLimits charMapDialogVariety =
-            AknLayoutScalable_Avkon::popup_grid_graphic_window_ParamLimits();
-
-        // Main pane without softkeys
-        TRect mainPaneRect;
-        if(!AknLayoutUtils::LayoutMetricsRect(
-            AknLayoutUtils::EPopupParent, mainPaneRect))
-            {
-            mainPaneRect = iAvkonAppUi->ClientRect();
-            }
-
-        // Calc the variety
-        TInt maxVariety = charMapDialogVariety.LastVariety();
-
-        TAknLayoutRect popupGridLayRect;
-        popupGridLayRect.LayoutRect(mainPaneRect,
-            AknLayoutScalable_Avkon::popup_grid_graphic_window(maxVariety));
-
-        // Calculate the size relatively
-        TRect relativeDialog(TPoint(0,0),popupGridLayRect.Rect().Size());
-
-        // Get the layout of the actual character grid with scrollbar
-        TAknLayoutRect gridWithScrollLayRect;
-        gridWithScrollLayRect.LayoutRect(relativeDialog,
-            AknLayoutScalable_Avkon::listscroll_popup_graphic_pane());
-
-        TAknLayoutRect categoryButtonLayRect;
-        categoryButtonLayRect.LayoutRect(gridWithScrollLayRect.Rect(),
-            AknLayoutScalable_Avkon::grid_sct_catagory_button_pane());
-
-        oneButtonLayRect.LayoutRect(categoryButtonLayRect.Rect(),
-            AknLayoutScalable_Avkon::cell_sct_catagory_button_pane());
-        }
-    else
-        {
-        TAknLayoutRect popupGridLayRect;
-        popupGridLayRect.LayoutRect(iAvkonAppUi->ApplicationRect(),
-            AknLayoutScalable_Avkon::popup_grid_graphic2_window(0));
-
-        TAknLayoutRect oneButtonLayRect;
-        TAknLayoutRect categoryButtonLayRect;
-        if (!Layout_Meta_Data::IsLandscapeOrientation())
-            {
-            oneButtonLayRect.LayoutRect(popupGridLayRect.Rect(),
-                AknLayoutScalable_Avkon::grid_graphic2_control_pane(4));
-
-            categoryButtonLayRect.LayoutRect(popupGridLayRect.Rect(),
-                AknLayoutScalable_Avkon::grid_graphic2_catg_pane(0));
-            }
-        else
-            {
-            oneButtonLayRect.LayoutRect(popupGridLayRect.Rect(),
-                AknLayoutScalable_Avkon::grid_graphic2_control_pane(5));
-
-            categoryButtonLayRect.LayoutRect(popupGridLayRect.Rect(),
-                AknLayoutScalable_Avkon::grid_graphic2_catg_pane(1));
-
-            }
-        }
-
-    TSize size(oneButtonLayRect.Rect().Width(),
-        oneButtonLayRect.Rect().Height() * iButtonArray.Count());
-    return size;
-    }
-
-void CAknSctRadioButton::SizeChanged()
-    {
-    TRect base;
-    if (!AknLayoutUtils::PenEnabled())
-        {
-        TAknLayoutScalableParameterLimits charMapDialogVariety =
-            AknLayoutScalable_Avkon::popup_grid_graphic_window_ParamLimits();
-
-        // Main pane without softkeys
-        TRect mainPaneRect;
-        if(!AknLayoutUtils::LayoutMetricsRect(
-            AknLayoutUtils::EPopupParent, mainPaneRect))
-            {
-            mainPaneRect = iAvkonAppUi->ClientRect();
-            }
-
-        // Calc the variety
-        TInt maxVariety = charMapDialogVariety.LastVariety();
-
-        TAknLayoutRect popupGridLayRect;
-        popupGridLayRect.LayoutRect(mainPaneRect,
-            AknLayoutScalable_Avkon::popup_grid_graphic_window(maxVariety));
-
-        // Calculate the size relatively
-        TRect relativeDialog(TPoint(0,0), popupGridLayRect.Rect().Size());
-
-        // Get the layout of the actual character grid with scrollbar
-        TAknLayoutRect gridWithScrollLayRect;
-        gridWithScrollLayRect.LayoutRect(relativeDialog,
-            AknLayoutScalable_Avkon::listscroll_popup_graphic_pane());
-
-        TAknLayoutRect categoryButtonLayRect;
-        categoryButtonLayRect.LayoutRect(gridWithScrollLayRect.Rect(),
-            AknLayoutScalable_Avkon::grid_sct_catagory_button_pane());
-
-        TAknLayoutRect oneButtonLayRect;
-        oneButtonLayRect.LayoutRect(categoryButtonLayRect.Rect(),
-            AknLayoutScalable_Avkon::cell_sct_catagory_button_pane());
-
-        base = oneButtonLayRect.Rect();
-        }
-    else
-        {
-        TAknLayoutRect popupGridLayRect;
-        popupGridLayRect.LayoutRect(iAvkonAppUi->ApplicationRect(),
-            AknLayoutScalable_Avkon::popup_grid_graphic2_window(0));
-
-        TAknLayoutRect oneButtonLayRect;
-        TAknLayoutRect categoryButtonLayRect;
-        if ( !Layout_Meta_Data::IsLandscapeOrientation() )
-            {
-            oneButtonLayRect.LayoutRect(popupGridLayRect.Rect(),
-                AknLayoutScalable_Avkon::grid_graphic2_control_pane(4));
-
-            categoryButtonLayRect.LayoutRect(popupGridLayRect.Rect(),
-                AknLayoutScalable_Avkon::grid_graphic2_catg_pane(0));
-            }
-        else
-            {
-            oneButtonLayRect.LayoutRect(popupGridLayRect.Rect(),
-                AknLayoutScalable_Avkon::grid_graphic2_control_pane(5));
-
-            categoryButtonLayRect.LayoutRect(popupGridLayRect.Rect(),
-                AknLayoutScalable_Avkon::grid_graphic2_catg_pane(1));
-
-            }
-        base.iTl = categoryButtonLayRect.Rect().iTl;
-        base.SetSize(oneButtonLayRect.Rect().Size());
-        }
-
-    if (iButtonArray.Count() > 0)
-        {
-        CAknButton* buttonCtrlObj;
-
-        TMargins8 margins;
-        margins.iTop = 1;
-        margins.iBottom = 0;
-        margins.iLeft = 0;
-        margins.iRight = 0;
-
-        // Change the size of buttons
-        for (TInt index=0; index < iButtonArray.Count(); index++)
-            {
-            buttonCtrlObj = iButtonArray[index]->iButtonControl;
-            if (buttonCtrlObj)
-                {
-                if (AknLayoutUtils::PenEnabled())
-                    {
-                    buttonCtrlObj->SetHighlightRect(base);
-                    }
-                buttonCtrlObj->SetRect( base );
-                buttonCtrlObj->SetIconSize( base.Size() );
-                buttonCtrlObj->SetMargins( margins );
-                buttonCtrlObj->SetIconScaleMode(EAspectRatioPreserved);
-                base.Move(TPoint(0, base.Size().iHeight));
-                }
-            }
-        }
-    }
-
-void CAknSctRadioButton::Draw(const TRect& /*aRect*/) const
-    {
-    // no draw
-    }
-
-/**
- * Returns ETrue if the aFlag bitfield in iFlags is set, EFalse if it
- * is clear
- */
-inline TInt CAknSctRadioButton::Count() const
-    {
-    return iButtonArray.Count();
-    }
-
-void CAknSctRadioButton::SetCurrentCategory(TInt aCategory)
-    {
-    CAknSctCategoryButton* buttonObj;
-    TInt status;
-
-    for (TInt index=0; index < iButtonArray.Count(); index++)
-        {
-        buttonObj = iButtonArray[index];
-        status = (buttonObj->iButtonId == aCategory)?
-                     KAknSctRadioOn : KAknSctRadioOff;
-        buttonObj->iButtonControl->SetCurrentState(status, ETrue);
-        }
-    }
-
-void CAknSctRadioButton::SetValidSctCase(TInt aSctCase)
-    {
-    CAknSctCategoryButton* buttonObj;
-
-    for (TInt index=0; index < iButtonArray.Count(); index++)
-        {
-        buttonObj = iButtonArray[index];
-        if (buttonObj->iSctCaseId == aSctCase)
-            {
-            buttonObj->iValid = ETrue;
-            break;
-            }
-        // Here is the special case for Half-width/Lower/Upper
-        else if (buttonObj->iSctCaseId == EAknSCTHalfCase
-              && (aSctCase == EAknSCTLowerCase
-                 || aSctCase == EAknSCTUpperCase)
-                )
-            {
-            buttonObj->iValid = ETrue;
-            break;
-            }
-        }
-    }
-
-void CAknSctRadioButton::RemoveInvalidButton()
-    {
-    CAknSctCategoryButton* buttonObj;
-
-    for (TInt index=iButtonArray.Count()-1; index >= 0; index--)
-        {
-        buttonObj = iButtonArray[index];
-        if (!buttonObj->iValid)
-            {
-            if (buttonObj->iSctCaseId == EAknSCTHalfCase)
-                {
-                if (iButtonArray.Count() > 1)
-                    {
-                    delete buttonObj;
-                    iButtonArray.Remove(index);
-                    }
-                }
-            else
-                {
-                delete buttonObj;
-                iButtonArray.Remove(index);
-                }
-            }
-        }
-    }
-
-CCoeControl* CAknSctRadioButton::FocusedControl()
-    {
-    return this;
-    }
-
-TBool CAknSctRadioButton::EnterControl(TInt /*aX*/, TInt aY)
-    {
-    if (IsVisible())
-        {
-        if ((aY >= 0) && (aY < Count()))
-            {
-            if (iExtension->iHasCategoryButtonUi)
-                {
-                iEntryIndex = aY;
-                iExtension->iFocusHandler = this;
-                if (AknLayoutUtils::PenEnabled())
-                    {
-                    iButtonIndex = aY;
-                    CAknSctCategoryButton* buttonObj =
-                        iButtonArray[iButtonIndex];
-                    buttonObj->SetFocused(ETrue);
-                    }
-                return ETrue;
-                }
-            }
-        }
-    return EFalse;
-    }
-
-void CAknSctRadioButton::MoveFocus(TInt /*aX*/, TInt aY)
-    {
-    CAknSctCategoryButton* buttonObj;
-    CAknButton* buttonCtrlObj;
-    TInt buttonIndex = iButtonIndex + aY;
-    if (buttonIndex > iButtonArray.Count() - 1)
-        {
-        if (!AknLayoutUtils::PenEnabled())
-            {
-             // First radio button.
-            buttonIndex = 0;
-            }
-        else
-            {
-            if (!Layout_Meta_Data::IsLandscapeOrientation())
-                {
-                // Left page button.
-                if (iExtension->iPageNavi &&
-                    iExtension->iPageNavi->EnterControl(0,0))
-                    {
-                    LeaveControl();
-                    return;
-                    }
-                }
-            else
-                {
-                // First table button.
-                if (iExtension->iTableNavi &&
-                    iExtension->iTableNavi->EnterControl(0,0))
-                    {
-                    LeaveControl();
-                    return;
-                    }
-                }
-            }
-        }
-    else if (buttonIndex < 0)
-        {
-         if (!AknLayoutUtils::PenEnabled())
-            {
-            // Last radio button.
-            buttonIndex = iButtonArray.Count() - 1;
-            }
-         else
-            {
-            // First table button.
-            if (iExtension->iTableNavi &&
-                iExtension->iTableNavi->EnterControl(0,0))
-                {
-                LeaveControl();
-                return;
-                }
-            }
-        }
-
-    if (!AknLayoutUtils::PenEnabled())
-        {
-        buttonObj = iButtonArray[iButtonIndex];
-        buttonCtrlObj = buttonObj->iButtonControl;
-        buttonCtrlObj->SetCurrentState(KAknSctRadioOff, ETrue);
-        iButtonIndex = buttonIndex;
-        buttonObj = iButtonArray[iButtonIndex];
-        buttonCtrlObj = buttonObj->iButtonControl;
-        buttonCtrlObj->SetCurrentState(KAknSctRadioOn, ETrue);
-        iExtension->iCurrentCategory =
-            iButtonArray[buttonIndex]->iButtonId;
-        iCharMap->SetStatusChanged(EAknCharChangedCategory);
-        }
-    else
-        {
-        buttonObj = iButtonArray[iButtonIndex];
-        buttonObj->SetFocused(EFalse);
-        iButtonIndex = buttonIndex;
-        buttonObj = iButtonArray[iButtonIndex];
-        buttonObj->SetFocused(ETrue);
-        }
-    }
-
-TBool CAknSctRadioButton::LeaveControl()
-    {
-    for (TInt i = 0; i < iButtonArray.Count(); i++ )
-        {
-        iButtonArray[i]->SetFocused(EFalse);
-        }
-    return ETrue;
-    }
-
-TBool CAknSctRadioButton::ExitWithKey(TInt /*aKeycode*/)
-    {
-    return EFalse;
-    }
-
-// ----------------------------------------------------------------------------
 // Extension class implementation
 // ----------------------------------------------------------------------------
 //
@@ -2464,11 +1388,9 @@
     delete iCharsQwerty;
     delete iBgContext;
 
-    delete iRadioButton;
     delete iTitleBuf;
 
     delete iPageNavi;
-    delete iTableNavi;
     delete iCategoryTitle;
     delete iCategoryEntry;
     delete iEntryBuf;
@@ -2901,17 +1823,6 @@
         return;
 
     iExtension->iFlags = 0x00;
-
-    // if feature language is Japanese
-    CAknEnv* env = CAknEnv::Static();
-    if (env)
-        {
-        if (env->IsFeatureLanguage(KFeatureIdJapanese))
-            {
-            iExtension->iJapaneseSctUi = ETrue;
-            iExtension->iHasCategoryButtonUi = ETrue;
-            }
-        }
     iExtension->iFocusHandler = iExtension;
     iExtension->SetCharMapControl(this);
 	
@@ -2962,6 +1873,7 @@
     iPictographCases.Close();
     iPictographPages.Close();
     MTouchFeedback* feedback = MTouchFeedback::Instance();
+    
     if ( feedback != NULL )
         {
         feedback->RemoveFeedbackForControl( this );
@@ -2978,11 +1890,6 @@
             specialCharItemLayout =
                 AknLayoutScalable_Avkon::cell_graphic2_pane_t1(1);
             }
-        else if (IsJapaneseSctUi())
-            {
-            specialCharItemLayout =
-                AknLayoutScalable_Avkon::cell_graphic2_pane_t1(2);
-            }
         else
             {
             specialCharItemLayout =
@@ -3006,11 +1913,21 @@
     CountMaxColumnsAndCellSizes();
     SizeChanged();
 
-    // load Emotion icon resource, but not load images
-    TSize iconSize(iGridItemWidth,iGridItemHeight);
-    iconSize.iWidth = iconSize.iWidth * 3 / 4;
-    iconSize.iHeight = iconSize.iHeight * 3 / 4;
-    Extension()->SetEmotionSize(iconSize);
+    // set smiley size
+    TAknWindowComponentLayout cellGraphicsLayout;
+    if ( Layout_Meta_Data::IsLandscapeOrientation() )
+        {
+        cellGraphicsLayout = AknLayoutScalable_Avkon::cell_graphic2_pane_g5(1);
+        }
+    else
+        {
+        cellGraphicsLayout = AknLayoutScalable_Avkon::cell_graphic2_pane_g5(0);
+        }
+
+    TAknLayoutRect cellGraphicsRect;
+    cellGraphicsRect.LayoutRect(TRect(TSize(iGridItemWidth,iGridItemHeight)), cellGraphicsLayout);
+    
+    Extension()->SetEmotionSize(cellGraphicsRect.Rect().Size());
     }
 
 
@@ -3074,20 +1991,8 @@
     // Alternate components.
     if (AknLayoutUtils::PenEnabled())
         {
-        if (iExtension->iHasCategoryButtonUi)
-            {
-            EnableCategoryInputFieldL();
-            EnableCategoryButtonsL();
-            }
         EnableNavigationButtonsL();
         }
-    else
-        {
-        if (iExtension->iHasCategoryButtonUi)
-            {
-            EnableCategoryButtonsL();
-            }
-        }
 
     // Offscreen background.
     if (offscreen)
@@ -3243,10 +2148,6 @@
         }
 
     iExtension->iCurrentCategory = Category();
-    if (iExtension->iRadioButton)
-        {
-        iExtension->iRadioButton->SetCurrentCategory(iExtension->iCurrentCategory);
-        }
 
     // Create and set the scb visible even though there is nothing to scroll
     delete iSBFrame;
@@ -3262,12 +2163,6 @@
         }
     
     iExtension->LoadEmotionTumbnails(*iChars);
-
-    CAknSctPageNavi* pageNavi = Extension()->iPageNavi;
-    if(pageNavi)
-        {
-        pageNavi->MakeVisible(PageCount()>1);
-        }
     
     SetSmileyAnimationActivityInCurrentPageL(ETrue);
     
@@ -3469,40 +2364,21 @@
         case EKeyLeftArrow:
         case '4':
             {
-            if (iExtension->iRadioButton && (iCursorPos.iX == 0)) // Radio button.
-                {
-                if (iExtension->iRadioButton->EnterControl(iCursorPos.iX,iCursorPos.iY))
-                    {
-                    LeaveControl();
-                    break;
-                    }
-                }
-
             if (AknLayoutUtils::PenEnabled())
                 {
                 if (!iIsMirrored)
                     {
                     if ((iCursorPos.iX == 0) && (iCursorPos.iY == ColMin(0)))
                         {
-                        if (!Layout_Meta_Data::IsLandscapeOrientation())
+                        // western, move left from first one in grid, focus pageNavi last button
+                        if ( iExtension->iPageNavi )
                             {
-                            // Last table button.
-                            if (iExtension->iTableNavi &&
-                                iExtension->iTableNavi->EnterControl(TableCount() - 1,0))
-                                {
+                            TInt maxButt = iExtension->iPageNavi->LastButton();
+                            if ( iExtension->iPageNavi->EnterControl( maxButt,0 ) )
+                            	{
                                 LeaveControl();
                                 break;
-                                }
-                            }
-                        else
-                            {
-                            // Right page button.
-                            if (iExtension->iPageNavi &&
-                                iExtension->iPageNavi->EnterControl(1,0))
-                                {
-                                LeaveControl();
-                                break;
-                                }
+                            	}
                             }
                         }
                     }
@@ -3510,25 +2386,12 @@
                     {
                     if (((iCursorPos.iY == ColMax(0)) && (iCursorPos.iX == RowMax(ColMax(0)))))
                         {
-                        if (!Layout_Meta_Data::IsLandscapeOrientation())
+                        // mirrored, move left from last one in grid, focus pgNavi first button
+                        if (iExtension->iPageNavi &&
+                            iExtension->iPageNavi->EnterControl(0,0))
                             {
-                            // Left page button.
-                            if (iExtension->iPageNavi &&
-                                iExtension->iPageNavi->EnterControl(0,0))
-                                {
-                                LeaveControl();
-                                break;
-                                }
-                            }
-                        else
-                            {
-                            // First table button.
-                            if (iExtension->iTableNavi &&
-                                iExtension->iTableNavi->EnterControl(0,0))
-                                {
-                                LeaveControl();
-                                break;
-                                }
+                            LeaveControl();
+                            break;
                             }
                         }
                     }
@@ -3539,17 +2402,6 @@
         case EKeyRightArrow:
         case '6':
             {
-            if (iExtension->iRadioButton &&
-                (iCursorPos.iX == RowMax(iCursorPos.iY)) &&
-                    (iCursorPos.iY <= (iExtension->iRadioButton->Count() - 2)))
-                {
-                // Radio button.
-                if (iExtension->iRadioButton->EnterControl(iCursorPos.iX,iCursorPos.iY+1))
-                    {
-                    LeaveControl();
-                    break;
-                    }
-                }
             if (AknLayoutUtils::PenEnabled())
                 {
                 if (!iIsMirrored)
@@ -3557,25 +2409,12 @@
                     if ((iCursorPos.iY == ColMax(0)) &&
                         (iCursorPos.iX == RowMax(ColMax(0))))
                         {
-                        if (!Layout_Meta_Data::IsLandscapeOrientation())
+                        // western, move right from last one in grid, focus pgNavi first button
+                        if (iExtension->iPageNavi &&
+                            iExtension->iPageNavi->EnterControl(0,0))
                             {
-                            // Left page button.
-                            if (iExtension->iPageNavi &&
-                                iExtension->iPageNavi->EnterControl(0,0))
-                                {
-                                LeaveControl();
-                                break;
-                                }
-                            }
-                        else
-                            {
-                            // First table button.
-                            if (iExtension->iTableNavi &&
-                                iExtension->iTableNavi->EnterControl(0,0))
-                                {
-                                LeaveControl();
-                                break;
-                                }
+                            LeaveControl();
+                            break;
                             }
                         }
                     }
@@ -3584,22 +2423,11 @@
                     if ((iCursorPos.iY == ColMin(0)) &&
                         (iCursorPos.iX == 0))
                         {
-                        if (!Layout_Meta_Data::IsLandscapeOrientation())
+                        // mirrored, move right from first one in grid, focus pgNavi last button
+                        if ( iExtension->iPageNavi )
                             {
-                            // First table button.
-                            if (iExtension->iTableNavi &&
-                                iExtension->iTableNavi->EnterControl(0,0))
-                                {
-                                LeaveControl();
-                                break;
-                                }
-
-                            }
-                        else
-                            {
-                            // Left page button.
-                            if (iExtension->iPageNavi &&
-                                iExtension->iPageNavi->EnterControl(1,0))
+                            TInt maxButt = iExtension->iPageNavi->LastButton();
+                            if ( iExtension->iPageNavi->EnterControl( maxButt,0 ) )
                                 {
                                 LeaveControl();
                                 break;
@@ -3616,59 +2444,54 @@
             {
             if (AknLayoutUtils::PenEnabled())
                 {
-                if (iCursorPos.iY == ColMin(iCursorPos.iX))
+                if ( iCursorPos.iY == ColMin(iCursorPos.iX) )
                     {
-                    if (!iExtension->iRadioButton && iCursorPos.iX < TableCount())
+                    // cell is at the top row, need to go on to PageNavi
+                    if ( iExtension->iPageNavi )
                         {
-                        // Table button up.
-                        if ( iExtension->iTableNavi &&
-                            iExtension->iTableNavi->EnterControl(iCursorPos.iX,0))
+                        TInt aX = 0;
+                        
+                        if ( iCursorPos.iX == MaxCols() - 1 )
+                            {
+                            aX = iExtension->iPageNavi->LastButton();
+                            }
+                        else if ( iCursorPos.iX == MaxCols() - 2 )
+                            {
+                            // a bit complex as unable-emotion SCT has no SC/Emotion icon
+                            if ( iExtension->IsEmotionEnabled() )
+                            	{
+                                aX = iIsMirrored? 1 : 2;
+                            	}
+                            else
+                            	{
+                                aX = -1;
+                            	}
+                            }
+                        else if (iCursorPos.iX == 1 )  
+                            {
+                            aX = iIsMirrored? 2 : 1;
+                            }
+                        else if ( iCursorPos.iX == 0 )
+                            {
+                            // first button in PageNavi
+                            aX = 0;
+                            }
+                        else
+                        	{
+                            aX = -1;
+                        	}
+                        if ( iExtension->iPageNavi->EnterControl( aX,0 ) )
                             {
                             LeaveControl();
                             break;
                             }
                         }
-                    else
-                        {
-                        if (iCursorPos.iX == MaxCols() - 1)
-                            {
-                            // Right page button.
-                            if ( iExtension->iPageNavi &&
-                                iExtension->iPageNavi->EnterControl(1,0))
-                                {
-                                LeaveControl();
-                                break;
-                                }
-                            }
-                        if (Layout_Meta_Data::IsLandscapeOrientation())
-                            {
-                            if ((!iExtension->iRadioButton &&
-                                 (iCursorPos.iX == TableCount())) ||
-                               ((iExtension->iRadioButton) &&
-                                 (iCursorPos.iX == MaxCols()-2)))
-                                {
-                                // Left page button.
-                                if ( iExtension->iPageNavi &&
-                                    iExtension->iPageNavi->EnterControl(0,0))
-                                    {
-                                    LeaveControl();
-                                    break;
-                                    }
-                                }
-                            }
-                        // Grid bottom row.
-                        if (ColMax(0) > ColMax(iCursorPos.iX))
-                            {
-                            EnterControl(RowMax(ColMax(0)), ColMax(0));
-                            break;
-                            }
-                        EnterControl(iCursorPos.iX, ColMax( iCursorPos.iX));
-                        break;
-                        }
+                    EnterControl(iCursorPos.iX, ColMax( iCursorPos.iX));
+                    break;
                     }
                 }
-            MoveFocus(0,-1);
-            break;
+                MoveFocus(0,-1);
+                break;
             }
         case EKeyDownArrow:
         case '8':
@@ -3677,53 +2500,52 @@
                 {
                 if (iCursorPos.iY == ColMax(iCursorPos.iX))
                     {
+                    if (  iExtension->iPageNavi )
+                    	{
+                        TInt aX = 0;
+                    
+                        if ( iCursorPos.iX == MaxCols() - 1 )
+                            {
+                            aX = iExtension->iPageNavi->LastButton();
+                            }
+                        else if ( iCursorPos.iX == MaxCols() - 2 )
+                            {
+                             // a bit complex as unable-emotion SCT has no SC/Emotion icon
+                            if ( iExtension->IsEmotionEnabled() )
+                                {
+                                aX = iIsMirrored? 1 : 2;
+                                }
+                            else
+                                {
+                                aX = -1;
+                                }
+                            }
+                        else if ( iCursorPos.iX == 1 )  
+                            {
+                            aX = iIsMirrored? 2 : 1;
+                            }
+                        else if ( iCursorPos.iX == 0 )
+                            {
+                            // default: first button in PageNavi
+                            aX = 0;
+                            }
+                        else
+                        	{
+                            aX = -1;
+                        	}
+                        if ( iExtension->iPageNavi->EnterControl( aX,0 ) )
+                            {
+                            LeaveControl();
+                            break;
+                            }
+                    	}
+                    // cell is at bottom row
                     if (iCursorPos.iX > RowMax(ColMax(0)))
                         {
                         // Grid last item.
                         EnterControl(RowMax(ColMax(0)), ColMax(0));
                         break;
                         }
-                    if ((iCursorPos.iX == MaxCols() - 1) ||
-                        (!Layout_Meta_Data::IsLandscapeOrientation() &&
-                            iExtension->iRadioButton &&
-                                (iCursorPos.iX == MaxCols() - 2)))
-                        {
-                        // Right page button.
-                        if (iExtension->iPageNavi &&
-                            iExtension->iPageNavi->EnterControl(1,0))
-                            {
-                            LeaveControl();
-                            break;
-                            }
-                        }
-                    if ((Layout_Meta_Data::IsLandscapeOrientation() &&
-                            !iExtension->iRadioButton &&
-                                (iCursorPos.iX == TableCount())) ||
-                        (!Layout_Meta_Data::IsLandscapeOrientation() &&
-                            (iCursorPos.iX == 0)) ||
-                        (Layout_Meta_Data::IsLandscapeOrientation() &&
-                            iExtension->iRadioButton &&
-                                (iCursorPos.iX == MaxCols() - 2)))
-                        {
-                        // Left page button.
-                        if (iExtension->iPageNavi &&
-                            iExtension->iPageNavi->EnterControl(0,0))
-                            {
-                            LeaveControl();
-                            break;
-                            }
-                        }
-                    if (!iExtension->iRadioButton &&
-                            iCursorPos.iX < TableCount())
-                        {
-                         // Table button down.
-                        if (iExtension->iTableNavi &&
-                            iExtension->iTableNavi->EnterControl(iCursorPos.iX,0))
-                            {
-                            LeaveControl();
-                            break;
-                            }
-                        }
                     // Grid top row.
                     EnterControl(iCursorPos.iX, ColMin(iCursorPos.iX));
                     break;
@@ -3820,14 +2642,7 @@
         gridWithScrollLayRect.LayoutRect(relativePopup, AknLayoutScalable_Avkon::listscroll_popup_graphic_pane());
 
         TAknLayoutRect gridLayRect;
-        if (iExtension->iHasCategoryButtonUi)
-            {
-            gridLayRect.LayoutRect(gridWithScrollLayRect.Rect(), AknLayoutScalable_Avkon::grid_graphic_popup_pane(2));
-            }
-        else
-            {
-            gridLayRect.LayoutRect(gridWithScrollLayRect.Rect(), AknLayoutScalable_Avkon::grid_graphic_popup_pane(0));
-            }
+        gridLayRect.LayoutRect(gridWithScrollLayRect.Rect(), AknLayoutScalable_Avkon::grid_graphic_popup_pane(0));
 
         // Grid.
         TRect contentRect = Extension()->iMenuSct ? Rect() : gridLayRect.Rect();
@@ -3848,24 +2663,6 @@
             iGridTopLeft.iX = contentRect.iTl.iX;
             }
 
-        // Category buttons.
-        if (iExtension && iExtension->iHasCategoryButtonUi)
-            {
-            if (iExtension->iRadioButton)
-                {
-                TAknLayoutRect categoryButtonLayRect;
-                categoryButtonLayRect.LayoutRect(gridWithScrollLayRect.Rect(),AknLayoutScalable_Avkon::grid_sct_catagory_button_pane());
-
-                TAknLayoutRect oneButtonLayRect;
-                oneButtonLayRect.LayoutRect(categoryButtonLayRect.Rect(),AknLayoutScalable_Avkon::cell_sct_catagory_button_pane());
-
-                TSize size(oneButtonLayRect.Rect().Width(), oneButtonLayRect.Rect().Height()*iExtension->iRadioButton->Count());
-                TRect rectRadio(categoryButtonLayRect.Rect().iTl, size);
-                iExtension->iRadioButton->SetRect(rectRadio);
-                }
-            }
-
-
         // Background context.
         if(iExtension && iExtension->iBgContext)
             {
@@ -3879,17 +2676,7 @@
         }
     else
         {
-        
-        TInt variety;
-        if (!IsJapaneseSctUi())
-            {
-            variety = Layout_Meta_Data::IsLandscapeOrientation() ? 3 : 1;
-            if(TableCount() > 1) variety--;
-            }
-        else
-            {
-            variety = Layout_Meta_Data::IsLandscapeOrientation() ? 5 : 4;
-            }
+        TInt variety = Layout_Meta_Data::IsLandscapeOrientation() ? 7 : 6;
         
         // Popup.
         TAknLayoutRect popupGridLayRect;
@@ -3914,56 +2701,14 @@
             iGridTopLeft.iX = gridRect.iTl.iX;
             }
 
-        // Category
-        if (iExtension->iHasCategoryButtonUi && iExtension->iRadioButton) // Radio buttons.
-            {
-            TAknLayoutRect oneButtonLayRect;
-            TAknLayoutRect categoryButtonLayRect;
-            TInt oneButtonLayVariety, categoryButtonLayVariety;
-            
-            if (Layout_Meta_Data::IsLandscapeOrientation())
-                {
-                oneButtonLayVariety = 5;
-                categoryButtonLayVariety = 1;
-                }
-            else
-                {
-                oneButtonLayVariety = 4;
-                categoryButtonLayVariety = 0;
-                }
-            
-            oneButtonLayRect.LayoutRect(popupGridRect, AknLayoutScalable_Avkon::grid_graphic2_control_pane(oneButtonLayVariety));
-            categoryButtonLayRect.LayoutRect(popupGridRect, AknLayoutScalable_Avkon::grid_graphic2_catg_pane(categoryButtonLayVariety));
-
-            TSize size(oneButtonLayRect.Rect().Width(), 
-                       oneButtonLayRect.Rect().Height() * iExtension->iRadioButton->Count());
-            TRect rectRadio(categoryButtonLayRect.Rect().iTl, size);
-            iExtension->iRadioButton->SetRect(rectRadio);
-            }
-
-        // Table navigation.
-        if (iExtension->iTableNavi)
-            {
-            TAknLayoutRect tableNaviLayRect;
-            tableNaviLayRect.LayoutRect(popupGridRect, AknLayoutScalable_Avkon::grid_graphic2_control_pane(variety));
-            iExtension->iTableNavi->SetRect(tableNaviLayRect.Rect());
-            }
-
         // Page navigation.
         if (iExtension->iPageNavi)
             {
-            if (PageCount() > 1)
-                {
-                iExtension->iPageNavi->MakeVisible(ETrue);
-                
-                TAknLayoutRect pageNaviLayRect;
-                pageNaviLayRect.LayoutRect(popupGridRect, AknLayoutScalable_Avkon::graphic2_pages_pane(variety));
-                iExtension->iPageNavi->SetRect(pageNaviLayRect.Rect());
-                }
-            else
-                {
-                iExtension->iPageNavi->MakeVisible(EFalse);
-                }
+            iExtension->iPageNavi->MakeVisible(ETrue);
+
+            TAknLayoutRect pageNaviLayRect;
+            pageNaviLayRect.LayoutRect(popupGridRect, AknLayoutScalable_Avkon::grid_graphic2_control_pane(variety));
+            iExtension->iPageNavi->SetRect(pageNaviLayRect.Rect());
             }
 
         // Background context.
@@ -4058,33 +2803,15 @@
             }
 
         // Sets alternate UI controls.
-        if (iExtension->iHasCategoryButtonUi)
-            {
-            if (AknLayoutUtils::PenEnabled())
-                {
-                EnableCategoryInputFieldL();
-                EnableNavigationButtonsL();
-                }
-            else
-                {
-                DisableCategoryInputFieldL();
-                DisableNavigationButtonsL();
-                }
-            EnableCategoryButtonsL();
+        if (AknLayoutUtils::PenEnabled())
+            {
+            EnableNavigationButtonsL();
             }
         else
             {
-            DisableCategoryInputFieldL();
-            DisableCategoryButtonsL();
-            if (AknLayoutUtils::PenEnabled())
-                {
-                EnableNavigationButtonsL();
-                }
-            else
-                {
-                DisableNavigationButtonsL();
-                }
-            }
+            DisableNavigationButtonsL();
+            }
+
 
         // and finally updates the page counts (from setcasetable)
         iSpecialCharPages.Reset(); // reset the current page count for different charsets
@@ -4144,20 +2871,6 @@
     {
     if ( iExtension )
         {
-        if ( !iExtension->iTableNavi )
-            {
-            iExtension->iTableNavi = new(ELeave) CAknSctTableNavi(this, iExtension);
-            iExtension->iTableNavi->SetContainerWindowL(*this);
-            TResourceReader reader;
-            iCoeEnv->CreateResourceReaderLC(reader, R_AVKON_SCT_TABLE_NAVI_CONTROL);
-            iExtension->iTableNavi->ConstructFromResourceL(reader);
-            iExtension->iTableNavi->SetNonFocusing();
-            iExtension->iTableNavi->SetMopParent(iExtension);
-            CleanupStack::PopAndDestroy(); // reader
-            }
-
-        iExtension->iTableNavi->MakeVisible(ETrue);
-
         if ( !iExtension->iPageNavi )
             {
             iExtension->iPageNavi = new(ELeave) CAknSctPageNavi(this, iExtension);
@@ -4176,40 +2889,12 @@
 
 void CAknCharMap::DisableNavigationButtonsL()
     {
-    if ( iExtension && iExtension->iTableNavi )
-        {
-        iExtension->iTableNavi->MakeVisible( EFalse );
-        }
     if ( iExtension && iExtension->iPageNavi )
         {
         iExtension->iPageNavi->MakeVisible( EFalse );
         }
     }
 
-void CAknCharMap::EnableCategoryButtonsL()
-    {
-    if (!iExtension->iRadioButton)
-        {
-        iExtension->iRadioButton = new(ELeave) CAknSctRadioButton(this, iExtension);
-        iExtension->iRadioButton->SetContainerWindowL(*this);
-        TResourceReader reader;
-        iCoeEnv->CreateResourceReaderLC(reader, R_AVKON_SCT_CATEGORY_BUTTON_CONTROL);
-        iExtension->iRadioButton->ConstructFromResourceL(reader);
-        iExtension->iRadioButton->SetNonFocusing();
-        iExtension->iRadioButton->SetMopParent(iExtension);
-        CleanupStack::PopAndDestroy(); // reader
-        }
-    iExtension->iRadioButton->MakeVisible(ETrue);
-    }
-
-void CAknCharMap::DisableCategoryButtonsL()
-    {
-    if (iExtension && iExtension->iRadioButton)
-        {
-        iExtension->iRadioButton->MakeVisible(EFalse);
-        }
-    }
-
 void CAknCharMap::EnableCategoryInputFieldL()
     {
     TAknLayoutRect popupGridLayRect;
@@ -4299,24 +2984,20 @@
 
     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
     MAknsControlContext* cc = AknsDrawUtils::ControlContext( this );
+    AknLayoutUtils::TAknCbaLocation location = AknLayoutUtils::CbaLocation();
 
     TRect rect = Rect();
 
     if (!AknLayoutUtils::PenEnabled() || Extension()->iMenuSct)
         {
         TRect mainPaneRect;
-        if(!AknLayoutUtils::LayoutMetricsRect(
-            AknLayoutUtils::EPopupParent, mainPaneRect))
+        if(!AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EPopupParent, mainPaneRect))
             {
             mainPaneRect = iAvkonAppUi->ClientRect();
             }
 
-        TAknLayoutScalableParameterLimits charMapDialogVariety =
-            AknLayoutScalable_Avkon::popup_grid_graphic_window_ParamLimits();
-
+        TAknLayoutScalableParameterLimits charMapDialogVariety = AknLayoutScalable_Avkon::popup_grid_graphic_window_ParamLimits();
         TInt maxVariety = charMapDialogVariety.LastVariety();
-
-        AknLayoutUtils::TAknCbaLocation location = AknLayoutUtils::CbaLocation();
         TInt maxVarietyOffset = 0;
         TInt varietyOffset = maxVariety + 1;
 
@@ -4347,25 +3028,19 @@
         varietyNumber += maxVarietyOffset;
 
         TAknLayoutRect popupGridLayRect;
-        popupGridLayRect.LayoutRect(mainPaneRect,
-            AknLayoutScalable_Avkon::popup_grid_graphic_window(varietyNumber));
+        popupGridLayRect.LayoutRect(mainPaneRect, AknLayoutScalable_Avkon::popup_grid_graphic_window(varietyNumber));
 
         // Background height.
-        TInt backgroundHeightOffset =
-            popupGridLayRect.Rect().Height() - rect.iBr.iY;
-
+        TInt backgroundHeightOffset = popupGridLayRect.Rect().Height() - rect.iBr.iY;
         rect.iBr.iY += backgroundHeightOffset;
         }
     else
         {
         TAknLayoutRect popupGridLayRect;
-        popupGridLayRect.LayoutRect(iAvkonAppUi->ApplicationRect(),
-            AknLayoutScalable_Avkon::popup_grid_graphic2_window(0));
+        popupGridLayRect.LayoutRect(iAvkonAppUi->ApplicationRect(), AknLayoutScalable_Avkon::popup_grid_graphic2_window(0));
 
         // Background height.
-        TInt backgroundHeightOffset =
-            popupGridLayRect.Rect().Height() - rect.iBr.iY;
-
+        TInt backgroundHeightOffset = popupGridLayRect.Rect().Height() - rect.iBr.iY;
         rect.iBr.iY += backgroundHeightOffset * 2;
         }
 
@@ -4373,44 +3048,49 @@
     if ( !Extension()->iMenuSct )
         {
         // 1) Draw the background
-
         // Check if we got an offscreen bitmap allocated for skin background and
         // there is bitmap background in the current skin.
 		if( CAknEnv::Static()->TransparencyEnabled() )
 			{
 			TRegionFix<10> clipReg;
 			clipReg.AddRect(rect);
+
 			if ( iFirstVisibleRow == 0 && iSetRecentSct )
 				{
 				TPoint pos = iGridTopLeft;
-				TInt endX = pos.iX + iGridItemWidth * iMaxColumns + 1;
-				TInt endY = pos.iY + iGridItemHeight;
+				TSize size(iGridItemWidth*iMaxColumns+1, iGridItemHeight);
+				if(iIsMirrored)
+				    {
+                    pos.iX += iGridItemWidth - size.iWidth;
+				    }
 				// eliminate the overlap area between menu sct and the first menu item.
 				if ( Extension()->iMenuSct )
 					{
-					endY--;
+                    size.iHeight--;
 					}
-				clipReg.SubRect( TRect( pos, TPoint( endX, endY ) ) );
+				clipReg.SubRect(TRect(pos,size));
 				}
+			
 			// Take scroll bar out of clip region
 			if (iSBFrame)
 				{
-				clipReg.SubRect(iSBFrame->GetScrollBarHandle(
-					CEikScrollBar::EVertical)->Rect());
+				clipReg.SubRect(iSBFrame->GetScrollBarHandle(CEikScrollBar::EVertical)->Rect());
 				}
+
 			gc.SetClippingRegion(clipReg);
 			}
+		
 		AknsDrawUtils::Background( skin, cc, this, gc, rect,KAknsDrawParamNoClearUnderImage);
+		
 		if( CAknEnv::Static()->TransparencyEnabled() )
 			{
 			gc.CancelClippingRegion();
 			}
 
-        gc.SetPenStyle(CGraphicsContext::ESolidPen);
+        // 2) Draw the grid
+		gc.SetPenStyle(CGraphicsContext::ESolidPen);
         gc.SetBrushStyle(CGraphicsContext::ENullBrush);
         gc.SetPenSize(TSize(1,1));
-
-        // 2) Draw the grid
         DrawGrid(gc);
         }
 
@@ -4612,10 +3292,6 @@
             {
             specialCharItemLayout = AknLayoutScalable_Avkon::cell_graphic2_pane_t1(1);
             }
-        else if (IsJapaneseSctUi())
-            {
-            specialCharItemLayout = AknLayoutScalable_Avkon::cell_graphic2_pane_t1(2);
-            }
         else
             {
             specialCharItemLayout = AknLayoutScalable_Avkon::cell_graphic2_pane_t1(0);
@@ -4629,7 +3305,6 @@
     TRect textRect = aSctPosition;
     if( IsRecentChar(aCharIndex) )
         {
-        textRect.Move(0, -1);       //because height of recent char frame decreased 1.
         if( Extension()->iMenuSct )
             {
             textRect.Move(0, -1);   //because menu sct will also shrink 1.
@@ -4749,7 +3424,7 @@
 //
 void CAknCharMap::DrawRecentCharFrame( CWindowGc& aGc) const
     {
-    MAknsSkinInstance*   skin = AknsUtils::SkinInstance();
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
     MAknsControlContext* cc = iExtension->iBgContext;
     if ( !cc )
         {
@@ -4757,27 +3432,22 @@
         }
 
     TPoint pos = iGridTopLeft;
-    TInt endX = pos.iX + iGridItemWidth * iMaxColumns + 1;
-    TInt endY = pos.iY + iGridItemHeight;
-    TRect drawRect(TPoint(pos.iX, pos.iY), TPoint(endX, endY));
+    TSize size(iGridItemWidth*iMaxColumns+1, iGridItemHeight);
+    if(iIsMirrored)
+        {
+        pos.iX += iGridItemWidth - size.iWidth;
+        }
     // eliminate the overlap area between menu sct and the first menu item.
     if ( Extension()->iMenuSct )
         {
-        drawRect = Rect();
-        endY--;
-        }
-
-    AknsDrawUtils::Background( skin, cc, this, aGc, drawRect );
+        size.iHeight--;
+        }
+
+    AknsDrawUtils::Background(skin, cc, this, aGc, TRect(pos,size));
 
     SetRecentCharFrameStyle(aGc);
-    if(iIsMirrored)
-        {
-        pos.iX = iGridTopLeft.iX - ((iMaxColumns - 1) * iGridItemWidth);
-        endX = iGridTopLeft.iX + iGridItemWidth + 1;
-        }
-
-    aGc.DrawRect( TRect(TPoint(pos.iX-1, pos.iY-1), TPoint(endX, endY)));
-    
+    aGc.DrawRect(TRect(pos,size));
+
     MTouchFeedback* feedback = MTouchFeedback::Instance();
     CFeedbackSpec* spec = CFeedbackSpec::New();
 
@@ -5100,11 +3770,7 @@
        )
         {
         caseChange = ETrue;
-        // Cursor was on the second line
-        if (aDeltaY < 0)
-            {
-            globalYPos--;
-            }
+
         // Cursor was on the second line and first position
         if (aDeltaX < 0 && iCursorPos.iX == 0)
             {
@@ -5492,14 +4158,7 @@
     TRect parent = gridWithScrollLayRect.Rect();
 
     TAknWindowComponentLayout scrollbarLayout;
-    if (iExtension->iHasCategoryButtonUi)
-        {
-        scrollbarLayout = AknLayoutScalable_Avkon::scroll_pane_cp5(1);
-        }
-    else
-        {
-        scrollbarLayout = AknLayoutScalable_Avkon::scroll_pane_cp5(0);
-        }
+    scrollbarLayout = AknLayoutScalable_Avkon::scroll_pane_cp5(0);
 
     vSbarModel.iScrollSpan = PageCount() * iExtension->iMaxVisibleRows;
     vSbarModel.iThumbSpan = iExtension->iMaxVisibleRows;
@@ -5925,15 +4584,6 @@
         aIndex--;
         }
 
-    if (iExtension->iRadioButton)
-        {
-         if ( aIndex == 0 )
-            {
-            return iExtension->iRadioButton;
-            }
-        aIndex--;
-        }
-
     if (iExtension->iCategoryTitle)
         {
         if ( aIndex == 0 )
@@ -5950,15 +4600,6 @@
             }
         aIndex--;
         }
-
-    if (iExtension->iTableNavi)
-        {
-         if ( aIndex == 0 )
-            {
-            return iExtension->iTableNavi;
-            }
-        aIndex--;
-        }
     if (iExtension->iPageNavi)
         {
          if ( aIndex == 0 )
@@ -5978,10 +4619,6 @@
         {
         num++;
         }
-    if (iExtension->iRadioButton)
-        {
-        num++;
-        }
     if (iExtension->iCategoryTitle)
         {
         num++;
@@ -5990,10 +4627,6 @@
         {
         num++;
         }
-    if (iExtension->iTableNavi)
-        {
-        num++;
-        }
     if (iExtension->iPageNavi)
         {
         num++;
@@ -6033,11 +4666,6 @@
     iSpecialCharPages.AppendL( PageCountFromChars(*currentcasechars) );
 
     iSpecialCharCases.AppendL( iSpecialCharCase );
-    if (iExtension->iRadioButton)
-        {
-        // Set the sct case mode to valid
-        iExtension->iRadioButton->SetValidSctCase(iSpecialCharCase);
-        }
 
     if (aCase.Count() > 0)
         {
@@ -6048,11 +4676,6 @@
                 {
                 iSpecialCharCases.AppendL( aCase[i] );
                 iSpecialCharPages.AppendL( PageCountFromChars(*chars) );
-                if (iExtension->iRadioButton)
-                    {
-                    // Set the sct case mode to valid
-                    iExtension->iRadioButton->SetValidSctCase(aCase[i]);
-                    }
                 }
             }
         }
@@ -6068,29 +4691,7 @@
             {
             iPictographPages.AppendL( PageCountFromChars(*iPictographsBuffer2) );
             iPictographCases.AppendL(EAknCharMapTablePicto2);
-            if (iExtension->iRadioButton)
-                {
-                // Set the sct case mode to valid
-                iExtension->iRadioButton->SetValidSctCase(EAknSCTPictograph1);
-                iExtension->iRadioButton->SetValidSctCase(EAknSCTPictograph2);
-                }
-            }
-        else
-            {
-            if (iExtension->iRadioButton)
-                {
-                // Set the sct case mode to valid
-                iExtension->iRadioButton->SetValidSctCase(EAknSCTPictograph);
-                }
-            }
-        }
-
-    if (iExtension->iRadioButton)
-        {
-        // Remove invalid category buttons
-        iExtension->iRadioButton->RemoveInvalidButton();
-        __ASSERT_DEBUG( iExtension->iRadioButton->Count() > 0,
-            Panic(EAknPanicInvalidValue));
+            }
         }
     }
 
@@ -6188,6 +4789,8 @@
 
 void CAknCharMap::CountMaxColumnsAndCellSizes()
     {
+    const TBool isLandscape = Layout_Meta_Data::IsLandscapeOrientation();
+
     TRect mainPaneRect;
     if (!AknLayoutUtils::PenEnabled() || Extension()->iMenuSct)
         {
@@ -6204,7 +4807,7 @@
         AknLayoutUtils::TAknCbaLocation location = AknLayoutUtils::CbaLocation();
         TInt maxVarietyOffset = 0;
         TInt varietyOffset = maxVariety + 1;
-        if(Layout_Meta_Data::IsLandscapeOrientation())
+        if(isLandscape)
             {
             varietyOffset = (maxVariety + 1) / KAknSctCBaButtonDirections;
             }
@@ -6228,16 +4831,8 @@
 
 
         TAknLayoutRect gridLayRect;
-        if (iExtension->iHasCategoryButtonUi)
-            {
-            gridLayRect.LayoutRect(gridWithScrollLayRect.Rect(),
-                AknLayoutScalable_Avkon::grid_graphic_popup_pane(2));
-            }
-        else
-            {
-            gridLayRect.LayoutRect(gridWithScrollLayRect.Rect(),
-                AknLayoutScalable_Avkon::grid_graphic_popup_pane(0));
-            }
+        gridLayRect.LayoutRect(gridWithScrollLayRect.Rect(),
+            AknLayoutScalable_Avkon::grid_graphic_popup_pane(0));
 
         TRect gridRect = Extension()->iMenuSct ? Rect(): gridLayRect.Rect();
 
@@ -6293,39 +4888,19 @@
     else
         {
         TAknLayoutRect popupGridLayRect;
-        popupGridLayRect.LayoutRect(iAvkonAppUi->ApplicationRect(),
-            AknLayoutScalable_Avkon::popup_grid_graphic2_window(0));
-
+        popupGridLayRect.LayoutRect(iAvkonAppUi->ApplicationRect(), AknLayoutScalable_Avkon::popup_grid_graphic2_window(0));
         TRect popupGridRect = popupGridLayRect.Rect();
 
-        TInt gridVariety;
-        if (!IsJapaneseSctUi())
-            {
-            if(!Layout_Meta_Data::IsLandscapeOrientation())
-                {
-                gridVariety = (TableCount() > 1) ? 0 : 1;
-                }
-            else
-                {
-                gridVariety = (TableCount() > 1) ? 2 : 3;
-                }
-            }
-        else
-            {
-            gridVariety = !Layout_Meta_Data::IsLandscapeOrientation() ? 4 : 5;
-            }
-
+        TInt gridVariety = isLandscape ? 7 : 6;
         TAknLayoutRect gridLayRect;
-        gridLayRect.LayoutRect(popupGridRect,
-            AknLayoutScalable_Avkon::grid_graphic2_pane(gridVariety));
-
+        gridLayRect.LayoutRect(popupGridRect, AknLayoutScalable_Avkon::grid_graphic2_pane(gridVariety));
         TRect gridRect = gridLayRect.Rect();
 
+        TInt cellVariety = isLandscape ? 1 : 0;
         TAknLayoutRect firstCellLayRect;
-        firstCellLayRect.LayoutRect(popupGridRect,
-            AknLayoutScalable_Avkon::aid_size_cell_graphic2(gridVariety,0,0));
-
+        firstCellLayRect.LayoutRect(gridRect, AknLayoutScalable_Avkon::cell_graphic2_pane(cellVariety));
         TRect firstCellRect = firstCellLayRect.Rect();
+        
         TInt firstVisibleIndex = iFirstVisibleRow * iMaxColumns;
 
         // Max columns.
@@ -6335,10 +4910,8 @@
         // Max visible rows.
         iExtension->iMaxVisibleRows = gridRect.Height() / firstCellRect.Height();
 
-        // Cell width.
+        // Cell.
         iGridItemWidth = firstCellRect.Width();
-
-        // Cell height.
         iGridItemHeight = firstCellRect.Height();
         }
     }
@@ -7491,9 +6064,7 @@
                 // Update also title if requested
                 if ( aUpdateTitle)
                     {
-                    const TDesC* title = (IsJapaneseSctUi())?
-                                         TitleWithSelectingSpecialChar()
-                                         :Title();
+                    const TDesC* title = Title();
                     if ( title )
                         {
                         //
@@ -7624,12 +6195,12 @@
 
 TBool CAknCharMap::IsSupportCategoryButtonUi() const
     {
-    return (iExtension)? iExtension->iHasCategoryButtonUi : EFalse;
+    return EFalse;
     }
 
 TBool CAknCharMap::IsJapaneseSctUi() const
     {
-    return (iExtension)? iExtension->iJapaneseSctUi : EFalse;
+    return EFalse;
     }
 
 // -----------------------------------------------------------------------------
@@ -8234,10 +6805,10 @@
         
         SetSmileyAnimationActivityInCurrentPageL(ETrue);
         
-        CAknSctTableNavi* tableNavi = Extension()->iTableNavi;
-        if(tableNavi)
-            {
-            tableNavi->UpdateNextTableButtonL();
+        CAknSctPageNavi* pageNavi = Extension()->iPageNavi;
+        if(pageNavi)
+            {
+            pageNavi->UpdateNextTableButtonL();
             }
 
         DrawNow();
--- a/uifw/AvKon/src/AknCheckBoxSettingPage.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/src/AknCheckBoxSettingPage.cpp	Tue May 25 12:58:19 2010 +0300
@@ -210,7 +210,7 @@
         if (newResourceId)
             {
             bgc->SetCommandL(3,newResourceId);
-            cba->DrawNow();
+            cba->DrawDeferred();
             }
         }
 
--- a/uifw/AvKon/src/AknIndicatorContainer.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/src/AknIndicatorContainer.cpp	Tue May 25 12:58:19 2010 +0300
@@ -855,7 +855,14 @@
 
 EXPORT_C CCoeControl* CAknIndicatorContainer::ComponentControl(TInt aIndex) const
     {
-    return iIndicators->At(aIndex);
+    if ( aIndex >= 0 && aIndex < iIndicators->Count() )
+        {
+        return iIndicators->At( aIndex );
+        }
+    else
+        {
+        return NULL;
+        }
     }
 
 
--- a/uifw/AvKon/src/AknNoteDialog.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/src/AknNoteDialog.cpp	Tue May 25 12:58:19 2010 +0300
@@ -49,19 +49,26 @@
 #include "akntrace.h"
 const TInt EEikDialogFlagSleeping   =0x20000;
 
+
+
 // -----------------------------------------------------------------------------
 // Finds out if this control belongs to the window group that is in focus.
-// This information can be used to skip effects when the window group is
-// not visible.
+// This information can be used to skip effects when the window group is not visible.
 //
-// @param aThis The control in question.
+// @param aControl The control in question.
 //
 // @return ETrue if the window group is in focus, otherwise EFalse
 // -----------------------------------------------------------------------------
 //
-TBool IsFocusedWindowGroup( CAknNoteDialog* aThis )
+TBool IsFocusedWindowGroup( const CCoeControl* aControl )
     {
-    RWindowTreeNode* node = aThis->DrawableWindow();
+    if( !aControl )
+    	{
+    	return EFalse;	
+    	}
+
+    RWindowTreeNode* node = aControl->DrawableWindow();
+
     // this code finds out if this control belongs to window group
     // that is in focus, there are some rare cases when the latest opened
     // popup goes behind another one (e.g. system lock query -> power key menu)
@@ -72,12 +79,13 @@
         {
         return EFalse;
         }
+        
     TInt nodeWindowGroupId = node->WindowGroupId();
     TInt focusedWindowGroupId = wsSession.GetFocusWindowGroup();
     
     if ( nodeWindowGroupId == focusedWindowGroupId )
         {
-        return aThis->IsFocused();
+        return aControl->IsFocused();
         }
 
     TInt count = wsSession.NumWindowGroups( 0 );
@@ -101,7 +109,8 @@
             }
         }
     return EFalse;
-    }
+    }  
+    
 
 //////////////////////////////////////////////////////////////////////
 // CAknNoteDialogExtension
@@ -440,7 +449,7 @@
         
 #ifdef RD_UI_TRANSITION_EFFECTS_POPUPS           
     if ( self->IsVisible() && GfxTransEffect::IsRegistered( self ) &&
-        IsFocusedWindowGroup( self ) )
+         IsFocusedWindowGroup( self ) )
 		{
         TBool rsWasEnabled( EFalse );
         if( !CAknEnv::Static()->TransparencyEnabled() && self->DrawableWindow() && self->Window().IsRedrawStoreEnabled() )
--- a/uifw/AvKon/src/AknPhedView.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/src/AknPhedView.cpp	Tue May 25 12:58:19 2010 +0300
@@ -499,7 +499,7 @@
     {
     TRgb color = KRgbBlack;
     AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), color,
-                KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG51 );
+                KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG8 );
     aGc.SetPenColor( color );
     // This function shifts the RHS of aRect left by the width of the text drawn.
     // It temporarily limits the draw rectangle to the text width to prevent flicker.
@@ -523,7 +523,7 @@
     TRgb color;
     color = KRgbBlack;
     AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), color,
-                KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG51 );
+                KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG8 );
     aGc.SetPenColor( color );
     TPtr buf( TranslatedText( aText ) );
     aGc.DrawText( buf, aRect, aBaseline, CGraphicsContext::ERight );
@@ -574,12 +574,10 @@
     aGc.DrawRect( rect );
     aGc.SetPenStyle( CGraphicsContext::ESolidPen );
     aGc.SetPenColor( penColor );
-    TInt selStart( iModel->LeftMark() );
     TInt endPos( iModel->Length() - SelectionStart() );
     TInt startPos( iModel->Length() - SelectionEnd() );
-    TPtrC text( TranslatedText( iModel->Selection().Mid( startPos - selStart, 
-        endPos - startPos ) ) );
-    aGc.DrawText( text, rect, baseline, CGraphicsContext::ERight );
+    TPtrC text( TranslatedText( iModel->Text( startPos, endPos - 1 ) ) );
+    aGc.DrawText( text, rect, baseline, CGraphicsContext::ELeft );
     }
 
 TPtr TAknPhedViewLine::TranslatedText( const TDesC& aText ) const
--- a/uifw/AvKon/src/AknPreviewPopUp.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/src/AknPreviewPopUp.cpp	Tue May 25 12:58:19 2010 +0300
@@ -78,6 +78,11 @@
 //
 CAknPreviewPopUp::~CAknPreviewPopUp()
     {
+    if( iIsDeleted )
+        {
+    	*iIsDeleted = ETrue ;
+        iIsDeleted = 0 ;
+        }
 
     if ( IsVisible() )
         {
@@ -519,7 +524,10 @@
 // -----------------------------------------------------------------------------
 //
 void CAknPreviewPopUp::HandlePointerEventL( const TPointerEvent& aPointerEvent )
-    {
+    {   
+	TBool isDelete = EFalse; 
+	iIsDeleted = &isDelete;
+	
     if ( AknLayoutUtils::PenEnabled() )
         {
         iCloseMenu = EFalse;
@@ -531,8 +539,14 @@
         // redirect pointer event to content
         if ( Rect().Contains( aPointerEvent.iPosition ) && IsVisible() )
             {
-            iAllowUpEvent = ETrue;
+            iAllowUpEvent = ETrue;         
+            CleanupStack::PushL( TCleanupItem( CleanLocalRef, this ) );
             CCoeControl::HandlePointerEventL( aPointerEvent );
+            CleanupStack::Pop();
+            if( isDelete )
+            	{
+            	return;
+            	}
             if ( !( iFlags & CAknPreviewPopUpController::EPermanentMode ) && aPointerEvent.iType == TPointerEvent::EButton1Up && IsVisible() )
                 {
             	  // if pointer up is already redirected to the content, but the popup is still visible,
@@ -603,7 +617,13 @@
                     aPointerEvent.iType == TPointerEvent::EButtonRepeat ||
                     (aPointerEvent.iType == TPointerEvent::EButton1Up && iAllowUpEvent ) )
                     {
+                    CleanupStack::PushL( TCleanupItem( CleanLocalRef, this ) );
                     CCoeControl::HandlePointerEventL( aPointerEvent );
+                    CleanupStack::Pop();
+                    if( isDelete )
+                    	{
+                    	return;
+                    	}
                     }
                 }
             else
@@ -611,7 +631,13 @@
                 if ( aPointerEvent.iType == TPointerEvent::EDrag || 
                     aPointerEvent.iType == TPointerEvent::EButtonRepeat )
                     {
+                    CleanupStack::PushL( TCleanupItem( CleanLocalRef, this ) );
                     CCoeControl::HandlePointerEventL( aPointerEvent );
+                    CleanupStack::Pop();
+                    if( isDelete )
+                    	{
+                    	return;
+                    	}
                     }
                 }
                 
@@ -621,6 +647,8 @@
             iAllowUpEvent = EFalse;
             }
         }
+       
+    iIsDeleted = NULL;
     }
     
 // -----------------------------------------------------------------------------
@@ -807,5 +835,14 @@
         }   
     }
 
+// -----------------------------------------------------------------------------
+// CAknPreviewPopUp::CleanLocalRef
+// -----------------------------------------------------------------------------
+//
+void CAknPreviewPopUp::CleanLocalRef( TAny* any )
+    {
+    static_cast<CAknPreviewPopUp*>( any )->iIsDeleted = NULL;
+    }
+
 //  End of File  
 
--- a/uifw/AvKon/src/AknQueryDialog.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/src/AknQueryDialog.cpp	Tue May 25 12:58:19 2010 +0300
@@ -1025,35 +1025,47 @@
     }
 
 EXPORT_C void CAknQueryDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent) 
-    { 
-    if ( AknLayoutUtils::PenEnabled() )
+    {
+    CAknAppUi *appUi = iAvkonAppUi;
+    CCoeControl *redirectControl = NULL;
+    TRect rectToScreenOfControl;
+ 
+    if (!Rect().Contains(aPointerEvent.iPosition))
         {
-
-        CAknTouchPane* touchPane = iAvkonAppUi->TouchPane();
-        
-        if ( !Rect().Contains( aPointerEvent.iPosition ) && touchPane
-            && touchPane->IsVisible() )
+        CAknTouchPane* touchPane = appUi->TouchPane();
+        CEikStatusPane *statusPane = appUi->StatusPane();
+ 
+        if ( touchPane && touchPane->IsVisible() )
             {
             // touchpane is a window-owning control -> Rect() cannot be used
-            TRect touchPaneRect( touchPane->Position(), touchPane->Size() );
-                
-            if ( touchPaneRect.Contains( aPointerEvent.iParentPosition ) )
+            rectToScreenOfControl.SetRect( touchPane->Position(), touchPane->Size() );
+            redirectControl = touchPane;
+            }
+        else if ( statusPane && statusPane->IsVisible() && 
+                Layout_Meta_Data::IsLandscapeOrientation() && 
+                !IsFocused())
+            {
+            CCoeControl* cbControl = statusPane->ControlL(TUid::Uid(EEikStatusPaneUidCombined));
+            if ( cbControl && !statusPane->IsFaded() )
                 {
-                TPointerEvent pointerEvent( aPointerEvent );
-                   
-                // make event's coordinates touch pane relative
-                pointerEvent.iPosition = aPointerEvent.iParentPosition - 
-                    touchPaneRect.iTl;
-                    
-                static_cast<CCoeControl*>( touchPane )->HandlePointerEventL( 
-                    pointerEvent );
+                rectToScreenOfControl.SetRect( cbControl->PositionRelativeToScreen(), cbControl->Size() );
+                redirectControl = cbControl;
                 }
             }
-        else
-            {
-            // Forward also those pointerevents that the dialog rect does not contain
-            CAknDialog::HandlePointerEventL( aPointerEvent );
-            }
+        }
+ 
+    if ( redirectControl && rectToScreenOfControl.Contains(aPointerEvent.iParentPosition) )
+        {
+        // make event's coordinates relative to new control.
+        TPointerEvent pointerEvent( aPointerEvent );
+        pointerEvent.iPosition = aPointerEvent.iParentPosition - rectToScreenOfControl.iTl;
+ 
+        redirectControl->HandlePointerEventL( pointerEvent );
+        }
+    else
+        {
+        // Forward also those pointerevents that the dialog rect does not contain
+        CAknDialog::HandlePointerEventL( aPointerEvent );
         }
     }
 
--- a/uifw/AvKon/src/AknSettingPage.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/src/AknSettingPage.cpp	Tue May 25 12:58:19 2010 +0300
@@ -52,6 +52,14 @@
 #include "aknitemactionmenuregister.h"
 #include "aknqueryeditorindicator.h"
 
+
+
+//
+// the function's definition is in the AknNoteDialog.cpp
+//
+TBool IsFocusedWindowGroup( const CCoeControl* aControl );
+
+
 // This determines the maximum number of digits in the optional number displayed on the
 // top left of the setting page
 const TInt KAknSettingPageMaxOrdinalDigits = 3;
@@ -1425,7 +1433,7 @@
 			iSettingPageObserver->HandleSettingPageEventL(this, MAknSettingPageObserver::EEventSettingCancelled);
 		}
 	
-	if ( GfxTransEffect::IsRegistered( this ) )
+	if ( GfxTransEffect::IsRegistered( this ) && IsFocusedWindowGroup( this ) && IsVisible() )
 	    {
         GfxTransEffect::Begin( this, KGfxControlDisappearAction );
         MakeVisible( EFalse );
--- a/uifw/AvKon/src/AknViewAppUi.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/src/AknViewAppUi.cpp	Tue May 25 12:58:19 2010 +0300
@@ -47,8 +47,6 @@
 // CONSTANTS
 const TInt KAknAppUiViewsGranularity = 1;
 const TInt KAknViewAsyncPriority = EActivePriorityRedrawEvents + 10;
-const TUid KCRUidThemes = { 0x102818E8 }; // defined in pslninternalcrkeys.h
-const TUint32 KThemesTransitionEffects = 0x00000009; //defined in pslninternalcrkeys.h
 
 
 #ifdef RD_SPLIT_VIEW
@@ -236,26 +234,12 @@
 	iExtension->iNavigator = new ( ELeave ) CAknViewNavigator( this );
 	AddToStackL( iExtension->iNavigator, ECoeStackPriorityDefault - 1, ECoeStackFlagRefusesFocus );
 #endif // RD_SPLIT_VIEW
-	
-	
-	// disable CAknLocalScreenClearer when fullscreen effect is on
-	CRepository *uiThemeCenRep =  CRepository::NewL( KCRUidThemes );
-	CleanupStack::PushL( uiThemeCenRep );
-	TInt effectValue = 0;
-	TBool themeEffectDisabled = ETrue;
-	if ( KErrNone == uiThemeCenRep->Get( KThemesTransitionEffects, effectValue ) )
-        {
-        themeEffectDisabled = effectValue & AknTransEffect::EFullScreenTransitionsOff;
-        }
 
 	if ( iEikonEnv->RootWin().OrdinalPosition() == 0 && // only clear the window for foreground apps
-	     iExtension->iUseDefaultScreenClearer && themeEffectDisabled )
+	     iExtension->iUseDefaultScreenClearer )
 		{
 		iClearer = CAknLocalScreenClearer::NewL( ETrue );
 		}
-	
-	CleanupStack::PopAndDestroy( uiThemeCenRep ); // uiThemeCenRep
-	
 	}
 
 // -----------------------------------------------------------------------------
--- a/uifw/AvKon/src/aknindicatordataobserver.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/src/aknindicatordataobserver.cpp	Tue May 25 12:58:19 2010 +0300
@@ -65,7 +65,6 @@
 		{
 		iDataSubscriber->RemoveObserver( this );
 		}
-
     }
 
 
@@ -77,7 +76,7 @@
 void CAknIndicatorDataObserver::HandleUpdateL(
     const TAknStatusPaneStateData& aData )
 	{
-	if ( !iDataSubscriber )
+	if ( !iDataSubscriber || !iIndicatorPane->IsVisible() )
 	    {
 		return;
 	    }
--- a/uifw/AvKon/src/aknlistquerydialog.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/src/aknlistquerydialog.cpp	Tue May 25 12:58:19 2010 +0300
@@ -262,17 +262,9 @@
 		listbox->SetListBoxObserver(this);
     
 		CAknListQueryControl* listControl = ListControl();
-        if ( listControl )
-            {
-            listControl->SetLayout( &iLayout );
-            }            
-        
-        if ( iAvkonAppUi->IsSingleClickCompatible() && 
-             !IsLeftSoftkeyShown() )
-            {
-            MakeLeftSoftkeyVisible( EFalse );
-            }    
-        }
+		if (listControl)
+			listControl->SetLayout(&iLayout);
+		}
 
     if (FindBox())
         {
@@ -469,16 +461,6 @@
                         iIdle->Start(TCallBack(ClosePopupAcceptingChanges, this));
                         }
                     }  
-                
-                if( iAvkonAppUi->IsSingleClickCompatible() && 
-                        aListBox->IsMultiselection() )
-                    {
-                    CEikListBox* listbox = ListBox();
-                    if( listbox )
-                        {
-                        MakeLeftSoftkeyVisible( IsLeftSoftkeyShown() );
-                        }    
-                    }
                 }
                 break;
             default:
@@ -583,22 +565,16 @@
 	        }
 
         TInt currentSelection = listbox->CurrentItemIndex();
-        TBool isSingleClick = iAvkonAppUi->IsSingleClickCompatible(); 
-        if ( currentSelection == KErrNotFound )
+        if( currentSelection == KErrNotFound )
             {
-            MakeLeftSoftkeyVisible( EFalse );
+            MakeLeftSoftkeyVisible(EFalse);
             }
-        else if ( isSingleClick )
+        else
             {
-            MakeLeftSoftkeyVisible( IsLeftSoftkeyShown() );
+            MakeLeftSoftkeyVisible(ETrue);
             }
             
         TKeyResponse response = listbox->OfferKeyEventL( aKeyEvent, aType);
-        
-        if ( isSingleClick && IsLeftSoftkeyShown() )
-            {
-            MakeLeftSoftkeyVisible( ETrue );
-            }
         if (currentSelection != listbox->CurrentItemIndex() && iMediatorObs)
             {
             iMediatorObs->UpdateL(listbox->CurrentItemIndex());
@@ -766,8 +742,12 @@
     }
 
 
-EXPORT_C void* CAknListQueryDialog::ExtensionInterface( TUid /*aInterface*/ ) 
-    { 
+EXPORT_C void* CAknListQueryDialog::ExtensionInterface( TUid aInterface ) 
+    {
+    if(aInterface == KExIfTactileFeedbackUid)
+        {
+        return MTouchFeedback::Instance();
+        }
     return NULL;
     }
 
@@ -794,18 +774,6 @@
     return NULL;
     }
 
-TBool CAknListQueryDialog::IsLeftSoftkeyShown()
-	{
-    CEikListBox* listbox = ListBox();
-    __ASSERT_DEBUG( listbox, Panic(EAknPanicNullPointer));
-    // This flag indicators that listbox is a viewer listbox.    
-    TBool isViewMode = listbox->View()->ItemDrawer()->Flags() & 
-                           CListItemDrawer::EDisableHighlight; 
-
-    return listbox->IsHighlightEnabled() || 
-               listbox->SelectionIndexes()->Count() > 0 || isViewMode;
-	}
-
 EXPORT_C void CAknListQueryDialog::SetTone(TInt aTone)
 	{
 	iTone = (TTone)aTone;
--- a/uifw/AvKon/src/aknsfld.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/src/aknsfld.cpp	Tue May 25 12:58:19 2010 +0300
@@ -246,7 +246,7 @@
         {
         aFieldStyle = EPopupWindow;
         }
-    iColumnFlag = 0xFFFFFFFF;   
+
     switch ( aFieldStyle )
         {
         case EFixed:
@@ -304,7 +304,8 @@
         case EAdaptiveSearch:
             bitmapId = EMbmAvkonQgn_indi_find_glass;
             bitmapMaskId = EMbmAvkonQgn_indi_find_glass_mask;
-            SetContainerWindowL( aParent );      
+            SetContainerWindowL( aParent );  
+            iColumnFlag = 0xFFFFFFFF;     
             if( AknLayoutUtils::PenEnabled() )
                 {
                 iAdaptiveSearch = CAknAdaptiveSearch::NewL( aTextLimit, aFieldStyle );       
@@ -322,6 +323,7 @@
             bitmapId = EMbmAvkonQgn_indi_find_glass;
             bitmapMaskId = EMbmAvkonQgn_indi_find_glass_mask;
             CreateWindowL( &aParent ); 
+            iColumnFlag = 0xFFFFFFFF; 
             if( AknLayoutUtils::PenEnabled() )
                 {
                 iAdaptiveSearch = CAknAdaptiveSearch::NewL( aTextLimit, aFieldStyle );       
@@ -340,6 +342,7 @@
             bitmapMaskId = EMbmAvkonQgn_indi_find_glass_mask;
             flags |= CAknInputFrame::EPopupLayout;
             CreateWindowL(); 
+            iColumnFlag = 0xFFFFFFFF; 
             iIsPopup = ETrue;
             if( AknLayoutUtils::PenEnabled() )
                 {
@@ -373,6 +376,7 @@
             flags |= CAknInputFrame::EPopupWindowLayout;
             flags |= CAknInputFrame::EFixedFindWithoutLine;
             SetContainerWindowL( aParent ); 
+            iColumnFlag = 0xFFFFFFFF;   
             if( AknLayoutUtils::PenEnabled() )
                 {
                 iAdaptiveSearch = CAknAdaptiveSearch::NewL( aTextLimit, aFieldStyle );       
--- a/uifw/AvKon/src/aknutils.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/src/aknutils.cpp	Tue May 25 12:58:19 2010 +0300
@@ -1885,17 +1885,14 @@
     
     // an index to end of array
     TInt indexEnd = iShownIndexes->Count();
-
-    TBitFlags32 columnFlag = iSearchField->ListColumnFilterFlags(); 
-    HBufC16* temptext = HBufC16::NewL( KMatchingBufferLength );  
-    CleanupStack::PushL( temptext );  
-    TPtr ptr_temptext( temptext->Des() );  
-
     // If adaptive search manage with next characters
     if( iSearchField && IsAdaptiveSearch() )
         {        
         ClearNextChars();
-        
+        TBitFlags32 columnFlag = iSearchField->ListColumnFilterFlags(); 
+        HBufC16* temptext = HBufC16::NewL( KMatchingBufferLength );  
+        CleanupStack::PushL( temptext );  
+        TPtr ptr_temptext( temptext->Des() );  
         for ( TInt i = iShownIndexes->Count()-1; i>=0; i-- )
            {
            TInt realindex = iShownIndexes->At( i );        
@@ -1948,17 +1945,15 @@
         CleanupStack::PopAndDestroy(array);   
 
         iSearchField->SetAdaptiveGridChars( *(iExtension->iNextChars) ); 
+        CleanupStack::PopAndDestroy( temptext );
         }
     else
         {
         for (TInt i = iShownIndexes->Count()-1; i>=0 ; i--)
             {
-
-            TInt realindex = iShownIndexes->At( i );        
-            TPtrC itemtext = arr->ItemTextArray()->MdcaPoint( realindex );
-            AknFind::UpdateItemTextAccordingToFlag( itemtext, columnFlag, ptr_temptext );
-            TBool isItemVisible = IsItemVisible( ptr_temptext, aCriteria );
-
+            TInt realindex = iShownIndexes->At(i);
+            TPtrC itemtext = array->MdcaPoint(realindex);
+            TBool isItemVisible = IsItemVisible(itemtext, aCriteria);
             TBool isItemSelected = IsItemSelected(realindex);
             // EAJA-7SK9UC set indexToSet as current index when found item
             if ( isItemVisible )
@@ -1969,10 +1964,8 @@
                 {
                 iShownIndexes->Delete(i);
                 }
-            ptr_temptext.Zero();  
             }  
-        } 
-    CleanupStack::PopAndDestroy( temptext );  
+        }   
     InstallEmptyTextL();
 
     // Set highlight to the first match item in markable list
@@ -1992,19 +1985,17 @@
     // An index to set highlight after find pane updating
     TInt indexToSet = KInvalidIndex;    
     iShownIndexes->Reset();
-
-    const MDesCArray *array = iModel->MatchableTextArray();
-    const CAknFilteredTextListBoxModel* arr = (CAknFilteredTextListBoxModel*)( iModel->MatchableTextArray() );
-    TInt count = array->MdcaCount();
-    TBitFlags32 columnFlag = iSearchField->ListColumnFilterFlags();
-    HBufC16* temptext = HBufC16::NewL( KMatchingBufferLength ); 
-    CleanupStack::PushL( temptext );
-    TPtr ptr_temptext( temptext->Des() );   
-
     // If adaptive search field 
     if( iSearchField && IsAdaptiveSearch() )
         {        
         ClearNextChars();
+        TBitFlags32 columnFlag = iSearchField->ListColumnFilterFlags();
+        HBufC16* temptext = HBufC16::NewL( KMatchingBufferLength ); 
+        CleanupStack::PushL( temptext );
+        TPtr ptr_temptext( temptext->Des() );       
+        const MDesCArray *array = iModel->MatchableTextArray();
+        const CAknFilteredTextListBoxModel* arr = (CAknFilteredTextListBoxModel*)(iModel->MatchableTextArray());
+        TInt count = array->MdcaCount();
         
         for (TInt i = 0; i < count; i++)
            {            
@@ -2024,10 +2015,12 @@
            }                
         iSearchField->SetAdaptiveGridChars( *(iExtension->iNextChars) ); 
         InstallEmptyTextL(); 
+        CleanupStack::PopAndDestroy( temptext );
         }
     else
         {
-
+        const MDesCArray *array = iModel->MatchableTextArray();
+        TInt count = array->MdcaCount();
         TInt i;
 
         if ( aCriteria.Length() == 0)
@@ -2047,10 +2040,8 @@
             {
             for( i = 0; i < count ; i++ )
                 {
-
-                TPtrC itemtext = arr->ItemTextArray()->MdcaPoint( i );    
-                AknFind::UpdateItemTextAccordingToFlag( itemtext, columnFlag, ptr_temptext );
-                TBool isItemVisible = IsItemVisible( temptext->Des(), aCriteria );
+                TPtrC itemtext = array->MdcaPoint(i);
+                TBool isItemVisible = IsItemVisible(itemtext, aCriteria);
                 
                 // Find first match item to set highlight
                 if ((indexToSet == KInvalidIndex) && isItemVisible)
@@ -2061,12 +2052,10 @@
                     {
                     iShownIndexes->AppendL(i);
                     }
-                ptr_temptext.Zero();  
                 } 
             InstallEmptyTextL();
             }
         }
-    CleanupStack::PopAndDestroy( temptext );
     
     // Set highlight to the first match item in markable list
     if ( iListBox && indexToSet != KInvalidIndex )
--- a/uifw/AvKon/src/eikfrlbd.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/src/eikfrlbd.cpp	Tue May 25 12:58:19 2010 +0300
@@ -59,6 +59,10 @@
 // colored tick marks support
 const TInt KColorIconFlag = -1;
 const TInt KColorIconIdx  =  0;
+
+// Number of icons in marking mode icon array
+const TInt KMarkingModeIconArraySize = 2;
+
 // smiley text place holder
 _LIT( KPlaceHolder, "\xFFF0i" );
 
@@ -1329,7 +1333,8 @@
     {
     if ( !iMarkingIconArray )
         {
-        iMarkingIconArray = new ( ELeave ) CAknIconArray( 2 );
+        iMarkingIconArray = new ( ELeave ) CAknIconArray( 
+                KMarkingModeIconArraySize );
         }
     else
         {
@@ -2477,45 +2482,7 @@
     __ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
     
     TRect textRect(aItemRect);
-    
-    CEikListBox* listbox = static_cast<CEikListBox*>( Control() ); 
-    
-    if ( listbox->View()->ItemDrawer()->Flags() 
-            & CListItemDrawer::EMarkingModeEnabled 
-            && iExtension->iMarkingIconArray
-            &&  iExtension->iMarkingIconArray->Count() == 2 )
-        {
-        textRect.iTl.iX += 
-                AknLayoutScalable_Avkon::list_double_graphic_pane_t1( 0 ).LayoutLine().il;
-
-        TAknLayoutRect layoutRect;
-        layoutRect.LayoutRect( aItemRect, 
-                AknLayoutScalable_Avkon::list_double_graphic_pane_g1( 0 ) );
-        
-        CGulIcon* icon = (*iExtension->iMarkingIconArray)[1]; // unchecked
-
-        if ( listbox->View()->ItemIsSelected( 
-                iExtension->iCurrentlyDrawnItemIndex ) )
-            {
-            icon = (*iExtension->iMarkingIconArray)[0];
-            }
-        
-        CFbsBitmap* bitmap = icon->Bitmap();
-
-        if ( bitmap )
-            {
-            TSize size( bitmap->SizeInPixels() ); // set size if not already
-            TSize targetSize( layoutRect.Rect().Size() );
-            
-            if ( size.iWidth != targetSize.iWidth && size.iHeight != targetSize.iHeight )
-                {
-                AknIconUtils::SetSize( bitmap, targetSize,
-                        EAspectRatioPreservedAndUnusedSpaceRemoved ); 
-                }
-
-            aGc.BitBltMasked( layoutRect.Rect().iTl, bitmap, TRect( layoutRect.Rect().Size() ), icon->Mask(), EFalse );
-            }
-        }
+    DrawMarkingModeIcons( aProperties, aGc, textRect );
     
     const TColors *subcellColors = &aColors;
 
@@ -2878,6 +2845,67 @@
     _AKNTRACE_FUNC_EXIT;
     }
 
+// -----------------------------------------------------------------------------
+// CFormattedCellListBoxData::DrawMarkingModeIcons
+// -----------------------------------------------------------------------------
+//
+void CFormattedCellListBoxData::DrawMarkingModeIcons( 
+                                            TListItemProperties& aProperties,
+                                            CWindowGc& aGc,
+                                            TRect& aItemRect ) const
+    {
+    CEikListBox* listbox = static_cast<CEikListBox*>( Control() ); 
+    TRect textRect( aItemRect );
+    
+    if ( listbox->View()->ItemDrawer()->Flags() 
+            & CListItemDrawer::EMarkingModeEnabled 
+            && !aProperties.IsSelectionHidden()            
+            && iExtension->iMarkingIconArray
+#ifdef RD_TOUCH2_MARKING
+            &&  iExtension->iMarkingIconArray->Count() 
+                == KMarkingModeIconArraySize )         
+#else            
+            &&  iExtension->iMarkingIconArray->Count() == 2 )
+#endif // RD_TOUCH2_MARKING        
+        {
+        textRect.iTl.iX += 
+                AknLayoutScalable_Avkon::list_double_graphic_pane_t1( 
+                        0 ).LayoutLine().il;
+
+        TAknLayoutRect layoutRect;
+        layoutRect.LayoutRect( aItemRect, 
+                AknLayoutScalable_Avkon::list_double_graphic_pane_g1( 0 ) );
+
+        // unchecked icon
+        CGulIcon* icon = ( *iExtension->iMarkingIconArray )[1];        
+        
+        if ( listbox->View()->ItemIsSelected( 
+                iExtension->iCurrentlyDrawnItemIndex ) )
+            {
+            icon = ( *iExtension->iMarkingIconArray )[0];        
+            }
+        
+        CFbsBitmap* bitmap = icon->Bitmap();
+
+        if ( bitmap )
+            {
+            TSize size( bitmap->SizeInPixels() ); // set size if not already
+            TSize targetSize( layoutRect.Rect().Size() );
+            
+            if ( size.iWidth != targetSize.iWidth && 
+                 size.iHeight != targetSize.iHeight )
+                {
+                AknIconUtils::SetSize( bitmap, targetSize,
+                        EAspectRatioPreservedAndUnusedSpaceRemoved ); 
+                }
+            aGc.BitBltMasked( layoutRect.Rect().iTl, 
+                              bitmap, 
+                              TRect( layoutRect.Rect().Size() ),
+                              icon->Mask(), EFalse );
+            }
+        aItemRect = textRect;
+        }    
+    }
 
 EXPORT_C 
 CFormattedCellListBoxData::CFormattedCellListBoxData()
@@ -4198,49 +4226,7 @@
     
     CEikListBox* listbox = static_cast<CEikListBox*>( Control() ); 
     
-    if ( listbox->View()->ItemDrawer()->Flags()
-            & CListItemDrawer::EMarkingModeEnabled &&
-         iExtension->iMarkingIconArray && 
-         iExtension->iMarkingIconArray->Count() == 2 )
-        {
-        itemRect.iTl.iX +=
-            AknLayoutScalable_Avkon::list_double_graphic_pane_t1( 0 ).LayoutLine().il;
-
-        TAknLayoutRect layoutRect;
-        layoutRect.LayoutRect(
-            aItemRect, 
-            AknLayoutScalable_Avkon::list_double_graphic_pane_g1( 0 ) );
-        TRect iconRect( layoutRect.Rect() );
-        
-        CGulIcon* icon = (*iExtension->iMarkingIconArray)[1]; // unchecked
-
-        if ( listbox->View()->ItemIsSelected( 
-                iExtension->iCurrentlyDrawnItemIndex ) )
-            {
-            icon = (*iExtension->iMarkingIconArray)[0];
-            }
-        
-        CFbsBitmap* bitmap = icon->Bitmap();
-
-        if ( bitmap )
-            {
-            TSize size( bitmap->SizeInPixels() ); // set size if not already
-            TSize targetSize( layoutRect.Rect().Size() );
-            
-            if ( size.iWidth != targetSize.iWidth &&
-                 size.iHeight != targetSize.iHeight )
-                {
-                AknIconUtils::SetSize( bitmap, targetSize,
-                        EAspectRatioPreservedAndUnusedSpaceRemoved ); 
-                }
-
-            aGc.BitBltMasked( iconRect.iTl,
-                              bitmap,
-                              TRect( iconRect.Size() ),
-                              icon->Mask(),
-                              EFalse );
-            }
-        }
+    DrawMarkingModeIcons( aProperties, aGc, itemRect );
     
     const TColors* subcellColors = &aColors;
     
--- a/uifw/AvKon/srcdata/avkon.rss	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/srcdata/avkon.rss	Tue May 25 12:58:19 2010 +0300
@@ -10034,6 +10034,11 @@
         {
         AVKON_SCT_NAVI_BUTTON
             {
+            id = EAknSctTableNaviExit;
+            button = r_avkon_sct_navi_table_exit_button;
+            },
+        AVKON_SCT_NAVI_BUTTON
+            {
             id = EAknSctPageNaviPrevPage;
             button = r_avkon_sct_navi_prev_page_button;
             },
@@ -10041,6 +10046,16 @@
             {
             id = EAknSctPageNaviNextPage;
             button = r_avkon_sct_navi_next_page_button;
+            },
+        AVKON_SCT_NAVI_BUTTON
+            {
+            id = EAknSctTableNaviSpecialChar;
+            button = r_avkon_sct_navi_table_special_char_button;
+            },
+        AVKON_SCT_NAVI_BUTTON
+            {
+            id = EAknSctTableNaviEmotion;
+            button = r_avkon_sct_navi_table_emotion_button;
             }
         };
     }
--- a/uifw/AvKon/tsrc/bc/S60_SDK3.0/bctestbuttons/src/bctestbuttonscase.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/tsrc/bc/S60_SDK3.0/bctestbuttons/src/bctestbuttonscase.cpp	Tue May 25 12:58:19 2010 +0300
@@ -286,6 +286,7 @@
     buttonGroupContainer4->DimCommand( commandId, dimmed );
     _LIT( KDimCommand, "DimCommand test" );
     AssertTrueL( ETrue, KDimCommand );
+    buttonGroupContainer4->DimCommand( commandId, EFalse );
 
     TBool isCommandDimmed = buttonGroupContainer4->IsCommandDimmed( commandId );
     _LIT( KIsCommandDimmed, "IsCommandDimmed test" );
--- a/uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/group/bctestmixmcl.mmp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/group/bctestmixmcl.mmp	Tue May 25 12:58:19 2010 +0300
@@ -82,6 +82,7 @@
 LIBRARY         AknSkinSrv.lib
 LIBRARY         aknphysics.lib
 LIBRARY         bitgdi.lib
+LIBRARY         eikcoctl.lib
 
 
 START RESOURCE ../group/bctestmixmcl_reg.rss
--- a/uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/inc/bctestmixmclgeneralcase.h	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/inc/bctestmixmclgeneralcase.h	Tue May 25 12:58:19 2010 +0300
@@ -168,6 +168,10 @@
       */
      void TestFindItemDialog();
 
+    /**
+     * Tests button component API.
+     */
+    void TestAknButtonEnableFeedbackL();
 
 protected: // From base class MAknPhysicsObserver
     
--- a/uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/src/bctestmixmclgeneralcase.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/src/bctestmixmclgeneralcase.cpp	Tue May 25 12:58:19 2010 +0300
@@ -36,6 +36,7 @@
 #include <ItemFinder.h>
 #include <finditemdialog.h>
 #include <aknphysics.h>
+#include <aknbutton.h>
 
 #include "bctestmixmclgeneralcase.h"
 #include "bctestmixmclcontainer.h"
@@ -139,6 +140,7 @@
     TestAknPhysicsResumePhysicsL();
     TestCbaL();
 	TestCommonDialogsL();
+	TestAknButtonEnableFeedbackL();
     }
 
 // ---------------------------------------------------------------------------
@@ -716,5 +718,23 @@
     // do nothing
     }
 
+
+// ---------------------------------------------------------------------------
+// CBCTestMixMCLGeneralCase::TestAknButtonEnableFeedbackL
+// ---------------------------------------------------------------------------
+//
+void CBCTestMixMCLGeneralCase::TestAknButtonEnableFeedbackL()
+    {
+    CAknButton* button = CAknButton::NewLC();
+
+    button->EnableFeedback( EFalse );
+    button->EnableFeedback( ETrue );
+
+    CleanupStack::PopAndDestroy ( button );
+
+    _LIT( KEnableFeedback, "CAknButton::EnableFeedback tested" );
+    AssertTrueL( ETrue, KEnableFeedback );
+    }
+
 //end of file
 
--- a/uifw/AvKon/tsrc/bc/bctestlauncher/inc/bctestapplication.h	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/tsrc/bc/bctestlauncher/inc/bctestapplication.h	Tue May 25 12:58:19 2010 +0300
@@ -58,6 +58,11 @@
 	* select the application to run
 	*/
 	void Select(TBool aSelected = ETrue){ iSelected = aSelected; }
+	
+	/**
+	* test whether the application is selected
+	*/
+	TBool IsSelect(){ return iSelected; }
     
 private:
     void StartAutoTest();
--- a/uifw/AvKon/tsrc/bc/bctestlauncher/src/bctestrunner.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/tsrc/bc/bctestlauncher/src/bctestrunner.cpp	Tue May 25 12:58:19 2010 +0300
@@ -105,6 +105,10 @@
     LOG << KTEST << EndLine << End;
     for ( TInt i = 0; i < iTestApps.Count(); ++i )
         {
+        if ( !( iTestApps[ i ]->IsSelect() || aCommand == EAutoTestAll ) )
+        	{
+            continue;
+        	}
         TRAPD( errno, iTestApps[ i ]->RunL( aCommand ) );
         switch( errno )
         {
--- a/uifw/AvKon/tsrc/bc/script/codetest_script/output/api_table.bak.xml	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/tsrc/bc/script/codetest_script/output/api_table.bak.xml	Tue May 25 12:58:19 2010 +0300
@@ -41193,7 +41193,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[RAknAppServiceBase::ConnectChainedAppL]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -41205,7 +41205,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[RAknAppServiceBase::Close]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -41217,7 +41217,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[MAknServerAppExitObserver::HandleServerAppExit]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -41229,7 +41229,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[CAknAppServiceBase::CAknAppServiceBase]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -41241,7 +41241,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[CAknAppServiceBase::~CAknAppServiceBase]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -41253,7 +41253,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[CAknAppServiceBase::CreateL]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -41265,7 +41265,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[CAknAppServiceBase::ServiceL]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -41277,7 +41277,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[CAknAppServiceBase::ServiceError]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -41289,7 +41289,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[CAknAppServer::~CAknAppServer]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -41301,7 +41301,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[CAknAppServer::ConstructL]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -41313,7 +41313,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[CAknAppServer::CreateServiceL]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -41325,7 +41325,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[CAknAppServer::HandleAllClientsClosed]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
--- a/uifw/AvKon/tsrc/bc/script/codetest_script/output/api_table.xml	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/AvKon/tsrc/bc/script/codetest_script/output/api_table.xml	Tue May 25 12:58:19 2010 +0300
@@ -50865,7 +50865,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[CAknAppServer::ConstructL]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -50877,7 +50877,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[CAknAppServer::CreateServiceL]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -50889,7 +50889,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[CAknAppServer::HandleAllClientsClosed]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -50901,7 +50901,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[CAknAppServer::~CAknAppServer]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -50913,7 +50913,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[CAknAppServiceBase::CAknAppServiceBase]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -50925,7 +50925,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[CAknAppServiceBase::CreateL]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -50937,7 +50937,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[CAknAppServiceBase::ServiceError]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -50949,7 +50949,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[CAknAppServiceBase::ServiceL]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -50961,7 +50961,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[CAknAppServiceBase::~CAknAppServiceBase]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -50973,7 +50973,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[MAknServerAppExitObserver::HandleServerAppExit]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -50985,7 +50985,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[RAknAppServiceBase::Close]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -50997,7 +50997,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[RAknAppServiceBase::ConnectChainedAppL]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
@@ -51009,7 +51009,7 @@
 <O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
 <P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
 <FUNCTION><![CDATA[--------------------------]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
 <K_BLOCK><![CDATA[0]]></K_BLOCK>
 </APIITEM>
 <APIITEM>
--- a/uifw/EikStd/EABI/EIKCOCTLU.DEF	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/EABI/EIKCOCTLU.DEF	Tue May 25 12:58:19 2010 +0300
@@ -2014,4 +2014,5 @@
 	_ZN11CEikListBox18IsHighlightEnabledEv @ 2013 NONAME
 	_ZN11CEikListBox14SetMarkingModeEi @ 2014 NONAME
 	_ZN11CEikListBox22SetMarkingModeObserverEP23MAknMarkingModeObserver @ 2015 NONAME
+	_ZN10CAknButton14EnableFeedbackEi @ 2016 NONAME
 
--- a/uifw/EikStd/bwins/EIKCOCTLU.DEF	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/bwins/EIKCOCTLU.DEF	Tue May 25 12:58:19 2010 +0300
@@ -1625,4 +1625,5 @@
 	?IsHighlightEnabled@CEikListBox@@QAEHXZ @ 1624 NONAME ; int CEikListBox::IsHighlightEnabled(void)
 	?SetMarkingModeObserver@CEikListBox@@QAEXPAVMAknMarkingModeObserver@@@Z @ 1625 NONAME ; void CEikListBox::SetMarkingModeObserver(class MAknMarkingModeObserver *)
 	?SetMarkingMode@CEikListBox@@QAEXH@Z @ 1626 NONAME ; void CEikListBox::SetMarkingMode(int)
+	?EnableFeedback@CAknButton@@QAEXH@Z @ 1627 NONAME ; void CAknButton::EnableFeedback(int)
 
--- a/uifw/EikStd/coctlsrc/AknButton.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/coctlsrc/AknButton.cpp	Tue May 25 12:58:19 2010 +0300
@@ -287,6 +287,10 @@
     
     //Previous touch down or drag position, valid only with pressed state. 
     TPoint iPrePointerPos;
+    CAknsFrameBackgroundControlContext* iHighlightContext;  
+    // buffer for visually ordered text
+    TBuf<255 + KAknBidiExtraSpacePerLine> iVisualText; 
+    TBool iFeedbackEnabled; 
     };
 
 // ============================ MEMBER FUNCTIONS ===============================
@@ -306,7 +310,8 @@
       iVerticalIconAlignment( CAknButton::ECenter ),
       iHorizontalIconAlignment( CAknButton::ECenter ),
       iTextAndIconAlignment( CAknButton::EIconBeforeText ),
-      iResourceProvider( 0 )
+      iResourceProvider( 0 ),
+      iFeedbackEnabled( ETrue )
     {
     // default margins, these are applied to both text and icon
     iMargins.SetAllValuesTo( 
@@ -333,6 +338,7 @@
     iPictographInterface = NULL; // not owned
     iFrameAndCenterIds.Close();
     DeletePressedBmps();
+    delete iHighlightContext; 
     }
 
 // -----------------------------------------------------------------------------
@@ -371,6 +377,13 @@
     // Latched dimmed frame and center
     iFrameAndCenterIds.AppendL( KAknsIIDQsnFrButtonInactive );
     iFrameAndCenterIds.AppendL( KAknsIIDQsnFrButtonCenterInactive );
+    if ( !iHighlightContext )
+        {
+        iHighlightContext = CAknsFrameBackgroundControlContext::NewL(
+            KAknsIIDNone, TRect(), TRect(), EFalse );
+        iHighlightContext->SetFrame( KAknsIIDQsnFrButtonHighlight ); 
+        iHighlightContext->SetCenter( KAknsIIDQsnFrButtonHighlightCenter ); 
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -517,6 +530,10 @@
 
 void CAknButtonExtension::HandleFeedbackAreaChange()
     {
+    if ( !iFeedbackEnabled )
+        {
+        return; 
+        }
     // it is possible that feedback does not exist, eg. while booting.
     // try getting one, and give up if that fails.
     if ( !iFeedback )
@@ -582,6 +599,8 @@
     TAknsItemID iPressedId;
     TAknsItemID iHoverId;
     TScaleMode iScaleMode;
+    TBool iFlagsChanged; 
+    TBool iTextChanged; 
     };
 
 // ============================ MEMBER FUNCTIONS ===============================
@@ -994,6 +1013,7 @@
     iText = NULL;
 
     iText = aText.AllocL();
+    iExtension->iTextChanged = ETrue; 
     }
 
 // -----------------------------------------------------------------------------
@@ -1016,6 +1036,11 @@
 //
 EXPORT_C void CAknButtonState::SetFlags( const TInt aFlags )
     {
+    if ( iFlags & KAknButtonStateHasLatchedFrame != 
+        aFlags & KAknButtonStateHasLatchedFrame )
+        {
+        iExtension->iFlagsChanged = ETrue; 
+        }
     iFlags = aFlags;
     }
 
@@ -1338,6 +1363,44 @@
     {
     iExtension->iGeneratedDimmedIcon = aDimmedIconCreatedByButton;
     }
+// -----------------------------------------------------------------------------
+// CAknButtonState::FlagsChanged
+// Returns ETrue if button state flags are changed so that 
+// KAknStateHasLatchedDownFrame is setted or cleared
+// -----------------------------------------------------------------------------    
+TBool CAknButtonState::FlagsChanged()
+    {
+    return iExtension->iFlagsChanged;
+    }
+
+// -----------------------------------------------------------------------------
+// CAknButtonState::ResetFlagsChanged
+// Frame has been updated so boolean iFlagsChanged can be set to EFalse
+// -----------------------------------------------------------------------------
+void CAknButtonState::ResetFlagsChanged()
+    {
+    iExtension->iFlagsChanged = EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CAknButtonState::TextChanged
+// Returns ETrue if text is changed and button's visual text has 
+// not been updated. 
+// -----------------------------------------------------------------------------    
+TBool CAknButtonState::TextChanged()
+    {
+    return iExtension->iTextChanged;
+    }
+
+// -----------------------------------------------------------------------------
+// CAknButtonState::ResetTextChanged
+// Visual text has been updated so boolean iTextChanged can be set to EFalse
+// -----------------------------------------------------------------------------
+void CAknButtonState::ResetTextChanged()
+    {
+    iExtension->iTextChanged = EFalse;
+    }
+
 
 // -----------------------------------------------------------------------------
 // CAknButtonState::Extension
@@ -1579,7 +1642,12 @@
         {
         OverrideColorL( EColorButtonText, textColor );
         }
-
+    
+    if ( AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), textColor, 
+            iTextColorTableId, EAknsCIQsnTextColorsCG84 ) == KErrNone )
+        {
+        OverrideColorL( EColorButtonTextPressed, textColor );
+        }
     if ( !iStates )
         {
         iStates = new ( ELeave ) CArrayPtrFlat<CAknButtonState>( 2 );
@@ -1611,6 +1679,8 @@
         iHorizontalAlignment = CGraphicsContext::ELeft;
         }
     iExtension->HandleFeedbackAreaChange();
+    SetFrameIDs(); 
+    ConvertTextToVisualAndClip();
     }
 
 // -----------------------------------------------------------------------------
@@ -1813,6 +1883,11 @@
             TRAP_IGNORE( OverrideColorL( EColorButtonText, textColor ) );
             }
     
+        if ( AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), textColor, 
+                    iTextColorTableId, EAknsCIQsnTextColorsCG84 ) == KErrNone )
+            {
+            TRAP_IGNORE( OverrideColorL( EColorButtonTextPressed, textColor ) );
+            }
         // generated pressed frame has to be regenerated
         if ( iFlags & KAknButtonNoFrame && iFlags & KAknButtonPressedDownFrame )
             {
@@ -1906,7 +1981,6 @@
         HideHelp();
         iButtonPressed = EFalse;
         }
-    
     if ( aDimmed )
         {
         iExtension->iFlags.Set( CAknButtonExtension::EDimmed );
@@ -1915,7 +1989,7 @@
         {
         iExtension->iFlags.Clear( CAknButtonExtension::EDimmed );
         }
-    if ( iExtension->iFeedback )
+    if ( iExtension->iFeedbackEnabled && iExtension->iFeedback )
         {
         if ( aDimmed )
             {
@@ -1950,6 +2024,7 @@
         {
         CCoeControl::SetDimmed( aDimmed );
         }
+    SetFrameIDs(); 
     }
 
 // -----------------------------------------------------------------------------
@@ -1981,6 +2056,7 @@
                 iButtonPressed = ETrue;
                 iExtension->iPrePointerPos.SetXY( -1, -1 );
                 
+                SetFrameIDs(); 
                 if ( NeedsRedrawWhenPressed() )
                     {
                     DrawNow();
@@ -2015,6 +2091,7 @@
             if ( iButtonPressed )
                 {
                 iButtonPressed = EFalse;
+                SetFrameIDs(); 
 
                 if ( NeedsRedrawWhenPressed() )
                     {
@@ -2051,14 +2128,14 @@
                 iExtension->iFlags.Clear( CAknButtonExtension::ELongPressReported );
                 iExtension->iFlags.Clear( CAknButtonExtension::EKeyRepeatEventReported );
                 }
-
-            if ( iKeyDownReported && RequestExit() && Observer() )
+            
+            TInt reported = iKeyDownReported;
+            iKeyDownReported = EFalse;            
+            if ( reported && RequestExit() && Observer() )
                 {
                 Observer()->HandleControlEventL( this,
                     MCoeControlObserver::EEventRequestExit );
-                }
-
-            iKeyDownReported = EFalse;
+                }            
             }
         // we don't want aKeyEvent to go somewhere else :)
         return EKeyWasConsumed;
@@ -2077,7 +2154,7 @@
     if ( aVisible != IsVisible() )
         {
         CAknControl::MakeVisible( aVisible );
-        if ( iExtension->iFeedback )
+        if ( iExtension->iFeedbackEnabled && iExtension->iFeedback )
             {
             if ( aVisible )
                 {
@@ -2177,6 +2254,8 @@
        {
         TRAP_IGNORE( CreatePressedDownFrameL() );
         }
+    SetFrameRects(); 
+    ConvertTextToVisualAndClip(); 
 
     iExtension->HandleFeedbackAreaChange();
     }
@@ -2230,6 +2309,7 @@
                     if ( !iButtonPressed )
                         {
                         iButtonPressed = ETrue;
+                        SetFrameIDs(); 
                         // feedback/basic on down event, if hit test is
                         // used. Area registry is used for rectangular
                         // buttons
@@ -2297,10 +2377,10 @@
                         // Redraw button, if needed
                         if ( NeedsRedrawWhenPressed() )
                             {
-                            iButtonPressed = EFalse;
                             redrawNeeded = ETrue;
                             }
                         iButtonPressed = EFalse;
+                        SetFrameIDs(); 
 
                         StopKeyRepeatTimer();
                         StopLongPressTimer();
@@ -2322,6 +2402,7 @@
                     else if ( buttonEvent && !iButtonPressed && !IsDimmed() )
                         {
                         iButtonPressed = ETrue;
+                        SetFrameIDs(); 
 
                         // Redraw button, if needed
                         if ( NeedsRedrawWhenPressed() )
@@ -2370,6 +2451,7 @@
                             }
                         }
                     iButtonPressed = EFalse;
+                    SetFrameIDs(); 
                     }
 
                 TBool hasDrawn( EFalse );
@@ -2487,6 +2569,7 @@
     	{
     	ResetState();
     	}
+    SetFrameRects(); 
     }
     
 // -----------------------------------------------------------------------------
@@ -2499,6 +2582,7 @@
     if ( !IsFocused() && iButtonPressed )
         {
         iButtonPressed = EFalse; 
+        SetFrameIDs(); 
         iKeyDownReported = EFalse; 
         }
     if ( IsVisible() )
@@ -2543,49 +2627,14 @@
 EXPORT_C void CAknButton::Draw( const TRect& /*aRect*/ ) const
     {
     TRect rect( Rect() );
-    TAknLayoutRect centerLayout;
-    centerLayout.LayoutRect( rect,
-        AknLayoutScalable_Avkon::toolbar_button_pane_g1().LayoutLine() );
-    TRect innerRect( centerLayout.Rect() );
     TRect highlightRect( HighlightRect() );
     CWindowGc& gc = SystemGc();
     CAknButtonState* state = State();
 
-    // Skin ids are determined here (a bit too early than necessary) so that 
-    // we can avoid doing the same thing in DrawMaskedL.
-    if ( !( iFlags & KAknButtonNoFrame ) )
+    if ( !( iFlags & KAknButtonNoFrame ) && !iButtonPressed && state && 
+            state->FlagsChanged() )
         {
-        TInt frameIdIndex = KFrameId;
-
-        if ( iButtonPressed )
-            {
-            frameIdIndex = KPressedFrameId;
-            }
-        else if ( state && state->Flags() & KAknButtonStateHasLatchedFrame )
-            {
-            if ( IsDimmed() )
-                {
-                // dimmed latched frame
-                frameIdIndex = KLatchedDimmedFrameId;
-                }
-            else
-                {
-                // latched down
-                frameIdIndex = KLatchedFrameId;
-                }
-            }
-        else if ( IsDimmed())
-            {
-            // dimmed frame
-            frameIdIndex = KDimmedFrameId;
-            }
-
-        if ( SkinIID( frameIdIndex ) != KAknsIIDNone )
-            {
-            iBgContext->SetFrame( SkinIID( frameIdIndex ) );
-            iBgContext->SetCenter( SkinIID( ++frameIdIndex ) );
-            iBgContext->SetFrameRects( rect, innerRect );
-            }
+        SetFrameIDs(); 
         }
 
     if ( !iExtension->iFlags.IsSet( CAknButtonExtension::EUseAdditionalMask ) )
@@ -2607,13 +2656,10 @@
 
             if ( IsFocused() && !highlightRect.IsEmpty() )
                 {
-                iBgContext->SetFrame( KAknsIIDQsnFrButtonHighlight ); 
-                iBgContext->SetCenter( KAknsIIDQsnFrButtonHighlightCenter ); 
-                iBgContext->SetFrameRects( rect, innerRect );
-
                 // frame graphics
-                if ( !AknsDrawUtils::Background( skin, iBgContext, NULL, gc,
-                      rect, KAknsDrawParamNoClearUnderImage ) )
+                if ( !AknsDrawUtils::Background( skin, 
+                      iExtension->iHighlightContext, NULL, gc, rect, 
+                      KAknsDrawParamNoClearUnderImage ) )
                     {
                     gc.SetBrushColor( KRgbRed );
                     gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
@@ -2781,9 +2827,19 @@
 //
 EXPORT_C void CAknButton::SetButtonFlags( const TInt aFlags )
     {
-    if ( !(iFlags & KAknButtonNoFrame ) && aFlags & KAknButtonNoFrame )
+    if ( !( iFlags & KAknButtonNoFrame ) )
         {
-        iExtension->iMargins.SetAllValuesTo( 0 );
+        if ( aFlags & KAknButtonNoFrame ) 
+            {
+            iExtension->iMargins.SetAllValuesTo( 0 );
+            ConvertTextToVisualAndClip();
+            }
+        // aFlags does not include KAknButtonNoFrame
+        else if ( iFlags & KAknButtonTextInsideFrame != 
+                aFlags & KAknButtonTextInsideFrame )
+            {
+            ConvertTextToVisualAndClip(); 
+            }
         }
     if ( aFlags & KAknButtonHitTest )
         {
@@ -2794,6 +2850,14 @@
         {
         TRAP_IGNORE ( CreatePressedDownFrameL() );
         }
+    if ( iFlags & KAknButtonNoFrame && !( aFlags & KAknButtonNoFrame ) )
+        {
+        SetFrameIDs(); 
+        if ( aFlags & KAknButtonTextInsideFrame )
+            {
+            ConvertTextToVisualAndClip(); 
+            }
+        }
     iFlags = aFlags;
     }
 
@@ -2858,6 +2922,7 @@
         {
         skinIds[KLatchedDimmedCenterId] = aLatchedDimmedCenterId;
         }
+    SetFrameIDs(); 
     }
 
 // -----------------------------------------------------------------------------
@@ -2889,6 +2954,7 @@
 EXPORT_C void CAknButton::SetTextFont( const CFont* aFont )
     {
     iFont = aFont;
+    ConvertTextToVisualAndClip(); 
     }
 
 // -----------------------------------------------------------------------------
@@ -3183,6 +3249,8 @@
         }
     
     TRAP_IGNORE( SetStateIndexL( newIndex ) );
+    // Updating background context might be needed if states flags differ
+    SetFrameIDs(); 
     
     if ( aDrawNow )
         {
@@ -3361,6 +3429,7 @@
     StopKeyRepeatTimer();
     StopLongPressTimer();
     iButtonPressed = EFalse;
+    SetFrameIDs(); 
     HideHelp();
     if ( iExtension )
         {
@@ -3454,7 +3523,10 @@
     if ( !state || !state->HasText() )
         return;
 
-    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    if ( state->TextChanged() )
+        {
+        ConvertTextToVisualAndClip(); 
+        }
 
     TRect textRect = iExtension->iMargins.InnerRect( Rect() );
 
@@ -3467,6 +3539,17 @@
 
         textRect = center.Rect();
         }
+    DrawText( aGc, textRect ); 
+    }
+
+// -----------------------------------------------------------------------------
+// CAknButton::DrawText
+// Continues drawing of the button which has text
+// -----------------------------------------------------------------------------
+//
+void CAknButton::DrawText( CWindowGc& aGc, TRect& aTextRect ) const
+    {
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
 
     aGc.SetBrushStyle( CGraphicsContext::ENullBrush );
 
@@ -3485,17 +3568,6 @@
 
     aGc.SetUnderlineStyle( iExtension->iUnderlineStyle );
 
-    // buffer for visually ordered text
-    TBuf<255 + KAknBidiExtraSpacePerLine> visualText; 
-    TInt clipWidth = textRect.Width();
-
-    // bidi processing - using AknBidiTextUtils.
-    AknBidiTextUtils::ConvertToVisualAndClip(
-        state->Text(),
-        visualText,
-        *font,
-        clipWidth,
-        clipWidth );
 
     TInt baselineOffset = 0;
     switch ( iVerticalAlignment )
@@ -3505,22 +3577,24 @@
             break;
 
         case EBottom:
-            baselineOffset = textRect.Height();
+            baselineOffset = aTextRect.Height();
             break;
 
         default:  // centered
             baselineOffset = font->AscentInPixels() +
-                           ( textRect.Height() - font->AscentInPixels() ) / 2;
+                           ( aTextRect.Height() - font->AscentInPixels() ) / 2;
         }
 
     CGraphicsContext::TTextAlign horAlignment = iHorizontalAlignment;
 
-    aGc.DrawText( visualText, textRect, baselineOffset, horAlignment );
+    aGc.DrawText( iExtension->iVisualText, aTextRect, baselineOffset, 
+            horAlignment );
     if ( iExtension->iPictographInterface )
         {
         // For Japanese variant only
         iExtension->iPictographInterface->Interface()->DrawPictographsInText(
-            aGc, *font, visualText, textRect, baselineOffset, horAlignment );
+            aGc, *font, iExtension->iVisualText, aTextRect, baselineOffset, 
+            horAlignment );
         }
     }
 
@@ -3620,6 +3694,10 @@
         {
         return;
         }
+    if ( state->TextChanged() )
+        {
+        ConvertTextToVisualAndClip(); 
+        }
     
     const CGulIcon* icon = GetCurrentIcon();
     if ( !icon )
@@ -3775,57 +3853,7 @@
         aGc.BitBlt( iconPoint, buttonBmp, iconRect.Size() );
         }
 
-    const CFont* font = iFont;
-    if ( !font )
-        {
-        font = iCoeEnv->NormalFont();
-        }
-    aGc.UseFont( font );
-        
-    TRgb penColor;
-    TRgb brushColor;
-    GetTextColors( penColor, brushColor ); 
-    aGc.SetPenColor( penColor ); 
-    aGc.SetBrushColor( brushColor ); 
-
-    aGc.SetUnderlineStyle( iExtension->iUnderlineStyle );
-
-    TBuf<255 + KAknBidiExtraSpacePerLine> visualText; // buffer for visually ordered text
-    TInt clipWidth = textRect.Width();
-
-    // bidi processing - using AknBidiTextUtils.
-    AknBidiTextUtils::ConvertToVisualAndClip(
-        state->Text(),
-        visualText,
-        *font,
-        clipWidth,
-        clipWidth );
-
-    TInt baselineOffset = 0;
-    switch ( iVerticalAlignment )
-        {
-        case ETop:
-            baselineOffset = font->AscentInPixels();
-            break;
-
-        case EBottom:
-            baselineOffset = textRect.Height();
-            break;
-
-        default:  // centered
-            baselineOffset = font->AscentInPixels() +
-                           ( textRect.Height() - font->AscentInPixels() ) / 2;
-        }
-
-    CGraphicsContext::TTextAlign horAlignment = iHorizontalAlignment;
-
-    aGc.DrawText( visualText, textRect, baselineOffset, horAlignment );
-    if ( iExtension->iPictographInterface )
-        {
-        // For Japanese variant only
-        iExtension->iPictographInterface->Interface()->DrawPictographsInText(
-            aGc, *font, visualText, textRect, baselineOffset, horAlignment );
-        }
+    DrawText( aGc, textRect ); 
     }
 
 // -----------------------------------------------------------------------------
@@ -4412,6 +4440,7 @@
         iStates->Delete( iStateIndex );
         
         iStateIndex <= 0 ? iStateIndex = 0 : iStateIndex--;
+        SetFrameIDs(); 
         DrawNow();
         }
     }
@@ -4513,6 +4542,115 @@
     }
 
 // -----------------------------------------------------------------------------
+// CAknButton::SetFrameIDs
+// Sets frame ids for background context
+// -----------------------------------------------------------------------------
+//
+void CAknButton::SetFrameIDs() const
+    {
+    // Skin ids are determined here (a bit too early than necessary) so that 
+    // we can avoid doing the same thing in DrawMaskedL.
+    CAknButtonState* state = State();
+    if ( !( iFlags & KAknButtonNoFrame ) )
+        {
+        TInt frameIdIndex = KFrameId;
+
+        if ( iButtonPressed )
+            {
+            frameIdIndex = KPressedFrameId;
+            }
+        else if ( state && state->Flags() & KAknButtonStateHasLatchedFrame )
+            {
+            if ( IsDimmed() )
+                {
+                // dimmed latched frame
+                frameIdIndex = KLatchedDimmedFrameId;
+                }
+            else
+                {
+                // latched down
+                frameIdIndex = KLatchedFrameId;
+                }
+            }
+        else if ( IsDimmed() )
+            {
+            // dimmed frame
+            frameIdIndex = KDimmedFrameId;
+            }
+
+        if ( SkinIID( frameIdIndex ) != KAknsIIDNone )
+            {
+            iBgContext->SetFrame( SkinIID( frameIdIndex ) );
+            iBgContext->SetCenter( SkinIID( ++frameIdIndex) );
+            }
+        }
+    if ( state )
+        {
+        state->ResetFlagsChanged(); 
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CAknButton::SetFrameRects
+// -----------------------------------------------------------------------------
+//
+void CAknButton::SetFrameRects()
+    {
+    TRect rect( Rect() );
+    TAknLayoutRect centerLayout;
+    centerLayout.LayoutRect( rect,
+        AknLayoutScalable_Avkon::toolbar_button_pane_g1().LayoutLine() );
+    TRect innerRect( centerLayout.Rect() );
+
+    iBgContext->SetFrameRects( rect, innerRect ); 
+    iExtension->iHighlightContext->SetFrameRects( rect, innerRect ); 
+    }
+
+// -----------------------------------------------------------------------------
+// CAknButton::ConvertTextToVisualAndClip
+// -----------------------------------------------------------------------------
+//
+void CAknButton::ConvertTextToVisualAndClip() const
+    {
+    CAknButtonState* state = State();
+    if ( !state || !state->HasText() )
+        {
+        if ( state ) 
+            {
+            state->ResetTextChanged();
+            } 
+        return;
+        }
+
+    TRect textRect = iExtension->iMargins.InnerRect( Rect() );
+
+    if ( !( iFlags & KAknButtonNoFrame ) && 
+         ( iFlags & KAknButtonTextInsideFrame ) )
+        {
+        TAknLayoutRect center;
+        center.LayoutRect( Rect(), 
+            AknLayoutScalable_Avkon::toolbar_button_pane_g1().LayoutLine() );
+
+        textRect = center.Rect();
+        }
+
+    TInt clipWidth = textRect.Width();
+
+    const CFont* font = iFont;
+    if ( !font )
+        {
+        font = iCoeEnv->NormalFont();
+        }
+
+    // bidi processing - using AknBidiTextUtils.
+    AknBidiTextUtils::ConvertToVisualAndClip(
+        state->Text(),
+        iExtension->iVisualText,
+        *font,
+        clipWidth,
+        clipWidth );
+    }
+// -----------------------------------------------------------------------------
 // CAknButton::TouchArea
 // Returns the button touchable area.
 // -----------------------------------------------------------------------------
@@ -4530,4 +4668,49 @@
         }
     return touchRect;
     }
+
+// -----------------------------------------------------------------------------
+// CAknButton::EnableFeedback
+// Enables or disables tactile feedback
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CAknButton::EnableFeedback( TBool aEnable )
+    {
+    if ( iExtension->iFeedbackEnabled == aEnable )
+        {
+        return; 
+        }
+    iExtension->iFeedbackEnabled = aEnable; 
+    if ( aEnable )
+        {
+        if ( !iExtension->iFeedback )
+            {
+            iExtension->iFeedback = MTouchFeedback::Instance();
+            }
+        if ( !iExtension->iFeedback )
+            {
+            return;
+            }
+        if ( IsVisible() )
+            {
+            iExtension->iFeedback->MoveFeedbackAreaToFirstPriority( this, 
+                                                                        0 );
+            iExtension->iFeedback->EnableFeedbackForControl( 
+                    this, 
+                   !IsDimmed() );
+            }
+        iExtension->HandleFeedbackAreaChange(); 
+        }
+    else 
+        {
+        // MTouchFeedback instance lives in AknAppUi. If there is no
+        // MTouchFeedback instance there is no need to remove any areas
+        // either.
+        MTouchFeedback* fb = MTouchFeedback::Instance();
+        if ( fb )
+            {
+            fb->RemoveFeedbackForControl( this );
+            }
+        }
+    }
 // end of file
--- a/uifw/EikStd/coctlsrc/AknClearer.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/coctlsrc/AknClearer.cpp	Tue May 25 12:58:19 2010 +0300
@@ -36,6 +36,7 @@
 #include <aknlayoutscalable_avkon.cdl.h>
 #include <layoutmetadata.cdl.h>
 #include <AknStatuspaneUtils.h>
+#include <alf/alfcompositionutility.h>
 
 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
 #include <uikon/eikenvinterface.h> 
@@ -197,6 +198,10 @@
 
 	CreateWindowL(&aParent);
 
+    CAlfEffectObserver* alfEffectObserver = CAlfEffectObserver::NewL(); 
+    alfEffectObserver->SetDistractionWindow(*DrawableWindow());
+    delete alfEffectObserver;
+
 	iFlags.Assign(EAknScreenClearerBlankAppStatusPane, aBlankAppStatusPane);
 
 	SetShapeL();
--- a/uifw/EikStd/coctlsrc/EIKCOCTL.MMP	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/coctlsrc/EIKCOCTL.MMP	Tue May 25 12:58:19 2010 +0300
@@ -175,6 +175,7 @@
 LIBRARY         gfxtrans.lib
 LIBRARY         hal.lib
 LIBRARY         apgrfx.lib
+LIBRARY         alfdecoderserverclient.lib
 
 LIBRARY         touchfeedback.lib
 
--- a/uifw/EikStd/coctlsrc/EIKEDWIN.CPP	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/coctlsrc/EIKEDWIN.CPP	Tue May 25 12:58:19 2010 +0300
@@ -663,28 +663,16 @@
             if ( aDocumentPosition >= inlineText.LowerPos() && 
                 aDocumentPosition + length <= inlineText.HigherPos() )
                 {
-                iEdwin.iEdwinExtension->iSmiley->ConvertTextForSmileyL(
-                    aDocumentPosition, aEditorContent, EFalse );
+                smiley->ConvertTextForSmileyL( aDocumentPosition, aEditorContent, 
+                    EFalse );
                 }
             }
-        TBool prevIsCode( EFalse );
         for ( TInt i( 0 ); i < length; i++ )
             {
-            if ( aEditorContent[i] == CSmileyManager::KCompensateChar )
+            if ( smiley->SmileyCodeByPos( aDocumentPosition + i ) > 0 &&
+                !CSmileyManager::IsSmileyCode( aEditorContent[i] ) )
                 {
-                if ( i == 0 )
-                    {
-                    prevIsCode = ( CSmileyManager::IsSmileyCode( 
-                        smiley->SmileyCodeByPos( aDocumentPosition ) ) );
-                    }
-                if ( prevIsCode )
-                    {
-                    aEditorContent[i] = CSmileyManager::KPlaceHolder;
-                    }
-                }
-            else
-                {
-                prevIsCode = CSmileyManager::IsSmileyCode( aEditorContent[i] );
+                aEditorContent[i] = CSmileyManager::KPlaceHolder;
                 }
             }
         }
@@ -2104,6 +2092,7 @@
             const TCursorSelection sel(lower,lower);
             iTextView->SetPendingSelection(sel);
             iTextView->HandleInsertDeleteL(sel,toDelete.Length(),formatHasChanged);
+            cursorPos = lower;
             reportChange=ETrue;
             }
         else if ( replaceSelection ) // All neutral protection cases 
@@ -6751,6 +6740,18 @@
     case KEikInputLanguageChange:
         {
         UpdateCache(KEikInputLanguageChange);
+        TLanguage language = CAknEnv::Static()->SettingCache().InputLanguage(); 
+		if ( language == ELangArabic || language == ELangFarsi || 
+			language == ELangUrdu || language == ELangHebrew )
+			{
+			iEdwinUserFlags &= ~EAvkonEnableSmileySupport;
+			EnableSmileySupportL( EFalse );
+			}
+		else if ( iEdwinExtension->iEnableSmileySupported )
+			{
+			iEdwinUserFlags |= EAvkonEnableSmileySupport;
+			EnableSmileySupportL( ETrue );
+			}
         DoAlignment();
         }
         break;
@@ -7628,6 +7629,7 @@
     SetVKBStatus(); 
     if ( aFlag & EAvkonEnableSmileySupport )
         {
+        iEdwinExtension->iEnableSmileySupported = ETrue;
         EnableSmileySupportL( ETrue );
         }
     }
@@ -7638,6 +7640,7 @@
     SetVKBStatus(); 
     if ( aFlag & EAvkonEnableSmileySupport )
         {    
+        iEdwinExtension->iEnableSmileySupported = EFalse;
         EnableSmileySupportL( EFalse );
         }
     }
@@ -8299,20 +8302,25 @@
     {
     if ( aEnableSmiley && !AknLayoutUtils::LayoutMirrored() && iEdwinExtension )
         {
-        if ( !iEdwinExtension->iSmiley )
-            {
-            iEdwinExtension->iSmiley = CSmileyManager::NewL( *this );
-            iEdwinExtension->iSmiley->SetAnimationPlayTimes( KNormalAnimPlayTimes );
-            if ( IsReadOnly() || iEdwinUserFlags & EDisplayOnly )
-                {
-                iEdwinExtension->iSmiley->SetAnimationPlayTimes( 
-                    KInfiniteAnimPlayTimes );
-                }
-            }        
-        if ( TextLayout() )
-            {
-            TextLayout()->SetCustomWrap( iEdwinExtension->iSmileyWrap );
-            }
+        TLanguage language = CAknEnv::Static()->SettingCache().InputLanguage();
+		if ( language != ELangArabic && language != ELangFarsi && 
+			language != ELangUrdu && language != ELangHebrew )
+			{
+			if ( !iEdwinExtension->iSmiley )
+				{
+				iEdwinExtension->iSmiley = CSmileyManager::NewL( *this );
+				iEdwinExtension->iSmiley->SetAnimationPlayTimes( KNormalAnimPlayTimes );
+				if ( IsReadOnly() || iEdwinUserFlags & EDisplayOnly )
+					{
+					iEdwinExtension->iSmiley->SetAnimationPlayTimes( 
+						KInfiniteAnimPlayTimes );
+					}
+				}        
+			if ( TextLayout() )
+				{
+				TextLayout()->SetCustomWrap( iEdwinExtension->iSmileyWrap );
+				}
+			}
         }    
     else if ( iEdwinExtension )
         {
--- a/uifw/EikStd/coctlsrc/EIKLBX.CPP	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/coctlsrc/EIKLBX.CPP	Tue May 25 12:58:19 2010 +0300
@@ -1000,6 +1000,10 @@
         {
         state |= MAknCollection::EStateMultipleSelection;
         }
+    if ( MarkedItems() )
+        {
+        state |= MAknCollection::EStateMarkedItems; 
+        }
     _AKNTRACE_FUNC_EXIT;
     return state;
     }
@@ -1399,7 +1403,7 @@
     {
     return ( iListBox.iListBoxFlags & CEikListBox::ES60StyleMarkable
             || iListBox.iListBoxFlags & CEikListBox::EMultipleSelection )
-            && iListBox.SelectionIndexes()->Count() > 0;
+            && iListBox.iView && iListBox.SelectionIndexes()->Count() > 0;
     }
 
 
@@ -1423,11 +1427,9 @@
     if ( windowOwningControl )
         {
         windowOwningControl->IgnoreEventsUntilNextPointerUp();   
-        _AKNTRACE_FUNC_EXIT;
-        return ETrue;
         }
     _AKNTRACE_FUNC_EXIT;
-    return EFalse; 
+    return ( windowOwningControl != NULL );
     }
 
 
@@ -1803,6 +1805,13 @@
     _AKNTRACE_FUNC_ENTER;    
     if ( iScrolling )
         {
+        // currently, this is the only way to fix ou1cimx1#375869
+        // iViewPosision is changed but we can't provent that
+        if ( iListBox.iView->TopItemIndex() == 0 
+             && iListBox.iView->ItemOffsetInPixels() > 0 )
+            {
+            iListBox.ScrollView( -iListBox.iView->ItemOffsetInPixels(), ETrue );
+            }        
 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
         iListBox.SuspendEffects( EFalse );
 #endif // RD_UI_TRANSITION_EFFECTS_LIST
@@ -2342,7 +2351,8 @@
     iView->CalcBottomItemIndex();
     iView->CalcDataWidth();
     TInt currentItemIndex = iView->CurrentItemIndex();
-
+    TInt totalItems = iModel->NumberOfItems();
+    
     if ( ItemExists(currentItemIndex) )
         {
         TInt topItemIndex( iView->TopItemIndex() );
@@ -2358,7 +2368,6 @@
                 {
                 TInt offset = (iListBoxExt->iWorldSize.iHeight / 2)
                         - iListBoxExt->iViewPosition.iY;
-                TInt totalItems = iModel->NumberOfItems();
                 TInt itemsInRect =
                         iView->NumberOfItemsThatFitInRect( iView->ViewRect() );
 
@@ -2382,15 +2391,15 @@
             }
         else
             {
-            // recalculates top index of list when mode be changed
-            TInt totalItems = iModel->NumberOfItems();
+            // recalculates top index of list when mode be changed            
             if ( (totalItems - topItemIndex) < numberOfItems )
                 {
                 newTopItemIndex = Max( 0, totalItems - numberOfItems );
                 }
             }
 
-        if ( newTopItemIndex != KEikListBoxInvalidIndex )
+        if ( newTopItemIndex > KEikListBoxInvalidIndex 
+             && newTopItemIndex < totalItems )
         	{
         	iView->SetTopItemIndex( newTopItemIndex );
             }
@@ -5156,6 +5165,18 @@
                         }
                     else
                         {
+                        if( itemIndex == oldCurrentItemIndex )
+                            {
+                            if( !( ( iListBoxFlags & EViewerFlag ) && 
+                                    ( iListBoxFlags & EDisableItemSpecificMenu ) ) )
+                                {
+                                iListBoxExt->ImmediateFeedback( 
+							                                   iListBoxExt->iFeedbackType,
+														       TTouchFeedbackType( ETouchFeedbackVibra | 
+														       ETouchFeedbackAudio ),
+														       aPointerEvent );
+                               }
+							}
                         ReportListBoxEventL( 
                                 MEikListBoxObserver::EEventPenDownOnItem );    
                         }
@@ -5324,9 +5345,13 @@
             
         case TPointerEvent::EButton1Up:
             _AKNTRACE("TPointerEvent::EButton1Up");
-            if ( iListBoxExt->FeedbackEnabledOnUpEvent() && iListBoxExt->iClickEventsAllowed 
-            	                    && ( !( ( iListBoxFlags & EViewerFlag ) && 
-                            ( iListBoxFlags & EDisableItemSpecificMenu ) ) ) )
+            if ( iListBoxExt->FeedbackEnabledOnUpEvent() && 
+			     iListBoxExt->iClickEventsAllowed && 
+				 ( !( ( iListBoxFlags & EViewerFlag ) && 
+				 ( iListBoxFlags & EDisableItemSpecificMenu ) ) )&& 
+				 ( iListBoxExt->iLastDownTappedItem == itemIndex ) && 
+				 (Buffer()->iPressedIndex != KEikListBoxInvalidIndex) && 
+				 itemIndex == iView->CurrentItemIndex() )
                 {
                 TTouchLogicalFeedback fbType = ETouchFeedbackList;
                 if ( iListBoxFlags & ES60StyleMultiselection 
@@ -5403,14 +5428,13 @@
                     }
                 // Due to the feature of capactior panel, the pointer position
                 // may change between pointer down and up during user click 
-                // action. When the click position is between two items, the
-                // item index may change unwanted, so we make a threshold 
-                // for this situation.                
-                else if ( s60StyleMultiselection
+                // action. When the click position is between two items 
+                // and flick or drag event is not performed, the item index may
+                // change unwanted, so we make a threshold for this situation.
+                else if ( s60StyleMultiselection && !Buffer()->iDragToAnotherItem
                          && ( iListBoxExt->iLastDownTappedItem == itemIndex
-                         || Abs( iListBoxExt->iLastPointerPos.iY 
-                         - aPointerEvent.iPosition.iY ) < KPointerDownAndUpThreshold )
-                         && !Buffer()->iDragToAnotherItem )
+                         || ( iListBoxExt->iLastDownTappedItem != KErrNotFound 
+                         && Abs( iListBoxExt->iLastPointerPos.iY - aPointerEvent.iPosition.iY ) < KPointerDownAndUpThreshold ) ) )
                     {
                     iListBoxFlags |= EStateChanged;
                     Buffer()->iPressedIndex = itemIndex;
@@ -6138,10 +6162,12 @@
             // Some client does not let list get button1up, so we do it there...
             iItemDrawer->ClearFlags( CListItemDrawer::EPressedDownState );
             TInt index = View()->CurrentItemIndex();
-            if ( index != KErrNotFound )
+            TBool enabled( !( iItemDrawer->Flags()
+                & CListItemDrawer::ESingleClickDisabledHighlight ) );
+            if ( index != KErrNotFound && enabled )
             	{
                 Window().Invalidate( TRect( View()->ItemPos(index), 
-            		                 View()->ItemSize() ) );
+                                    iItemDrawer->ItemCellSize() ) );
             	}
             break;
             }
@@ -6153,13 +6179,12 @@
 
         case KAknMessageFocusLost:
             {
-            TInt oldWinPos = iListBoxExt->iOldWinPos;
-            TInt winPos = DrawableWindow()->OrdinalPosition();
-            
-            // Do not remove higlight if window ordinal position has changed
+            // Do not remove highlight if window ordinal position has changed
             // during the time when stylus menu is open
-            if ( iListBoxExt && iListBoxExt->iSingleClickEnabled
-                 && ( oldWinPos == KErrNotFound || oldWinPos == winPos ) )
+            if ( iListBoxExt && iListBoxExt->iSingleClickEnabled &&
+                 ( iListBoxExt->iOldWinPos == KErrNotFound ||
+                   iListBoxExt->iOldWinPos == 
+                   DrawableWindow()->OrdinalPosition() ) )
                 {
                 TBool enabled( iItemDrawer && !( iItemDrawer->Flags()
                     & CListItemDrawer::ESingleClickDisabledHighlight ) );
@@ -6563,9 +6588,13 @@
 EXPORT_C void CEikListBox::DisableSingleClick( TBool aDisabled )
     {
     _AKNTRACE_FUNC_ENTER;    
-    if ( aDisabled && iListBoxExt && iListBoxExt->iSingleClickEnabled )
+    if ( aDisabled && 
+         iListBoxExt && 
+    	 iListBoxExt->iSingleClickEnabled && 
+    	 iItemDrawer )
         {
         iListBoxExt->DisableSingleClick(); 
+        iItemDrawer->ClearFlags( CListItemDrawer::ESingleClickEnabled);
         }
     _AKNTRACE_FUNC_EXIT;
     }
--- a/uifw/EikStd/coctlsrc/EIKMENUB.CPP	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/coctlsrc/EIKMENUB.CPP	Tue May 25 12:58:19 2010 +0300
@@ -177,6 +177,7 @@
             {
             TBool dimCommands( EFalse );
             TBool changeState( EFalse );
+            TBool dimMarkAndUnmark( EFalse ); 
             if ( iItemActionMenu->MarkingMode().MultipleMarkingActive() )
                 {
                 changeState = ETrue;
@@ -184,13 +185,30 @@
                 }
             else if ( !iItemActionMenu->CollectionHighlightVisible() )
                 {
-                changeState = ETrue;
-                dimCommands = ETrue;
+                if ( iItemActionMenu->CollectionHasMarkedItems() )
+                    {
+                    TInt pos; 
+                    if ( iBar->iMenuPane->MenuItemExists( EAknCmdMark, pos ) ) 
+                        {
+                        iBar->iMenuPane->SetItemDimmed( EAknCmdMark, ETrue ); 
+                        }
+                    if ( iBar->iMenuPane->MenuItemExists( EAknCmdUnmark, pos ) ) 
+                        {
+                        iBar->iMenuPane->SetItemDimmed( EAknCmdUnmark, ETrue ); 
+                        } 
+                    dimMarkAndUnmark = ETrue; 
+                    }
+                else 
+                    {
+                    changeState = ETrue;
+                    dimCommands = ETrue;
+                    }
                 }
             if ( changeState )
                 {
                 iBar->iMenuPane->SetItemCommandsStateL( dimCommands );
                 }
+            iBar->iMenuPane->HideMarkAndUnmark( dimMarkAndUnmark ); 
             }
         else if ( iSingleClickEnabled )
             {
@@ -973,9 +991,11 @@
                     ( *iTitleArray )[ titles ]->iData.iMenuPaneResourceId,
                     iMenuPane );
         if ( iActiveEditMenuObserver )
+            {
             iActiveEditMenuObserver->DynInitMenuPaneL(
                     ( *iTitleArray )[ titles ]->iData.iMenuPaneResourceId,
                     iMenuPane );
+            }
 
         titles = iTitleArray->Count() - 2;
         iMenuPane->FilterDimmedItems();
@@ -991,14 +1011,16 @@
             if ( fepMenuObserver )
                 fepMenuObserver->DynInitMenuPaneL( resource, iMenuPane );
             if ( iActiveEditMenuObserver )
+                {
                 iActiveEditMenuObserver->DynInitMenuPaneL(
                         resource,iMenuPane );
+                }
 
             if ( resource == R_AVKON_MENUPANE_MARK_MULTIPLE )
                 {
                 iMenuPane->SetItemDimmed( EAknCmdMarkingModeMarkOne, ETrue );
                 }
-
+            iMenuPane->FilterDimmedItems();
             titles--;
             }
         iExt->SetItemCommandsStateL();
@@ -1100,9 +1122,13 @@
     
     iMenuPane->SetFocus(ETrue);
     if (fepMenuObserver)
+        {
         fepMenuObserver->SetEmphasis(this, ETrue);
+        }        
     if (iActiveEditMenuObserver)
+        {
         iActiveEditMenuObserver->SetEmphasis(this, ETrue);
+        }
     
     // Set the position of the menu pane to the top of the CBA area, 
     // and set the width to the width of the screen
--- a/uifw/EikStd/coctlsrc/EIKMENUP.CPP	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/coctlsrc/EIKMENUP.CPP	Tue May 25 12:58:19 2010 +0300
@@ -238,7 +238,8 @@
         EContextSensitive,
         ESkipScrollbarUpdate,
         EHighlightEnabled,
-        EHideViewSpecificCommands
+        EHideViewSpecificCommands, 
+        EHideMarkAndUnmark
         };
 
     /**
@@ -2260,6 +2261,19 @@
         iEditMenuObserver->DynInitMenuPaneL( aCascadeMenuId, iCascadeMenuPane );
         }
 
+    if ( iExtension->iFlags.IsSet( CEikMenuPaneExtension::EHideMarkAndUnmark ) )
+        {
+        TInt pos; 
+        if ( iCascadeMenuPane->MenuItemExists( EAknCmdMark, pos ) ) 
+            {
+            iCascadeMenuPane->SetItemDimmed( EAknCmdMark, ETrue ); 
+            }
+        if ( iCascadeMenuPane->MenuItemExists( EAknCmdUnmark, pos ) ) 
+            {
+            iCascadeMenuPane->SetItemDimmed( EAknCmdUnmark, ETrue ); 
+            } 
+        }
+    
     iCascadeMenuPane->iExtension->PrepareCascadeForItemCommandsL();
     iCascadeMenuPane->iExtension->EnableHighlight( EFalse );
     iCascadeMenuPane->FilterDimmedItems();
@@ -3123,7 +3137,10 @@
             _AKNTRACE( "commandId = %d",  commandId );
             TBool isDeleted = EFalse;
             iIsDeleted = &isDeleted;
+            
+            CleanupStack::PushL( TCleanupItem( CleanLocalRef, this ) );            
             iMenuObserver->ProcessCommandL( commandId ); 
+            CleanupStack::Pop();
 
             if ( !isDeleted )
                 {
@@ -6702,5 +6719,31 @@
         }
     }
 
+// -----------------------------------------------------------------------------
+// CEikMenuPane::HideMarkAndUnmark
+// -----------------------------------------------------------------------------
+//
+void CEikMenuPane::HideMarkAndUnmark( TBool aHide )
+    {
+    if ( aHide )
+        {
+        iExtension->iFlags.Set( CEikMenuPaneExtension::EHideMarkAndUnmark );
+        }
+    else 
+        {
+        iExtension->iFlags.Clear( CEikMenuPaneExtension::EHideMarkAndUnmark );
+        }
+    }
+	
+// -----------------------------------------------------------------------------
+// CEikMenuPane::CleanLocalRef
+// -----------------------------------------------------------------------------
+//
+void CEikMenuPane::CleanLocalRef( TAny* any )
+    {
+    static_cast<CEikMenuPane*>( any )->iIsDeleted = NULL;
+    }
+
+
 // end of file
 
--- a/uifw/EikStd/coctlsrc/EIKSCRLB.CPP	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/coctlsrc/EIKSCRLB.CPP	Tue May 25 12:58:19 2010 +0300
@@ -41,8 +41,6 @@
 #include "eikscrlb.h"
 #include "EIKSBEXT.H"
 
-const TInt KIntensity = 100; // 100%
-
 const TInt KScrollBarWidth=9;
 // const TInt KScrollButtonHeight=10;
 // const TInt KArrowHeadScrollBarLength=20;
@@ -671,13 +669,13 @@
     if ( iAvkonAppUiBase )
         {
         CAknPointerEventModifier* modifier = iAvkonAppUiBase->PointerEventModifier();
-        
+
         if ( modifier )
             {
             modifier->Pop( *this );
             }
         }
-        
+
     AknsUtils::DeregisterControlPosition( this );
     }
 
@@ -826,7 +824,7 @@
 EXPORT_C void CAknDoubleSpanScrollBar::MakeVisible(TBool aVisible)
     {
     CAknPointerEventModifier* modifier = iAvkonAppUiBase ? iAvkonAppUiBase->PointerEventModifier() : NULL;
-    
+
     if ( modifier )
         {
         CAknDoubleSpanScrollBarExtension* extension = static_cast<CAknDoubleSpanScrollBarExtension*> (iExtension);
@@ -896,22 +894,22 @@
 EXPORT_C void CAknDoubleSpanScrollBar::SizeChanged()
     {
     CAknPointerEventModifier* modifier = iAvkonAppUiBase ? iAvkonAppUiBase->PointerEventModifier() : NULL;
-    
+
     if (iExtension)
             {
-            CAknDoubleSpanScrollBarExtension* extension = static_cast<CAknDoubleSpanScrollBarExtension*> (iExtension);          
-			if ( modifier && IsVisible() && !( extension->iExtensionType & ENoExpandedTouchArea ) )
-				{
-				modifier->Update( *this, ExtensionArea() );
-				}
+            CAknDoubleSpanScrollBarExtension* extension = static_cast<CAknDoubleSpanScrollBarExtension*> (iExtension);
+            if ( modifier && IsVisible() && !( extension->iExtensionType & ENoExpandedTouchArea ) )
+                {
+                modifier->Update( *this, ExtensionArea() );
+                }
           }
     else
-    	{
-		if ( modifier && IsVisible()  )
-			{
-			modifier->Update( *this, ExtensionArea() );
-			}
-    	}
+        {
+        if ( modifier && IsVisible()  )
+            {
+            modifier->Update( *this, ExtensionArea() );
+            }
+        }
 
     AknsUtils::RegisterControlPosition( this );
     if (iExtension)
@@ -1045,33 +1043,48 @@
     // The real span area available (as pixels)
     scrollSpanPix -= thumbSpanPix;
 
-            
-         // touch release on thumb
-         TBool thumbPressed = 
-                 ( position < (thumbPositionPix + thumbSpanPix) 
-                         && position > thumbPositionPix );
-         if ( thumbPressed &&
-              aPointerEvent.iType == TPointerEvent::EButton1Up &&
-              thumbSpan < scrollSpan )
-             {
-             MTouchFeedback* feedback = MTouchFeedback::Instance();
+
+     // touch release on thumb
+    TBool thumbPressed =
+             ( position < (thumbPositionPix + thumbSpanPix)
+                     && position > thumbPositionPix );
+    if ( thumbPressed &&
+          aPointerEvent.iType == TPointerEvent::EButton1Up &&
+          thumbSpan < scrollSpan )
+        {
+         MTouchFeedback* feedback = MTouchFeedback::Instance();
 
-             CCoeControl* parent = Parent();
-             TBool feedbackEnabled = !IsDimmed() && IsVisible();
-             if (parent && feedbackEnabled)
-                 {
-                 // check the same for the parent
-                 feedbackEnabled = !parent->IsDimmed() && parent->IsVisible();
-                 }
-             if ( feedback && feedbackEnabled )
-                 {
-                 feedback->InstantFeedback( this, 
-                                            ETouchFeedbackSlider, 
-                                            ETouchFeedbackVibra, 
-                                            aPointerEvent );
-                 }
+         CCoeControl* parent = Parent();
+         TBool feedbackEnabled = !IsDimmed() && IsVisible();
+         if (parent && feedbackEnabled)
+             {
+             // check the same for the parent
+             feedbackEnabled = !parent->IsDimmed() && parent->IsVisible();
+             }
+         if ( feedback && feedbackEnabled )
+             {
+             feedback->InstantFeedback( this,
+                                        ETouchFeedbackSlider,
+                                        ETouchFeedbackVibra,
+                                        aPointerEvent );
              }
-     
+         }
+
+     if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
+         {
+         extension->iPointerDownOn = CEikScrollBar::ENone;
+
+         // Highlight off always when the pointer is lifted
+         indicator->SetHandleHighlight( EFalse );
+         indicator->DrawDeferred();
+         indicator->SetBackgroudHighlight( EFalse );
+
+         if ( extension->iPopupController )
+             {
+             extension->iPopupController->HideInfoPopupNote();
+                 extension->iShowPopup = EFalse;
+             }
+         }
     // check that scroll bar is useful
     if (thumbSpan < scrollSpan)
         {
@@ -1111,22 +1124,6 @@
                 }
             }
 
-        if (aPointerEvent.iType == TPointerEvent::EButton1Up)
-            {
-            extension->iPointerDownOn = CEikScrollBar::ENone;
-
-            // Highlight off always when the pointer is lifted
-            indicator->SetHandleHighlight( EFalse );
-            indicator->DrawDeferred();
-            indicator->SetBackgroudHighlight( EFalse );
-
-            if ( extension->iPopupController )
-                {
-                extension->iPopupController->HideInfoPopupNote();
-                    extension->iShowPopup = EFalse;
-                }
-            }
-
         // respond to the pointer event
         switch(extension->iPointerDownOn)
             {
@@ -1145,7 +1142,7 @@
 
 
                         TInt prevPosValue = extension->ThumbPosition();
-                        
+
                         // This will update the thumb's pixel extent, used
                         // below
                         extension->SetModelThumbPosition(thumbPosition);
@@ -1188,7 +1185,7 @@
                             // repeat until thumb reaches the stylus down position
                             pointerWindow->RequestPointerRepeatEvent(KScrollRepeatTimeout, ignoreRect);
                             }
-                        
+
 
                         }
                     else
@@ -1239,7 +1236,7 @@
                             pointerWindow->RequestPointerRepeatEvent(KScrollRepeatTimeout, ignoreRect);
 
                             }
-                        
+
                         }
 
                     if(indicator->DrawBackgroundState())
@@ -1263,30 +1260,30 @@
 
                     if ( feedback )
                         {
-                        TTouchFeedbackType fbType = TTouchFeedbackType( 
+                        TTouchFeedbackType fbType = TTouchFeedbackType(
                                                         ETouchFeedbackAudio |
                                                         ETouchFeedbackVibra );
-                          
+
                         feedback->InstantFeedback( this, ETouchFeedbackSlider, fbType, aPointerEvent );
                         }
                     }
 
-                if( aPointerEvent.iType == TPointerEvent::EDrag 
+                if( aPointerEvent.iType == TPointerEvent::EDrag
                    || aPointerEvent.iType == TPointerEvent::EButtonRepeat )
                     {
-                    // performace improving. Too many drag event received, handling every single event 
+                    // performace improving. Too many drag event received, handling every single event
                     // will use too much CPU time.
                     TTime now;
-                    now.HomeTime();                    
+                    now.HomeTime();
                     if ( extension->iDragged &&
-                         now.MicroSecondsFrom( extension->iLastDrag ) 
+                         now.MicroSecondsFrom( extension->iLastDrag )
                          < KScrollDragTimeout )
-                        {                        
+                        {
                         break; // ignore drag for this time
                         }
                     extension->iDragged = ETrue; // after this time, iLastDragged has value.
                     extension->iLastDrag = now;
-                    
+
                     thumbPositionPix = position - extension->iPointerOffsetFromThumb;
                     TInt oldPosition = thumbPosition;
                     TReal newPosition = thumbPositionPix * ( scrollSpan - thumbSpan ) / (TReal)scrollSpanPix;
@@ -1304,20 +1301,6 @@
 
                     if(thumbPosition != oldPosition)
                         {
-                        // Smooth continuous tactile feedback is produced
-                        // during thumb dragging. The tactile feedback API 
-                        // filters out possible re-startings of the effect.
-                        MTouchFeedback* feedback = MTouchFeedback::Instance();
-
-                        if ( feedback )
-                            {
-                            TTimeIntervalMicroSeconds32 timeout( 300000 );
-                            feedback->StartFeedback( this, 
-                                                     ETouchContinuousSlider, 
-                                                     &aPointerEvent, 
-                                                     KIntensity, // intensity 100%
-                                                     timeout );
-                            }
                         extension->SetModelThumbPosition(thumbPosition);
                         indicator->SetIndicatorValues(scrollSpan, thumbPosition, thumbSpan, 0, 0);
 
@@ -1367,17 +1350,6 @@
                 break;
 
             case CEikScrollBar::ENone:
-                {
-                // Stop the continuous tactile feedback that may be playing
-                // at the time due to possible previous thumb dragging.
-                MTouchFeedback* feedback = MTouchFeedback::Instance();
-
-                if ( feedback )
-                    {
-                    feedback->StopFeedback( this );
-                    }
-                }
-
                 if(lastPointerDownOn == CEikScrollBar::EThumb)
                     {
                     if(extension->ScrollBarObserver())
@@ -1590,9 +1562,9 @@
     {
     CAknDoubleSpanScrollBarExtension* extension =
         static_cast<CAknDoubleSpanScrollBarExtension*>( iExtension );
-        
+
     CAknDoubleSpanScrollIndicator* indicator = extension->iScrollIndicator;
-    
+
     indicator->SetHandleHighlight( EFalse );
     }
 
@@ -1773,7 +1745,7 @@
                 }
             else
                 {
-                iParent->DrawDeferred();                 
+                iParent->DrawDeferred();
                 }
 
             }
@@ -2345,13 +2317,13 @@
     // interested in only about the ratio between scrollbar and extension.
     TAknLayoutRect layoutRect;
     layoutRect.LayoutRect( TRect( 0, 0, 200, 200 ), AknLayoutScalable_Avkon::listscroll_gen_pane( 0 ).LayoutLine() );
-    
+
     TRect parent( layoutRect.Rect() ); // parent of both extension and scrollbar
-    
+
     layoutRect.LayoutRect( parent, AknLayoutScalable_Avkon::scroll_pane( 0 ).LayoutLine() );
-    
+
     TRect scrollbar( layoutRect.Rect() );
-    
+
     CAknDoubleSpanScrollBarExtension* extension1 = static_cast<CAknDoubleSpanScrollBarExtension*> (iExtension);
     if( extension1->iExtensionType & ENormalExpandedTouchArea )
         layoutRect.LayoutRect( parent, AknLayoutScalable_Avkon::aid_size_touch_scroll_bar( 0 ).LayoutLine() );
@@ -2362,58 +2334,58 @@
     TRect extension( layoutRect.Rect() );
 
     TRect area;
-    
+
     if ( iParentControl )
         {
         CCoeControl* windowOwningParent = iParentControl;
         while ( windowOwningParent && !windowOwningParent->OwnsWindow() )
             {
             windowOwningParent = windowOwningParent->Parent();
-            }       
-        
+            }
+
         if ( windowOwningParent )
             {
             TInt xGap = 0;
-            TRect scrollBarRect = Rect();   
+            TRect scrollBarRect = Rect();
             TRect parentRect = windowOwningParent->Rect();
-                               
-            if ( OwnsWindow() ) 
+
+            if ( OwnsWindow() )
                 {
-                scrollBarRect.Move( Position().iX - 
+                scrollBarRect.Move( Position().iX -
                     windowOwningParent->Position().iX, 0 );
-                } 
+                }
             if ( iOrientation == CEikScrollBar::EVertical )
-            	{
-				// left to right layout in use
-				if ( !AknLayoutUtils::LayoutMirrored() )
-					{
-					xGap = parentRect.iBr.iX - scrollBarRect.iBr.iX;  
-					if ( Abs( xGap ) < scrollBarRect.Width() )
-						{
-						extension.iBr.iX += xGap;
-						}				
-					}
-				// right to left layout in use
-				else
-					{				
-					xGap = parentRect.iTl.iX - scrollBarRect.iTl.iX;
-					if ( Abs( xGap ) < scrollBarRect.Width() )
-						{
-						extension.iTl.iX += xGap;
-						}
-					} 
-            	}
+                {
+                // left to right layout in use
+                if ( !AknLayoutUtils::LayoutMirrored() )
+                    {
+                    xGap = parentRect.iBr.iX - scrollBarRect.iBr.iX;
+                    if ( Abs( xGap ) < scrollBarRect.Width() )
+                        {
+                        extension.iBr.iX += xGap;
+                        }
+                    }
+                // right to left layout in use
+                else
+                    {
+                    xGap = parentRect.iTl.iX - scrollBarRect.iTl.iX;
+                    if ( Abs( xGap ) < scrollBarRect.Width() )
+                        {
+                        extension.iTl.iX += xGap;
+                        }
+                    }
+                }
             else
-            	{
-				xGap = parentRect.iBr.iY - scrollBarRect.iBr.iY;  
-				if ( Abs( xGap ) < scrollBarRect.Height() )
-					{
-					extension.iBr.iY += xGap;
-					}
-            	}             
+                {
+                xGap = parentRect.iBr.iY - scrollBarRect.iBr.iY;
+                if ( Abs( xGap ) < scrollBarRect.Height() )
+                    {
+                    extension.iBr.iY += xGap;
+                    }
+                }
             }
-        }     
-    
+        }
+
     if ( iOrientation == CEikScrollBar::EVertical )
         {
         area.iTl.iX = extension.iTl.iX - scrollbar.iTl.iX;
@@ -2426,9 +2398,9 @@
         area.iTl.iX = scrollbar.iTl.iY - extension.iTl.iY;
         area.iTl.iY = scrollbar.Width() - extension.Width();
         area.iBr.iX = iSize.iWidth + ( extension.Height() - scrollbar.Height() );
-        area.iBr.iY = area.iTl.iY + extension.Height();
+        area.iBr.iY = area.iTl.iY + extension.Width();
         }
-    
+
     return area;
     }
 
--- a/uifw/EikStd/coctlsrc/aknitemactionmenu.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/coctlsrc/aknitemactionmenu.cpp	Tue May 25 12:58:19 2010 +0300
@@ -392,6 +392,28 @@
 
 
 // ---------------------------------------------------------------------------
+// CAknItemActionMenu::CollectionHasMarkedItems
+// ---------------------------------------------------------------------------
+//
+TBool CAknItemActionMenu::CollectionHasMarkedItems()
+    {
+    _AKNTRACE_FUNC_ENTER;
+    TBool markedItems( EFalse );
+    for ( TInt i = 0; i < iStates.Count(); i++ )
+        {
+        TInt state( iStates[ i ]->CollectionState() );
+        if ( state & MAknCollection::EStateCollectionVisible )
+            {
+            if ( state & MAknCollection::EStateMarkedItems )
+                {
+                markedItems = ETrue;
+                }
+            }
+        }
+    _AKNTRACE_FUNC_EXIT;
+    return markedItems;
+    }
+// ---------------------------------------------------------------------------
 // CAknItemActionMenu::CAknItemActionMenu
 // ---------------------------------------------------------------------------
 //
--- a/uifw/EikStd/coctlsrc/aknmarkingmode.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/coctlsrc/aknmarkingmode.cpp	Tue May 25 12:58:19 2010 +0300
@@ -21,7 +21,9 @@
 #include <aknnavide.h>
 #include <barsread.h>
 #include <AknUtils.h>
+#include <AknTasHook.h>
 
+#include "akntrace.h"
 #include "aknmarkingmode.h"
 
 // ---------------------------------------------------------------------------
@@ -32,8 +34,10 @@
         CAknItemActionMenu& aItemActionMenu,
         CollectionArray& aArray )
     {
+    _AKNTRACE_FUNC_ENTER;
     CAknMarkingMode* self =
         new ( ELeave ) CAknMarkingMode( aItemActionMenu, aArray );
+    _AKNTRACE_FUNC_EXIT;
     return self;
     }
 
@@ -44,7 +48,10 @@
 //
 CAknMarkingMode::~CAknMarkingMode()
     {
+    _AKNTRACE_FUNC_ENTER;
+    AKNTASHOOK_REMOVE();    
     delete iMarkingDecorator;
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
@@ -54,9 +61,10 @@
 //
 void CAknMarkingMode::SetCollectionMultipleMarkingState( TBool aActive )
     {
+    _AKNTRACE_FUNC_ENTER;
     for ( TInt i = 0; i < iCollections.Count(); i++ )
         {
-        MAknCollection* collection( iCollections[ i ] );
+        MAknCollection* collection( iCollections[i] );
         // Assume the command applies to first list with multiple selection
         if ( collection->CollectionState() &
                 MAknCollection::EStateMultipleSelection )
@@ -72,6 +80,7 @@
             break;
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
@@ -81,9 +90,10 @@
 //
 void CAknMarkingMode::TryExitMarkingMode()
     {
+    _AKNTRACE_FUNC_ENTER;
     for ( TInt i = 0; i < iCollections.Count(); i++ )
         {
-        MAknCollection* collection( iCollections[ i ] );
+        MAknCollection* collection( iCollections[i] );
         MAknMarkingCollection* markingCollection
             = MarkingCollection( *collection );
         if ( markingCollection && markingCollection->MarkingState(
@@ -96,6 +106,7 @@
             }
         break;
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
@@ -105,10 +116,11 @@
 //
 TBool CAknMarkingMode::MultipleMarkingActive() const
     {
+    _AKNTRACE_FUNC_ENTER;
     TBool markingActive( EFalse );
     for ( TInt i = 0; i < iCollections.Count(); i++ )
         {
-        MAknCollection* collection( iCollections[ i ] );
+        MAknCollection* collection( iCollections[i] );
         if ( collection->CollectionState() &
                 MAknCollection::EStateCollectionVisible )
             {
@@ -122,6 +134,7 @@
             break;
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     return markingActive;
     }
 
@@ -132,10 +145,11 @@
 //
 TBool CAknMarkingMode::MarkedItems() const
     {
+    _AKNTRACE_FUNC_ENTER;
     TBool markedItems( EFalse );
     for ( TInt i = 0; i < iCollections.Count(); i++ )
         {
-        MAknCollection* collection( iCollections[ i ] );
+        MAknCollection* collection( iCollections[i] );
         if ( collection->CollectionState() &
                 MAknCollection::EStateCollectionVisible )
             {
@@ -154,6 +168,7 @@
             break;
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     return markedItems;
     }
 
@@ -163,10 +178,11 @@
 //
 TBool CAknMarkingMode::CollectionEmpty() const
     {
+    _AKNTRACE_FUNC_ENTER;
     TBool empty( EFalse );
      for ( TInt i = 0; i < iCollections.Count(); i++ )
          {
-         MAknCollection* collection( iCollections[ i ] );
+         MAknCollection* collection( iCollections[i] );
          if ( collection->CollectionState() &
                  MAknCollection::EStateCollectionVisible )
              {
@@ -185,6 +201,7 @@
              break;
              }
          }
+     _AKNTRACE_FUNC_EXIT;
     return empty;    
     }
 
@@ -195,12 +212,14 @@
 //
 void CAknMarkingMode::MarkAllL()
     {
+    _AKNTRACE_FUNC_ENTER;
     MAknMarkingCollection* collection = ActiveMarkingCollection();
     
     if ( collection )
         {
         collection->MarkAllL();
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
@@ -210,12 +229,14 @@
 //
 void CAknMarkingMode::UnmarkAll()
     {
+    _AKNTRACE_FUNC_ENTER;
     MAknMarkingCollection* collection = ActiveMarkingCollection();
     
     if ( collection )
         {
         collection->UnmarkAll();
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
@@ -225,6 +246,7 @@
 //
 void CAknMarkingMode::MarkCurrentItemL()
     {
+    _AKNTRACE_FUNC_ENTER;
     MAknMarkingCollection* collection = ActiveMarkingCollection();
     
     // first activate marking mode if needed
@@ -239,6 +261,7 @@
         {
         collection->MarkCurrentItemL();
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 // ---------------------------------------------------------------------------
@@ -247,6 +270,8 @@
 //
 TBool CAknMarkingMode::CurrentItemMarkable()
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return MarkingCollection()->CurrentItemMarkable();
     }
 
@@ -261,6 +286,9 @@
     iItemActionMenu( aItemActionMenu ),
     iMarkingDecorator( NULL )
     {
+    _AKNTRACE_FUNC_ENTER;
+    AKNTASHOOK_ADD( this, "CAknMarkingMode" );
+    _AKNTRACE_FUNC_EXIT;    
     }
 
 
@@ -271,9 +299,11 @@
 MAknMarkingCollection* CAknMarkingMode::MarkingCollection(
         MAknCollection& aCollection )
     {
+    _AKNTRACE_FUNC_ENTER;
     TAny* extension( NULL );
     aCollection.CollectionExtension(
             MAknMarkingCollection::TYPE, extension, NULL );
+    _AKNTRACE_FUNC_EXIT;
     return static_cast<MAknMarkingCollection*>( extension );
     }
 
@@ -284,16 +314,18 @@
 //
 MAknMarkingCollection* CAknMarkingMode::MarkingCollection()
     {
+    _AKNTRACE_FUNC_ENTER;
     for ( TInt i = 0; i < iCollections.Count(); i++ )
         {
-        MAknCollection* collection( iCollections[ i ] );
+        MAknCollection* collection( iCollections[i] );    
         if ( collection->CollectionState() &
                 MAknCollection::EStateCollectionVisible )
             {
+            _AKNTRACE_FUNC_EXIT;
             return MarkingCollection( *collection );
             }
         }
-
+    _AKNTRACE_FUNC_EXIT;
     return NULL;
     }
 
@@ -304,9 +336,10 @@
 //
 MAknMarkingCollection* CAknMarkingMode::ActiveMarkingCollection()
     {
+    _AKNTRACE_FUNC_ENTER;
     for ( TInt i = 0; i < iCollections.Count(); i++ )
         {
-        MAknCollection* collection( iCollections[ i ] );
+        MAknCollection* collection( iCollections[i] );
         
         MAknMarkingCollection* markingCollection = 
                 MarkingCollection( *collection );
@@ -314,10 +347,11 @@
         if ( markingCollection && markingCollection->MarkingState() & 
                 MAknMarkingCollection::EStateMarkingMode )
             {
+            _AKNTRACE_FUNC_EXIT;
             return markingCollection;
             }
         }
-
+    _AKNTRACE_FUNC_EXIT;
     return NULL;
     }
 
@@ -327,6 +361,7 @@
 //
 void CAknMarkingMode::UpdateMarkingModeNaviPaneL( TBool aEnable )
     {
+    _AKNTRACE_FUNC_ENTER;
     CEikonEnv* eikonEnv = CEikonEnv::Static();
         
     if ( eikonEnv && eikonEnv->AppUiFactory() )
@@ -364,6 +399,7 @@
                 }
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 // End of File
--- a/uifw/EikStd/coctlsrc/aknstyluspopupmenu.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/coctlsrc/aknstyluspopupmenu.cpp	Tue May 25 12:58:19 2010 +0300
@@ -24,6 +24,7 @@
 #include <eikapp.h>
 #include <aknappui.h>
 #include <AknDef.h>
+#include <touchfeedback.h>
 
 #include "aknstyluspopupmenu.h"
 #include "aknstyluspopupmenucontent.h"
@@ -195,7 +196,18 @@
     
     TSize size(iController->Size());
     iController->ShowPopUp();
-
+    if ( AknLayoutUtils::PenEnabled() )
+        {
+        MTouchFeedback* feedback = MTouchFeedback::Instance();
+        if ( feedback )
+            {
+            feedback->InstantFeedback(
+                    iContent,
+                    ETouchFeedbackPopUp,
+                    ETouchFeedbackVibra,
+                    TPointerEvent() );
+            }
+        }
     if ( size.iWidth == 0 && size.iHeight == 0 )
         {
         if ( iPositionType != KErrNotFound )
@@ -391,8 +403,10 @@
             TBool isDeleted = EFalse;
             iIsDeleted = &isDeleted;
 
+            CleanupStack::PushL( TCleanupItem( CleanLocalRef, this ) );
             iMenuObserver->ProcessCommandL( iContent->CurrentCommandId() );
-
+            CleanupStack::Pop();
+            
             if ( isDeleted )
                 {
                 return;
@@ -510,3 +524,12 @@
         iController = NULL;
         }
     }
+
+// -----------------------------------------------------------------------------
+// CAknStylusPopUpMenu::CleanLocalRef
+// -----------------------------------------------------------------------------
+//
+void CAknStylusPopUpMenu::CleanLocalRef( TAny* any )
+    {
+    static_cast<CAknStylusPopUpMenu*>( any )->iIsDeleted = NULL;
+    }
--- a/uifw/EikStd/coctlsrc/akntoolbarextensionview.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/coctlsrc/akntoolbarextensionview.cpp	Tue May 25 12:58:19 2010 +0300
@@ -539,6 +539,14 @@
             {
             // tapped outside view, 
             MakeVisible( EFalse ); 
+
+          	MTouchFeedback* feedback = MTouchFeedback::Instance();
+	        if ( feedback )
+				{
+        		feedback->InstantFeedback( this, ETouchFeedbackPopUp,
+                                   		   ETouchFeedbackVibra, aPointerEvent );
+                }
+
             // Close extension view and let also extension know about it
             // so it can change state
             iExtension->ViewClosed(); 
--- a/uifw/EikStd/coctlsrc/eikcba.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/coctlsrc/eikcba.cpp	Tue May 25 12:58:19 2010 +0300
@@ -214,8 +214,9 @@
     ECbaSingleClickEnabled, // single click enabled in appUi
     ECbaItemSoftkeyDisabled, // item specific softkey disabled
     ECbaItemSpecificSoftkeyInUse, // item specific softkey is in use
-    ECbaItemSoftkeyDisabledByClient, // client disabled item specific softkey
-    ECbaMultipleMarkingActive // multiple marking has changed RSK
+    ECbaItemSoftkeyDisabledByClient, // client has disabled item specific softkey
+    ECbaMultipleMarkingActive, // multiple marking has changed RSK
+    ECbaCombinePaneUncovered // The combine pane in status pane is invisible.
     };
 
 enum TCbaLayers
@@ -1780,9 +1781,14 @@
       
     TAknLayoutRect qgn_graf_sk_msk;
     TRect rect;
+    TInt graphicMSKVariety = 1;
+    if ( iCbaFlags & EEikCbaFlagAppMskIcon )
+    	{
+        graphicMSKVariety = 0 ;
+    	}
     qgn_graf_sk_msk.LayoutRect(
         rect,
-        AknLayoutScalable_Avkon::control_pane_g4( 1 ).LayoutLine() );
+        AknLayoutScalable_Avkon::control_pane_g4( graphicMSKVariety ).LayoutLine() );
 
     TSize iconSize( qgn_graf_sk_msk.Rect().Width(),
                     qgn_graf_sk_msk.Rect().Height() );
@@ -2952,12 +2958,27 @@
             }
         
         // We must check for landscape mode bottom sks 
+        TBool isLandscapeOrient = Layout_Meta_Data::IsLandscapeOrientation();
         TInt bottomPaneVariety = 1;
-        if ( Layout_Meta_Data::IsLandscapeOrientation() )
+        if ( isLandscapeOrient )
             {
             bottomPaneVariety = 6;
             }
             
+        // SetBoundingRect is always called by status pane when it is changing visibility.
+        // If the status pane is invisible in landscape, softkey need to draw frame to cover
+        // the area of combine pane.
+        CEikStatusPaneBase* statusPane = CEikStatusPaneBase::Current();
+        if (statusPane && !statusPane->IsVisible() && isLandscapeOrient &&
+            statusPane->PaneCapabilities(TUid::Uid(EEikStatusPaneUidCombined)).IsInCurrentLayout())
+            {
+            iFlags.Set( ECbaCombinePaneUncovered );
+            }
+        else
+            {
+            iFlags.Clear( ECbaCombinePaneUncovered );
+            }
+        
         TAknWindowLineLayout controlPane( DoCompose(
             AknLayoutScalable_Avkon::application_window( 0 ),
             DoCompose( AknLayoutScalable_Avkon::area_bottom_pane( bottomPaneVariety ),
@@ -2971,8 +2992,6 @@
         // Set correct window region incase we have been in stacon mode.
         RRegion region;
         region.AddRect( Rect() );
-            
-        CEikStatusPaneBase* statusPane = CEikStatusPaneBase::Current();
         
         // If status indicators and clock are shown in control pane area,
         // then remove those areas from cba window region.
@@ -4622,7 +4641,7 @@
                     CEikCbaButton* button2 = static_cast<CEikCbaButton*>(
                         (*iControlArray)[KControlArrayCBAButton2Posn].iControl );
                     
-                    if ( IsMskEnabledLayoutActive() )
+                    if ( IsMskEnabledLayoutActive() || iFlags.IsSet( ECbaCombinePaneUncovered ) )
                         {
                         CEikCbaButton* buttonMSK = static_cast<CEikCbaButton*>(
                             (*iControlArray)[KControlArrayCBAButtonMSKPosn].iControl );
@@ -5288,7 +5307,7 @@
                         .LayoutLine() );
             iExtension->iRightFrameInnerRect = layoutRect.Rect();
 
-            if ( mskEnabledInPlatform )
+            if ( mskEnabledInPlatform || ( isLandscape && iFlags.IsSet( ECbaCombinePaneUncovered ) ) )
                 {
                 layoutRect.LayoutRect(
                     rect,
@@ -5488,6 +5507,10 @@
         TInt textMSKVariety = 3;
         TInt graphicMSKVariety = 1;
 
+        if ( iCbaFlags & EEikCbaFlagAppMskIcon )
+        	{
+            graphicMSKVariety = 0 ;
+        	}
         if ( mskEnabledInApplication && mskEnabledInPlatform )
             {
             MSKSoftkey = (*iControlArray)[KControlArrayCBAButtonMSKPosn].iControl;
@@ -6455,7 +6478,7 @@
     // Right pane:    
     TInt rightPaneTextVariety = 0;
     
-    if ( iExtension->iEnablePostingTransparency ||
+    if ( ( iExtension && iExtension->iEnablePostingTransparency ) ||
          ( iCbaFlags & EEikCbaFlagTransparent ) )
         {
         rightPaneTextVariety = 1; // Outline font used
@@ -7657,11 +7680,16 @@
         CFbsBitmap *bitmap = NULL;
         CFbsBitmap *mask = NULL;
       
+        TInt graphicMSKVariety = 1;
+        if ( iCbaFlags & EEikCbaFlagAppMskIcon )
+        	{
+            graphicMSKVariety = 0 ;
+        	}
         TAknLayoutRect qgn_graf_sk_msk;
         TRect rect;
         qgn_graf_sk_msk.LayoutRect(
             rect,
-            AknLayoutScalable_Avkon::control_pane_g4( 1 ).LayoutLine() );
+            AknLayoutScalable_Avkon::control_pane_g4( graphicMSKVariety ).LayoutLine() );
 
         TSize iconSize( qgn_graf_sk_msk.Rect().Width(),
                         qgn_graf_sk_msk.Rect().Height() );
@@ -7881,17 +7909,12 @@
 
 // ---------------------------------------------------------------------------
 // CEikCba::CommandChangeAllowed
-// 
 // ---------------------------------------------------------------------------
 //     
-TBool CEikCba::CommandChangeAllowed()
-    {
-    if ( iFlags.IsSet( ECbaSingleClickEnabled ) 
-            && iFlags.IsSet( ECbaMultipleMarkingActive ) )
-        {
-        return EFalse;
-        }
-    return ETrue;
+TBool CEikCba::CommandChangeAllowed() const
+    {
+    return ( !( iFlags.IsSet( ECbaSingleClickEnabled ) 
+            && iFlags.IsSet( ECbaMultipleMarkingActive ) ) );
     }
 
 
--- a/uifw/EikStd/coctlsrc/eikspane.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/coctlsrc/eikspane.cpp	Tue May 25 12:58:19 2010 +0300
@@ -3247,7 +3247,65 @@
 		}
 
 	CCoeControl* oldControl = cont->Control();
+	
+	// Make the old control invisible and effectively remove it from data
+    // subscriber's observer array. This ensures that:
+	//
+	// 1. Old control won't receive messages about layout switch etc.
+	// 2. Old control doesn't try to draw. It must be prevented because its
+	//    window might be invalid due to layout change.
+	if ( oldControl )
+	    {
+        oldControl->MakeVisible( EFalse );
+        
+        TInt count = oldControl->CountComponentControls();
+        
+        for ( TInt i = 0; i < count; ++i )
+            {
+            CCoeControl* child = oldControl->ComponentControl( i );
+            
+            if ( child )
+                {
+                child->MakeVisible( EFalse );
+                }
+            }
+	    }
+	
+	// Make the new control visible and so that it gets added to data
+	// subscriber's observer array. This is only done if the new control is
+    // properly constructed before swapping, i.e. it already
+    // has a container window set.
+	if ( aNewControl && aNewControl->DrawableWindow() )
+	    {
+        SetContainersL( *aNewControl, *cont );
+
+        if ( cont->IsVisible() )
+            {
+            aNewControl->MakeVisible( ETrue );
+
+            TInt count = aNewControl->CountComponentControls();
+            
+            for ( TInt i = 0; i < count; ++i )
+                {
+                CCoeControl* child = aNewControl->ComponentControl( i );
+                
+                if ( child )
+                    {
+                    child->MakeVisible( ETrue );
+                    }
+                }
+            }
+	    }
+	
 	cont->SetControl( aNewControl );
+	
+	// ensure that indicator's priorities etc are up-to-date
+	CAknStatusPaneDataSubscriber* subscriber = DataSubscriber();
+	
+	if ( subscriber )
+	    {
+        subscriber->RefreshDataL();
+	    }
 
 	return oldControl;
 	}
--- a/uifw/EikStd/coctlsrc/eikspmod.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/coctlsrc/eikspmod.cpp	Tue May 25 12:58:19 2010 +0300
@@ -1495,8 +1495,17 @@
                         }
                     case EEikStatusPaneUidSignal:
                         {
-                        layout =
-                            aknLayoutScalable_Avkon.signal_pane( 13 ).LayoutLine();
+                        if (aLayoutId
+                                == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT_NO_SOFTKEYS)
+                            {
+                            layout
+                                    = aknLayoutScalable_Avkon.signal_pane(2).LayoutLine();
+                            }
+                        else
+                            {
+                            layout
+                                    = aknLayoutScalable_Avkon.signal_pane(13).LayoutLine();
+                            }                       
                         break;
                         }
                     case EEikStatusPaneUidTitle:
@@ -1530,8 +1539,17 @@
                         }
                     case EEikStatusPaneUidBattery:
                         {
-                        layout =
-                            aknLayoutScalable_Avkon.battery_pane( 13 ).LayoutLine();
+                         if (aLayoutId
+                                == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT_NO_SOFTKEYS)
+                            {
+                            layout
+                                    = aknLayoutScalable_Avkon.battery_pane(2).LayoutLine();
+                            }
+                        else
+                            {
+                            layout
+                                    = aknLayoutScalable_Avkon.battery_pane(13).LayoutLine();
+                            }
                         break;
                         }
                     case EEikStatusPaneUidDigitalClock:
--- a/uifw/EikStd/dlgsrc/EIKDIALG.CPP	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/dlgsrc/EIKDIALG.CPP	Tue May 25 12:58:19 2010 +0300
@@ -41,6 +41,7 @@
 #include <eikdpage.h>
 #include <eikmop.h>
 #include <aknenv.h>
+#include <touchfeedback.h>
 //<SKIN>
 #include "eikdialogext.h"
 #include <AknsListBoxBackgroundControlContext.h>
@@ -70,6 +71,7 @@
 #include <AknQueryDialog.h>
 #include <aknQueryControl.h>
 #include <aknitemactionmenuregister.h>
+#include <layoutmetadata.cdl.h>
 
 #include "akncbacontentobserver.h"
 #include "akntrace.h"
@@ -849,32 +851,33 @@
 	_AKNTRACE_FUNC_ENTER;
 	if (iDialogFlags&EEikDialogFlagFillAppClientRect)
 	    {
+        TRect destRect = iEikonEnv->EikAppUi()->ClientRect();       
         // if this is a view app then ask client rect from the currently active view
         TVwsViewId uid;    
         if ( iAvkonAppUi->GetActiveViewId( uid ) == KErrNone )
             {
             if ( uid.iAppUid != uid.iViewUid )
                 {
-                CAknView* view = iAvkonViewAppUi->View(uid.iViewUid);
-                if (view)
+                CAknView* view = iAvkonViewAppUi->View( uid.iViewUid );
+                if ( view )
                     {
-                    SetRect(view->ClientRect());
-                    }
-                else
-                    {
-                    SetRect(iEikonEnv->EikAppUi()->ClientRect());
+                    destRect = view->ClientRect();
                     }
                 }
-            else
+            }
+
+        if ( !Layout_Meta_Data::IsLandscapeOrientation() && iButtonGroupContainer != NULL )
+            {
+            TRect controlPane;
+            AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EControlPane, controlPane );
+
+            if ( destRect.iBr.iY > controlPane.iTl.iY )
                 {
-                SetRect(iEikonEnv->EikAppUi()->ClientRect());
+                destRect.iBr.iY = controlPane.iTl.iY;
                 }
-            }
-         else
-            {
-            SetRect( iEikonEnv->EikAppUi()->ClientRect() );
-            }
-	    }
+            }        
+        SetRect( destRect );
+        }
 	else
         {
         SetRect( TRect( AknPopupUtils::Position( aSize, this ), aSize ) );
@@ -1652,6 +1655,16 @@
 		GfxTransEffect::NotifyExternalState(EInternalHandleSequence, (const TDesC8*)this);
 #endif
 		GfxTransEffect::Begin(this, KGfxControlAppearAction);
+        MTouchFeedback* feedback = NULL;
+		if(AknLayoutUtils::PenEnabled())
+		    {
+            feedback = static_cast<MTouchFeedback*>(ExtensionInterface(KExIfTactileFeedbackUid));
+		    }
+		if(feedback && CAknTransitionUtils::TransitionsEnabled(AknTransEffect::EComponentTransitionsOff ))
+		    {
+            feedback->InstantFeedback(this, ETouchFeedbackIncreasingPopUp,
+                                        ETouchFeedbackVibra, TPointerEvent());
+		    }
 		GfxTransEffect::NotifyExternalState(ECaptureComponentsBegin, (const TDesC8*)this);
 		
 		TRect demarcation;
@@ -1664,6 +1677,11 @@
 
 		GfxTransEffect::NotifyExternalState(ECaptureComponentsEnd, (const TDesC8*)this);
 		GfxTransEffect::End(this);
+		if(feedback)
+		    {
+            feedback->InstantFeedback(this, ETouchFeedbackPopUp,
+                                        ETouchFeedbackVibra, TPointerEvent());
+		    }
 		}
 	else
 		{
@@ -1999,7 +2017,13 @@
 
     TBool effectTriggered = EFalse;
     CAknAppUi* aknAppUi = static_cast<CAknAppUi*>(iEikonEnv->EikAppUi());
-    
+
+    MTouchFeedback* feedback = NULL;
+    if(AknLayoutUtils::PenEnabled())
+        {
+        feedback = static_cast<MTouchFeedback*>(ExtensionInterface(KExIfTactileFeedbackUid));
+        }
+
     if (!(iDialogFlags & EEikDialogFlagDelayEffects)
         && IsFocusedWindowGroup( this )
         && GfxTransEffect::IsRegistered(this) && IsVisible() && effectButton
@@ -2012,6 +2036,21 @@
         {
         CAknTransitionUtils::SetAllParents(this);
         GfxTransEffect::Begin(this, KGfxControlDisappearAction);
+
+        if(feedback)
+            {
+            if(CAknTransitionUtils::TransitionsEnabled(AknTransEffect::EComponentTransitionsOff))
+                {
+                feedback->InstantFeedback(this, ETouchFeedbackDecreasingPopUp,
+                                        ETouchFeedbackVibra, TPointerEvent());
+                }
+            else
+                {
+                feedback->InstantFeedback(this, ETouchFeedbackPopUp,
+                                        ETouchFeedbackVibra, TPointerEvent());
+                }
+            }
+
         GfxTransEffect::NotifyExternalState(ECaptureComponentsBegin, (const TDesC8*)this);
         TRect demarcation;
         CAknTransitionUtils::GetDemarcation(CAknTransitionUtils::EPopup, demarcation);
@@ -2080,6 +2119,21 @@
                 TRect demarcation;
                 CAknTransitionUtils::SetAllParents(this);
                 GfxTransEffect::Begin(this, KGfxControlDisappearAction);
+
+                if(feedback)
+                    {
+                    if(CAknTransitionUtils::TransitionsEnabled(AknTransEffect::EComponentTransitionsOff))
+                        {
+                        feedback->InstantFeedback(this, ETouchFeedbackDecreasingPopUp,
+                                                ETouchFeedbackVibra, TPointerEvent());
+                        }
+                    else
+                        {
+                        feedback->InstantFeedback(this, ETouchFeedbackPopUp,
+                                                ETouchFeedbackVibra , TPointerEvent());
+                        }
+                    }
+
                 GfxTransEffect::NotifyExternalState(ECaptureComponentsBegin, (const TDesC8*)this);
                 CAknTransitionUtils::GetDemarcation(CAknTransitionUtils::EPopup, demarcation);
                 GfxTransEffect::SetDemarcation(this, demarcation);
@@ -3241,7 +3295,8 @@
     // softkeys
     if ( iExtension && CbaEmbeddedInDialog( iDialogFlags ) )
         {
-        TSize dialogSize( Rect().Size() );
+        TRect oldDialogRect( Rect() );
+        TSize dialogSize( oldDialogRect.Size() );
         CEikCba* cba = static_cast<CEikCba*>(
                 iButtonGroupContainer->ButtonGroup() );
         TBool cbaVisible( cba->IsVisible() && !cba->IsEmpty() );
@@ -3266,8 +3321,14 @@
             dialogSize.iHeight -= cbaRect.Rect().Height();
             }
 
-        SetRect( TRect(
-            AknPopupUtils::Position( dialogSize, this ), dialogSize ) );
+        TRect newDialogRect( AknPopupUtils::Position( dialogSize, cbaVisible ),
+                             dialogSize );
+        SetRect( newDialogRect );
+        
+        if ( oldDialogRect != newDialogRect )
+            {
+            DrawDeferred();
+            }
         }
     }
 
--- a/uifw/EikStd/dlgsrc/EIKDPAGE.CPP	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/dlgsrc/EIKDPAGE.CPP	Tue May 25 12:58:19 2010 +0300
@@ -2329,12 +2329,37 @@
 
   Added Enter key as a special case... 
 */
+       
     if ( (iCurrentLine!=-1) && (iCurrentLine < iLines->Count()) )
+        {
         if ( (*iLines)[iCurrentLine]->OfferHotKeys() ||
             (*iLines)[iCurrentLine]->TakesEnterKey() && (aKeyEvent.iCode==EKeyEnter)
-            )
+            ) 
+            {
+            CEikCaptionedControl* currentLine = ( *iLines )[iCurrentLine];
+            const TInt controlType( currentLine->iControlType );
+            
+            if ( currentLine->ControlIsAnEdwin( controlType ) )
+                {
+                CEikEdwin* edwin = ( CEikEdwin* )currentLine->iControl;
+                TBool readOnly = edwin->IsReadOnly();
+    
+                // The control is an editor which is read-only, 
+                // such as an on/off control
+                if ( readOnly )
+                    {
+                    iPageObserver->HandleDialogPageEventL( 
+                            MEikDialogPageObserver::EDialogPageTapped );
+                    return EKeyWasConsumed;                                
+                    }
+                }
+
             if (!IsForm()|| iIsEditable)
+                {
                 return (*iLines)[iCurrentLine]->iControl->OfferKeyEventL(aKeyEvent,aType);
+                }
+            }
+        }
     return EKeyWasNotConsumed;
     }
 
@@ -2999,7 +3024,9 @@
                 {
                 iExtension->iScrolling = EFalse;
                 
-                if ( iPageObserver && GrabbingComponent() && !iExtension->iWasScrolling )
+                if ( iPageObserver && GrabbingComponent() 
+                    && !iExtension->iWasScrolling 
+                    && touchedLine == iCurrentLine )
                     {
                     iPageObserver->HandleDialogPageEventL( MEikDialogPageObserver::EDialogPageTapped );
                     }
@@ -3052,7 +3079,13 @@
         ( iExtension->iFocusedClicked || iExtension->iUsesSingleClick ) &&
         !iExtension->iScrolling )
         {
-        mskPress = ETrue;
+        // Not need to sent key event when focus lost.
+        CEikCaptionedControl* currentLine = (*iLines)[iCurrentLine];     
+        if ( currentLine->IsFocused() )
+        	{
+            mskPress = ETrue;
+        	}
+        
         callDefaultImplementation = EFalse;
         }
     if ( callDefaultImplementation && ( iExtension->iFocusedClicked || 
--- a/uifw/EikStd/srvuisrc/EIKSRVUI.CPP	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/srvuisrc/EIKSRVUI.CPP	Tue May 25 12:58:19 2010 +0300
@@ -624,12 +624,13 @@
 
 EXPORT_C void CEikServAppUiBase::HandleThreadExitL(RThread& aThread)
     {
+    _LIT(KAppArcServerThread, "AppArcServerThread");
     if (aThread.Name() == ASCliDefinitions::ServerAndThreadName()) // alarm server died
         {
         aThread.Close(); // need to Close() before restarting with same name
         iServerToRestart |= EAlwlSvr; // restarted under active object
         }
-    else if (aThread.Name()==NameApaServServerThread()) // AppArc server died
+    else if (aThread.Name() == KAppArcServerThread) // AppArc server died
         {
         aThread.Close();
         iServerToRestart|=EApaSvr;
--- a/uifw/EikStd/srvuisrc/eikkeysoundserver.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/srvuisrc/eikkeysoundserver.cpp	Tue May 25 12:58:19 2010 +0300
@@ -1147,7 +1147,7 @@
     Stop();
 
     // Create audio player. DoPlay() will be called in all circumstances.
-    iAudioPlayer = CMdaAudioPlayerUtility::NewFilePlayerL(iFileName, *this);
+    iAudioPlayer = CMdaAudioPlayerUtility::NewFilePlayerL(iFileName, *this, iPriority,(TMdaPriorityPreference)iPreference );
     LOGTEXT(_L(" CAknFileSoundInfo::PlayL() - Exit"));
     }
 
--- a/uifw/eikctl/src/EIKCLB.CPP	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/eikctl/src/EIKCLB.CPP	Tue May 25 12:58:19 2010 +0300
@@ -840,7 +840,7 @@
 
     TInt firstPotentialItemIndex = iTopItemIndex;
     TInt lastPotentialItemIndex =
-        iTopItemIndex + NumberOfItemsThatFitInRect( iViewRect ) - 1;
+        iTopItemIndex + NumberOfItemsThatFitInRect( iViewRect );
     TBool backgroundDrawingSuppressed = ( listbox && listbox->BackgroundDrawingSuppressed() );
 
     if ( iModel->NumberOfItems() == 0 )
--- a/uifw/eikctl/src/EIKCLBD.CPP	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/eikctl/src/EIKCLBD.CPP	Tue May 25 12:58:19 2010 +0300
@@ -53,6 +53,8 @@
 const TInt KColorIconFlag = -1;
 const TInt KColorIconIdx  =  0;
 
+// Number of icons in marking mode icon array
+const TInt KMarkingModeIconArraySize = 2;
 
 /**
 * About animation usage:
@@ -1148,7 +1150,8 @@
     {
     if ( !iMarkingIconArray )
         {
-        iMarkingIconArray = new ( ELeave ) CAknIconArray( 2 );
+        iMarkingIconArray = new ( ELeave ) CAknIconArray( 
+                KMarkingModeIconArraySize );
         }
     else
         {
@@ -2030,22 +2033,6 @@
 
     TRgb aTextColor = aHighlight ? aColors.iHighlightedText : aColors.iText;
     
-    TBool markingMode = EFalse;
-    TRect itemRect( aRect );
-    
-    if ( listbox->View() && listbox->View()->ItemDrawer() )
-        {
-        if ( listbox->View()->ItemDrawer()->Flags() 
-                & CListItemDrawer::EMarkingModeEnabled
-                && iExtension->iMarkingIconArray
-                &&  iExtension->iMarkingIconArray->Count() == 2 )
-            {
-            markingMode = ETrue;
-            itemRect.iTl.iX += 
-                    AknLayoutScalable_Avkon::list_single_graphic_pane_t1( 0 ).LayoutLine().il;
-            }
-        }
-
     MAknsSkinInstance *skin = AknsUtils::SkinInstance();
     MAknsControlContext *cc = AknsDrawUtils::ControlContext( Control() );
     if ( !cc )
@@ -2057,11 +2044,6 @@
     TBool rectClipped[KMaxColumn];
     
     Mem::FillZ( &rectClipped[0], KMaxColumn * sizeof( TBool ) );
-    
-    if ( iExtension->iSubCellsMightIntersect )
-        {
-        CheckIfSubCellsIntersect( &textLines[0], &rectClipped[0], *aText, itemRect );
-        }
 #ifdef RD_UI_TRANSITION_EFFECTS_LIST
     MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( &aGc );
 #endif // RD_UI_TRANSITION_EFFECTS_LIST
@@ -2095,45 +2077,18 @@
 #endif // RD_UI_TRANSITION_EFFECTS_LIST
         }
  
+    TRect itemRect( aRect );
+    DrawMarkingModeIcons( aItemProperties, aGc, itemRect );
+    if ( iExtension->iSubCellsMightIntersect )
+        {
+        CheckIfSubCellsIntersect( &textLines[0], &rectClipped[0], *aText, itemRect );
+        }
     if ( iExtension->iCurrentRow < listbox->BottomItemIndex() )
         {
         AknListUtils::DrawSeparator( aGc, aRect, aColors.iText, skin );
         }
     DrawHighLight( aGc, aRect, aHighlight, skin );
     
-    if ( markingMode && !aItemProperties.IsSelectionHidden() )
-        {
-        TAknLayoutRect layoutRect;
-        layoutRect.LayoutRect( aRect, 
-                AknLayoutScalable_Avkon::list_single_graphic_pane_g1( 0 ) );
-        
-        aGc.SetPenColor( aColors.iText );
-        aGc.SetPenStyle( CGraphicsContext::ESolidPen );
-
-        CGulIcon* icon = (*iExtension->iMarkingIconArray)[1]; // unchecked
-
-        if ( listbox->View()->ItemIsSelected( iExtension->iCurrentRow ) )
-            {
-            icon = (*iExtension->iMarkingIconArray)[0];
-            }
-        
-        CFbsBitmap* bitmap = icon->Bitmap();
-
-        if ( bitmap )
-            {
-            TSize size( bitmap->SizeInPixels() ); // set size if not already
-            TSize targetSize( layoutRect.Rect().Size() );
-            
-            if ( size.iWidth != targetSize.iWidth && size.iHeight != targetSize.iHeight )
-                {
-                AknIconUtils::SetSize( bitmap, targetSize,
-                        EAspectRatioPreservedAndUnusedSpaceRemoved ); 
-                }
-
-            aGc.BitBltMasked( layoutRect.Rect().iTl, bitmap, TRect( layoutRect.Rect().Size() ), icon->Mask(), EFalse );
-            }
-        
-        }
     
     // The column draw loop
     column = 0;
@@ -2153,7 +2108,10 @@
         TextUtils::ColumnText( text, column, aText );
         if ( text == KNullDesC ) { continue; }
 
-        if ( iExtension->FindSLSubCellIndex( subCellIndex, column )!=0 ) { continue; }
+        if ( iExtension->FindSLSubCellIndex( subCellIndex, column )!=0 ) 
+            { 
+            continue; 
+            }
         
         CGraphicsContext::TTextAlign align=ColumnAlignment(column);
         TBool isLayoutAlignment = iExtension->ColumnLayoutAlignment(column);
@@ -2460,27 +2418,57 @@
         }
 
     CEikListBox* listbox = static_cast<CEikListBox*>( iExtension->iControl );
-    TBool markingMode = EFalse;
     TRect itemRect( aRect );
     
-    if ( listbox->View() && listbox->View()->ItemDrawer() )
-        {
-        if ( listbox->View()->ItemDrawer()->Flags() 
-                & CListItemDrawer::EMarkingModeEnabled &&
-             iExtension->iMarkingIconArray && 
-             iExtension->iMarkingIconArray->Count() == 2 )
-            {
-            markingMode = ETrue;
-            itemRect.iTl.iX += 
-                AknLayoutScalable_Avkon::list_single_graphic_pane_t1( 0 ).LayoutLine().il;
-            }
-        }
-    
     TInt extraVerticalSpace=(aRect.Height()-font->HeightInPixels());
     TInt baseLineOffset=extraVerticalSpace/2+font->AscentInPixels();
+    // SERIES60 Background drawing.
+    MAknsSkinInstance *skin = AknsUtils::SkinInstance();
+    MAknsControlContext *cc = AknsDrawUtils::ControlContext( Control() );
+    if (!cc)
+        {
+        cc = SkinBackgroundContext();
+        }
+
+#ifdef RD_UI_TRANSITION_EFFECTS_LIST
+
+    MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( &aGc );
+
+#endif // RD_UI_TRANSITION_EFFECTS_LIST
+
+    if ( !listbox || !listbox->BackgroundDrawingSuppressed() )
+        {
+#ifdef RD_UI_TRANSITION_EFFECTS_LIST
+        if ( transApi )
+            {
+            transApi->StartDrawing( MAknListBoxTfxInternal::EListView );
+            }
+#endif // RD_UI_TRANSITION_EFFECTS_LIST
+
+        aGc.SetBrushStyle(CGraphicsContext::ESolidBrush);
+        aGc.SetPenStyle(CGraphicsContext::ESolidPen);
+
+        if ( listbox )
+            {
+            AknsDrawUtils::Background( skin, cc, listbox, aGc, aRect );
+            }
+        else
+            {
+            aGc.Clear(aRect);
+            }
+
+#ifdef RD_UI_TRANSITION_EFFECTS_LIST   
+        if ( transApi )
+            {
+            transApi->StopDrawing();
+            }
+#endif // RD_UI_TRANSITION_EFFECTS_LIST
+        }
+    
+    DrawMarkingModeIcons( aItemProperties, aGc, itemRect );
     TRect textRect( itemRect );
+    textRect.iBr.iX = itemRect.iTl.iX;    
     TRect textMRect; // textrect with margins.
-    textRect.iBr.iX = itemRect.iTl.iX;
     TInt column=0;
     TPtrC text;
 
@@ -2559,48 +2547,6 @@
 
     // pass 3 drawing
 
-    // SERIES60 Background drawing.
-    MAknsSkinInstance *skin = AknsUtils::SkinInstance();
-    MAknsControlContext *cc = AknsDrawUtils::ControlContext( Control() );
-    if (!cc)
-        {
-        cc = SkinBackgroundContext();
-        }
-
-#ifdef RD_UI_TRANSITION_EFFECTS_LIST
-
-    MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( &aGc );
-
-#endif // RD_UI_TRANSITION_EFFECTS_LIST
-
-    if ( !listbox || !listbox->BackgroundDrawingSuppressed() )
-        {
-#ifdef RD_UI_TRANSITION_EFFECTS_LIST
-        if ( transApi )
-            {
-            transApi->StartDrawing( MAknListBoxTfxInternal::EListView );
-            }
-#endif // RD_UI_TRANSITION_EFFECTS_LIST
-
-        aGc.SetBrushStyle(CGraphicsContext::ESolidBrush);
-        aGc.SetPenStyle(CGraphicsContext::ESolidPen);
-
-        if ( listbox )
-            {
-            AknsDrawUtils::Background( skin, cc, listbox, aGc, aRect );
-            }
-        else
-            {
-            aGc.Clear(aRect);
-            }
-
-#ifdef RD_UI_TRANSITION_EFFECTS_LIST   
-        if ( transApi )
-            {
-            transApi->StopDrawing();
-            }
-#endif // RD_UI_TRANSITION_EFFECTS_LIST
-        }
 
     if ( iExtension->iCurrentRow < listbox->BottomItemIndex() )
         {
@@ -2618,48 +2564,6 @@
         aGc.SetClippingRect( view->ViewRect() );
         }
 #endif // RD_UI_TRANSITION_EFFECTS_LIST
-
-    if ( markingMode && !aItemProperties.IsSelectionHidden() )
-        {
-        TAknLayoutRect layoutRect;
-        layoutRect.LayoutRect(
-            aRect, 
-            AknLayoutScalable_Avkon::list_single_graphic_pane_g1( 0 ) );
-        
-        aGc.SetPenColor( aColors.iText );
-        aGc.SetPenStyle( CGraphicsContext::ESolidPen );
-
-        CGulIcon* icon = (*iExtension->iMarkingIconArray)[1]; // unchecked
-
-        if ( listbox->View()->ItemIsSelected( iExtension->iCurrentRow ) )
-            {
-            icon = (*iExtension->iMarkingIconArray)[0];
-            }
-        
-        CFbsBitmap* bitmap = icon->Bitmap();
-
-        if ( bitmap )
-            {
-            TSize size( bitmap->SizeInPixels() ); // set size if not already
-            TSize targetSize( layoutRect.Rect().Size() );
-            
-            if ( size.iWidth != targetSize.iWidth &&
-                 size.iHeight != targetSize.iHeight )
-                {
-                AknIconUtils::SetSize(
-                    bitmap,
-                    targetSize,
-                    EAspectRatioPreservedAndUnusedSpaceRemoved ); 
-                }
-
-            aGc.BitBltMasked( layoutRect.Rect().iTl,
-                              bitmap,
-                              TRect( layoutRect.Rect().Size() ),
-                              icon->Mask(),
-                              EFalse );
-            }
-        }
-    
     // The column draw loop
     column = 0;
     FOREVER
@@ -2919,6 +2823,71 @@
 #endif //RD_UI_TRANSITION_EFFECTS_LIST
     }
 
+// -----------------------------------------------------------------------------
+// CColumnListBoxData::DrawMarkingModeIcons
+// -----------------------------------------------------------------------------
+//
+void CColumnListBoxData::DrawMarkingModeIcons( 
+                const TListItemProperties& aProperties,
+                CWindowGc& aGc,
+                TRect& aItemRect ) const
+    {
+    CEikListBox* listbox = static_cast<CEikListBox*>( iExtension->iControl );
+    TRect textRect( aItemRect );
+    
+    if ( listbox->View() && listbox->View()->ItemDrawer() )
+        {
+        if ( listbox->View()->ItemDrawer()->Flags() 
+                & CListItemDrawer::EMarkingModeEnabled &&
+                !aProperties.IsSelectionHidden() &&
+                iExtension->iMarkingIconArray &&
+#ifdef RD_TOUCH2_MARKING
+                iExtension->iMarkingIconArray->Count() == 
+                        KMarkingModeIconArraySize )
+#else
+                iExtension->iMarkingIconArray->Count() == 2 )
+#endif // RD_TOUCH2_MARKING            
+            {
+            textRect.iTl.iX += 
+                AknLayoutScalable_Avkon::list_single_graphic_pane_t1( 
+                        0 ).LayoutLine().il;
+            TAknLayoutRect layoutRect;
+            layoutRect.LayoutRect( aItemRect, 
+                AknLayoutScalable_Avkon::list_single_graphic_pane_g1( 0 ) );
+            
+            // unchecked icon
+            CGulIcon* icon = (*iExtension->iMarkingIconArray)[1];
+            
+            if ( listbox->View()->ItemIsSelected( iExtension->iCurrentRow ) )
+                {
+                icon = (*iExtension->iMarkingIconArray)[0];
+                }
+            CFbsBitmap* bitmap = icon->Bitmap();
+            
+            if ( bitmap )
+                {
+                TSize size( bitmap->SizeInPixels() ); // set size if not already
+                TSize targetSize( layoutRect.Rect().Size() );
+                
+                if ( size.iWidth != targetSize.iWidth &&
+                     size.iHeight != targetSize.iHeight )
+                    {
+                    AknIconUtils::SetSize(
+                        bitmap,
+                        targetSize,
+                        EAspectRatioPreservedAndUnusedSpaceRemoved ); 
+                    }
+
+                aGc.BitBltMasked( layoutRect.Rect().iTl,
+                                  bitmap,
+                                  TRect( layoutRect.Rect().Size() ),
+                                  icon->Mask(),
+                                  EFalse );
+                }   
+            aItemRect = textRect;
+            }
+        }
+    }
 
 void CColumnListBoxData::AddColumnL(TInt aColumn)
 //
--- a/uifw/eikctl/src/EIKMFNE.CPP	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/eikctl/src/EIKMFNE.CPP	Tue May 25 12:58:19 2010 +0300
@@ -4584,6 +4584,15 @@
         {
         HideCursor();
         }
+    
+    if ( iExtension && !aVisible )
+        {
+        TRAP_IGNORE (
+            iExtension->iExtendedInputCapabilities->ReportEventL( 
+                CAknExtendedInputCapabilities::MAknEventObserver::EClosePenInputRequest, 
+                0 );
+            )
+        }
     }
 
 void CEikMfne::SetValidateCallBack( TCallBack aCallBack )
--- a/uifw/ganes/inc/HgConstants.h	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/ganes/inc/HgConstants.h	Tue May 25 12:58:19 2010 +0300
@@ -51,8 +51,7 @@
 const TInt KAknMaxMarqueeLength = 512;
 
 _LIT( KGanesMif, "\\resource\\apps\\ganes.mif" );
-_LIT( KGanesDateString, "%D%M%Y%/0%1%/1%2%/2%3%/3" );
-_LIT( KGanesYearString, "%Y%3" );
-_LIT( KGanesMonthString, "%N%M%2" );
+_LIT( KGanesYearString, "%F%Y" );
+_LIT( KGanesMonthString, "%F%N" );
 
 #endif /* HGCONSTANTS_H_ */
--- a/uifw/ganes/src/HgGrid.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/ganes/src/HgGrid.cpp	Tue May 25 12:58:19 2010 +0300
@@ -316,10 +316,7 @@
 
         iItemsOnScreen *= iRows;
 
-        if( oldCount != iRows )
-            {
-            FitTopItemToView( iCurrentRow*oldCount );        
-            }                
+        FitTopItemToView( iCurrentRow*oldCount );        
         }
     else
         {
@@ -337,10 +334,7 @@
 
         iItemsOnScreen *= iCols;
 
-        if( oldCount != iCols )
-            {
-            FitTopItemToView( iCurrentRow*oldCount );        
-            }        
+        FitTopItemToView( iCurrentRow*oldCount );        
         }        
     }
 
--- a/uifw/ganes/src/HgScroller.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/ganes/src/HgScroller.cpp	Tue May 25 12:58:19 2010 +0300
@@ -50,8 +50,6 @@
 
 #include <featdiscovery.h>
 
-const TInt KIntensity = 100; // 100%
-
 // ============================ MEMBER FUNCTIONS ===============================
 
 // -----------------------------------------------------------------------------
@@ -374,7 +372,8 @@
     iCurrentRow(-1),
     iSelectedIndex(KErrNotFound),
     iScrollBarType( EHgScrollerScrollBar ),
-    iFirstTime(ETrue)
+    iFirstTime(ETrue),
+    iOldWinPos(KErrNotFound)
     {
     // No implementation required
     }
@@ -436,7 +435,7 @@
     }
 
 // -----------------------------------------------------------------------------
-// CHgGrid::Draw()
+// CHgScroller::Draw()
 // Draws the display.
 // -----------------------------------------------------------------------------
 //
@@ -589,7 +588,9 @@
                     && iSelectedIndex != KErrNotFound 
                     && !HasHighlight() 
                     && iActionMenu->InitMenuL() )
+                {
                 iDetector->PointerEventL( aEvent );
+                }
             }
         // Drag
         else if( aEvent.iType == TPointerEvent::EDrag && iPointerDown )
@@ -647,24 +648,6 @@
                     feedback->InstantFeedback( this, ETouchFeedbackSlider, aEvent );
                     }
                 }
-            // Drag
-            else if( aEvent.iType == TPointerEvent::EDrag 
-                    && iScrollbar->IsDragging() )
-                {
-                // Smooth continuous tactile feedback is produced
-                // during thumb dragging. The tactile feedback API 
-                // filters out possible re-startings of the effect.
-                if ( feedback )
-                    {
-                    TTimeIntervalMicroSeconds32 timeout( 300000 );
-                    feedback->StartFeedback( this, 
-                                             ETouchContinuousSlider, 
-                                             &aEvent, 
-                                             KIntensity, // intensity
-                                             timeout );
-                    }
-                }
-            // End drag
             else if( aEvent.iType == TPointerEvent::EButton1Up )
                 {
                 // Stop the continuous tactile feedback that may be playing
@@ -723,6 +706,8 @@
         }
     else if( !iPanning )
         {
+        // to get Handle Selected to be called for sure in single touch
+        iSelectedIndex = KErrNotFound; 
         SetHighlightL();
         }
     MTouchFeedback* feedback = MTouchFeedback::Instance();
@@ -755,8 +740,18 @@
         iPanning = delta >= iPhysics->DragThreshold();
         }
 
+    //if user has dragged onto another item
+    if( !iPanning && GetSelected(iStart) != GetSelected(aEvent.iPosition) )
+        {
+        // after setting iPanning true, longtap is cancelled
+        iPanning = ETrue;    
+        }
+    
     if( prevPanning != iPanning )
+        {
+        iPrev = aEvent.iPosition;
         DrawDeferred(); // to clear highlight
+        }
     
     if(iPanning)
         {
@@ -1271,7 +1266,7 @@
         {
         iItems.ResetAndDestroy();
         iItemCount = 0;
-        iSelectedIndex = -1;
+        iSelectedIndex = KErrNotFound;
         
         if( iManager )
             {
@@ -1494,8 +1489,6 @@
 void CHgScroller::HandleGainingForeground()
     {
     iSelectionMode = ENoSelection;
-    TRect rect( PositionRelativeToScreen(), Size() );
-    TRAP_IGNORE( InitScreenL( rect ); )
     iScrollbar->Reset();
     }
 
@@ -1505,7 +1498,12 @@
 //
 void CHgScroller::HandleLosingForeground()
     {
-    iPointerDown = EFalse;
+    if( iOldWinPos == KErrNotFound 
+            || iOldWinPos == DrawableWindow()->OrdinalPosition() ) 
+        {
+        iPointerDown = EFalse;
+        }
+    
     iPopupText1.Zero();
     iPopupText2.Zero();
     }
@@ -1570,7 +1568,7 @@
     if((index != KErrNotFound || !HasHighlight())
             && iPointerDown )
         {
-        iSelectionToFocusedItem = index == iSelectedIndex;            
+        iSelectionToFocusedItem = (index == iSelectedIndex);            
         iSelectedIndex = index;
         iFocusedIndex = index;
         // Selection has changed to valid item
@@ -1723,6 +1721,9 @@
             {
             delete iIndicatorManager; iIndicatorManager = NULL;
             iIndicatorManager = CHgIndicatorManager::NewL();
+            delete iScrollbar; iScrollbar = NULL;
+            iScrollbar = CHgScrollbar::NewL(*this);
+            InitScrollbarL();
             InitGraphicsL();
             }
         )
@@ -1737,8 +1738,9 @@
     {
     if( iActionMenu )
         {
+        iOldWinPos = DrawableWindow()->OrdinalPosition();
+        iActionMenu->ShowMenuL(aPenEventScreenLocation);
         iPointerDown = EFalse;
-        iActionMenu->ShowMenuL(aPenEventScreenLocation);
         }
     }
 
@@ -1750,12 +1752,26 @@
     {
     TUint ret = 0;
     
-    if(IsFocused()) ret |= MAknCollection::EStateCollectionVisible;
-    
-    if(HasHighlight()) ret |= MAknCollection::EStateHighlightVisible; 
-    
-    if( iFlags & EHgScrollerSelectionMode ) ret |= MAknCollection::EStateMultipleSelection;
-    
+    if( IsFocused() ) 
+        {
+        ret |= MAknCollection::EStateCollectionVisible;
+        }
+    if( HasHighlight() ) 
+        {
+        ret |= MAknCollection::EStateHighlightVisible;
+        } 
+    if( iFlags & EHgScrollerSelectionMode )
+        {
+        ret |= MAknCollection::EStateMultipleSelection;
+        for( TInt i = 0; i < iItems.Count(); ++i )
+            {
+            if( iItems[i]->Flags() & CHgItem::EHgItemFlagMarked )
+                {
+                ret |= MAknCollection::EStateMarkedItems; 
+                break; 
+                }
+            }
+        }
     return ret; 
     }
 
@@ -1765,6 +1781,7 @@
 //     
 void CHgScroller::ItemActionMenuClosed()
     {
+    iOldWinPos = KErrNotFound;
     DrawDeferred();
     }
 
--- a/uifw/ganes/src/HgVgEGL.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/ganes/src/HgVgEGL.cpp	Tue May 25 12:58:19 2010 +0300
@@ -292,7 +292,13 @@
         {
         // create temporary buffer for data
         RBuf8 buf;
-        buf.Create(aRect.Width() * aRect.Height() * 4);
+        TInt bufCreateErr = buf.Create(aRect.Width() * aRect.Height() * 4);
+        if(bufCreateErr != KErrNone) {
+            buf.Close(); //just in case
+            delete bitmap;
+            bitmap = NULL;
+            return NULL;
+        }
         buf.Fill(0xFF);
 
         // read data back from vg (this is sloooww)
@@ -301,18 +307,25 @@
             {
             dataStride = 4 * aRect.Height();
             vgReadPixels((void*)buf.Ptr(), 
-                    dataStride, VG_sARGB_8888, 0, 0, aRect.Height(), aRect.Width());
+                         dataStride, VG_sARGB_8888, 0, 0, aRect.Height(), aRect.Width());
             }
         else
             {
             dataStride = 4 * aRect.Width();
             vgReadPixels((void*)buf.Ptr(), 
-                    dataStride, VG_sARGB_8888, 0, 0, aRect.Width(), aRect.Height());            
+                         dataStride, VG_sARGB_8888, 0, 0, aRect.Width(), aRect.Height());
             }
 
         // because of bug in vg driver we need to swap memory using for loop, because
         // negative datastrides cause crash
-        bitmap->Create(TSize(aRect.Width(), aRect.Height()), EColor16MA);
+        TInt bitmapCreateErr = bitmap->Create(TSize(aRect.Width(), aRect.Height()), EColor16MA);
+        if(bitmapCreateErr != KErrNone) {
+            buf.Close();
+            delete bitmap;
+            bitmap = NULL;
+            return NULL;
+        }
+        
         bitmap->BeginDataAccess();
         if (!aLandscape)
             {
--- a/uifw/ganes/src/HgVgMediaWall.cpp	Tue May 11 16:27:42 2010 +0300
+++ b/uifw/ganes/src/HgVgMediaWall.cpp	Tue May 25 12:58:19 2010 +0300
@@ -387,7 +387,11 @@
             }
         else
             {
-            FillSystemGcWithSkin( );
+            // draw with alpha to make a hole to composition layer
+            SystemGc().SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
+            SystemGc().SetBrushColor(TRgb(0,0,0,0));
+            SystemGc().Clear();
+            DrawOpenVG();
             }
         }
     else
@@ -396,8 +400,7 @@
         SystemGc().SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
         SystemGc().SetBrushColor(TRgb(0,0,0,0));
         SystemGc().Clear();
-        
-        DrawOpenVG();        
+        DrawOpenVG();
         }
     }
 
@@ -484,7 +487,6 @@
     {
     // Not faded and initialized and the drawing is set to be done to WinGc
     if( aEvent.iType == TPointerEvent::EButton1Down 
-            && !( iFlags & EHgVgMediaWallFaded )
             && !( iFlags & EHgVgMediaWallUninitialized )
             && iFlags & EHgVgMediaWallDrawToWindowGC )
         {
@@ -735,6 +737,15 @@
     iKeyRepeats = 0;
     iKeyScrollingState = ENoKeyScrolling;    
     iPointerDown = EFalse;
+    
+    // Not faded and initialized and the drawing is set to be done to WinGc
+    if( !( iFlags & EHgVgMediaWallUninitialized )
+        && iFlags & EHgVgMediaWallDrawToWindowGC )
+        {
+        // Draw with OpenVg to our surface.
+        ClearFlags( EHgVgMediaWallDrawToWindowGC );
+        DrawNow();
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -854,12 +865,14 @@
             {
             if( iSelectedIndex != KErrNotFound && iSelectionObserver )
                 {
-                TRAP_IGNORE( StartOpeningAnimationL(ETrue ); )                
+                TRAP_IGNORE( DoStartOpeningAnimationL( ); )                
                 return EKeyWasConsumed;
                 }
             return EKeyWasNotConsumed;
             }
-        default: 
+        default:
+            TChar key(aKeyEvent.iCode);
+            SearchItem(key);
             break;
         }
     
@@ -1169,13 +1182,13 @@
             iAnimationTimer->Cancel();
             }
     
-        SetFlags( EHgVgMediaWallDrawToWindowGC | EHgVgMediaWallFaded );
+        SetFlags( EHgVgMediaWallDrawToWindowGC  );
         DrawNow();
         }
     
     if( aType == KEikMessageUnfadeWindows )
         {
-        ClearFlags( EHgVgMediaWallDrawToWindowGC | EHgVgMediaWallFaded );
+        ClearFlags( EHgVgMediaWallDrawToWindowGC );
         DrawNow();
         }
 
@@ -2212,6 +2225,10 @@
         TInt y = aIndex % iRowCount;
         StartAnimationToPosition(x, y, ETrue);
         }
+    else if (aIndex >= 0 && aIndex < iItems.Count())
+        {
+        StartAnimationToPosition(aIndex, 0, ETrue);
+        }
     return ETrue;
     }
 
@@ -2587,4 +2604,48 @@
     }
 
 
+TBool CHgVgMediaWall::SearchItem( TChar& aFirstLetter )
+    {
+
+    TInt searchStartIndex = iSelectedIndex+1;
+    
+    // From selected to end
+    for(TInt i = searchStartIndex; i < iItems.Count(); ++i)
+        {
+        if(iItems[i]->Title().Length() > 0 )
+            {
+            TChar compare( iItems[i]->Title()[0] );
+            compare.UpperCase();
+            aFirstLetter.UpperCase();
+            
+            if(compare - aFirstLetter == 0)
+                {
+                iSelectedIndex = i;
+                StartAnimationToPosition(iSelectedIndex, ETrue);
+                return ETrue;
+                }
+            }
+        }
+
+    // From beginning to selected - 1
+    for(TInt i = 0; i < iSelectedIndex; ++i)
+        {
+        if(iItems[i]->Title().Length() > 0 )
+            {
+            TChar compare( iItems[i]->Title()[0] );
+            compare.UpperCase();
+            aFirstLetter.UpperCase();
+            
+            if(compare - aFirstLetter == 0)
+                {
+                iSelectedIndex = i;
+                StartAnimationToPosition(iSelectedIndex, ETrue);
+                return ETrue;
+                }
+            }
+        }
+    
+    return EFalse;
+    }
+
 // End of File