diff -r fcdfafb36fe7 -r aecbbf00d063 uifw/AvKon/src/AknTextSettingPage.cpp --- a/uifw/AvKon/src/AknTextSettingPage.cpp Thu Aug 19 10:11:06 2010 +0300 +++ b/uifw/AvKon/src/AknTextSettingPage.cpp Tue Aug 31 15:28:30 2010 +0300 @@ -34,120 +34,7 @@ #include #include -#include -#include -#include - -/* - * this class is a fixing for bug ESLM-8395MP - * Settingpage will keep watch the RProperty(set by Fep) to hide it self - */ -NONSHARABLE_CLASS( CAknFepSettingDialogStatusWatcher ) : public CActive - { -public: - static CAknFepSettingDialogStatusWatcher* NewL( CAknTextSettingPage* aControl ) - { - CAknFepSettingDialogStatusWatcher* watcher = new (ELeave) CAknFepSettingDialogStatusWatcher( aControl ); - CleanupStack::PushL( watcher ); - watcher->ConstructL(); - CleanupStack::Pop(watcher); - return watcher; - } - - CAknFepSettingDialogStatusWatcher( CAknTextSettingPage* aControl ) - : CActive( EPriorityNormal ) - , iControl( aControl ) - , iAttachSucceed( EFalse ) - { - CActiveScheduler::Add( this ); - } - - ~CAknFepSettingDialogStatusWatcher() - { - StopWatching(); - iFepSettingDialogStatusProperty.Close(); - } - - void StartWatching() - { - if ( !IsActive() && iAttachSucceed ) - { - iFepSettingDialogStatusProperty.Subscribe( iStatus ); - SetActive(); - } - } - - void StopWatching() - { - Cancel(); - } - -private: - - void ConstructL() - { - TInt ret = iFepSettingDialogStatusProperty.Attach( KPSUidAknFep - , KAknFepSettingDialogState - , EOwnerThread ); - iAttachSucceed = ( ret == KErrNone ); - } - - void HandleAknFepSettingDialogStatusChangeNotification() - { - TInt isOpen = 0; - iFepSettingDialogStatusProperty.Get( isOpen ); - if ( !iControl ) - { - return; - } - - if ( isOpen ) - { - iControl->MakeVisible( EFalse ); - } - else - { - iControl->MakeVisible( ETrue ); - } - } - -private: // from CActive - - void RunL() - { - if ( iStatus.Int() == KErrNone ) - { - HandleAknFepSettingDialogStatusChangeNotification(); - StartWatching(); - } - } - - void DoCancel() - { - iFepSettingDialogStatusProperty.Cancel(); - } - -private: - // - // not owned - // - CAknTextSettingPage* iControl; - - RProperty iFepSettingDialogStatusProperty; - - // - // If RProperty attach succeed - // - TBool iAttachSucceed ; - }; - - -// ============================================================================ -// text settingpage private extented class -// -// ============================================================================ -// class CAknTextSettingPageExtension : public CBase , public MEikEdwinObserver { @@ -164,24 +51,16 @@ ~CAknTextSettingPageExtension() { iExtensionOwner = 0; - - if( iAknFepSettingDialogStatusWatcher ) - { - iAknFepSettingDialogStatusWatcher->StopWatching(); - } - delete iAknFepSettingDialogStatusWatcher; } TInt PreviousCba() { return iPreviousCba; }; - void SetPreviousCba(TInt aCbaId) { iPreviousCba = aCbaId; } - TBool PopupState() { return iPopupState; @@ -203,13 +82,10 @@ private: void ConstructL() { - iAknFepSettingDialogStatusWatcher = CAknFepSettingDialogStatusWatcher::NewL( iExtensionOwner ); - iAknFepSettingDialogStatusWatcher->StartWatching(); } CAknTextSettingPageExtension(CAknTextSettingPage* aExtensionOwner ) - : iPreviousCba( 0 ) - , iExtensionOwner( aExtensionOwner ) + : iPreviousCba( 0 ), iExtensionOwner( aExtensionOwner ) , iPopupState( EFalse ) { } @@ -218,11 +94,6 @@ TInt iPreviousCba; CAknTextSettingPage* iExtensionOwner; TBool iPopupState; // when open the popup set popup state flag to 1 - - // - // active object keep watching Fep's property (Owned) - // - CAknFepSettingDialogStatusWatcher* iAknFepSettingDialogStatusWatcher; }; /** @@ -356,7 +227,6 @@ iBackupText = iText.AllocL(); CEikEdwin* editor = TextControl(); - editor->EnableKineticScrollingL( ETrue ); // Inhibit predictive text entry unless allowed by API if ( !(iTextSettingPageFlags & EPredictiveTextEntryPermitted) ) editor->SetAknEditorFlags( EAknEditorFlagNoT9 | editor->AknEdwinFlags() ); @@ -399,14 +269,7 @@ // Construct an appropriate control context for the contained editor areas. // Context produced is owned by CAknSettingPage. SetEditedItemFrameIID( KAknsIIDQsnFrInput, KAknsIIDQsnFrInputCenter ); - - // ScrollBarFrame always exists in this phase - CEikScrollBar* sb = editor->ScrollBarFrame()->VerticalScrollBar(); - if ( sb ) - { - sb->SetMopParent( this ); - sb->MakeVisible( ETrue ); - } + TextControl()->ScrollBarFrame()->VerticalScrollBar()->SetMopParent(this); } /** @@ -560,12 +423,8 @@ for ( TInt i = textLimits.FirstRow(); i <= textLimits.LastRow(); ++i ) { - TInt err = array.Append( AknLayoutScalable_Avkon::set_text_pane_t1_copy1( 0, 0, i ) ); - if ( err != KErrNone) - { - array.Close(); - return; - } + array.Append( + AknLayoutScalable_Avkon::set_text_pane_t1_copy1( 0, 0, i ) ); } AknLayoutUtils::LayoutEdwin( TextControl(),