# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1284490104 -10800 # Node ID 978afdc0236fd5a2bec8dc505b29df1cf58cdea5 # Parent d48ab3b357f1601d11f68feb4de66e41d999d854 Revision: 201033 Kit: 201035 diff -r d48ab3b357f1 -r 978afdc0236f akntouchgesturefw/src/akntouchgesturefwpointerstate.cpp --- a/akntouchgesturefw/src/akntouchgesturefwpointerstate.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/akntouchgesturefw/src/akntouchgesturefwpointerstate.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -142,9 +142,11 @@ // TPoint* CAknTouchGestureFwPointerState::FirstPointerPosition() { - __ASSERT_ALWAYS( iFirstPointerNumber != KInvalidPointerNumber, + __ASSERT_DEBUG( iFirstPointerNumber != KInvalidPointerNumber, User::Invariant() ); - return &iPointerData[ iFirstPointerNumber ].iPosition; + + // If iFirstPointerNumber is invalid, use default index instead. + return &iPointerData[ iFirstPointerNumber == KInvalidPointerNumber ? 0 : iFirstPointerNumber ].iPosition; } @@ -154,9 +156,11 @@ // TPoint* CAknTouchGestureFwPointerState::SecondPointerPosition() { - __ASSERT_ALWAYS( iSecondPointerNumber != KInvalidPointerNumber, + __ASSERT_DEBUG( iSecondPointerNumber != KInvalidPointerNumber, User::Invariant() ); - return &iPointerData[ iSecondPointerNumber ].iPosition; + + // If iSecondPointerNumber is invalid, use default index instead. + return &iPointerData[ iSecondPointerNumber == KInvalidPointerNumber ? 1 : iSecondPointerNumber ].iPosition; } diff -r d48ab3b357f1 -r 978afdc0236f classicui_plat/avkon_localised_texts_api/loc/avkon.loc --- a/classicui_plat/avkon_localised_texts_api/loc/avkon.loc Wed Sep 01 12:16:19 2010 +0100 +++ b/classicui_plat/avkon_localised_texts_api/loc/avkon.loc Tue Sep 14 21:48:24 2010 +0300 @@ -4322,5 +4322,9 @@ //r: TB9.2 #define qtn_handwriting_input_options "Handwriting input settings" + +//d: Text in editor when the editor is empty, it is used to indicate user to tap and input +//r: 9.2 +#define qtn_editors_tap_to_write "Tap to write" // End of File diff -r d48ab3b357f1 -r 978afdc0236f classicui_plat/avkon_settings_api/inc/AvkonInternalCRKeys.h --- a/classicui_plat/avkon_settings_api/inc/AvkonInternalCRKeys.h Wed Sep 01 12:16:19 2010 +0100 +++ b/classicui_plat/avkon_settings_api/inc/AvkonInternalCRKeys.h Tue Sep 14 21:48:24 2010 +0300 @@ -310,6 +310,16 @@ * */ const TUint32 KAknATTSignalIconEnable = 0x00000019; +/** + * Value indicates the feature "tap to write" + * + * Possible values are: + * + * 0: The "tap to write" feature isn't supported + * 1: The "tap to write" feature is supported + * + */ +const TUint32 KAknEdwinTapToWrite = 0x0000001A; const TUid KCRUidLeaveAppsInMemory = { 0x102858F2 }; diff -r d48ab3b357f1 -r 978afdc0236f classicui_plat/extended_editors_api/inc/AknPhoneNumberEditor.h --- a/classicui_plat/extended_editors_api/inc/AknPhoneNumberEditor.h Wed Sep 01 12:16:19 2010 +0100 +++ b/classicui_plat/extended_editors_api/inc/AknPhoneNumberEditor.h Tue Sep 14 21:48:24 2010 +0300 @@ -158,6 +158,9 @@ IMPORT_C TInt GetEditorMode() const; IMPORT_C void ResetEditorToDefaultValues(); + IMPORT_C void SetQwertyAllowed( TBool aQwertyAllowed ); + IMPORT_C void SetHybridModeAllowed( TBool aHybridModeAllowed ); + public: // from CCoeControl /** diff -r d48ab3b357f1 -r 978afdc0236f classicui_plat/special_character_table_api/inc/AknSctDialog.h --- a/classicui_plat/special_character_table_api/inc/AknSctDialog.h Wed Sep 01 12:16:19 2010 +0100 +++ b/classicui_plat/special_character_table_api/inc/AknSctDialog.h Tue Sep 14 21:48:24 2010 +0300 @@ -153,6 +153,14 @@ * Handles pointer events */ IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); + + /** + * Return the initialized character case + * @since Timebox 92 + * + */ + TInt CharacterCase(); + private: // helpers void DoLayout(); private: diff -r d48ab3b357f1 -r 978afdc0236f classicui_plat/special_character_table_api/inc/AknSmileyUtils.h --- a/classicui_plat/special_character_table_api/inc/AknSmileyUtils.h Wed Sep 01 12:16:19 2010 +0100 +++ b/classicui_plat/special_character_table_api/inc/AknSmileyUtils.h Tue Sep 14 21:48:24 2010 +0300 @@ -60,6 +60,11 @@ class CAknSmileyManager : public CBase { public: + static const TText KPlaceHolder = 0xfff0; + static const TText KCompensateChar = 'i'; + static const TUint KSmileyCodeMin = 0xf880; + static const TUint KSmileyCodeMax = 0xf8e4; + IMPORT_C static CAknSmileyManager* NewL(MAknSmileyObserver* aObserver); IMPORT_C ~CAknSmileyManager(); diff -r d48ab3b357f1 -r 978afdc0236f classicui_pub/editors_api/inc/EIKEDWIN.H --- a/classicui_pub/editors_api/inc/EIKEDWIN.H Wed Sep 01 12:16:19 2010 +0100 +++ b/classicui_pub/editors_api/inc/EIKEDWIN.H Tue Sep 14 21:48:24 2010 +0300 @@ -500,6 +500,23 @@ * Record if text view has been actually hidden. */ TBool iTextViewHidden; + /** + * Record the buff of "Tap To write" in current language. + * + * Own. + */ + HBufC* iT2WBuf; + enum TT2WFlag + { + ESplitInputEnabled = 0x00000001, + EFocusOn = 0x00000002, + ERecordCursor = 0x00000004, + ECursorVisible = 0x00000008 + }; + /** + * Record internal status of of "tap to write". + */ + TInt iT2WState; }; public: @@ -2385,7 +2402,15 @@ TBool AdjustCursorPosByMovementL( TCursorPosition::TMovementType aMovement, TBool aSelect ); void HandleSelectionForSmiley( TCursorSelection aSelect ); - + + /** + * 1,If the editor is read only or it is display only "tap to write" is disabled + * 2,If iEdwinExtension->iT2WBuf is NULL, "tap to write" is disabled. + * 3,If Qwerty key borad is opened, "tap to write" is disabled + * 4,If focus off, "tap to write" is disabled + * 5,If split input is enabled, "tap to write" is disabled + */ + TBool IsT2WEnabled() const; protected: /** @@ -2778,6 +2803,12 @@ TRect AdjustedViewRect() const; void SetVKBStatus(); void ScrollViewToCursorLineL(); + + /** + * Scrolls view so that cursor is visible. + */ + void MoveViewToCursorLineL(); + void PerformRecordedOperationL(); void ScrollIfAtTopOrBottomL(); void SetSelectionVisibilityL( TBool aIsVisable ); @@ -2805,6 +2836,41 @@ private: void DrawFirstLineTextL() const; + + /** + * Draws "Tap to write" text to help user to navigate to virtual input + * This text is drawn when the text length of the editor field is zero + * + * @param none + * @return none + */ + void DrawT2WTextL() const; + + /** + * Draws "Tap to write" text if text length is zero + * + * @param aClean. When aClean is set to ETrue and the codition of "tap to write" is False, + * The editor will be redraw and "tap to write" will be clean. + * @return none + */ + void TryToDrawT2W( TBool aClean = EFalse ); + + /** + * Get the align of the first line text + * + * @param none + * @return text align for first line text + */ + CGraphicsContext::TTextAlign AlignForFirstLineText( const TPtr & aReorderedTextPtr ) const; + + /** + * Get the rect of the first line text + * + * @param none + * @return rect of the first line + */ + TRect RectForFirstLineText() const; + CAknEdwinDrawingModifier* AknEdwinDrawingModifier(); TBool EditorSupportsNeutralProtection() const; @@ -3089,6 +3155,28 @@ */ TBool ContentFitsToViewRect() const; + /** + * Set the "Tap To Write" enable or not + * There are two ways to use this API. The first way is: after construct a editor you can + * call EnableT2WL( ETrue ) to enable the feature, then editor will display or hide + * "tap to write" by the internal status of editor. It means that "tap to write" will + * display and hide automatically as internal logical of editor. + * Enable the feature: + * CEikEdwin *editor = new (ELeave) CEikEdwin; + * editor->ConstructL(); + * editor->EnableT2WL( ETrue ); + * + * The second way is application can call EnableT2WL( ETrue/EFalse ) + * to display or hide "tap to write" immediately according to its own logic. + * Display: + * editor->EnableT2WL( ETrue ); + * Hide: + * editor->EnableT2WL( EFalse ); + * + * @param ETure for enable EFalse for not disable. + * @return none. + */ + IMPORT_C void EnableT2WL( TBool aEnable ); protected: /** diff -r d48ab3b357f1 -r 978afdc0236f classicui_pub/lists_api/inc/EIKLBO.H --- a/classicui_pub/lists_api/inc/EIKLBO.H Wed Sep 01 12:16:19 2010 +0100 +++ b/classicui_pub/lists_api/inc/EIKLBO.H Tue Sep 14 21:48:24 2010 +0300 @@ -72,7 +72,9 @@ /** An empty listbox was clicked */ EEventEmptyListClicked, /** An empty area of non-empty listbox was clicked */ - EEventEmptyAreaClicked + EEventEmptyAreaClicked, + /** Item is long tapped in single click enabled list*/ + EEventItemLongTapped }; public: diff -r d48ab3b357f1 -r 978afdc0236f classicui_pub/lists_api/inc/EIKLBX.H --- a/classicui_pub/lists_api/inc/EIKLBX.H Wed Sep 01 12:16:19 2010 +0100 +++ b/classicui_pub/lists_api/inc/EIKLBX.H Tue Sep 14 21:48:24 2010 +0300 @@ -1540,12 +1540,17 @@ IMPORT_C TBool IsHighlightEnabled(); /** - * Turns the marking mode on / off. + * Turns the marking mode on / off. + * States of navipane and softkeys are updated. * * @since S60 5.2 * - * @param aEnable @c ETrue to turn marking mode on - * @c EFalse to turn marking mode off + * @param aEnable @c ETrue to turn marking mode on, + * "marking mode" is shown in navipane, + * "Cancel" is shown in right softkey. + * @c EFalse to turn marking mode off, + * "marking mode" is not shown in navipane, + * "Back" or "exit" is shown in right softkey. */ IMPORT_C void SetMarkingMode( TBool aEnable ); diff -r d48ab3b357f1 -r 978afdc0236f commonuis/CommonUi/inc/DocDefaultHandler.h --- a/commonuis/CommonUi/inc/DocDefaultHandler.h Wed Sep 01 12:16:19 2010 +0100 +++ b/commonuis/CommonUi/inc/DocDefaultHandler.h Tue Sep 14 21:48:24 2010 +0300 @@ -238,6 +238,11 @@ * constant declared in CDocumentHandler.h */ TInt SetSrcFile( const RFile& aFile ); + + /** + * Reset source file. It should be called until source file will not be used. + */ + void ResetSrcFile(); /** * Set destination file name. diff -r d48ab3b357f1 -r 978afdc0236f commonuis/CommonUi/inc/DocHandlerBase.h --- a/commonuis/CommonUi/inc/DocHandlerBase.h Wed Sep 01 12:16:19 2010 +0100 +++ b/commonuis/CommonUi/inc/DocHandlerBase.h Tue Sep 14 21:48:24 2010 +0300 @@ -139,6 +139,11 @@ * constant declared in CDocumentHandler.h */ virtual TInt SetSrcFile( const RFile& aFile ) = 0; + + /** + * Reset source file. It should be called until source file will not be used. + */ + virtual void ResetSrcFile() = 0; /** * Set the root path of the memory where the file should be moved. diff -r d48ab3b357f1 -r 978afdc0236f commonuis/CommonUi/src/DocDefaultHandler.cpp --- a/commonuis/CommonUi/src/DocDefaultHandler.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/commonuis/CommonUi/src/DocDefaultHandler.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -361,7 +361,7 @@ done = ETrue; error = KErrNone; break; - case EDocFileRenameNew: + case EDocFileRenameNew: CheckFileNameExtensionL( iDestFile, iDataType ); break; default: @@ -558,6 +558,15 @@ return SetAndReturnStatus( KErrNone ); } +void CDocDefaultHandler::ResetSrcFile() + { + if( iFileHandleSet ) + { + iFile.Close(); + iFileHandleSet = EFalse; + } + } + // --------------------------------------------------------- // CDocDefaultHandler::SetDestName() // Check the name and set iDestFile. @@ -1660,54 +1669,56 @@ // If we have iSourceFile available, we check first that is file DCF file. // If it is, then we will use dcf file extensions, which override all other extensions. if (iSourceFile.Length() > 0) - { + { TInt ret = EFalse; TBuf<6> ext; - CContent* content = NULL; - if( iFileHandleSet ) - { - content = CContent::NewL( iFile ); - iFile.Close(); - iFileHandleSet = EFalse; - } - else - { - content = CContent::NewL( iSourceFile ); - } - - CleanupStack::PushL(content); - content->GetAttribute( ContentAccess::EIsProtected, ret ); - if ( ret ) - { - content->GetAttribute( EFileType, ret ); + CContent* content = NULL; + TInt err = KErrNone; + if( iFileHandleSet ) + { + TRAP(err, content = CContent::NewL( iFile )); + } + else + { + TRAP(err, content = CContent::NewL( iSourceFile )); + } + + if( err == KErrNone) + { + content->GetAttribute( ContentAccess::EIsProtected, ret ); + if ( ret ) + { + content->GetAttribute( EFileType, ret ); - #ifdef _DEBUG - RDebug::Print( _L("DocumentHandler: CDocDefaultHandler::CheckFileNameExtensionL: GetAttribute called, ret =%d"), ret); - #endif + #ifdef _DEBUG + RDebug::Print( _L("DocumentHandler: CDocDefaultHandler::CheckFileNameExtensionL: GetAttribute called, ret =%d"), ret); + #endif - if ( ret == EOma1Dcf ) - { - // change extension to .dcf - ext.Copy( KOma1DcfExtension ); - ReplaceExtension( aFileName, ext ); - CleanupStack::PopAndDestroy(); // content - return; - } - else if ( ret == EOma2Dcf ) - { - // change extension to .odf if not already .o4a, .o4v or .odf - ext.Copy( KOma2DcfExtension ); - if ( NeedsToReplaceDcf2Extension( aFileName ) ) - { - ReplaceExtension( aFileName, ext ); - } - CleanupStack::PopAndDestroy(); // content - return; - } - } - CleanupStack::PopAndDestroy(); // content - } + if ( ret == EOma1Dcf ) + { + // change extension to .dcf + ext.Copy( KOma1DcfExtension ); + ReplaceExtension( aFileName, ext ); + delete content; + return; + } + else if ( ret == EOma2Dcf ) + { + // change extension to .odf if not already .o4a, .o4v or .odf + ext.Copy( KOma2DcfExtension ); + if ( NeedsToReplaceDcf2Extension( aFileName ) ) + { + ReplaceExtension( aFileName, ext ); + } + delete content; + return; + } + } + delete content; + content = NULL; + } + } //if mime type=oma 2 dcf check extension separately if ( aDataType.Des8().FindF( KOma2DcfContentType ) != KErrNotFound ) diff -r d48ab3b357f1 -r 978afdc0236f commonuis/CommonUi/src/DocumentHandler.cpp --- a/commonuis/CommonUi/src/DocumentHandler.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/commonuis/CommonUi/src/DocumentHandler.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -464,6 +464,8 @@ error = iHandler->CopyHandleL( aFileOld, aAttr ); } + iHandler->ResetSrcFile(); + #ifdef _DEBUG RDebug::Print( _L("DocumentHandler: CDocumentHandler::CopyL: finished with error=%d."), error); #endif diff -r d48ab3b357f1 -r 978afdc0236f commonuis/CommonUi/src/ItemFinder.cpp --- a/commonuis/CommonUi/src/ItemFinder.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/commonuis/CommonUi/src/ItemFinder.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -38,6 +38,7 @@ #include #include +#include // CONSTANTS const TInt KMINTAGLENGTH(5); @@ -143,7 +144,38 @@ void CItemFinderAsyncParser::RunL() { TInt fullLength = Min( iEditor->TextLength(), 0xffff ); - const TDesC& text = iEditor->Text()->Read( 0, fullLength ); + if ( fullLength <= 0 ) + { + return; + } + // If editor enables smiley feature, then smiley string shouldn't be included + // in the search string. Normally a smiley string comprises 3 parts: a smiley code, + // a smiley compensating character to expand smiley icon area, and several invisible + // smiley placeholder characters if the length of the smiley string is longer than 2 + // characters. Since smiley codes are in reserved Unicode range and smiley placeholder + // is 0xfff0, they won't be counted in search string, but the compensating character + // is a valid english character so it needs to be replaced with smiley placeholder + // otherwise it will mess the search string. + HBufC* textBuf( iEditor->Text()->Read( 0, fullLength ).Alloc() ); + if( !textBuf ) + { + return; + } + CleanupStack::PushL( textBuf ); + TPtr text( textBuf->Des() ); + for ( TInt i( 0 ); i < fullLength; i++ ) + { + // Check if current character is a smiley code, if so, the character + // following the code is a smiley compensating character and it needs to + // be replaced. + if ( text[i] >= CAknSmileyManager::KSmileyCodeMin && + text[i] <= CAknSmileyManager::KSmileyCodeMax && + ( i + 1 < fullLength ) ) + { + i++; + text[i] = CAknSmileyManager::KPlaceHolder; + } + } TInt searchAll = CFindItemEngine::EFindItemSearchURLBin |CFindItemEngine::EFindItemSearchMailAddressBin |CFindItemEngine::EFindItemSearchPhoneNumberBin @@ -156,6 +188,7 @@ { iFIE->DoNewSearchL( text, (CFindItemEngine::TFindItemSearchCase)searchAll, iMinDigitsToFind ); } + CleanupStack::PopAndDestroy( textBuf ); delete iMarkedItems; iMarkedItems = 0; iMarkedItems = new ( ELeave ) CArrayPtrFlat( 10 ); diff -r d48ab3b357f1 -r 978afdc0236f commonuisupport/uikon/group/BLD.INF --- a/commonuisupport/uikon/group/BLD.INF Wed Sep 01 12:16:19 2010 +0100 +++ b/commonuisupport/uikon/group/BLD.INF Tue Sep 14 21:48:24 2010 +0300 @@ -20,7 +20,7 @@ */ // include test code -#include "../test/group/BLD.INF" +#include "../test/group/bld.inf" PRJ_EXPORTS // specify the source file followed by its destination here diff -r d48ab3b357f1 -r 978afdc0236f uifw/AknGlobalUI/OldStyleNotif/Src/AknNotifyPlugin.cpp --- a/uifw/AknGlobalUI/OldStyleNotif/Src/AknNotifyPlugin.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/AknGlobalUI/OldStyleNotif/Src/AknNotifyPlugin.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -275,7 +275,7 @@ } if ( sParams.iGprsState != EAknSignalGprsIndicatorBgTypeWipe && - sParams.iGprsState != EAknNaviPaneBackgroundTypeSolid && + sParams.iGprsState != EAknSignalGprsIndicatorBgTypeSolid && sParams.iGprsState >= 0 ) { publisher->SetSignalIcon( sParams.iGprsState ); diff -r d48ab3b357f1 -r 978afdc0236f uifw/AknGlobalUI/akncustcmds/rom/akncustcmds.iby --- a/uifw/AknGlobalUI/akncustcmds/rom/akncustcmds.iby Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/AknGlobalUI/akncustcmds/rom/akncustcmds.iby Tue Sep 14 21:48:24 2010 +0300 @@ -19,6 +19,6 @@ #ifndef AKNCUSTCMDS_IBY #define AKNCUSTCMDS_IBY -file=ABI_DIR\UDEB\akncustcmds.dll SHARED_LIB_DIR\akncustcmds.dll +file=ABI_DIR\BUILD_DIR\akncustcmds.dll SHARED_LIB_DIR\akncustcmds.dll #endif // AKNCUSTCMDS_IBY diff -r d48ab3b357f1 -r 978afdc0236f uifw/AvKon/EABI/AVKONU.DEF --- a/uifw/AvKon/EABI/AVKONU.DEF Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/AvKon/EABI/AVKONU.DEF Tue Sep 14 21:48:24 2010 +0300 @@ -4604,4 +4604,6 @@ _ZThn84_N20CAknPopupSettingPage15ProcessCommandLEi @ 4603 NONAME _ZThn84_N26CAknRadioButtonSettingPage15ProcessCommandLEi @ 4604 NONAME _ZN14CAknSignalPane12ShowUmaIconLEi @ 4605 NONAME + _ZN21CAknPhoneNumberEditor16SetQwertyAllowedEi @ 4606 NONAME + _ZN21CAknPhoneNumberEditor20SetHybridModeAllowedEi @ 4607 NONAME diff -r d48ab3b357f1 -r 978afdc0236f uifw/AvKon/aknphysics/group/bld.inf --- a/uifw/AvKon/aknphysics/group/bld.inf Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/AvKon/aknphysics/group/bld.inf Tue Sep 14 21:48:24 2010 +0300 @@ -26,7 +26,7 @@ // Generic configuration interface for component cenrep settings ../cenrep/20021192.txt /epoc32/winscw/c/private/10202be9/20021192.txt -../cenrep/20021192.txt /epoc32/data/Z/private/10202BE9/20021192.txt +../cenrep/20021192.txt /epoc32/data/z/private/10202BE9/20021192.txt ../conf/s60/aknphysics.confml APP_LAYER_CONFML(aknphysics.confml) ../conf/s60/aknphysics_20021192.crml APP_LAYER_CRML(aknphysics_20021192.crml) diff -r d48ab3b357f1 -r 978afdc0236f uifw/AvKon/bwins/AVKONU.def --- a/uifw/AvKon/bwins/AVKONU.def Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/AvKon/bwins/AVKONU.def Tue Sep 14 21:48:24 2010 +0300 @@ -3470,4 +3470,6 @@ ?ProcessCommandL@CAknRadioButtonSettingPage@@MAEXH@Z @ 3469 NONAME ; void CAknRadioButtonSettingPage::ProcessCommandL(int) ?ProcessCommandL@CAknPopupSettingPage@@MAEXH@Z @ 3470 NONAME ; void CAknPopupSettingPage::ProcessCommandL(int) ?ShowUmaIconL@CAknSignalPane@@QAEXH@Z @ 3471 NONAME ; void CAknSignalPane::ShowUmaIconL(int) + ?SetQwertyAllowed@CAknPhoneNumberEditor@@QAEXH@Z @ 3472 NONAME ; void CAknPhoneNumberEditor::SetQwertyAllowed(int) + ?SetHybridModeAllowed@CAknPhoneNumberEditor@@QAEXH@Z @ 3473 NONAME ; void CAknPhoneNumberEditor::SetHybridModeAllowed(int) diff -r d48ab3b357f1 -r 978afdc0236f uifw/AvKon/conf/s60/avkon.confml Binary file uifw/AvKon/conf/s60/avkon.confml has changed diff -r d48ab3b357f1 -r 978afdc0236f uifw/AvKon/conf/s60/avkon_101F876E.crml Binary file uifw/AvKon/conf/s60/avkon_101F876E.crml has changed diff -r d48ab3b357f1 -r 978afdc0236f uifw/AvKon/group/Iconlist.txt --- a/uifw/AvKon/group/Iconlist.txt Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/AvKon/group/Iconlist.txt Tue Sep 14 21:48:24 2010 +0300 @@ -845,3 +845,22 @@ /c8,8 qgn_indi_signal_uma_multipdp.svg /c8,8 qgn_indi_signal_uma_noservice.svg /c8,8 qgn_indi_signal_uma_suspended.svg + +/1,8 qgn_indi_signal_gprs_tdscdma_attach.svg +/1,8 qgn_indi_signal_gprs_tdscdma_context.svg +/1,8 qgn_indi_signal_gprs_tdscdma_icon.svg +/1,8 qgn_indi_signal_gprs_tdscdma_multipdp.svg +/1,8 qgn_indi_signal_gprs_tdscdma_suspended.svg + +/1,8 qgn_indi_signal_hsdpa_tdscdma_attach.svg +/1,8 qgn_indi_signal_hsdpa_tdscdma_context.svg +/1,8 qgn_indi_signal_hsdpa_tdscdma_icon.svg +/1,8 qgn_indi_signal_hsdpa_tdscdma_multipdp.svg +/1,8 qgn_indi_signal_hsdpa_tdscdma_suspended.svg + +/1,8 qgn_indi_signal_tdscdma_attach.svg +/1,8 qgn_indi_signal_tdscdma_context.svg +/1,8 qgn_indi_signal_tdscdma_icon.svg +/1,8 qgn_indi_signal_tdscdma_multipdp.svg +/1,8 qgn_indi_signal_tdscdma_suspended.svg + diff -r d48ab3b357f1 -r 978afdc0236f uifw/AvKon/group/bld.inf --- a/uifw/AvKon/group/bld.inf Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/AvKon/group/bld.inf Tue Sep 14 21:48:24 2010 +0300 @@ -56,7 +56,7 @@ smiley.mif /epoc32/data/z/resource/apps/smiley.mif smiley.mif /epoc32/release/winscw/udeb/z/resource/apps/smiley.mif smiley.mif /epoc32/release/winscw/urel/z/resource/apps/smiley.mif -smiley.mif /epoc32/release/armv5/udeb/Z/resource/apps/smiley.mif +smiley.mif /epoc32/release/armv5/udeb/z/resource/apps/smiley.mif smiley.mif /epoc32/release/armv5/urel/z/resource/apps/smiley.mif ../srcdata/AvkonSystemSounds/volume_min.wav /epoc32/data/z/resource/avkonsystemsounds/volume_min.wav @@ -137,7 +137,7 @@ OPTION TARGETFILE avkon2mifheader_inst.cpp OPTION GENPATH ../Avkon2MifHeader OPTION MIFFILE avkon2.mif -// OPTION MIFDIR armv5 uses $(EPOCROOT)epoc32/data/Z/resource/apps and for winscw uses $(EPOCROOT)epoc32/release/winscw/$(CFG)/z/resource/apps +// OPTION MIFDIR armv5 uses $(EPOCROOT)epoc32/data/z/resource/apps and for winscw uses $(EPOCROOT)epoc32/release/winscw/$(CFG)/z/resource/apps OPTION DLLNAME Avkon2MifHeader OPTION DLLUID 0x102827CF END diff -r d48ab3b357f1 -r 978afdc0236f uifw/AvKon/inc/AknSignalIcon.h --- a/uifw/AvKon/inc/AknSignalIcon.h Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/AvKon/inc/AknSignalIcon.h Tue Sep 14 21:48:24 2010 +0300 @@ -188,6 +188,16 @@ */ void LoadATTIconL( TInt aIconState, TInt aIconColorIndex ); + + /** + * Loads the signal icon for TD phone to be displayed. + * + * @param aIconState ID of the signal state, @see signal indicator + * states in @c avkon.hrh. + * @param aIconColorIndex Color index of the icon. + */ + void LoadTDIconL(TInt aIconState, TInt aIconColorIndex); + private: /** @@ -219,6 +229,9 @@ /** Flag defining whether or not the ATT is enable. */ TInt iATTEnable; + + /** Flag defining whether or not the TD is enable. */ + TBool iTDEnable; }; #endif // AKNSIGNALICON_H diff -r d48ab3b357f1 -r 978afdc0236f uifw/AvKon/inc/aknindicatorpopupcontent.h --- a/uifw/AvKon/inc/aknindicatorpopupcontent.h Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/AvKon/inc/aknindicatorpopupcontent.h Tue Sep 14 21:48:24 2010 +0300 @@ -335,6 +335,11 @@ * Current rect of press down effect */ TRect iPressedDownRect; + + /** + * Ordinal upon button down + */ + TInt iOrdinal; }; #endif // C_AKNINDICATORPOPUPCONTENT_H diff -r d48ab3b357f1 -r 978afdc0236f uifw/AvKon/src/AknAdaptiveSearch.cpp --- a/uifw/AvKon/src/AknAdaptiveSearch.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/AvKon/src/AknAdaptiveSearch.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -245,9 +245,10 @@ { //hide grid HideAdaptiveSearchGridL(); - iSearchField->MakeVisible( ETrue ); - iSearchField->SetFocus( ETrue ); - + if( iSearchField->IsVisible() ) + { + iSearchField->SetFocus( ETrue ); + } } else if( aCommand == CAknAdaptiveSearchGrid::EDeleteLastCharPressed ) { diff -r d48ab3b357f1 -r 978afdc0236f uifw/AvKon/src/AknPhoneNumberEditor.cpp --- a/uifw/AvKon/src/AknPhoneNumberEditor.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/AvKon/src/AknPhoneNumberEditor.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -32,6 +32,10 @@ #include #include +#include +#include // for checking qwerty availability + + static const TInt KPlainTextPos = 0; typedef CArrayFixFlat CFormatArray; @@ -52,6 +56,8 @@ TInt iPointPos; CAknCcpuSupport* iCcpuSupport; HBufC* iPasteText; + TBool iQwertyAllowed; + TBool iHybridModeAllowed; }; CAknPhoneNumberEditorExtension::CAknPhoneNumberEditorExtension() @@ -435,16 +441,29 @@ EXPORT_C TCoeInputCapabilities CAknPhoneNumberEditor::InputCapabilities() const { - if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) ) + if ( iExtension->iQwertyAllowed ) { TCoeInputCapabilities inputCaps( TCoeInputCapabilities::EWesternAlphabetic | TCoeInputCapabilities::ENavigation, const_cast( this ), NULL ); + //iExtension->iExtendedInputCapabilities->SetEditorType( + // CAknExtendedInputCapabilities::EPhoneNumberEditor ); + TInt qwertyActive = 0; + RProperty::Get( KCRUidAvkon, KAknQwertyInputModeActive, qwertyActive ); + if ( qwertyActive && iExtension->iHybridModeAllowed ) + { + iExtension->iExtendedInputCapabilities->SetEditorType( + CAknExtendedInputCapabilities::EHybridAlphaNumericEditor ); + } + else + { + iExtension->iExtendedInputCapabilities->SetEditorType( + CAknExtendedInputCapabilities::EPhoneNumberEditor ); + } + // Voip-enabled phone editor wants to use edit-key style hash key mode selection. - iExtension->iExtendedInputCapabilities->SetEditorType( - CAknExtendedInputCapabilities::EPhoneNumberEditor ); iExtension->iExtendedInputCapabilities->SetCapabilities( CAknExtendedInputCapabilities::EForceHashKeySelectionStatusFlagOff | CAknExtendedInputCapabilities::EForceEditSubmenuStatusFlagOff ); @@ -772,7 +791,7 @@ { TInt value( EAknEditorNumericInputMode ); // Return value. - if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) ) + if ( iExtension->iQwertyAllowed ) { CAknEdwinState* fepState = ( CAknEdwinState* )iFepState; @@ -876,9 +895,32 @@ fepState->SetSpecialCharacterTableResourceId( 0 ); fepState->SetNumericKeymap( EAknEditorStandardNumberModeKeymap ); + iExtension->iQwertyAllowed = EFalse; + iExtension->iHybridModeAllowed = EFalse; + DrawChanges(); } + +// -------------------------------------------------------------------------- +// CAknPhoneNumberEditor::SetQwertyAllowed +// -------------------------------------------------------------------------- +// +EXPORT_C void CAknPhoneNumberEditor::SetQwertyAllowed( TBool aQwertyAllowed ) + { + iExtension->iQwertyAllowed = aQwertyAllowed; + } + +// -------------------------------------------------------------------------- +// CAknPhoneNumberEditor::SetHybridModeAllowed +// -------------------------------------------------------------------------- +// +EXPORT_C void CAknPhoneNumberEditor::SetHybridModeAllowed( TBool aHybridModeAllowed ) + { + iExtension->iHybridModeAllowed = aHybridModeAllowed; + } + + // -------------------------------------------------------------------------- // CAknPhoneNumberEditor::HandlePointerEventL // -------------------------------------------------------------------------- diff -r d48ab3b357f1 -r 978afdc0236f uifw/AvKon/src/AknRadioButtonSettingPage.cpp --- a/uifw/AvKon/src/AknRadioButtonSettingPage.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/AvKon/src/AknRadioButtonSettingPage.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -181,7 +181,7 @@ { iExtension = new (ELeave) CAknRadioButtonSettingPageExtension( *this ); } - + iExtension->iIsValidSelection = ( iCurrentSelectionIndex != -1 ); // Range should be within the valid indices, or -1: // So valid range is >= -1 and also < Count. __ASSERT_ALWAYS( iCurrentSelectionIndex >= -1, Panic( EAknPanicRadioButtonSettingPageIndexOutOfRange) ); @@ -315,7 +315,8 @@ { iCurrentSelectionIndex = ListBoxControl()->CurrentItemIndex(); } - else + else if( iCurrentSelectionIndex >= 0 && + iCurrentSelectionIndex < ListBoxControl()->Model()->NumberOfItems() ) { ListBoxControl()->SetCurrentItemIndex ( iCurrentSelectionIndex ); } diff -r d48ab3b357f1 -r 978afdc0236f uifw/AvKon/src/AknSctDialog.cpp --- a/uifw/AvKon/src/AknSctDialog.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/AvKon/src/AknSctDialog.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -56,6 +56,7 @@ #include "aknsctfocushandler.h" #include +#include // // class CAknCharMapDialog @@ -91,8 +92,6 @@ private: CAknCharMapDialogExtension(CAknCharMapDialog* aCaller); void ConstructL(); - static TInt QwertyModeChangeNotification(TAny* aObj); - void HandleQwertyModeChangeNotification(); public: // New method void SetCharacterCaseIfRequiredL(); @@ -106,31 +105,7 @@ TInt iShowAnotherTableCharCase; TAknCharMapPictoMode iPictoMode; TAknCharMapEmotionMode iEmotionMode; - -private: - NONSHARABLE_CLASS(CSubscriber) : public CActive - { - public: - CSubscriber(TCallBack aCallBack, RProperty& aProperty); - ~CSubscriber(); - - public: // New functions - void SubscribeL(); - void StopSubscribe(); - - private: // from CActive - void RunL(); - void DoCancel(); - - private: - TCallBack iCallBack; - RProperty& iProperty; - }; - -private: - CSubscriber* iQwertyModeStatusSubscriber; - RProperty iQwertyModeStatusProperty; - TInt iOldCharCase; + TBool iFirstOrientation; }; // ----------------------------------------------------------------------------- @@ -153,13 +128,6 @@ // CAknCharMapDialogExtension::~CAknCharMapDialogExtension() { - // Stop subscribe in PubSub - if (iQwertyModeStatusSubscriber) - { - iQwertyModeStatusSubscriber->StopSubscribe(); - } - iQwertyModeStatusProperty.Close(); - delete iQwertyModeStatusSubscriber; } // ----------------------------------------------------------------------------- @@ -185,150 +153,45 @@ // void CAknCharMapDialogExtension::ConstructL() { - // Start also listening qwerty mode status. - User::LeaveIfError(iQwertyModeStatusProperty.Attach(KCRUidAvkon, - KAknQwertyInputModeActive)); - - iQwertyModeStatusSubscriber = new (ELeave) CSubscriber( - TCallBack(QwertyModeChangeNotification, this), iQwertyModeStatusProperty); - - iQwertyModeStatusSubscriber->SubscribeL(); - - iOldCharCase=-1; // no default character case at beginning + iFirstOrientation = Layout_Meta_Data::IsLandscapeOrientation(); } -TInt CAknCharMapDialogExtension::QwertyModeChangeNotification(TAny* aObj) - { - if (aObj != NULL) - { - static_cast(aObj)->HandleQwertyModeChangeNotification(); - return KErrNone; - } - else - { - return KErrArgument; - } - } - +// ----------------------------------------------------------------------------- +// CAknCharMapDialogExtension::SetCharacterCaseIfRequiredL +// +// change the character case, when orientation changed if any. +// ----------------------------------------------------------------------------- +// void CAknCharMapDialogExtension::SetCharacterCaseIfRequiredL() { - TInt value = 0; - iQwertyModeStatusProperty.Get(value); - iQwertyMode = value; - + TBool landscape = Layout_Meta_Data::IsLandscapeOrientation(); + TInt charCase = EAknSCTLowerCase; CAknCharMap* charmapControl = - STATIC_CAST(CAknCharMap*, iCaller->Control(EAknSCTQueryContentId)); + STATIC_CAST( CAknCharMap*, iCaller->Control( EAknSCTQueryContentId ) ); - if ( (iQwertyMode) == (charmapControl->CharacterCase() == EAknSCTQwerty) ) - { - // No change for Qwerty mode - return; - } - - if (iQwertyMode) + // Set character case logic changed from Timebox 92 PS2, if Orientation is Landscape + // the case will be QWERTY, otherwise it will be LOWER. However, it is possible for + // Landscape launches LOWER case, or Poratrait does QWERTY at the first time launched, + // in this case, we need to store the first SCT launched case. + if ( landscape ) { iFlags |= ECharMapDialogItemLockNumericKeys; - - iOldCharCase=charmapControl->CharacterCase(); - charmapControl->SetCharacterCaseL(EAknSCTQwerty); + charCase = EAknSCTQwerty; } else { - iFlags &= (~ECharMapDialogItemLockNumericKeys); - if (iOldCharCase!=-1) - { - charmapControl->SetCharacterCaseL(iOldCharCase); - } - else - { - charmapControl->SetCharacterCaseL(EAknSCTLowerCase); - iOldCharCase = EAknSCTLowerCase; - } - } - //charmapControl->DrawNow(); - } - -void CAknCharMapDialogExtension::HandleQwertyModeChangeNotification() - { - TInt value = 0; - iQwertyModeStatusProperty.Get(value); - iQwertyMode = value; - - CAknCharMap* charmapControl = - STATIC_CAST(CAknCharMap*, iCaller->Control(EAknSCTQueryContentId)); - - if ( (iQwertyMode) == (charmapControl->CharacterCase() == EAknSCTQwerty) ) - { - // No change for Qwerty mode - return; + iFlags &= ( ~ECharMapDialogItemLockNumericKeys ); + charCase = EAknSCTLowerCase; } - if (iQwertyMode) - { - iFlags |= ECharMapDialogItemLockNumericKeys; - - iOldCharCase=charmapControl->CharacterCase(); - TRAP_IGNORE( charmapControl->SetCharacterCaseL(EAknSCTQwerty) ); - } - else - { - iFlags &= ~ECharMapDialogItemLockNumericKeys; - if (iOldCharCase!=-1) - { - TRAP_IGNORE( charmapControl->SetCharacterCaseL(iOldCharCase) ); - } - else - { - TRAP_IGNORE( charmapControl->SetCharacterCaseL(EAknSCTLowerCase) ); - iOldCharCase = EAknSCTLowerCase; - } - } - - // Reset focus. - charmapControl->TakeFocus(); - - // Draw new characters. - charmapControl->DrawNow(); - } + if ( landscape == iFirstOrientation ) + { + // Note, it should be equal to first char case once it return + // to the first orientation + charCase = iCaller->CharacterCase(); + } + charmapControl->SetCharacterCaseL( charCase ); -// CAknCharMapDialogExtension::CSubscriber -CAknCharMapDialogExtension::CSubscriber::CSubscriber(TCallBack aCallBack, RProperty& aProperty) - : CActive(EPriorityNormal), iCallBack(aCallBack), iProperty(aProperty) - { - CActiveScheduler::Add(this); - } - -CAknCharMapDialogExtension::CSubscriber::~CSubscriber() - { - Cancel(); - } - -void CAknCharMapDialogExtension::CSubscriber::SubscribeL() - { - if (!IsActive()) - { - iProperty.Subscribe(iStatus); - SetActive(); - } - } - -void CAknCharMapDialogExtension::CSubscriber::StopSubscribe() - { - Cancel(); - } - -void CAknCharMapDialogExtension::CSubscriber::RunL() - { - if (iStatus.Int() == KErrNone) - { - iCallBack.CallBack(); - SubscribeL(); - } - } - -void CAknCharMapDialogExtension::CSubscriber::DoCancel() - { - iProperty.Cancel(); } // CAknCharMapDialog @@ -497,7 +360,6 @@ charmapControl->SetCaseTableL(caseTable); caseTable.Close(); - // charmapControl->SetBuffer(*iSpecialChars); charmapControl->SetCharacterCaseL(iCharCase); @@ -537,7 +399,12 @@ DrawableWindow()->SetOrdinalPosition(0,ECoeWinPriorityAlwaysAtFront); // ButtonGroupContainer().ButtonGroup()->AsControl()->DrawableWindow()->SetOrdinalPosition(0,ECoeWinPriorityAlwaysAtFront); - CEikDialog::Extension()->SetPriority(CActive::EPriorityStandard); + // Boost its priority in GlobalPopupPriorityController queue, because its window priority is higher than zero, + // otherwise, GlobalPopupPriorityController will dim it wrongly. + // This code only effects for aknnfysrv.exe, since input server doesn't have GlobalPopupPriorityController instance. + AknGlobalPopupPriorityController::SetPopupPriorityL(*this, 1); + + CEikDialog::Extension()->SetPriority(CActive::EPriorityStandard); } EXPORT_C void CAknCharMapDialog::SetSizeAndPosition( const TSize& aSize ) @@ -1126,5 +993,8 @@ } } - +TInt CAknCharMapDialog::CharacterCase() + { + return iCharCase & KCharMapCaseMask; + } // End of File diff -r d48ab3b357f1 -r 978afdc0236f uifw/AvKon/src/AknServerApp.cpp --- a/uifw/AvKon/src/AknServerApp.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/AvKon/src/AknServerApp.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -21,7 +21,7 @@ #include #include -#include +#include #include "AknOpenFileServiceImpl.h" #include "AknNullServiceImpl.h" #include "AknLaunchAppServiceImpl.h" diff -r d48ab3b357f1 -r 978afdc0236f uifw/AvKon/src/AknSignalIcon.cpp --- a/uifw/AvKon/src/AknSignalIcon.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/AvKon/src/AknSignalIcon.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -252,6 +253,274 @@ iIconState = aIconState; iColorIndex = aIconColorIndex; } + +void CAknSignalIcon::LoadTDIconL(TInt aIconState, TInt aIconColorIndex) + { + + MAknsSkinInstance* skin = AknsUtils::SkinInstance(); + CFbsBitmap* bitmap = NULL; + CFbsBitmap* mask = NULL; + + switch (aIconState) + { + // Old legacy GPRS icons. + case EAknSignalGprsIndicatorOff: + case EAknSignalGprsIndicatorAvailable: // fallthrough + AknsUtils::CreateColorIconL(skin, KAknsIIDQgnPropSignalIcon, + KAknsIIDQsnIconColors, aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_gprs_tdscdma_icon, + EMbmAvkonQgn_indi_signal_gprs_tdscdma_icon_mask, KRgbGray ); + break; + case EAknSignalGprsIndicatorAttached: + case EAknSignalGprsIndicatorEstablishingContext: // fallthrough + AknsUtils::CreateColorIconL(skin, + KAknsIIDQgnIndiSignalGprsContext, KAknsIIDQsnIconColors, + aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_gprs_tdscdma_attach, + EMbmAvkonQgn_indi_signal_gprs_tdscdma_attach_mask, KRgbGray ); + break; + case EAknSignalGprsIndicatorContext: + AknsUtils::CreateColorIconL(skin, + KAknsIIDQgnIndiSignalGprsContext, KAknsIIDQsnIconColors, + aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_gprs_tdscdma_context, + EMbmAvkonQgn_indi_signal_gprs_tdscdma_context_mask, KRgbGray ); + break; + case EAknSignalGprsIndicatorSuspended: + AknsUtils::CreateColorIconL(skin, + KAknsIIDQgnIndiSignalGprsSuspended, + KAknsIIDQsnIconColors, aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_gprs_tdscdma_suspended, + EMbmAvkonQgn_indi_signal_gprs_tdscdma_suspended_mask, KRgbGray ); + break; + case EAknSignalGprsIndicatorMultipdp: + AknsUtils::CreateColorIconL(skin, + KAknsIIDQgnIndiSignalGprsMultipdp, KAknsIIDQsnIconColors, + aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_gprs_tdscdma_multipdp, + EMbmAvkonQgn_indi_signal_gprs_tdscdma_multipdp_mask, KRgbGray ); + break; + + // Create common packet data indicator bitmaps. + case EAknSignalCommonPacketDataIndicatorOff: + case EAknSignalCommonPacketDataIndicatorAvailable: // fallthrough + AknsUtils::CreateColorIconL(skin, KAknsIIDQgnPropSignalIcon, + KAknsIIDQsnIconColors, aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_gprs_tdscdma_icon, + EMbmAvkonQgn_indi_signal_gprs_tdscdma_icon_mask, KRgbGray ); + break; + case EAknSignalCommonPacketDataIndicatorAttached: + case EAknSignalCommonPacketDataIndicatorEstablishingContext: // fallthrough + AknsUtils::CreateColorIconL(skin, KAknsIIDQgnIndiSignalPdAttach, + KAknsIIDQsnIconColors, aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_gprs_tdscdma_attach, + EMbmAvkonQgn_indi_signal_gprs_tdscdma_attach_mask, KRgbGray ); + break; + case EAknSignalCommonPacketDataIndicatorContext: + AknsUtils::CreateColorIconL(skin, KAknsIIDQgnIndiSignalPdContext, + KAknsIIDQsnIconColors, aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_gprs_tdscdma_context, + EMbmAvkonQgn_indi_signal_gprs_tdscdma_context_mask, KRgbGray ); + break; + case EAknSignalCommonPacketDataIndicatorSuspended: + AknsUtils::CreateColorIconL(skin, + KAknsIIDQgnIndiSignalPdSuspended, KAknsIIDQsnIconColors, + aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_gprs_tdscdma_suspended, + EMbmAvkonQgn_indi_signal_gprs_tdscdma_suspended_mask, KRgbGray ); + break; + case EAknSignalCommonPacketDataIndicatorMultipdp: + AknsUtils::CreateColorIconL(skin, + KAknsIIDQgnIndiSignalPdMultipdp, KAknsIIDQsnIconColors, + aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_gprs_tdscdma_multipdp, + EMbmAvkonQgn_indi_signal_gprs_tdscdma_multipdp_mask, KRgbGray ); + break; + + // Create EDGE packet data indicator bitmaps. + case EAknSignalEdgeIndicatorOff: + AknsUtils::CreateColorIconL(skin, KAknsIIDQgnPropSignalIcon, + KAknsIIDQsnIconColors, aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_egprs_icon, + EMbmAvkonQgn_indi_signal_egprs_icon_mask, KRgbGray ); + break; + case EAknSignalEdgeIndicatorAvailable: + AknsUtils::CreateColorIconL(skin, KAknsIIDQgnPropSignalIcon, + KAknsIIDQsnIconColors, aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_egprs_icon, + EMbmAvkonQgn_indi_signal_egprs_icon_mask, KRgbGray ); + break; + case EAknSignalEdgeIndicatorAttached: + case EAknSignalEdgeIndicatorEstablishingContext: // fallthrough + AknsUtils::CreateColorIconL(skin, + KAknsIIDQgnIndiSignalEgprsAttach, KAknsIIDQsnIconColors, + aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_egprs_attach, + EMbmAvkonQgn_indi_signal_egprs_attach_mask, KRgbGray ); + break; + case EAknSignalEdgeIndicatorContext: + AknsUtils::CreateColorIconL(skin, + KAknsIIDQgnIndiSignalEgprsContext, KAknsIIDQsnIconColors, + aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_egprs_context, + EMbmAvkonQgn_indi_signal_egprs_context_mask, KRgbGray ); + break; + case EAknSignalEdgeIndicatorSuspended: + AknsUtils::CreateColorIconL(skin, + KAknsIIDQgnIndiSignalEgprsSuspended, + KAknsIIDQsnIconColors, aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_egprs_suspended, + EMbmAvkonQgn_indi_signal_egprs_suspended_mask, KRgbGray ); + break; + case EAknSignalEdgeIndicatorMultipdp: + AknsUtils::CreateColorIconL(skin, + KAknsIIDQgnIndiSignalEgprsMultipdp, + KAknsIIDQsnIconColors, aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_egprs_multipdp, + EMbmAvkonQgn_indi_signal_egprs_multipdp_mask, KRgbGray ); + break; + + // Create WCDMA indicator bitmaps. + case EAknSignalWcdmaIndicatorOff: + AknsUtils::CreateColorIconL(skin, KAknsIIDQgnPropSignalIcon, + KAknsIIDQsnIconColors, aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_tdscdma_icon, + EMbmAvkonQgn_indi_signal_tdscdma_icon_mask, KRgbGray ); + break; + case EAknSignalWcdmaIndicatorAvailable: + AknsUtils::CreateColorIconL(skin, KAknsIIDQgnIndiSignalWcdmaIcon, + KAknsIIDQsnIconColors, aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_tdscdma_icon, + EMbmAvkonQgn_indi_signal_tdscdma_icon_mask, KRgbGray ); + break; + case EAknSignalWcdmaIndicatorAttached: + case EAknSignalWcdmaIndicatorEstablishingContext: // fallthrough + AknsUtils::CreateColorIconL(skin, + KAknsIIDQgnIndiSignalWcdmaAttach, KAknsIIDQsnIconColors, + aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_tdscdma_attach, + EMbmAvkonQgn_indi_signal_tdscdma_attach_mask, KRgbGray ); + break; + case EAknSignalWcdmaIndicatorContext: + AknsUtils::CreateColorIconL(skin, + KAknsIIDQgnIndiSignalWcdmaContext, KAknsIIDQsnIconColors, + aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_tdscdma_context, + EMbmAvkonQgn_indi_signal_tdscdma_context_mask, KRgbGray ); + break; + case EAknSignalWcdmaIndicatorMultipdp: + AknsUtils::CreateColorIconL(skin, + KAknsIIDQgnIndiSignalWcdmaMultipdp, + KAknsIIDQsnIconColors, aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_tdscdma_multipdp, + EMbmAvkonQgn_indi_signal_tdscdma_multipdp_mask, KRgbGray ); + break; + case EAknSignalWcdmaIndicatorSuspended: + AknsUtils::CreateColorIconL(skin, + KAknsIIDQgnIndiSignalWcdmaSuspended, + KAknsIIDQsnIconColors, aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_tdscdma_suspended, + EMbmAvkonQgn_indi_signal_tdscdma_suspended_mask, KRgbGray ); + break; + + // Create HSDPA indicator bitmaps. + case EAknSignalHsdpaIndicatorOff: + AknsUtils::CreateColorIconL(skin, KAknsIIDQgnPropSignalIcon, + KAknsIIDQsnIconColors, aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_hsdpa_tdscdma_icon, + EMbmAvkonQgn_indi_signal_hsdpa_tdscdma_icon_mask, KRgbGray ); + break; + case EAknSignalHsdpaIndicatorAvailable: + AknsUtils::CreateColorIconL(skin, KAknsIIDQgnIndiSignalHsdpaIcon, + KAknsIIDQsnIconColors, aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_hsdpa_tdscdma_icon, + EMbmAvkonQgn_indi_signal_hsdpa_tdscdma_icon_mask, KRgbGray ); + break; + case EAknSignalHsdpaIndicatorAttached: + case EAknSignalHsdpaIndicatorEstablishingContext: // fallthrough + AknsUtils::CreateColorIconL(skin, + KAknsIIDQgnIndiSignalHsdpaAttach, KAknsIIDQsnIconColors, + aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_hsdpa_tdscdma_attach, + EMbmAvkonQgn_indi_signal_hsdpa_tdscdma_attach_mask, KRgbGray ); + break; + case EAknSignalHsdpaIndicatorContext: + AknsUtils::CreateColorIconL(skin, + KAknsIIDQgnIndiSignalHsdpaContext, KAknsIIDQsnIconColors, + aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_hsdpa_tdscdma_context, + EMbmAvkonQgn_indi_signal_hsdpa_tdscdma_context_mask, KRgbGray ); + break; + case EAknSignalHsdpaIndicatorSuspended: + AknsUtils::CreateColorIconL(skin, + KAknsIIDQgnIndiSignalHsdpaSuspended, + KAknsIIDQsnIconColors, aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_hsdpa_tdscdma_suspended, + EMbmAvkonQgn_indi_signal_hsdpa_tdscdma_suspended_mask, KRgbGray ); + break; + case EAknSignalHsdpaIndicatorMultipdp: + AknsUtils::CreateColorIconL(skin, + KAknsIIDQgnIndiSignalHsdpaMultipdp, + KAknsIIDQsnIconColors, aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_signal_hsdpa_tdscdma_multipdp, + EMbmAvkonQgn_indi_signal_hsdpa_tdscdma_multipdp_mask, KRgbGray ); + break; + + // Default in all situations + default: + AknsUtils::CreateColorIconL(skin, KAknsIIDQgnPropSignalIcon, + KAknsIIDQsnIconColors, aIconColorIndex, bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_prop_signal_icon, + EMbmAvkonQgn_prop_signal_icon_mask, KRgbGray ); + } + + +if ( bitmap ) + { + delete iSignalIcon; + iSignalIcon = bitmap; + AknIconUtils::SetSize( iSignalIcon, Size() ); + } + +if ( mask ) + { + delete iSignalIconMask; + iSignalIconMask = mask; + } + +iIconState = aIconState; +iColorIndex = aIconColorIndex; +} + // --------------------------------------------------------------------------- // CAknSignalIcon::LoadIconL // --------------------------------------------------------------------------- @@ -297,6 +566,11 @@ LoadATTIconL( aIconState, aIconColorIndex ); return; } + if ( iTDEnable ) + { + LoadTDIconL( aIconState, aIconColorIndex ); + return; + } switch( aIconState ) { // Old legacy GPRS icons. @@ -842,6 +1116,8 @@ } delete repo; repo = NULL; + + iTDEnable = FeatureManager::FeatureSupported( KFeatureIdFfTdScdma ); } // End of File diff -r d48ab3b357f1 -r 978afdc0236f uifw/AvKon/src/aknindicatorpopupcontent.cpp --- a/uifw/AvKon/src/aknindicatorpopupcontent.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/AvKon/src/aknindicatorpopupcontent.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -605,6 +605,7 @@ switch ( aPointerEvent.iType ) { case TPointerEvent::EButton1Down: + iOrdinal = DrawableWindow()->OrdinalPosition(); // Set flag that down was inside the popup. iFlags |= EAknIndicatorPopupContentButton1Down; iPreviousPressedDownItem = NULL; @@ -676,6 +677,12 @@ iFlags &= ( ~EAknIndicatorPopupContentButton1Down ); iEnablePressedDownState = EFalse; + if ( iOrdinal != DrawableWindow()->OrdinalPosition() ) + { + Window().Invalidate( iPressedDownRect ); + break; + } + if ( iBatteryPlugin && iBatteryArea.Contains( aPointerEvent.iPosition ) ) { diff -r d48ab3b357f1 -r 978afdc0236f uifw/AvKon/src/aknmessagequerycontrol.cpp --- a/uifw/AvKon/src/aknmessagequerycontrol.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/AvKon/src/aknmessagequerycontrol.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -208,9 +208,7 @@ **/ AknLayoutUtils::LayoutEdwin( iEdwin, listPopupInfoPane.Rect(), TAknTextComponentLayout::Multiline(textComponentLayoutArray), EAknsCIQsnTextColorsCG19 ); - iEdwin->SetSuppressFormatting(ETrue); iEdwin->SetRect( listPopupInfoPane.Rect() ); - iEdwin->SetSuppressFormatting(EFalse); textComponentLayoutArray.Close(); } diff -r d48ab3b357f1 -r 978afdc0236f uifw/AvKon/src/aknsfld.cpp --- a/uifw/AvKon/src/aknsfld.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/AvKon/src/aknsfld.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -896,7 +896,11 @@ { iEditor->SetFocus( aVisible ); } - } + } + if( iAdaptiveSearch && !aVisible ) + { + TRAP_IGNORE( iAdaptiveSearch->HideAdaptiveSearchGridL() ); + } _AKNTRACE_FUNC_EXIT; } diff -r d48ab3b357f1 -r 978afdc0236f uifw/AvKon/src/aknutils.cpp --- a/uifw/AvKon/src/aknutils.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/AvKon/src/aknutils.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -3574,6 +3574,16 @@ aRect = rect.Rect(); return ETrue; } + //add below code for vga_touch + else if ( screenRect.iBr.iX == 640 && screenRect.iBr.iY == 480 ) + { + TInt variety = 13; + + rect.LayoutRect( screenRect, + AknLayoutScalable_Avkon::main_pane( variety ) ); + aRect = rect.Rect(); + return ETrue; + } else { return LayoutMetricsRect( EMainPane, aRect ); diff -r d48ab3b357f1 -r 978afdc0236f uifw/AvKon/srcdata/avkon.rss --- a/uifw/AvKon/srcdata/avkon.rss Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/AvKon/srcdata/avkon.rss Tue Sep 14 21:48:24 2010 +0300 @@ -10373,5 +10373,11 @@ } }; } + +// the buffer of "tap to write" +RESOURCE TBUF r_avkon_tap_to_write + { + buf = qtn_editors_tap_to_write; + } // End of File diff -r d48ab3b357f1 -r 978afdc0236f uifw/EikStd/EABI/EIKCOCTLU.DEF --- a/uifw/EikStd/EABI/EIKCOCTLU.DEF Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/EikStd/EABI/EIKCOCTLU.DEF Tue Sep 14 21:48:24 2010 +0300 @@ -2017,4 +2017,5 @@ _ZN10CAknButton14EnableFeedbackEi @ 2016 NONAME _ZN22CAknLocalScreenClearer4NewLEii @ 2017 NONAME _ZN22CAknLocalScreenClearer5NewLCEii @ 2018 NONAME + _ZN9CEikEdwin10EnableT2WLEi @ 2019 NONAME diff -r d48ab3b357f1 -r 978afdc0236f uifw/EikStd/bwins/EIKCOCTLU.DEF --- a/uifw/EikStd/bwins/EIKCOCTLU.DEF Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/EikStd/bwins/EIKCOCTLU.DEF Tue Sep 14 21:48:24 2010 +0300 @@ -1628,3 +1628,4 @@ ?EnableFeedback@CAknButton@@QAEXH@Z @ 1627 NONAME ; void CAknButton::EnableFeedback(int) ?NewLC@CAknLocalScreenClearer@@SAPAV1@HH@Z @ 1628 NONAME ; class CAknLocalScreenClearer * CAknLocalScreenClearer::NewLC(int, int) ?NewL@CAknLocalScreenClearer@@SAPAV1@HH@Z @ 1629 NONAME ; class CAknLocalScreenClearer * CAknLocalScreenClearer::NewL(int, int) + ?EnableT2WL@CEikEdwin@@QAEXH@Z @ 1630 NONAME ; void CEikEdwin::EnableT2WL(int) diff -r d48ab3b357f1 -r 978afdc0236f uifw/EikStd/coctlinc/smileymanager.h --- a/uifw/EikStd/coctlinc/smileymanager.h Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/EikStd/coctlinc/smileymanager.h Tue Sep 14 21:48:24 2010 +0300 @@ -41,13 +41,9 @@ NONSHARABLE_CLASS( CSmileyManager ) : public CBase { public: - static const TText KPlaceHolder = 0xfff0; static const TInt KMaxLength = 100; static const TInt KMinLength = 2; - static const TText KZeroCode = 0; - static const TText KCompensateChar = 'i'; - static const TUint KSmileyCodeMin = 0xf880; - static const TUint KSmileyCodeMax = 0xf8e4; + static const TText KZeroCode = 0; enum TOperationType { diff -r d48ab3b357f1 -r 978afdc0236f uifw/EikStd/coctlsrc/AknButton.cpp --- a/uifw/EikStd/coctlsrc/AknButton.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/EikStd/coctlsrc/AknButton.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -170,16 +170,16 @@ { CGulIcon* newIcon = CGulIcon::NewLC(); CFbsBitmap* newPic = new ( ELeave ) CFbsBitmap; - CleanupStack::PushL( newPic ); newPic->Duplicate( aIcon->Bitmap()->Handle() ); - newIcon->SetBitmap( newPic ); + //newPic ownership is transferred to newIcon + newIcon->SetBitmap( newPic ); CFbsBitmap* newMask = new ( ELeave ) CFbsBitmap; + CleanupStack::PushL( newMask ); User::LeaveIfError( newMask->Create( newIcon->Bitmap()->SizeInPixels(), EGray256 ) ); - CleanupStack::PushL( newMask ); CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL( newMask ); CleanupStack::PushL( bitmapDevice ); @@ -212,7 +212,7 @@ ReplaceIconStatic( aDimmedIcon, newIcon, aScaleMode ); CleanupStack::PopAndDestroy( 2 ); // bitmapDevice, bitGc - CleanupStack::Pop( 3 ); // newIcon, newPic, newMask + CleanupStack::Pop( 2 ); // newIcon, newMask } } } @@ -2307,9 +2307,9 @@ { return; } - - if ( ( iFlags & KAknButtonHitTest ) && - !HitAreaContainsL( aPointerEvent.iPosition, EFalse ) ) + TBool hitArea( EFalse ); + TRAP_IGNORE( hitArea = HitAreaContainsL( aPointerEvent.iPosition, EFalse )) + if ( ( iFlags & KAknButtonHitTest ) && !hitArea ) { buttonEvent = EFalse; } diff -r d48ab3b357f1 -r 978afdc0236f uifw/EikStd/coctlsrc/AknDoubleSpanScrollIndicator.cpp --- a/uifw/EikStd/coctlsrc/AknDoubleSpanScrollIndicator.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/EikStd/coctlsrc/AknDoubleSpanScrollIndicator.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -258,7 +258,7 @@ if ( roomForMovementInSpan > 0 && roomForMovementInPixels > 0 ) { focusPositionInPixels = - checkedFocusPosition * roomForMovementInPixels / + (TInt64)checkedFocusPosition * roomForMovementInPixels / roomForMovementInSpan; } diff -r d48ab3b357f1 -r 978afdc0236f uifw/EikStd/coctlsrc/EIKEDWIN.CPP --- a/uifw/EikStd/coctlsrc/EIKEDWIN.CPP Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/EikStd/coctlsrc/EIKEDWIN.CPP Tue Sep 14 21:48:24 2010 +0300 @@ -97,7 +97,7 @@ #include #include #include - +#include #include "smileymanager.h" #include "smileycustomwrap.h" #include @@ -105,6 +105,11 @@ // declare function void ReadSpecialCharFromSCTL( TPtr& ptr, TInt sctResourceId ); void ReadSCTHeadPane( TResourceReader& aReader ); +// for supporting TapToWrite +#include +#include +#include +#include GLDEF_C void Panic(TEikEdwinPanic aPanic) { @@ -157,6 +162,10 @@ const TInt KTInt16Length( sizeof( TInt16 ) ); const TInt KTInt32Length( sizeof( TInt32 ) ); const TInt KTUint32Length( sizeof( TUint32 ) ); +const TInt KBlackMap( 179 ); +const TInt KWhiteMap( 76 ); +_LIT( KParagraphSeparator, "\x2029" ); +TRgb FadeRgb( TRgb aColor, TUint8 aBlackMap, TUint8 aWhiteMap ); // // class CEikEdwin::CUndoBuffer @@ -506,6 +515,9 @@ } iEdwin.iTextView->HandleInsertDeleteL( select, aNumberOfCharactersSuccessfullyDeleted, aParagraphContainingStartPositionOfInlineTextHasChangedFormat ); + // try to draw "tap to write" + iEdwin.TryToDrawT2W(); + User::LeaveIfError(aError); iEdwin.SetScrollBarsL(); iEdwin.DoReportEventL(MCoeControlObserver::EEventStateChanged); @@ -798,7 +810,7 @@ TInt smileyEndPos( 0 ); for ( TInt i( 0 ); i < length; i++ ) { - if ( aEditorContent[i] == CSmileyManager::KCompensateChar ) + if ( aEditorContent[i] == CAknSmileyManager::KCompensateChar ) { // when 'i' is the first character, it is unkonwn whether it is // part of a smiley code string or not, so we have to use another @@ -806,7 +818,7 @@ if ( ( i > 0 && i < smileyEndPos ) || ( i == 0 && smiley->SmileyCodeByPos( aDocumentPosition ) > 0 ) ) { - aEditorContent[i] = CSmileyManager::KPlaceHolder; + aEditorContent[i] = CAknSmileyManager::KPlaceHolder; } } else if ( smiley->IsSmileyCode( aEditorContent[i] ) ) @@ -1076,6 +1088,7 @@ *iDestroyedPtr = ETrue; iDestroyedPtr = NULL; } + delete iT2WBuf; delete iSmiley; delete iSmileyWrap; } @@ -2286,6 +2299,8 @@ const TCursorSelection sel(lower,lower); iTextView->SetPendingSelection(sel); iTextView->HandleInsertDeleteL(sel,toDelete.Length(),formatHasChanged); + // try to draw "tap to write" + TryToDrawT2W(); cursorPos = lower; reportChange=ETrue; } @@ -2345,6 +2360,7 @@ if (!isPicture) ClearUndo(); iTextView->HandleCharEditL(charEditType,formatHasChanged); + TryToDrawT2W(); reportChange=ETrue; formatChange=formatHasChanged; } @@ -2422,6 +2438,8 @@ selection=pending; --selection.iAnchorPos; iTextView->HandleInsertDeleteL(selection,selectionLength,formatHasChanged); + // try to draw "tap to write" + TryToDrawT2W(); User::LeaveIfError(err); reportChange=ETrue; formatChange=formatHasChanged; @@ -2439,6 +2457,7 @@ ETrue ); } iTextView->HandleCharEditL(charEditType); + TryToDrawT2W(); reportChange=ETrue; } else @@ -2545,6 +2564,8 @@ @return The number of pixels scrolled horizontally and vertically. ( Ignored ) */ (void)iTextView->HandleInsertDeleteL( selection, deletedChars, aFormatHasChanged); + // try to draw "tap to write" + TryToDrawT2W(); User::LeaveIfError(err); } @@ -3124,6 +3145,23 @@ return; const TBool focused=IsFocused(); TRAP_IGNORE(SetCursorVisibilityL(focused)); + if ( iEdwinExtension ) + { + if ( focused ) + { + iEdwinExtension->iT2WState |= CEikEdwinExtension::EFocusOn; + TryToDrawT2W(); + } + else + { + TBool change = ( TextLength() == 0 && IsT2WEnabled() ); + iEdwinExtension->iT2WState &= ~CEikEdwinExtension::EFocusOn; + if ( change ) + { + TryToDrawT2W( ETrue ); + } + } + } if (!focused && iEdwinUserFlags&EAlwaysShowSelection) ; else @@ -3988,6 +4026,12 @@ } TrappedDraw(viewRect); + + // try to draw "tap to write" + if ( TextLength() == 0 && IsT2WEnabled() ) + { + TRAP_IGNORE( DrawT2WTextL() ); + } #ifdef RD_UI_TRANSITION_EFFECTS_POPUPS // Workaround for clipping rect problem in multiline queries with text @@ -4008,33 +4052,68 @@ CEikonEnv::Static()->ScreenDevice()->ReleaseFont(*fontPtr); } -void CEikEdwin::DrawFirstLineTextL() const - { - - HBufC* clipbuf = GetTextInHBufL(); - CleanupStack::PushL(clipbuf); - - TPtrC clipbufPtr = clipbuf->Des(); +void CEikEdwin::DrawT2WTextL() const + { + if ( iEdwinExtension && iEdwinExtension->iT2WBuf ) + { + // rect + TRect edwinRect = RectForFirstLineText(); + + // font + TAknTextLineLayout textLayout = + AknLayoutScalable_Avkon::data_form_wide_pane_t1(0).LayoutLine(); + const CAknLayoutFont* font = AknLayoutUtils::LayoutFontFromId( + textLayout.FontId()); + TFontSpec fontSpec = CursorFontSpec(); + fontSpec.iFontStyle.SetStrokeWeight( EStrokeWeightNormal ); + + CGraphicsDevice* screenDevice = iEikonEnv->ScreenDevice(); + CFbsFont* customFont( NULL ); + TInt err = screenDevice->GetNearestFontInTwips((CFont*&) customFont, + fontSpec); + + //color + TRgb textColor = iEikonEnv->ControlColor(EColorControlText, *this); + MAknsSkinInstance* skin = AknsUtils::SkinInstance(); + if ( skin && SkinColorId() != KErrNotFound ) + { + AknsUtils::GetCachedColor( skin, textColor, KAknsIIDQsnTextColors, + SkinColorId() ); + } + + // reorder the buffer + TPtrC clipbufPtr = iEdwinExtension->iT2WBuf->Des(); + AknBidiTextUtils::PrepareRunInfoArray( clipbufPtr ); + HBufC* reorderedText = HBufC::NewLC( clipbufPtr.Length() + TBidiLogicalToVisual::KMinCharAvailable); + TPtr reorderedTextPtr = reorderedText->Des(); + TInt width = edwinRect.Size().iWidth; + AknBidiTextUtils::ConvertToVisualAndClip( clipbufPtr, reorderedTextPtr, *font, width, width ); + + CWindowGc& gc = SystemGc(); + gc.SetBrushStyle(CGraphicsContext::ENullBrush); + gc.SetPenStyle(CGraphicsContext::ESolidPen); + gc.SetPenColor( FadeRgb( textColor, KBlackMap , KWhiteMap ) ); + gc.UseFont( customFont ); + gc.DrawText( reorderedTextPtr, edwinRect, font->TextPaneTopToBaseline(), + AlignForFirstLineText( reorderedTextPtr ) ); + gc.DiscardFont(); + screenDevice->ReleaseFont( customFont ); + CleanupStack::PopAndDestroy( reorderedText ); + } + } + +TRect CEikEdwin::RectForFirstLineText() const + { TMargins8 margins = Margins(); const TRect rect(Rect()); TInt cursorWidth = CursorWidth(); // need to add cursor width to right hand margin - TRect edwinRect = AknLayoutUtils::RectFromCoords(rect, margins.iLeft, margins.iTop, margins.iRight+cursorWidth, margins.iBottom, ELayoutEmpty, ELayoutEmpty); - - TAknTextLineLayout textLayout = AknLayoutScalable_Avkon::data_form_wide_pane_t1(0).LayoutLine(); - const CAknLayoutFont* font = AknLayoutUtils::LayoutFontFromId( textLayout.FontId()); - - // reorder the text - AknBidiTextUtils::PrepareRunInfoArray(clipbufPtr); - - HBufC* reorderedText = HBufC::NewLC(clipbufPtr.Length() + TBidiLogicalToVisual::KMinCharAvailable); - TPtr reorderedTextPtr = reorderedText->Des(); - TInt width = edwinRect.Size().iWidth; - AknBidiTextUtils::ConvertToVisualAndClip(clipbufPtr, reorderedTextPtr, *font, width, width); - AknTextUtils::ReplaceCharacters( reorderedTextPtr, _L("\x2029"), TChar(' ') ); - CleanupStack::Pop(reorderedText); - CleanupStack::PopAndDestroy(clipbuf); - CleanupStack::PushL(reorderedText); - + TRect edwinRect = AknLayoutUtils::RectFromCoords(rect, margins.iLeft, margins.iTop, margins.iRight+cursorWidth, + margins.iBottom, ELayoutEmpty, ELayoutEmpty); + return edwinRect; + } + +CGraphicsContext::TTextAlign CEikEdwin::AlignForFirstLineText( const TPtr & aReorderedTextPtr ) const + { CGraphicsContext::TTextAlign alignment = CGraphicsContext::ELeft; switch(CurrentAlignment()) { @@ -4051,33 +4130,45 @@ case EAknEditorAlignBidi: // drop through to default default: { - if (TBidiText::TextDirectionality(reorderedTextPtr) == TBidiText::ELeftToRight) + if ( TBidiText::TextDirectionality( aReorderedTextPtr ) == TBidiText::ELeftToRight ) alignment = CGraphicsContext::ELeft; else alignment = CGraphicsContext::ERight; } break; } + return alignment; + } +void CEikEdwin::DrawFirstLineTextL() const + { + // rect + TRect edwinRect = RectForFirstLineText(); + // font + TAknTextLineLayout textLayout = AknLayoutScalable_Avkon::data_form_wide_pane_t1(0).LayoutLine(); + const CAknLayoutFont* font = AknLayoutUtils::LayoutFontFromId( textLayout.FontId()); + // reorder the text + HBufC* clipbuf = GetTextInHBufL(); + CleanupStack::PushL(clipbuf); + TPtrC clipbufPtr = clipbuf->Des(); + AknBidiTextUtils::PrepareRunInfoArray( clipbufPtr ); + HBufC* reorderedText = HBufC::NewLC( clipbufPtr.Length() + TBidiLogicalToVisual::KMinCharAvailable ); + TPtr reorderedTextPtr = reorderedText->Des(); + TInt width = edwinRect.Size().iWidth; + AknBidiTextUtils::ConvertToVisualAndClip( clipbufPtr, reorderedTextPtr, *font, width, width ); + AknTextUtils::ReplaceCharacters( reorderedTextPtr, KParagraphSeparator, TChar(' ') ); + CleanupStack::Pop( reorderedText ); + CleanupStack::PopAndDestroy( clipbuf ); + CleanupStack::PushL( reorderedText ); CWindowGc& gc=SystemGc(); - gc.UseFont(font); - - // Following patching up of the GC are now necessary after calling LafCustomDrawerfor background - gc.SetBrushStyle(CGraphicsContext::ENullBrush); - gc.SetPenStyle(CGraphicsContext::ESolidPen); - TRgb textColor=iEikonEnv->ControlColor(EColorControlText,*this); - - gc.SetPenColor(textColor); // Text color - - // Edwin is assumed to be laid out already with LayoutEdwin. In that case - // the textpane top is the top of the edwin - TInt ascent = font->TextPaneTopToBaseline(); - - gc.DrawText(reorderedTextPtr, edwinRect, ascent, alignment); - - CleanupStack::PopAndDestroy(reorderedText); - - gc.DiscardFont(); // So the GC will not try to use the font. + gc.UseFont( font ); + gc.SetBrushStyle( CGraphicsContext::ENullBrush ); + gc.SetPenStyle( CGraphicsContext::ESolidPen ); + gc.SetPenColor( iEikonEnv->ControlColor( EColorControlText, *this ) ); // Text color + gc.DrawText( reorderedTextPtr, edwinRect, font->TextPaneTopToBaseline(), + AlignForFirstLineText( reorderedTextPtr ) ); + CleanupStack::PopAndDestroy(reorderedText); + gc.DiscardFont(); } EXPORT_C void CEikEdwin::TrappedDraw(const TRect& aViewRect) const @@ -4386,6 +4477,23 @@ return(iText->DocumentLength()); } +TBool CEikEdwin::IsT2WEnabled() const + { + /** + * 1,If the editor is read only or it is display only "tap to write" is disabled + * 2,If iEdwinExtension->iT2WBuf is NULL, "tap to write" is disabled. + * 3,If Qwerty key borad is opened, "tap to write" is disabled + * 4,If focus off, "tap to write" is disabled + * 5,If split input is enabled, "tap to write" is disabled + */ + return iEdwinExtension && !( iEdwinUserFlags & EReadOnly ) && + !( iEdwinUserFlags & EDisplayOnly ) && iEdwinExtension->iT2WBuf && + ( iEdwinExtension->iT2WState & CEikEdwinExtension::EFocusOn ) && + !( iEdwinExtension->iT2WState & CEikEdwinExtension::ESplitInputEnabled ) && + !( iEdwinExtension->iExtendedInputCapabilities->Capabilities() & + CAknExtendedInputCapabilities::EInputEditorQwertyInputActive ); + } + void CEikEdwin::SetCursorVisibilityL(TBool aEmphasis) { TCursor::TVisibility textCursor=(aEmphasis? TCursor::EFCursorFlashing : TCursor::EFCursorInvisible); @@ -4397,6 +4505,22 @@ lineCursor = TCursor::EFCursorInvisible; } + if ( iEdwinExtension && ( iEdwinExtension->iT2WState & CEikEdwinExtension::ERecordCursor ) ) + { + if ( aEmphasis ) + { + iEdwinExtension->iT2WState |= CEikEdwinExtension::ECursorVisible; + } + else + { + iEdwinExtension->iT2WState &= ~CEikEdwinExtension::ECursorVisible; + } + } + + if ( TextLength() == 0 && IsT2WEnabled() ) + { + textCursor = TCursor::EFCursorInvisible; + } iTextView->SetCursorVisibilityL(lineCursor,textCursor); CAknEdwinState*edwinState = EditorState(); if( !edwinState ) @@ -4858,6 +4982,8 @@ ConvertTextForSmileyL( TCursorSelection( lower, undoneLength ), ETrue ); } TRAPD(err2,iTextView->HandleInsertDeleteL(TCursorSelection(lower,lower+undoneLength),newText.Length(),changed)); + // try to draw "tap to write" + TryToDrawT2W(); ClearUndo(); if (NeedToChangeFormattingModeL()) SetAmountToFormatL(); @@ -4940,9 +5066,15 @@ const TInt newCursorPos=cursorPos+newLength-oldLength; iTextView->SetPendingSelection(TCursorSelection(newCursorPos,newCursorPos)); if (NeedToChangeFormattingModeL()) + { SetAmountToFormatL(); + } else + { iTextView->HandleInsertDeleteL(TCursorSelection(newCursorPos,cursorPos),0,ETrue); + // try to draw "tap to write" + TryToDrawT2W(); + } DrawContents(); UpdateScrollBarsL(); ReportEdwinEventL( MEikEdwinObserver::EEventTextUpdate ); @@ -5023,6 +5155,8 @@ selection.iAnchorPos=lower; selection.iCursorPos=lower; iTextView->HandleInsertDeleteL(selection,selLength,formatHasChanged); + // try to draw "tap to write" + TryToDrawT2W(); reportChange=ETrue; } CAknNoteDialog* dlg = new (ELeave) CAknNoteDialog(); @@ -5171,7 +5305,11 @@ DrawContents(); } else + { iTextView->HandleInsertDeleteL(selection,selLength,formatHasChanged); + // try to draw "tap to write" + TryToDrawT2W(); + } iEikonEnv->BusyMsgCancel(); User::LeaveIfError(err); } @@ -6518,6 +6656,8 @@ const TCursorSelection pending(selection.iCursorPos,selection.iCursorPos); iTextView->SetPendingSelection(pending); iTextView->HandleInsertDeleteL(selection,aModel->iText.Length(),formatHasChanged); + // try to draw "tap to write" + TryToDrawT2W(); if ( NeedToChangeFormattingModeL()) SetAmountToFormatL(); ReportEdwinEventL( MEikEdwinObserver::EEventTextUpdate ); @@ -6825,6 +6965,8 @@ if (iUndoStore) iUndoStore->SetNewText(selection); iTextView->HandleInsertDeleteL(selection,selectionLength,formatHasChanged); + // try to draw "tap to write" + TryToDrawT2W(); ReportEdwinEventL( MEikEdwinObserver::EEventTextUpdate ); DoReportEventL( MCoeControlObserver::EEventStateChanged ); User::LeaveIfError(err); @@ -6928,6 +7070,7 @@ yPosQ.SetFillScreen(); TRAP_IGNORE( iTextView->SetViewL( docPos, yPos, yPosQ ) ); } + TRAP_IGNORE( MoveViewToCursorLineL() ); } break; case KEikMessageVirtualCursorStateChange: @@ -6969,6 +7112,28 @@ DoAlignment(); } break; + case KAknSplitInputEnabled: + { + if ( iEdwinExtension ) + { + TBool change = ( TextLength() == 0 && IsT2WEnabled() ); + iEdwinExtension->iT2WState |= CEikEdwinExtension::ESplitInputEnabled; + if ( change ) + { + TryToDrawT2W( ETrue ); + } + } + } + break; + case KAknSplitInputDisabled: + { + if ( iEdwinExtension ) + { + iEdwinExtension->iT2WState &= ~CEikEdwinExtension::ESplitInputEnabled; + TryToDrawT2W(); + } + } + break; default: break; } @@ -7182,6 +7347,8 @@ aInsertPos + aText.Length() ), ETrue ); } iTextView->HandleInsertDeleteL(TCursorSelection(aInsertPos,aInsertPos+aText.Length()),length,formatChanged); + // try to draw "tap to write" + TryToDrawT2W(); } EXPORT_C void CEikEdwin::SetNonPrintingCharsVisibility(TNonPrintingCharVisibility aVisibility) @@ -8437,6 +8604,40 @@ UpdateScrollBarsL(); } } + +// --------------------------------------------------------------------------- +// CEikEdwin::MoveViewToCursorLineL +// --------------------------------------------------------------------------- +// +void CEikEdwin::MoveViewToCursorLineL() + { + if ( !iTextView ) + { + return; + } + + const TInt cursorPos ( CursorPos() ); + const TRect viewRect( AdjustedViewRect() ); + + const TPoint startPoint ( viewRect.iTl ); + const TPoint endPoint ( viewRect.iBr ); + + TPoint cursorPoint; + iTextView->DocPosToXyPosL( cursorPos, cursorPoint ); + + if ( cursorPoint.iY > endPoint.iY ) + { + TBool exceed ( EFalse ) ; + TInt rest ( 0 ); + ScrollView ( endPoint.iY - cursorPoint.iY, exceed, rest ); + } + else if ( cursorPoint.iY < startPoint.iY ) + { + TBool exceed ( EFalse ) ; + TInt rest ( 0 ); + ScrollView ( startPoint.iY - cursorPoint.iY, exceed, rest ); + } + } EXPORT_C void CEikEdwin::SetCursorVisible(TBool aVisible) { @@ -9318,5 +9519,110 @@ aReader.ReadTPtrC(); // Process ToolTip } +// returns the faded color of aColor +// aWhiteMap and aBlackMap parameters control the amount of fading +TRgb FadeRgb(TRgb aColor, TUint8 aBlackMap,TUint8 aWhiteMap) + { + TUint8 fadeMapFactor = aWhiteMap - aBlackMap + 1; + TUint8 fadeMapOffset = aBlackMap; + TInt value = aColor.Internal(); + TInt b = (((value & 0x000000ff) * fadeMapFactor) >> 8) + fadeMapOffset; + TInt g = (((value & 0x0000ff00) * fadeMapFactor) >> 16) + fadeMapOffset; + //the multiplication by iFadeMapFactor can overflow into the sign bit, so we shift down in two steps + TInt r = ((((value & 0x00ff0000) >> 16) * fadeMapFactor) >> 8) + fadeMapOffset; + TInt a = aColor.Alpha(); + return TRgb(r,g,b,a ); + } + +// --------------------------------------------------------------------------- +// CEikEdwin::EnableT2WL +// --------------------------------------------------------------------------- +// +EXPORT_C void CEikEdwin::EnableT2WL( TBool aEnable ) + { + if ( iEdwinExtension ) + { + if ( !aEnable && iEdwinExtension->iT2WBuf ) + { + delete iEdwinExtension->iT2WBuf; + iEdwinExtension->iT2WBuf = NULL; + if ( iTextView ) + { + TryToDrawT2W( ETrue ); + } + } + else if ( aEnable && !iEdwinExtension->iT2WBuf ) + { + CRepository* cenrep = NULL; + TInt supportT2W = 0; + TRAPD(error, cenrep = CRepository::NewL(KCRUidAvkon)); + if ( error == KErrNone ) + { + error = cenrep->Get( KAknEdwinTapToWrite, supportT2W ); + } + delete cenrep; + if ( supportT2W && !iEdwinExtension->iT2WBuf ) + { + iEdwinExtension->iT2WBuf = iEikonEnv->AllocReadResourceLC( R_AVKON_TAP_TO_WRITE ); + CleanupStack::Pop( iEdwinExtension->iT2WBuf ); + if ( iTextView ) + { + TryToDrawT2W(); + } + } + } + } + } + +// --------------------------------------------------------------------------- +// CEikEdwin::TryToDrawT2W +// --------------------------------------------------------------------------- +// +void CEikEdwin::TryToDrawT2W( TBool aClean ) + { + CAknEdwinState* edwinState = EditorState(); + TBool cursorVisible( EFalse ); + if ( edwinState ) + { + cursorVisible = ( edwinState->Flags() | EAknEditorFlagTextCursorVisible ); + } + + if ( iEdwinExtension ) + { + // When "tap to write" is enabled( started ) we should record the status of cursor. + if ( TextLength() == 0 && IsT2WEnabled() ) + { + SetCursorVisible( EFalse ); + iEdwinExtension->iT2WState |= CEikEdwinExtension::ERecordCursor; + if ( cursorVisible ) + { + iEdwinExtension->iT2WState |= CEikEdwinExtension::ECursorVisible; + } + else + { + iEdwinExtension->iT2WState &= ~CEikEdwinExtension::ECursorVisible; + } + DrawDeferred(); + } + // When "tap to write" is disabled ( ended ) we need to recover the status of cursor. + else if ( IsFocused() && + ( iEdwinExtension->iT2WState & CEikEdwinExtension::ERecordCursor ) ) + { + iEdwinExtension->iT2WState &= ~CEikEdwinExtension::ERecordCursor; + SetCursorVisible( iEdwinExtension->iT2WState & CEikEdwinExtension::ECursorVisible ); + } + // When focus off, we don't need to record the status anymore. So clean it. + else if ( !IsFocused() ) + { + iEdwinExtension->iT2WState &= ~CEikEdwinExtension::ERecordCursor; + } + } + + if ( aClean && TextLength() == 0 ) + { + DrawDeferred(); + } + } + // End of File diff -r d48ab3b357f1 -r 978afdc0236f uifw/EikStd/coctlsrc/EIKLBX.CPP --- a/uifw/EikStd/coctlsrc/EIKLBX.CPP Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/EikStd/coctlsrc/EIKLBX.CPP Tue Sep 14 21:48:24 2010 +0300 @@ -75,6 +75,7 @@ #include #include #include +#include #include "akntrace.h" // timeout for long keypress used in markable lists @@ -1060,7 +1061,33 @@ void CListBoxExt::SetMultipleMarkingState( TBool aActive ) { _AKNTRACE_FUNC_ENTER; - iListBox.SetMarkingMode( aActive ); + if ( iMarkingModeInUse != aActive ) + { + if ( aActive ) + { + iListBox.iView->ItemDrawer()->SetFlags( + CListItemDrawer::EMarkingModeEnabled ); + } + else + { + iListBox.iView->ItemDrawer()->ClearFlags( + CListItemDrawer::EMarkingModeEnabled ); + + if ( iListBox.iView->SelectionIndexes()->Count() > 0 ) + { + iListBox.iView->ClearSelection( EFalse ); + } + } + + iMarkingModeInUse = aActive; + iListBox.DrawDeferred(); + } + + if ( iListBox.MarkingModeObserver() ) + { + iListBox.MarkingModeObserver()->MarkingModeStatusChanged( aActive ); + } + _AKNTRACE_FUNC_EXIT; } @@ -1185,6 +1212,7 @@ _AKNTRACE_FUNC_ENTER; iLongTappedItem = iLastDownTappedItem; iLastDownTappedItem = KErrNotFound; + iListBox.ReportListBoxEventL( MEikListBoxObserver::EEventItemLongTapped ); iItemActionMenu->ShowMenuL( aPenEventScreenLocation, 0 ); iOldWinPos = iListBox.DrawableWindow()->OrdinalPosition(); _AKNTRACE_FUNC_EXIT; @@ -6722,36 +6750,19 @@ // EXPORT_C void CEikListBox::SetMarkingMode( TBool aEnable ) { - if ( iListBoxExt && iListBoxExt->iSingleClickEnabled && - ( iListBoxFlags & CEikListBox::ES60StyleMarkable ) ) - { - if ( iListBoxExt->iMarkingModeInUse != aEnable ) - { - if ( aEnable ) - { - iView->ItemDrawer()->SetFlags( - CListItemDrawer::EMarkingModeEnabled ); - } - else - { - iView->ItemDrawer()->ClearFlags( - CListItemDrawer::EMarkingModeEnabled ); - - if ( iView->SelectionIndexes()->Count() > 0 ) - { - iView->ClearSelection( EFalse ); - } - } - - iListBoxExt->iMarkingModeInUse = aEnable; - DrawDeferred(); - } - - if ( MarkingModeObserver() ) - { - MarkingModeObserver()->MarkingModeStatusChanged( aEnable ); - } - } + _AKNTRACE_FUNC_ENTER; + if ( iListBoxExt + && iListBoxExt->iSingleClickEnabled + && ( iListBoxFlags & CEikListBox::ES60StyleMarkable ) + && iListBoxExt->iItemActionMenu + && iListBoxExt->iMarkingModeInUse != aEnable ) + { + CAknMarkingMode& markingMode = iListBoxExt->iItemActionMenu->MarkingMode(); + // Multiple marking state will be set, navi pane will be updated + // and softkeys will be updated when entering and exiting marking mode. + markingMode.SetCollectionMultipleMarkingState( aEnable ); + } + _AKNTRACE_FUNC_EXIT; } @@ -6762,10 +6773,12 @@ EXPORT_C void CEikListBox::SetMarkingModeObserver( MAknMarkingModeObserver* aObserver ) { + _AKNTRACE_FUNC_ENTER; if ( iListBoxExt ) { iListBoxExt->iMarkingModeObserver = aObserver; } + _AKNTRACE_FUNC_EXIT; } @@ -6898,12 +6911,13 @@ TBool blockEvent = EFalse; - // If tap down in listbox area, kinetic scrolling is enabled and style popup menu is not shown, - // drag event is sent to listbox. + // If touch down in listbox area, kinetic scrolling is enabled, and single + // click is disabled or style popup menu is not shown when single click is + // enabled, events of kinetic scrolling are sent to listbox. TBool allowDragEvent( ( iListBoxFlags & ELeftDownInViewRect ) - && !iListBoxExt->iScrollingDisabled - && ( iListBoxExt->iSingleClickEnabled - && iListBoxExt->iLongTappedItem == KErrNotFound ) ); + && !iListBoxExt->iScrollingDisabled + && ( !iListBoxExt->iSingleClickEnabled + || iListBoxExt->iLongTappedItem == KErrNotFound ) ); switch ( aPointerEvent.iType ) { diff -r d48ab3b357f1 -r 978afdc0236f uifw/EikStd/coctlsrc/EIKSCRLB.CPP --- a/uifw/EikStd/coctlsrc/EIKSCRLB.CPP Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/EikStd/coctlsrc/EIKSCRLB.CPP Tue Sep 14 21:48:24 2010 +0300 @@ -1286,7 +1286,7 @@ thumbPositionPix = position - extension->iPointerOffsetFromThumb; TInt oldPosition = thumbPosition; - TReal newPosition = thumbPositionPix * ( scrollSpan - thumbSpan ) / (TReal)scrollSpanPix; + TReal newPosition = (TReal)thumbPositionPix * ( scrollSpan - thumbSpan ) / scrollSpanPix; thumbPosition = newPosition; // round the value to the nearest possible position diff -r d48ab3b357f1 -r 978afdc0236f uifw/EikStd/coctlsrc/aknedwinphysicshandler.cpp --- a/uifw/EikStd/coctlsrc/aknedwinphysicshandler.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/EikStd/coctlsrc/aknedwinphysicshandler.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -190,17 +190,6 @@ + KMaxWorldSize ); TSize viewSize( iViewRect.Width(), iViewRect.Height() ); - CTextLayout* layout = iEdwin.TextLayout(); - - if ( layout ) - { - TInt pixelsAbove = layout->PixelsAboveBand(); - if ( pixelsAbove > 0 ) - { - MoveScrollIndex( -pixelsAbove ); - } - } - iPhysics->InitPhysicsL( totalSize, viewSize, EFalse ); } } diff -r d48ab3b357f1 -r 978afdc0236f uifw/EikStd/coctlsrc/aknstyluspopupmenucontent.cpp --- a/uifw/EikStd/coctlsrc/aknstyluspopupmenucontent.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/EikStd/coctlsrc/aknstyluspopupmenucontent.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -1026,11 +1026,11 @@ layoutText.DrawText( aGc, *(iItems[aItem]->iText), ETrue, textColor ); - if ( aItem < iLastVisibleItem ) + if ( aItem < iItems.Count()-1 ) { AknListUtils::DrawSeparator( aGc, rect, textColor, skin ); } - } + } } // ----------------------------------------------------------------------------- diff -r d48ab3b357f1 -r 978afdc0236f uifw/EikStd/coctlsrc/smileycustomwrap.cpp --- a/uifw/EikStd/coctlsrc/smileycustomwrap.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/EikStd/coctlsrc/smileycustomwrap.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -14,7 +14,7 @@ * Description: smiely engine class * */ - +#include #include "smileymanager.h" #include "smileycustomwrap.h" @@ -51,12 +51,12 @@ customWrap->iPrevCodeIsSmiley = !iPlaceHolder; customWrap->iPlaceHolder = EFalse; } - else if ( ( iPrevCodeIsSmiley || iPlaceHolder ) && aCode == CSmileyManager::KCompensateChar ) + else if ( ( iPrevCodeIsSmiley || iPlaceHolder ) && aCode == CAknSmileyManager::KCompensateChar ) { breakClass = MTmCustom::EClLineBreakClass; customWrap->iPrevCodeIsSmiley = EFalse; } - else if ( aCode == CSmileyManager::KPlaceHolder ) + else if ( aCode == CAknSmileyManager::KPlaceHolder ) { breakClass = MTmCustom::EB2LineBreakClass; customWrap->iPlaceHolder = ETrue; diff -r d48ab3b357f1 -r 978afdc0236f uifw/EikStd/coctlsrc/smileymanager.cpp --- a/uifw/EikStd/coctlsrc/smileymanager.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/EikStd/coctlsrc/smileymanager.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -18,6 +18,7 @@ #include #include #include +#include #include "smileymodel.h" #include "smileyinforeader.h" @@ -217,7 +218,8 @@ // TBool CSmileyManager::IsSmileyCode( TText aCode ) { - return ( aCode >= KSmileyCodeMin && aCode <= KSmileyCodeMax ); + return ( aCode >= CAknSmileyManager::KSmileyCodeMin && + aCode <= CAknSmileyManager::KSmileyCodeMax ); } // --------------------------------------------------------------------------- diff -r d48ab3b357f1 -r 978afdc0236f uifw/EikStd/coctlsrc/smileymodel.cpp --- a/uifw/EikStd/coctlsrc/smileymodel.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/EikStd/coctlsrc/smileymodel.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -15,8 +15,7 @@ * */ -//#include - +#include #include "smileymanager.h" #include "smileymodel.h" @@ -205,8 +204,8 @@ // void CSmileyModel::AddSimleyL( CSmileyInfo& aInfo ) { - if ( aInfo.iImageInfo.iCode < CSmileyManager::KSmileyCodeMin || - aInfo.iImageInfo.iCode > CSmileyManager::KSmileyCodeMax || + if ( aInfo.iImageInfo.iCode < CAknSmileyManager::KSmileyCodeMin || + aInfo.iImageInfo.iCode > CAknSmileyManager::KSmileyCodeMax || aInfo.iStrArray.Count() == 0 ) { return; @@ -383,11 +382,11 @@ TInt len( iLinkArray[linkIndex].iStrLength ); TInt imageIndex( iLinkArray[linkIndex].iImageIndex ); aText[aDocPos] = iImageInfoArray[imageIndex].iCode; - aText[aDocPos + 1] = CSmileyManager::KCompensateChar; + aText[aDocPos + 1] = CAknSmileyManager::KCompensateChar; const TInt KThirdIndex = 2; for ( TInt i( KThirdIndex ); i < len; i++ ) { - aText[i + aDocPos] = CSmileyManager::KPlaceHolder; + aText[i + aDocPos] = CAknSmileyManager::KPlaceHolder; } } diff -r d48ab3b357f1 -r 978afdc0236f uifw/EikStd/dlgsrc/EIKDIALG.CPP --- a/uifw/EikStd/dlgsrc/EIKDIALG.CPP Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/EikStd/dlgsrc/EIKDIALG.CPP Tue Sep 14 21:48:24 2010 +0300 @@ -2077,10 +2077,7 @@ GfxTransEffect::NotifyExternalState(ECaptureComponentsAbort, (const TDesC8*)this); GfxTransEffect::Abort(this); } - - // Draw again in cast any content change in OkToExitL - DrawDeferred(); - + _AKNTRACE("CEikDialog::TryExitL return with OkToExitL false"); return; } diff -r d48ab3b357f1 -r 978afdc0236f uifw/EikStd/dlgsrc/EIKDPAGE.CPP --- a/uifw/EikStd/dlgsrc/EIKDPAGE.CPP Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/EikStd/dlgsrc/EIKDPAGE.CPP Tue Sep 14 21:48:24 2010 +0300 @@ -2245,6 +2245,8 @@ { ExposeLine( iCurrentLine, ETrue ); } + TRAP_IGNORE( RecordLinesL() ); + DrawDeferred(); break; case KAknMessageFocusLost: @@ -2260,6 +2262,15 @@ ShowFocus( EFalse, ETrue ); } } + //Stop physics and synchronize the page to reset KS + //when page losing foreground. + if ( IsEditable() && iExtension->iScrolling + && iPhysics->OngoingPhysicsAction() == + CAknPhysics::EAknPhysicsActionDragging ) + { + iPhysics->Stop(); + Synchronize(); + } break; default: @@ -3202,7 +3213,7 @@ if ( ( touchedLine < iLines->Count() ) && ( touchedLine != iCurrentLine ) ) { - (*iLines)[touchedLine]->ActivateL(); + TRAP_IGNORE( (*iLines)[touchedLine]->ActivateL() ); if ( LineIsFocusable( touchedLine ) ) { diff -r d48ab3b357f1 -r 978afdc0236f uifw/eikctl/src/EIKMFNE.CPP --- a/uifw/eikctl/src/EIKMFNE.CPP Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/eikctl/src/EIKMFNE.CPP Tue Sep 14 21:48:24 2010 +0300 @@ -4090,6 +4090,22 @@ EXPORT_C void CEikTimeEditor::HandlePointerEventL(const TPointerEvent& aPointerEvent) { CEikTTimeEditor::HandlePointerEventL(aPointerEvent); + // If touch input is disabled or qwerty key board is opened, AM/PM will change when + // user taps at AM/PM filed; else touch input will be opened. + if ( aPointerEvent.iType == TPointerEvent::EButton1Up && + ( ( iExtension->iExtendedInputCapabilities->Capabilities() & + CAknExtendedInputCapabilities::EInputEditorQwertyInputActive ) || + iExtension->iDisablePenInput || iExtension->iPartialScreenInput ) ) + { + TAmPmName amName( EAm ); + TAmPmName pmName( EPm ); + if ( !IsUninitialised() && + ( !iFields[iCurrentField]->FieldText().Compare( amName ) || + !iFields[iCurrentField]->FieldText().Compare( pmName ) ) ) + { + ChangeAmPm(); + } + } } EXPORT_C void* CEikTimeEditor::ExtensionInterface( TUid /*aInterface*/ ) @@ -4483,6 +4499,22 @@ EXPORT_C void CEikTimeAndDateEditor::HandlePointerEventL(const TPointerEvent& aPointerEvent) { CEikTTimeEditor::HandlePointerEventL(aPointerEvent); + // If touch input is disabled or qwerty key board is opened, AM/PM will change when + // user taps at AM/PM filed; else touch input will be opened. + if ( aPointerEvent.iType == TPointerEvent::EButton1Up && + ( ( iExtension->iExtendedInputCapabilities->Capabilities() & + CAknExtendedInputCapabilities::EInputEditorQwertyInputActive ) || + iExtension->iDisablePenInput || iExtension->iPartialScreenInput ) ) + { + TAmPmName amName( EAm ); + TAmPmName pmName( EPm ); + if ( !IsUninitialised() && + ( !iFields[iCurrentField]->FieldText().Compare( amName ) || + !iFields[iCurrentField]->FieldText().Compare( pmName ) ) ) + { + ChangeAmPm(); + } + } } EXPORT_C void* CEikTimeAndDateEditor::ExtensionInterface( TUid /*aInterface*/ ) diff -r d48ab3b357f1 -r 978afdc0236f uifw/eikctl/src/EIKSECED.CPP --- a/uifw/eikctl/src/EIKSECED.CPP Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/eikctl/src/EIKSECED.CPP Tue Sep 14 21:48:24 2010 +0300 @@ -283,6 +283,15 @@ delete listener; } #endif + // When destruct secret editor, inform FEP that secret editor has been destroyed , + // so FEP can get opportunity to do some clean work, e.g. closing opened SCT dialog. + if ( iFepState ) + { + TRAP_IGNORE( + static_cast( iFepState )->ReportAknEdStateEventL( + MAknEdStateObserver::EAknEdwinDestroy ) + ); + } delete iInlineEditText; delete iFepState; delete iTimer; diff -r d48ab3b357f1 -r 978afdc0236f uifw/ganes/group/bld.inf --- a/uifw/ganes/group/bld.inf Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/ganes/group/bld.inf Tue Sep 14 21:48:24 2010 +0300 @@ -46,6 +46,7 @@ -c32,8 qgn_graf_mup_adtl_reorder_up\ -c32,8 qgn_graf_mup_adtl_reorder_updown\ -c32,8 qgn_prop_checkbox_on\ + -c32,8 qgn_prop_checkbox_off\ -c32,8 qgn_indi_button_exit_fs\ -c32,8 qgn_indi_media_thumbnail END diff -r d48ab3b357f1 -r 978afdc0236f uifw/ganes/inc/HgIndicatorManager.h --- a/uifw/ganes/inc/HgIndicatorManager.h Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/ganes/inc/HgIndicatorManager.h Tue Sep 14 21:48:24 2010 +0300 @@ -45,14 +45,15 @@ const TRect& aRect, TInt aFlags, TAknWindowComponentLayout aFirstIndicatorLayout, - TAknWindowComponentLayout aSecondIndicatorLayout + TAknWindowComponentLayout aSecondIndicatorLayout, + TBool aMarkingMode ) const; TBool DrawIndicator( CWindowGc& aGc, TAknLayoutRect& aRect, TInt aFlags, - TBool& aMemIndicator + TBool& aMemIndicator ) const; void InitIconL( @@ -90,6 +91,7 @@ CGulIcon* iDrmExpIcon; // icon for expired drm rights indicator CGulIcon* iVideoIcon; // icon for video indicator CGulIcon* iMarkIcon; // Icon for selection marking + CGulIcon* iMarkIconOff; // Icon for selection marking, the off state CGulIcon* iMmcIcon; // Mmc indicator icon CGulIcon* iPlaybackIndicatorIcon; // Playback indicator icon CGulIcon* iPauseIndicatorIcon; // Playback pause indicator icon diff -r d48ab3b357f1 -r 978afdc0236f uifw/ganes/inc/HgVgEGL.h --- a/uifw/ganes/inc/HgVgEGL.h Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/ganes/inc/HgVgEGL.h Tue Sep 14 21:48:24 2010 +0300 @@ -64,6 +64,8 @@ CFbsBitmap* GetSurfaceToBitmap(const TRect& aRect, TBool aLandscape = EFalse) const; + static TBool EglInitialized(); + protected: // Constructors CHgVgEGL(); diff -r d48ab3b357f1 -r 978afdc0236f uifw/ganes/src/HgDoubleGraphicList.cpp --- a/uifw/ganes/src/HgDoubleGraphicList.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/ganes/src/HgDoubleGraphicList.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -206,7 +206,8 @@ aRect, item->Flags(), iLayoutData->FirstIndicatorLayout(), - iLayoutData->SecondIndicatorLayout() ); + iLayoutData->SecondIndicatorLayout(), + iFlags & EHgScrollerSelectionMode || iSelectionMode != ENoSelection ); } // ----------------------------------------------------------------------------- diff -r d48ab3b357f1 -r 978afdc0236f uifw/ganes/src/HgDoubleTextList.cpp --- a/uifw/ganes/src/HgDoubleTextList.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/ganes/src/HgDoubleTextList.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -171,7 +171,8 @@ aRect, item->Flags(), iLayoutData->FirstIndicatorLayout(), - iLayoutData->SecondIndicatorLayout() ); + iLayoutData->SecondIndicatorLayout(), + iFlags & EHgScrollerSelectionMode || iSelectionMode != ENoSelection ); } // ----------------------------------------------------------------------------- diff -r d48ab3b357f1 -r 978afdc0236f uifw/ganes/src/HgGrid.cpp --- a/uifw/ganes/src/HgGrid.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/ganes/src/HgGrid.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -285,7 +285,8 @@ aRect, item->Flags(), iLayoutData->FirstIndicatorLayout(), - iLayoutData->SecondIndicatorLayout() ); + iLayoutData->SecondIndicatorLayout(), + iFlags & EHgScrollerSelectionMode || iSelectionMode != ENoSelection ); } // ----------------------------------------------------------------------------- diff -r d48ab3b357f1 -r 978afdc0236f uifw/ganes/src/HgIndicatorManager.cpp --- a/uifw/ganes/src/HgIndicatorManager.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/ganes/src/HgIndicatorManager.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -47,6 +47,7 @@ delete iPlaybackIndicatorIcon; delete iMmcIcon; delete iMarkIcon; + delete iMarkIconOff; delete iPauseIndicatorIcon; delete iBrokenPlaylistIcon; delete iBrokenTrackIcon; @@ -109,9 +110,15 @@ // Skinned icons // Mark icon - InitIconL( iMarkIcon, KAknsIIDQgnPropSubMarked, - EMbmGanesQgn_prop_sub_marked, - EMbmGanesQgn_prop_sub_marked_mask, + InitIconL( iMarkIcon, KAknsIIDQgnPropCheckboxOn, + EMbmGanesQgn_prop_checkbox_on, + EMbmGanesQgn_prop_checkbox_on_mask, + aIndicatorSize ); + + // Mark icon, off state + InitIconL( iMarkIconOff, KAknsIIDQgnPropCheckboxOff, + EMbmGanesQgn_prop_checkbox_off, + EMbmGanesQgn_prop_checkbox_off_mask, aIndicatorSize ); // DRM valid icon @@ -186,7 +193,8 @@ const TRect& aRect, TInt aFlags, TAknWindowComponentLayout aFirstIndicatorLayout, - TAknWindowComponentLayout aSecondIndicatorLayout + TAknWindowComponentLayout aSecondIndicatorLayout, + TBool aMarkingMode ) const { TAknLayoutRect secondIndicator; @@ -205,6 +213,12 @@ ++indicatorsDrawn; rect = firstIndicator; } + else if(aMarkingMode) + { + rect.DrawImage(aGc, iMarkIconOff->Bitmap(), iMarkIconOff->Mask()); + ++indicatorsDrawn; + rect = firstIndicator; + } if( DrawIndicator(aGc, rect, aFlags, memIndicator) ) { @@ -234,7 +248,7 @@ CWindowGc& aGc, TAknLayoutRect& aRect, TInt aFlags, - TBool& aMemIndicator + TBool& aMemIndicator ) const { TBool ret = EFalse; diff -r d48ab3b357f1 -r 978afdc0236f uifw/ganes/src/HgScroller.cpp --- a/uifw/ganes/src/HgScroller.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/ganes/src/HgScroller.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -15,7 +15,6 @@ * */ - // INCLUDE FILES #include @@ -590,10 +589,16 @@ iPointerDown = ETrue; HandleDownEventL( aEvent ); + // Long tap is supported in marking mode only for an item that is marked. + const TBool validIndex = iSelectedIndex != KErrNotFound && + iSelectedIndex >= 0 && iSelectedIndex < iItems.Count(); + const TBool selectionMode = iFlags & EHgScrollerSelectionMode; + const TBool longTapEnabled = validIndex && (!selectionMode || + (selectionMode && iItems[iSelectedIndex]->Flags() & CHgItem::EHgItemFlagMarked)); + if( iDetector - && iSelectedIndex != KErrNotFound + && longTapEnabled && !HasHighlight() - && !(iFlags & EHgScrollerSelectionMode) && iActionMenu->InitMenuL() ) { iDetector->PointerEventL( aEvent ); @@ -1272,6 +1277,19 @@ { if(iItemCount) { + iHighlightTimer->Cancel(); + iPointerDown = EFalse; + if(iDetector) + iDetector->CancelAnimationL(); + iPanning = EFalse; + + iPhysics->StopPhysics(); + iPhysics->ResetFriction(); + + iFocusedIndex = KErrNotFound; + iSelectionToFocusedItem = EFalse; + iDrawUtils->EnableMarquee(false); + iItems.ResetAndDestroy(); iItemCount = 0; iSelectedIndex = KErrNotFound; @@ -1282,6 +1300,9 @@ } HandleItemCountChanged(); + + iViewPosition = TPoint(iWidth/2, iHeight/2); + HandleViewPositionChanged(); } } @@ -1291,6 +1312,14 @@ // EXPORT_C void CHgScroller::SetFlags(TInt aFlags) { + const TBool currentSelectionMode = iFlags & EHgScrollerSelectionMode; + const TBool newSelectionMode = aFlags & EHgScrollerSelectionMode; + if( currentSelectionMode != newSelectionMode ) + { + // when selection mode changes we need to repaint + DrawDeferred(); + } + iFlags |= aFlags; } @@ -1599,12 +1628,18 @@ // void CHgScroller::SetSelectionMode( TSelectionMode aMode ) { + if( aMode != iSelectionMode ) + { + DrawDeferred(); + } + iSelectionMode = aMode; if( iSelectionMode == ESelectionPossible || iSelectionMode == ENoSelection ) { iCoeEnv->InputCapabilitiesChanged(); } + } // --------------------------------------------------------------------------- @@ -1747,7 +1782,14 @@ void CHgScroller::HandleLongTapEventL( const TPoint& /*aPenEventLocation*/, const TPoint& aPenEventScreenLocation) { - if( iActionMenu && !(iFlags & EHgScrollerSelectionMode) ) + // Long tap is supported in marking mode only for an item that is marked. + const TBool validIndex = iSelectedIndex != KErrNotFound && + iSelectedIndex >= 0 && iSelectedIndex < iItems.Count(); + const TBool selectionMode = iFlags & EHgScrollerSelectionMode; + const TBool longTapEnabled = validIndex && (!selectionMode || + (selectionMode && iItems[iSelectedIndex]->Flags() & CHgItem::EHgItemFlagMarked)); + + if( iActionMenu && longTapEnabled ) { iOldWinPos = DrawableWindow()->OrdinalPosition(); iActionMenu->ShowMenuL(aPenEventScreenLocation); diff -r d48ab3b357f1 -r 978afdc0236f uifw/ganes/src/HgSingleGraphicList.cpp --- a/uifw/ganes/src/HgSingleGraphicList.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/ganes/src/HgSingleGraphicList.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -162,7 +162,8 @@ aRect, item->Flags(), iLayoutData->FirstIndicatorLayout(), - iLayoutData->SecondIndicatorLayout() ); + iLayoutData->SecondIndicatorLayout(), + iFlags & EHgScrollerSelectionMode || iSelectionMode != ENoSelection ); } // ----------------------------------------------------------------------------- diff -r d48ab3b357f1 -r 978afdc0236f uifw/ganes/src/HgSingleLargeList.cpp --- a/uifw/ganes/src/HgSingleLargeList.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/ganes/src/HgSingleLargeList.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -163,7 +163,8 @@ aRect, item->Flags(), iLayoutData->FirstIndicatorLayout(), - iLayoutData->SecondIndicatorLayout() ); + iLayoutData->SecondIndicatorLayout(), + iFlags & EHgScrollerSelectionMode || iSelectionMode != ENoSelection ); } // ----------------------------------------------------------------------------- diff -r d48ab3b357f1 -r 978afdc0236f uifw/ganes/src/HgSingleTextList.cpp --- a/uifw/ganes/src/HgSingleTextList.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/ganes/src/HgSingleTextList.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -143,7 +143,8 @@ aRect, item->Flags(), iLayoutData->FirstIndicatorLayout(), - iLayoutData->SecondIndicatorLayout() ); + iLayoutData->SecondIndicatorLayout(), + iFlags & EHgScrollerSelectionMode || iSelectionMode != ENoSelection ); } // ----------------------------------------------------------------------------- diff -r d48ab3b357f1 -r 978afdc0236f uifw/ganes/src/HgSingleTextListWithIcon.cpp --- a/uifw/ganes/src/HgSingleTextListWithIcon.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/ganes/src/HgSingleTextListWithIcon.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -144,7 +144,8 @@ aRect, item->Flags(), iGraphicLayoutData->FirstIndicatorLayout(), - iGraphicLayoutData->SecondIndicatorLayout() ); + iGraphicLayoutData->SecondIndicatorLayout(), + iFlags & EHgScrollerSelectionMode || iSelectionMode != ENoSelection ); } // ----------------------------------------------------------------------------- diff -r d48ab3b357f1 -r 978afdc0236f uifw/ganes/src/HgVgEGL.cpp --- a/uifw/ganes/src/HgVgEGL.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/ganes/src/HgVgEGL.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -47,6 +47,12 @@ void CHgVgEGL::ConstructL (RWindow& aWindow) { InitEGL(aWindow); + // Enable flag that is used to determine whether egl has been initialized. + // For example vgImages shouldn't be created before egl has been initialized. + // There will be only one instance of this class so there is no need to check + // whether there is already something in the DLL tls. + TBool* eglInitialized = new TBool(ETrue); + Dll::SetTls((TAny*)eglInitialized); } // ----------------------------------------------------------------------------- @@ -66,6 +72,10 @@ CHgVgEGL::~CHgVgEGL ( ) { DestroyEGL(); + // Disable flag that is used to determine whether egl has been initialized. + // For example vgImages shouldn't be created before egl has been initialized. + delete Dll::Tls(); + Dll::FreeTls(); } // --------------------------------------------------------------------------- @@ -357,4 +367,14 @@ return bitmap; } +// --------------------------------------------------------------------------- +// CHgVgEGL::EglInitialized() +// --------------------------------------------------------------------------- +// +TBool CHgVgEGL::EglInitialized() +{ + TBool* eglInitialized = (TBool*)Dll::Tls(); + return eglInitialized ? *eglInitialized : EFalse; +} + // End of File diff -r d48ab3b357f1 -r 978afdc0236f uifw/ganes/src/HgVgHelper.cpp --- a/uifw/ganes/src/HgVgHelper.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/ganes/src/HgVgHelper.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -20,6 +20,7 @@ #include "HgVgHelper.h" #include "HgVgDrawBuffer.h" #include "HgVgImageCreator.h" +#include "HgVgEgl.h" #include #include @@ -107,7 +108,9 @@ // VGImage CreateVgImageFromIconL(const CGulIcon& aIcon) { - + // If egl has not been initialized we aren't allowed to create vgimages. + if (!CHgVgEGL::EglInitialized()) return VG_INVALID_HANDLE; + CFbsBitmap* bitmap = aIcon.Bitmap(); User::LeaveIfNull(bitmap); CFbsBitmap* mask = aIcon.Mask(); diff -r d48ab3b357f1 -r 978afdc0236f uifw/ganes/src/HgVgMediaWall.cpp --- a/uifw/ganes/src/HgVgMediaWall.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uifw/ganes/src/HgVgMediaWall.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -230,7 +230,12 @@ // EXPORT_C TInt CHgVgMediaWall::SelectedIndex() { - return iSelectedIndex * iRowCount; + // iObserverNotified flag is set on when animation is about to end and + // observer is notified from the selected index. + return ((iAnimationState == EHgVgMediaWallAnimationStateTransition || + iAnimationState == EHgVgMediaWallAnimationStateFastTransition) && + !iObserverNotified) ? + KErrNotFound : iSelectedIndex * iRowCount; } // ----------------------------------------------------------------------------- @@ -343,6 +348,9 @@ iPopupText1.Close(); iPopupText2.Close(); + // Just to be safe, this will release all resource, eventhought + // they should be already released at this point. + eglReleaseThread(); } // ----------------------------------------------------------------------------- diff -r d48ab3b357f1 -r 978afdc0236f uiutils/Findutil/src/FindUtilWestern.cpp --- a/uiutils/Findutil/src/FindUtilWestern.cpp Wed Sep 01 12:16:19 2010 +0100 +++ b/uiutils/Findutil/src/FindUtilWestern.cpp Tue Sep 14 21:48:24 2010 +0300 @@ -286,10 +286,12 @@ iNotifyHandler->StartListeningL(); } //TSW: LYEE-7Q2GRV - if(!iFindUtilKorean) - { + FeatureManager::InitializeLibL(); + if( !iFindUtilKorean && FeatureManager::FeatureSupported( KFeatureIdKorean ) ) + { iFindUtilKorean = CFindUtilKorean::NewL(); - } + } + FeatureManager::UnInitializeLib(); } void CFindUtilWestern::HandleNotifyInt( TUint32 aId, TInt aNewValue ) @@ -306,7 +308,7 @@ TBool CFindUtilWestern::Match(const TDesC& aContactsField, const TDesC& aWord) { - if ( iFindUtilKorean->IsKoreanLanguage( aContactsField ) || iFindUtilKorean->IsKoreanLanguage( aWord ) ) + if ( iFindUtilKorean && ( iFindUtilKorean->IsKoreanLanguage( aContactsField ) || iFindUtilKorean->IsKoreanLanguage( aWord ) ) ) { return iFindUtilKorean->Match( aContactsField, aWord ); } @@ -345,9 +347,9 @@ // TBool CFindUtilWestern::MatchRefineL( const TDesC& aItemString, const TDesC& aSearchText ) { - if ( FeatureManager::FeatureSupported( KFeatureIdKorean ) || - iFindUtilKorean->IsKoreanLanguage( aItemString ) || - iFindUtilKorean->IsKoreanLanguage( aSearchText ) ) + if ( iFindUtilKorean && + ( iFindUtilKorean->IsKoreanLanguage( aItemString ) || + iFindUtilKorean->IsKoreanLanguage( aSearchText ) ) ) { return iFindUtilKorean->MatchRefineL( aItemString, aSearchText ); } @@ -1316,7 +1318,7 @@ return EFalse; } - if ( iFindUtilKorean ) + if ( iFindUtilKorean && ( iFindUtilKorean->IsKoreanLanguage( aItemString ) || iFindUtilKorean->IsKoreanLanguage( aSearchText ) ) ) { return iFindUtilKorean->MatchAdaptiveRefineL(aItemString,aSearchText,aNextChars); }