# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1270061992 -10800 # Node ID 08e69e956a8c6bf5e428b5daf9f25a55c56c1c93 # Parent 9f56a4e1b8ab173170f47f69604ae95774ef2e74 Revision: 201011 Kit: 201013 diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_plat/avkon_localised_texts_api/loc/avkon.loc --- a/classicui_plat/avkon_localised_texts_api/loc/avkon.loc Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_plat/avkon_localised_texts_api/loc/avkon.loc Wed Mar 31 21:59:52 2010 +0300 @@ -4283,5 +4283,11 @@ //r: TB9.2 #define text_chi_input_stroke_phrase "Stroke phrase" +// d: Default text shown in the universal indicator popup for integrate im indicator. +// l: list_single_uniindi_pane_t1 +// w: +// r: TB9.2 +// +#define qtn_iim_uni_ind_default "New unread chats" // End of File diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_plat/extended_editors_api/inc/aknedwincustomdrawbase.h --- a/classicui_plat/extended_editors_api/inc/aknedwincustomdrawbase.h Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_plat/extended_editors_api/inc/aknedwincustomdrawbase.h Wed Mar 31 21:59:52 2010 +0300 @@ -25,7 +25,6 @@ class CTextView; class CTextLayout; -class MAknsSkinInstance; #include #include @@ -193,7 +192,6 @@ CWindowGc* iSysGc; CAknPictographInterface* iPictographDrawer; // owned TInt iWsBufferRequestId; - MAknsSkinInstance* iSkinInstance; }; #endif diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_plat/extended_setting_pages_api/tsrc/src/testdomsetpageblocks.cpp --- a/classicui_plat/extended_setting_pages_api/tsrc/src/testdomsetpageblocks.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_plat/extended_setting_pages_api/tsrc/src/testdomsetpageblocks.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -777,8 +777,11 @@ CAknTransparentCameraSettingPageExt( R_SETTING_PAGE, index, array ); CleanupStack::PushL( setPageExt ); setPageExt->ConstructL(); - + + CWindowGc& gc = setPageExt->SystemGc(); + gc.Activate( *setPageExt->DrawableWindow() ); setPageExt->DoDraw( TRect() ); + gc.Deactivate(); CleanupStack::PopAndDestroy( setPageExt ); CleanupStack::PopAndDestroy( array ); diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_plat/find_item_ui_api/inc/finditemmenu.h --- a/classicui_plat/find_item_ui_api/inc/finditemmenu.h Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_plat/find_item_ui_api/inc/finditemmenu.h Wed Mar 31 21:59:52 2010 +0300 @@ -371,6 +371,12 @@ TBool ItemFinderExists(); TPtrC CurrentSelection(); + /** + * Returns text highlight status. + * @return ETrue if there is highlighted text, otherwise EFalse + */ + TBool HasSelection() const; + private: /** * Enumeration for menu command ids diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_plat/ganes_api/inc/ganes/HgVgMediaWall.h --- a/classicui_plat/ganes_api/inc/ganes/HgVgMediaWall.h Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_plat/ganes_api/inc/ganes/HgVgMediaWall.h Wed Mar 31 21:59:52 2010 +0300 @@ -99,7 +99,9 @@ enum THgVgMediaWallEvent { EHgVgMediaWallEventRequestHideSoftkeys, - EHgVgMediaWallEventRequestShowSoftkeys + EHgVgMediaWallEventRequestShowSoftkeys, + EHgVgMediaWallEventButtonGotoNowPlaying, + EHgVgMediaWallEventButtonBack }; /** diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_plat/indicator_plugin_api/inc/AknIndicatorPluginImplUIDs.hrh --- a/classicui_plat/indicator_plugin_api/inc/AknIndicatorPluginImplUIDs.hrh Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_plat/indicator_plugin_api/inc/AknIndicatorPluginImplUIDs.hrh Wed Mar 31 21:59:52 2010 +0300 @@ -78,6 +78,9 @@ //UID for the USB MEM indicator plugin #define KImplUIDUSBMEMIndicatorsPlugin 0x20026FC4 +//UID for the IIM indicator plugin +#define KImplUIDIIMIndicatorPlugin 0x2002BC7F + #endif // AVKON_INDICATOR_PLUGIN_IMPL_UIDS_HRH // End of file diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_plat/item_finder_api/group/bld.inf --- a/classicui_plat/item_finder_api/group/bld.inf Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_plat/item_finder_api/group/bld.inf Wed Mar 31 21:59:52 2010 +0300 @@ -25,4 +25,4 @@ PRJ_EXPORTS ../inc/ItemFinder.h MW_LAYER_PLATFORM_EXPORT_PATH(ItemFinder.h) - +../inc/itemfinderobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(itemfinderobserver.h) diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_plat/item_finder_api/inc/ItemFinder.h --- a/classicui_plat/item_finder_api/inc/ItemFinder.h Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_plat/item_finder_api/inc/ItemFinder.h Wed Mar 31 21:59:52 2010 +0300 @@ -24,6 +24,7 @@ // INCLUDES #include // for MParser +#include // for MCoeMessageMonitorObserver // CONSTANTS @@ -33,6 +34,9 @@ class CItemFinderAsyncParser; class CSchemeResolver; class CFindItemEngine; +class MAknItemFinderObserver; +class CCoeEnv; +class CCoeControl; // CLASS DECLARATION class MItemFinderObserver @@ -46,7 +50,8 @@ */ NONSHARABLE_CLASS(CItemFinder) : public CBase, - public MParser + public MParser, + public MCoeMessageMonitorObserver { public: // Constructors and destructor @@ -221,8 +226,12 @@ * Tells whether the point tapped inside the editor text body was hit some find item. * Also updates the current item selection and cursor position when necessary. * - * @param aTappedPoint Tapped point relative to the upper left point of the editor text body control. - * @return ETrue if some find item inside editor text body was tapped. Otherwise EFalse. + * @param aTappedPoint Tapped point relative to the upper left point + * of the editor text body control. + * @return ETrue if some find item inside editor text body was tapped. + * Otherwise EFalse. If observer is given, then this returns + * always EFalse, since the information is given via observer + * interface */ IMPORT_C TBool ItemWasTappedL( const TPoint aTappedPoint ); @@ -254,6 +263,30 @@ * @return current selection of the text buffer on the screen. */ IMPORT_C TPtrC CurrentSelection(); + + /** + * Sets external observer (Must implement MAknItemFinderObserver) to + * which notify item activations. + * + * @param aObserver Observer which will be notified about item activations + * @since S60 5.2 + */ + IMPORT_C void SetItemFinderObserverL( MAknItemFinderObserver* + aObserver ); + + /** + * From @c MCoeMessageMonitorObserver, this method is called + * when a window server event is received. + * + * @param aEvent received event. + */ + void MonitorWsMessage( const TWsEvent& aEvent ); + + /** + * Returns text highlight status. + * @return ETrue if there is highlighted text, otherwise EFalse + */ + TBool HasSelection () const; private: @@ -282,6 +315,31 @@ TInt RefreshEditor(); + /** + * Sets window conrol, that is used when monitoring pointer events + * @param aControl pointer to editor control + */ + void SetWindowControl( CCoeControl* aControl ); + + /** + * Monitors pointer events and calls observer when item is tapped. + * @param aEvent pointer event + * @param aTargetControl control that the pointer event is targeted to + */ + void MonitorPointerEventL( TPointerEvent& aEvent, CCoeControl* aTargetControl ); + + /** + * Modifies pointer event so that it is relative to editor control + * @param aTapPoint tapped point + */ + void ModifyPointerEvent( TPoint& aTapPoint ); + + /** + * Returns drag threshold. + * @return drag threshold + */ + TInt DragThresholdL(); + private: // Data CEikRichTextEditor** iEditor; // Not owned @@ -307,6 +365,37 @@ friend class CItemFinderAsyncParser; TInt iMinDigitsToFind; + + /** + * Pointer to item activation observer + */ + MAknItemFinderObserver* iItemFinderObserver; // not owned + /** + * Control environment. + * Not own. + */ + CCoeEnv* iCoeEnv; + + /** + * Tells if focus move is allowed. + */ + TBool iAllowHighlight; + + /** + * CCoeControl that owns the window and receives pointer events. + */ + CCoeControl* iWindowControl; + + /** + * Tap point. + */ + TPoint iTapPoint; + + /** + * Drag threshold + */ + TInt iDragThreshold; + }; #endif // ITEMFINDER_H diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_plat/item_finder_api/inc/itemfinderobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/classicui_plat/item_finder_api/inc/itemfinderobserver.h Wed Mar 31 21:59:52 2010 +0300 @@ -0,0 +1,85 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Utility used for activation events +* +* +*/ + + + +#ifndef M_ITEMFINDEROBSERVER_H +#define M_ITEMFINDEROBSERVER_H + +// INCLUDES +#include // for CItemFinder::CFindItemExt + +/** + * Item activation observer. + * + * Notifies observer when user activates highlightable items in + * CEikRichTextEditor. Observer class should implement this interface and + * register itself to @c CItemFinder to receive item activation events. + * + * The sent event includes information about the activated item, + * method of activation and additional information about the activation. + * + * Code example of listening to activation events: + * @code + * void CItemFinderObserver::HandleFindItemEventL( + * CItemFinder::CFindItemExt& aItem, + * MAknItemFinderObserver::TEventFlag aEvent, + * TUint aFlags ) + * { + * if ( aEvent == MAknItemFinderObserver::EPointerEvent + * && aItem.iItemType == CItemFinder::EPhoneNumber ) + * { + * HandleCallL( aItem.iItemDescriptor->Des() ); + * } + * } + * @endcode + * + * @lib commonui.lib + * @since S60 v5.2 + */ +class MAknItemFinderObserver + { + public: + /** + * Enum for activation event flags. + */ + enum TEventFlag + { + /** + * Item was activated by a pointer event. + */ + EPointerEvent = 0x00000001, + /** + * Item was activated by a key event. + */ + EKeyEvent = 0x00000002 + }; + /** + * Handles the activation event. + * + * @param aItem Activated item. + * @param aEvent Activation method. + * @param aFlags Additional information about the event. + */ + virtual void HandleFindItemEventL( + const CItemFinder::CFindItemExt& aItem, + MAknItemFinderObserver::TEventFlag aEvent, + TUint aFlags = 0 ) = 0; + }; + +#endif // M_ITEMFINDEROBSERVER_H diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_plat/item_finder_api/tsrc/conf/tctestdomitemfinder.cfg --- a/classicui_plat/item_finder_api/tsrc/conf/tctestdomitemfinder.cfg Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_plat/item_finder_api/tsrc/conf/tctestdomitemfinder.cfg Wed Mar 31 21:59:52 2010 +0300 @@ -106,4 +106,9 @@ [Test] title TestIFCurrentSelection run testscripter c:\testframework\ui_testdomitemfinder.cfg 22 -[Endtest] \ No newline at end of file +[Endtest] + +[Test] +title TestIFSetItemFinderObserverL +run testscripter c:\testframework\ui_testdomitemfinder.cfg 23 +[Endtest] diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_plat/item_finder_api/tsrc/conf/ui_testdomitemfinder.cfg --- a/classicui_plat/item_finder_api/tsrc/conf/ui_testdomitemfinder.cfg Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_plat/item_finder_api/tsrc/conf/ui_testdomitemfinder.cfg Wed Mar 31 21:59:52 2010 +0300 @@ -171,4 +171,12 @@ test TestIFNewL test TestIFCurrentSelection delete test -[Endtest] \ No newline at end of file +[Endtest] + +[Test] +title TestIFSetItemFinderObserverL +create testdomitemfinder test +test TestIFNewL +test TestIFSetItemFinderObserverL +delete test +[Endtest] diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_plat/item_finder_api/tsrc/inc/testdomitemfinder.h --- a/classicui_plat/item_finder_api/tsrc/inc/testdomitemfinder.h Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_plat/item_finder_api/tsrc/inc/testdomitemfinder.h Wed Mar 31 21:59:52 2010 +0300 @@ -266,6 +266,14 @@ */ virtual TInt TestIFCurrentSelection( CStifItemParser& aItem ); + /** + * TestIFSetItemFinderObserverL test method. + * @since S60 5.0 + * @param aItem Script line containing parameters. + * @return Symbian OS error code. + */ + virtual TInt TestIFSetItemFinderObserverL( CStifItemParser& aItem ); + private: // Data /** diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_plat/item_finder_api/tsrc/src/testdomitemfinderblocks.cpp --- a/classicui_plat/item_finder_api/tsrc/src/testdomitemfinderblocks.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_plat/item_finder_api/tsrc/src/testdomitemfinderblocks.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -66,6 +66,7 @@ ENTRY( "TestIFSetExternalLinksL", CTestDOMItemFinder::TestIFSetExternalLinksL ), ENTRY( "TestIFCurrentItemExt", CTestDOMItemFinder::TestIFCurrentItemExt ), ENTRY( "TestIFCurrentSelection", CTestDOMItemFinder::TestIFCurrentSelection ), + ENTRY( "TestIFSetItemFinderObserverL", CTestDOMItemFinder::TestIFSetItemFinderObserverL ), }; const TInt count = sizeof( KFunctions ) / sizeof( TStifFunctionInfo ); @@ -522,4 +523,20 @@ iItemFinder->CurrentSelection(); return KErrNone; } +// ----------------------------------------------------------------------------- +// CTestDOMItemFinder::TestIFSetItemFinderObserverL +// ----------------------------------------------------------------------------- +// +TInt CTestDOMItemFinder::TestIFSetItemFinderObserverL( CStifItemParser& /*aItem*/ ) + { + + // Print to UI + _LIT( Ktestdomitemfinder, "testdomitemfinder" ); + _LIT( KTestIFSetItemFinderObserverL, "In TestIFSetItemFinderObserverL" ); + TestModuleIf().Printf( 0, Ktestdomitemfinder, KTestIFSetItemFinderObserverL ); + // Print to log file + iLog->Log( KTestIFSetItemFinderObserverL ); + iItemFinder->SetItemFinderObserverL( 0 ); + return KErrNone; + } // [End of File] diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/editors_api/inc/EIKEDWIN.H --- a/classicui_pub/editors_api/inc/EIKEDWIN.H Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/editors_api/inc/EIKEDWIN.H Wed Mar 31 21:59:52 2010 +0300 @@ -75,6 +75,7 @@ // For construction of Rich Text - based custom formatters class CRichText; +class CAknPhysics; enum TReplaceOption { @@ -331,12 +332,12 @@ /** * Enables kinetic scrolling. */ - void EnableKineticScrollingL(); + void EnableKineticScrollingL( CAknPhysics* aPhysics = NULL ); /** * Enables physics. */ - void EnablePhysicsL(); + void EnablePhysicsL( CAknPhysics* aPhysics = NULL ); /** * Initializes physics. @@ -2341,6 +2342,17 @@ */ IMPORT_C void EnableKineticScrollingL( TBool aEnable ); + /** + * Enables kinetic scrolling in editor with external CAknPhysics instance. + * + * Note that when kinetic scrolling is enabled, it is + * no longer possible to disable it with this function. + * + * @since S60 v5.2 + * @param aPhysics Pointer to external CAknPhysics instance. + */ + IMPORT_C void EnableKineticScrollingL( CAknPhysics* aPhysics ); + public: void EnableSmileySupportL( TBool aEnableSmiley ); TBool IsSmileyEnabled() const; diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/hierarchical_lists_api/inc/aknsinglecolumnstyletreelist.h --- a/classicui_pub/hierarchical_lists_api/inc/aknsinglecolumnstyletreelist.h Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/hierarchical_lists_api/inc/aknsinglecolumnstyletreelist.h Wed Mar 31 21:59:52 2010 +0300 @@ -128,7 +128,11 @@ /** Emphasis. Applicable to core data rows only. */ EEmphasis = 0x10, /** Item is not markable. */ - EMarkingDisabled = 0x20 + EMarkingDisabled = 0x20, + /** Item has smiley. For core data row, just first column gets it*/ + ESmileyIcon = 0x40, + /** Same as ESmileyIcon. Specify second column of core data row get it.n*/ + ESmileyIconSecond = 0x80 }; /** Icon types usable with single column style hierarchical list. diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/hierarchical_lists_api/inc/akntreelist.h --- a/classicui_pub/hierarchical_lists_api/inc/akntreelist.h Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/hierarchical_lists_api/inc/akntreelist.h Wed Mar 31 21:59:52 2010 +0300 @@ -49,6 +49,8 @@ items as required. */ const TUint32 KAknTreeListMarkable = 0x0010; +/** Flag to enalbe smiley in tree list. */ +const TUint32 KAknTreeListSmiley = 0x0020; /** * Abstract base class for hierarchical lists. @@ -98,7 +100,7 @@ public: - // for focus handling after Sort + // for focus handling after Sort enum TFocusBehaviour { ESaveFocus, @@ -846,28 +848,28 @@ * * @panic EAknHListPanicInvalidItemID Item with specified ID is not found. */ - IMPORT_C void SetFocusedItem( TAknTreeItemID aItem ); - - /** + IMPORT_C void SetFocusedItem( TAknTreeItemID aItem ); + + /** * Gets the index of the focused item on the screen. Possible values are * from 0 to max. number of visible lines - 1. Value -1 is * returned if no item is focused or focused item is not visible. * * @return index of the focused item on the screen. */ - IMPORT_C TInt FocusedItemIndex() const; - - /** + IMPORT_C TInt FocusedItemIndex() const; + + /** * Gets the index of the item on the screen. Possible values are * from 0 to max. number of visible lines - 1. Value -1 is * returned if the requested item is not visible on the screen. * * @return index of the requested item. */ - IMPORT_C TInt VisibleItemIndex( TAknTreeItemID aItem ) const; + IMPORT_C TInt VisibleItemIndex( TAknTreeItemID aItem ) const; - - /** + + /** * Sets custom ordering for the hierarchical list and sorts the list * with the use of given ordering interface. The given interface is * used until it is replaced with some other ordering. @@ -881,9 +883,9 @@ * * @param aDrawNow @c ETrue to redraw the list after sorting. */ - IMPORT_C void Sort( MAknCustomTreeOrdering* aOrdering, TFocusBehaviour aFocusBehaviour, TBool aDrawNow ); + IMPORT_C void Sort( MAknCustomTreeOrdering* aOrdering, TFocusBehaviour aFocusBehaviour, TBool aDrawNow ); - /** + /** * Sorts the specified node with the use of previously set ordering * interface. The sorting can be restricted to the specified node, or * the sorting can be set to include also every descendant node of the @@ -908,7 +910,7 @@ * * @panic EAknHListPanicInvalidItemType Specified item is not a node. */ - IMPORT_C void Sort( TAknTreeItemID aNode, TFocusBehaviour aFocusBehaviour, TBool aSortDescendants, TBool aDrawNow ); + IMPORT_C void Sort( TAknTreeItemID aNode, TFocusBehaviour aFocusBehaviour, TBool aSortDescendants, TBool aDrawNow ); /** * Sets text for the empty list. This text is visible if the list box @@ -916,7 +918,7 @@ * * @param aText The text for the empty list. */ - IMPORT_C void SetEmptyTextL(const TDesC& aText); + IMPORT_C void SetEmptyTextL(const TDesC& aText); // From base class CCoeControl diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/lists_api/inc/AknListBoxSettingPage.h --- a/classicui_pub/lists_api/inc/AknListBoxSettingPage.h Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/lists_api/inc/AknListBoxSettingPage.h Wed Mar 31 21:59:52 2010 +0300 @@ -148,7 +148,17 @@ */ static TBool FocusToFirstItem(); - + /** + * Enables highlight to listbox control in single click + * mode if needed + * + * @since 5.2 + * + * @param aCommandId Event Id from the soft-key + * @return TBool ETrue if highlight was enabled + */ + TBool EnableSingleClickHighlight( TInt aCommandId ); + /** * Create colorskinned icon and add it to icon array. Utility for * radiobutton, popup & checkbox setting page lists diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/lists_api/inc/EIKLBI.H --- a/classicui_pub/lists_api/inc/EIKLBI.H Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/lists_api/inc/EIKLBI.H Wed Mar 31 21:59:52 2010 +0300 @@ -321,7 +321,12 @@ /** * This flag indicates that single click mode is enabled. */ - ESingleClickEnabled = 0x0080 + ESingleClickEnabled = 0x0080, + + /** + * This flag indicates that simley icon is enabled. + */ + EDrawSmileyIcon = 0x0100 }; public: diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/lists_api/inc/aknlists.h --- a/classicui_pub/lists_api/inc/aknlists.h Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/lists_api/inc/aknlists.h Wed Mar 31 21:59:52 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -1857,20 +1857,6 @@ */ IMPORT_C static void SetupListboxPos(CEikListBox& aListBox, const TAknWindowLineLayout &aLayout); - - /** - * This function returns a correct offset to revise layout data. - * - * Attention: The function is only effective for QHD lanscape model. - * It always return 0 in QVGA, QVGA2, VGA and VAG3. - * A panic will take place if it is used in other models. - * - * @since S60 5.0 - * - * @param aScreenRect Size of Screen. - * @return Offset of listscroll_menu_pane's layout - */ - static TInt AdjustPopupLayoutData( const TRect& aScreenRect ); }; /** diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/lists_api/inc/eikfrlbd.h --- a/classicui_pub/lists_api/inc/eikfrlbd.h Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/lists_api/inc/eikfrlbd.h Wed Mar 31 21:59:52 2010 +0300 @@ -1275,7 +1275,23 @@ */ CEikListBox* ListBox() const; - + /** + * This method prepare smiley engine if it is not ready yet. + * apply new icon size to smiley icon. + * @internal + * @since S60 5.2 + */ + void InitSmileyL(); + + /** + * Decide which subcell will draw smiley icon. Note that only text subcell can + * be set. + * + * @param aSubCell Index Index number of the subcell. + * @internal + * @since S60 5.2 + */ + void SetSmileySubCellL( TInt aSubCell ); private: void DoConstructL( const TAknsItemID& aAnimationIID ); diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/popups_api/inc/AknPopupSettingPage.h --- a/classicui_pub/popups_api/inc/AknPopupSettingPage.h Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/popups_api/inc/AknPopupSettingPage.h Wed Mar 31 21:59:52 2010 +0300 @@ -448,7 +448,18 @@ * */ IMPORT_C virtual void CAknListBoxSettingPage_Reserved_1(); - + +protected: + /** + * From MEikCommandObserver + * Processes events from the softkeys. (Or translated from key events) + * + * @param aCommandId Event Id from the soft-key + * + * @since 5.2 + */ + IMPORT_C virtual void ProcessCommandL( TInt aCommandId ); + private: // The objects pointed to or referenced by this is not owned diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/popups_api/inc/aknpopuplayout.h --- a/classicui_pub/popups_api/inc/aknpopuplayout.h Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/popups_api/inc/aknpopuplayout.h Wed Mar 31 21:59:52 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -237,6 +237,17 @@ IMPORT_C static void MenuPopupWindowGraphics(TAknPopupWindowLayoutDef &aDef); static TRect RectFromLayout(TRect aParent, const TAknWindowComponentLayout &aComponentLayout); + +private: + + /** + * Contains layout setup that is common for all popups. + */ + static void CommonSetup( TAknPopupWindowLayoutDef& aDef, + const TAknWindowComponentLayout& aItemLayout, + TInt aNum, + TBool aHeading, + TBool aLayoutHeading ); }; /** TAknPopupWindowLayoutDef diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/popups_api/tsrc/conf/tctestsdkpopupsspsp.cfg --- a/classicui_pub/popups_api/tsrc/conf/tctestsdkpopupsspsp.cfg Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/popups_api/tsrc/conf/tctestsdkpopupsspsp.cfg Wed Mar 31 21:59:52 2010 +0300 @@ -143,3 +143,8 @@ title TestCPSPReserved_2L run testscripter c:\testframework\ui_testsdkpopupsspsp.cfg 30 [Endtest] + +[Test] +title TestCPSPProcessCommandL +run testscripter c:\testframework\ui_testsdkpopupsspsp.cfg 31 +[Endtest] diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/popups_api/tsrc/conf/ui_testsdkpopupsspsp.cfg --- a/classicui_pub/popups_api/tsrc/conf/ui_testsdkpopupsspsp.cfg Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/popups_api/tsrc/conf/ui_testsdkpopupsspsp.cfg Wed Mar 31 21:59:52 2010 +0300 @@ -332,3 +332,14 @@ delete test sendtobackground [Endtest] + +// For test function: +// IMPORT_C virtual void ProcessCommandL( TInt aCommandId ); +[Test] +title TestCPSPProcessCommandL +create testsdkpopups test +bringtoforeground +test TestCPSPProcessCommandL +delete test +sendtobackground +[Endtest] diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/popups_api/tsrc/inc/testsdkpopups.h --- a/classicui_pub/popups_api/tsrc/inc/testsdkpopups.h Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/popups_api/tsrc/inc/testsdkpopups.h Wed Mar 31 21:59:52 2010 +0300 @@ -1393,6 +1393,15 @@ * @return Symbian OS error code. */ virtual TInt TestCPSPReservedL( CStifItemParser& aItem ); + + /** + * TestCPSPProcessCommandL test function for testing the + * ProcessCommandL function + * @since S60 5.2 + * @param aItem never used + * @return Symbian OS error code. + */ + virtual TInt TestCPSPProcessCommandL( CStifItemParser& aItem ); }; #endif // C_TESTSDKPOPUPS_H diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/popups_api/tsrc/inc/testsdkpopupsspsp.h --- a/classicui_pub/popups_api/tsrc/inc/testsdkpopupsspsp.h Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/popups_api/tsrc/inc/testsdkpopupsspsp.h Wed Mar 31 21:59:52 2010 +0300 @@ -69,6 +69,11 @@ */ void Reserved_2(); + /** + * ProcessCommandL test function for testing the + * Test ProcessCommandL function + */ + void ProcessCommandL( TInt aCommandId ); }; #endif /*C_TESTSDKPOPUPSSPSP_H*/ diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/popups_api/tsrc/src/testsdkpopupsblocks.cpp --- a/classicui_pub/popups_api/tsrc/src/testsdkpopupsblocks.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/popups_api/tsrc/src/testsdkpopupsblocks.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -196,7 +196,8 @@ ENTRY( "TestCPSPQueryValueL", CTestSDKPopups::TestCPSPQueryValueL ), ENTRY( "TestCPSPSelectCurrentItemL", CTestSDKPopups::TestCPSPSelectCurrentItemL ), ENTRY( "TestCPSPWriteInternalStateL", CTestSDKPopups::TestCPSPWriteInternalStateL ), - ENTRY( "TestCPSPReservedL", CTestSDKPopups::TestCPSPReservedL ), + ENTRY( "TestCPSPReservedL", CTestSDKPopups::TestCPSPReservedL ), + ENTRY( "TestCPSPProcessCommandL", CTestSDKPopups::TestCPSPProcessCommandL ), // [test cases entries] }; diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/popups_api/tsrc/src/testsdkpopupsblocksspsp.cpp --- a/classicui_pub/popups_api/tsrc/src/testsdkpopupsblocksspsp.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/popups_api/tsrc/src/testsdkpopupsblocksspsp.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -1165,3 +1165,43 @@ return KErrNone; } + +// ----------------------------------------------------------------------------- +// CTestSDKPopups::TestCPSPProcessCommandL +// ----------------------------------------------------------------------------- +// +TInt CTestSDKPopups::TestCPSPProcessCommandL( CStifItemParser& /*aItem*/ ) + { + CDesCArrayFlat* item = CCoeEnv::Static()->ReadDesCArrayResourceL( R_TESTSDK_LIST_ITEM_ARRAY ); + CleanupStack::PushL( item ); + STIF_ASSERT_NOT_NULL( item ); + + CAknQueryValueTextArray* textArray = CAknQueryValueTextArray::NewL(); + CleanupStack::PushL( textArray ); + STIF_ASSERT_NOT_NULL( textArray ); + textArray->SetArray( *item ); + + CAknQueryValueText* queryValueText = CAknQueryValueText::NewL(); + CleanupStack::PushL( queryValueText ); + STIF_ASSERT_NOT_NULL( queryValueText ); + queryValueText->SetArrayL( textArray ); + + CTestSDKPopupsSPSP* popupSettingPage = new (ELeave) CTestSDKPopupsSPSP( + R_TESTSDK_POPUP_SETTING_PAGE, *queryValueText ); + CleanupStack::PushL( popupSettingPage ); + STIF_ASSERT_NOT_NULL( popupSettingPage ); + + popupSettingPage->ConstructL(); + CCoeEnv::Static()->AppUi()->AddToStackL( popupSettingPage ); + popupSettingPage->ProcessCommandL( EAknSoftkeySelect ); + CCoeEnv::Static()->AppUi()->RemoveFromStack( popupSettingPage ); + + CleanupStack::PopAndDestroy( popupSettingPage ); + CleanupStack::PopAndDestroy( queryValueText ); + CleanupStack::PopAndDestroy( textArray ); + CleanupStack::PopAndDestroy( item ); + + return KErrNone; + + } + diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/popups_api/tsrc/src/testsdkpopupsspsp.cpp --- a/classicui_pub/popups_api/tsrc/src/testsdkpopupsspsp.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/popups_api/tsrc/src/testsdkpopupsspsp.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -88,3 +88,12 @@ { CAknPopupSettingPage::Reserved_2(); } + +// ----------------------------------------------------------------------------- +// CTestSDKPopupsSPSP::ProcessCommandL +// ----------------------------------------------------------------------------- +void CTestSDKPopupsSPSP::ProcessCommandL( TInt aCommandId ) + { + CAknPopupSettingPage::ProcessCommandL( aCommandId ); + } + diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/setting_pages_api/inc/AknRadioButtonSettingPage.h --- a/classicui_pub/setting_pages_api/inc/AknRadioButtonSettingPage.h Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/setting_pages_api/inc/AknRadioButtonSettingPage.h Wed Mar 31 21:59:52 2010 +0300 @@ -194,7 +194,17 @@ */ IMPORT_C virtual void CAknListBoxSettingPage_Reserved_1(); - +protected: + /** + * From MEikCommandObserver + * Processes events from the softkeys. (Or translated from key events) + * + * @param aCommandId Event Id from the soft-key + * + * @since 5.2 + */ + IMPORT_C virtual void ProcessCommandL( TInt aCommandId ); + private: // Back up copy of the selection index TInt iOldSelectionIndex; diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/setting_pages_api/tsrc/conf/tctestsdksettingpagesaknradiobuttonsettingpage.cfg --- a/classicui_pub/setting_pages_api/tsrc/conf/tctestsdksettingpagesaknradiobuttonsettingpage.cfg Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/setting_pages_api/tsrc/conf/tctestsdksettingpagesaknradiobuttonsettingpage.cfg Wed Mar 31 21:59:52 2010 +0300 @@ -66,6 +66,10 @@ run testscripter c:\testframework\ui_testsdksettingpagesaknradiobuttonsettingpage.cfg 13 [Endtest] +[Test] +title TestSettingpagesRadioButtonProcessCommandLL +run testscripter c:\testframework\ui_testsdksettingpagesaknradiobuttonsettingpage.cfg 14 +[Endtest] diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/setting_pages_api/tsrc/conf/ui_testsdksettingpagesaknradiobuttonsettingpage.cfg --- a/classicui_pub/setting_pages_api/tsrc/conf/ui_testsdksettingpagesaknradiobuttonsettingpage.cfg Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/setting_pages_api/tsrc/conf/ui_testsdksettingpagesaknradiobuttonsettingpage.cfg Wed Mar 31 21:59:52 2010 +0300 @@ -107,6 +107,12 @@ delete test [Endtest] +[Test] +title TestSettingpagesRadioButtonProcessCommandLL +create testsdksettingpages test +test TestSettingpagesRadioButtonProcessCommandLL +delete test +[Endtest] diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/setting_pages_api/tsrc/inc/testaknradiobuttonsettingpageprotected.h --- a/classicui_pub/setting_pages_api/tsrc/inc/testaknradiobuttonsettingpageprotected.h Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/setting_pages_api/tsrc/inc/testaknradiobuttonsettingpageprotected.h Wed Mar 31 21:59:52 2010 +0300 @@ -64,6 +64,10 @@ * This fuction is wrote for testing WriteInternalStateL() function */ void DoWriteInternalStateL(RWriteStream& aWriteStream) const; + /* + * This function is wrote for testing ProcessCommandL() function + */ + void TestProcessCommandL( TInt aCommandId ); }; #endif /*C_TESTAKNRADIOBUTTONSETTINGPAGEPROTECTED_H*/ diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/setting_pages_api/tsrc/inc/testsdksettingpages.h --- a/classicui_pub/setting_pages_api/tsrc/inc/testsdksettingpages.h Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/setting_pages_api/tsrc/inc/testsdksettingpages.h Wed Mar 31 21:59:52 2010 +0300 @@ -1394,6 +1394,15 @@ */ virtual TInt TestSettingpagesRadioButtonWriteInternalStateLL( CStifItemParser& /*aItem*/ ); + /** + * TestSettingpagesRadioButtonProcessCommandLL test function for testing the + * ProcessCommandL function + * @since S60 5.2 + * @param aItem never used + * @return Symbian OS error code. + */ + virtual TInt TestSettingpagesRadioButtonProcessCommandLL( CStifItemParser& /*aItem*/ ); + /* * aknsettingitemlist.h */ diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/setting_pages_api/tsrc/src/testaknradiobuttonsettingpageprotected.cpp --- a/classicui_pub/setting_pages_api/tsrc/src/testaknradiobuttonsettingpageprotected.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/setting_pages_api/tsrc/src/testaknradiobuttonsettingpageprotected.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -100,6 +100,15 @@ WriteInternalStateL( aWriteStream ); } +// ----------------------------------------------------------------------------- +// CTestRadioButtonSettingPage::TestProcessCommandL +// ----------------------------------------------------------------------------- +// +void CTestRadioButtonSettingPage::TestProcessCommandL( TInt aCommandId ) + { + ProcessCommandL( aCommandId ); + } + //End file diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/setting_pages_api/tsrc/src/testsdksettingpagesblocks.cpp --- a/classicui_pub/setting_pages_api/tsrc/src/testsdksettingpagesblocks.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/setting_pages_api/tsrc/src/testsdksettingpagesblocks.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -358,8 +358,10 @@ ENTRY( "TestSettingpagesRadioButtonSelectCurrentItemLL", CTestSDKSettingPages::TestSettingpagesRadioButtonSelectCurrentItemLL ), ENTRY( "TestSettingpagesRadioButtonWriteInternalStateLL", - CTestSDKSettingPages::TestSettingpagesRadioButtonWriteInternalStateLL ), - + CTestSDKSettingPages::TestSettingpagesRadioButtonWriteInternalStateLL ), + ENTRY( "TestSettingpagesRadioButtonProcessCommandLL", + CTestSDKSettingPages::TestSettingpagesRadioButtonProcessCommandLL ), + //aknsettingitemlist.h //CAknSettingItem ENTRY( "TestSettingPagesItemListConstructorL", diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/setting_pages_api/tsrc/src/testsdksettingpagesblocksaknmfnesettingpage.cpp --- a/classicui_pub/setting_pages_api/tsrc/src/testsdksettingpagesblocksaknmfnesettingpage.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/setting_pages_api/tsrc/src/testsdksettingpagesblocksaknmfnesettingpage.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -249,7 +249,7 @@ pageDialog->DoBaseConstructL(); pageDialog->DoConstructL(); - CCoeControl* control = pageDialog->DoComponentControl( KOne ); + CCoeControl* control = pageDialog->DoComponentControl( KZero ); CEikMfne* editorControl = pageDialog->DoMfne(); STIF_ASSERT_EQUALS( static_cast( editorControl ), control ); diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/setting_pages_api/tsrc/src/testsdksettingpagesblocksaknradiobuttonsettingpage.cpp --- a/classicui_pub/setting_pages_api/tsrc/src/testsdksettingpagesblocksaknradiobuttonsettingpage.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/setting_pages_api/tsrc/src/testsdksettingpagesblocksaknradiobuttonsettingpage.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -427,6 +427,38 @@ return KErrNone; } +// ----------------------------------------------------------------------------- +// CTestSDKSettingPages::TestSettingpagesRadioButtonProcessCommandLL +// ----------------------------------------------------------------------------- +// +TInt CTestSDKSettingPages::TestSettingpagesRadioButtonProcessCommandLL( CStifItemParser& /*aItem*/ ) + { + CDesCArrayFlat* mArr = new( ELeave ) CDesCArrayFlat( KSize ); + CleanupStack::PushL( mArr ); + + TBuf tom( KTom ); + TBuf jack( KJack ); + TBuf mary( KMary ); + mArr->AppendL( tom ); + mArr->AppendL( jack ); + mArr->AppendL( mary ); + + TInt optin( KZero ); + TBuf< KBufSize > buffer( KTestString ); + CTestRadioButtonSettingPage* dialog = + new (ELeave) CTestRadioButtonSettingPage( &buffer, KOne, EAknCtPopupSettingList, + R_EXAMPLE_EDITOR_CONTROL, R_EXAMPLE_SETTING_PAGE, optin, mArr ); + CleanupStack::PushL( dialog ); + + dialog->ConstructL(); + CCoeEnv::Static()->AppUi()->AddToStackL( dialog ); + dialog->TestProcessCommandL( EAknSoftkeySelect ); + CCoeEnv::Static()->AppUi()->RemoveFromStack( dialog ); + + CleanupStack::PopAndDestroy( KTwo ); + return KErrNone; + } + //End file diff -r 9f56a4e1b8ab -r 08e69e956a8c classicui_pub/ui_framework_definitions_api/inc/avkon.hrh --- a/classicui_pub/ui_framework_definitions_api/inc/avkon.hrh Mon Mar 15 12:41:34 2010 +0200 +++ b/classicui_pub/ui_framework_definitions_api/inc/avkon.hrh Wed Mar 31 21:59:52 2010 +0300 @@ -1114,6 +1114,7 @@ EAknIndicatorStopWatch, EAknIndicatorMecoServiceTab, EAknIndicatorHDMI, + EAknIndicatorIntegratedIM, // Navi pane editor indicators EAknNaviPaneEditorIndicatorT9 = 100, diff -r 9f56a4e1b8ab -r 08e69e956a8c commonuis/CommonDialogs/src/CAknCFDFileSystemEvent.cpp --- a/commonuis/CommonDialogs/src/CAknCFDFileSystemEvent.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/commonuis/CommonDialogs/src/CAknCFDFileSystemEvent.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -109,10 +109,11 @@ // If not ENotifyDisk, do refresh when event is checked // using CheckFileSystemEvent - if ( iNotifyType == ENotifyDisk ) + if ( iNotifyType == ENotifyEntry ) { iObserver.NotifyFileSystemChangedL(); } + Setup(); } // ----------------------------------------------------------------------------- diff -r 9f56a4e1b8ab -r 08e69e956a8c commonuis/CommonDialogs/src/CAknCommonDialogsPopupList.cpp --- a/commonuis/CommonDialogs/src/CAknCommonDialogsPopupList.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/commonuis/CommonDialogs/src/CAknCommonDialogsPopupList.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -379,6 +379,16 @@ UpdateItemsAndRedrawPopupL( focus, topIndex ); } +void CAknCommonDialogsPopupList::HandleFileSystemChangedL( const MDesCArray* aItemArray ) + { + TInt focus = iListBox->CurrentItemIndex(); + TInt topIndex = iListBox->View()->TopItemIndex(); + if ( focus < 0 ) + { + focus = aItemArray->MdcaCount() - 1; + } + UpdateItemsAndRedrawPopupL( focus, topIndex ); + } // ----------------------------------------------------------------------------- // CAknCommonDialogsPopupList::HandleListBoxHighlightChangedL // diff -r 9f56a4e1b8ab -r 08e69e956a8c commonuis/CommonDialogs/src/CAknCommonDialogsPopupList.h --- a/commonuis/CommonDialogs/src/CAknCommonDialogsPopupList.h Mon Mar 15 12:41:34 2010 +0200 +++ b/commonuis/CommonDialogs/src/CAknCommonDialogsPopupList.h Wed Mar 31 21:59:52 2010 +0300 @@ -65,6 +65,7 @@ */ virtual void NotifyDrivesChangedL(const MDesCArray* aItemArray); + void HandleFileSystemChangedL(const MDesCArray* aItemArray); /** * From CCoeControl. To handle the Pointer events. * @param aPointerEvent The Pointer event details. diff -r 9f56a4e1b8ab -r 08e69e956a8c commonuis/CommonDialogs/src/CAknCommonDialogsRadioButtonSettingPage.cpp --- a/commonuis/CommonDialogs/src/CAknCommonDialogsRadioButtonSettingPage.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/commonuis/CommonDialogs/src/CAknCommonDialogsRadioButtonSettingPage.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -130,7 +130,14 @@ } case EKeyOK: + case EKeyEnter: { + if ( ListBoxControl()->ItemDrawer()->Flags() + & CListItemDrawer::ESingleClickDisabledHighlight ) + { + return CAknSettingPage::OfferKeyEventL( aKeyEvent, aType ); + } + TInt focus( lb->CurrentItemIndex() ); TInt topIndex( lb->TopItemIndex() ); @@ -194,36 +201,8 @@ // ----------------------------------------------------------------------------- // void CAknCommonDialogsRadioButtonSettingPage::ProcessCommandL(TInt aCommandId) - { - if(!IsEditable() && !(aCommandId == EAknSoftkeyBack || aCommandId == EAknSoftkeyCancel)) - { - return; - } - - HideMenu(); - - // Respond to softkey events - switch (aCommandId) - { - case EAknSoftkeyOk: - case EAknSoftkeySelect: - case EAknSoftkeyDone: - { - SelectCurrentItemL(); // has non-trivial implemenations in listbox type - // controls to put the selection on the current item - AttemptExitL(ETrue); - break; - } - case EAknSoftkeyBack: - case EAknSoftkeyCancel: - AttemptExitL(EFalse); - break; - case EAknSoftkeyOptions: - DisplayMenuL(); - break; - default: - break; - } + { + CAknRadioButtonSettingPage::ProcessCommandL( aCommandId ); } // ----------------------------------------------------------------------------- // CAknCommonDialogsRadioButtonSettingPage::NotifyDrivesChangedL diff -r 9f56a4e1b8ab -r 08e69e956a8c commonuis/CommonDialogs/src/CAknFileSelectionDialog.cpp --- a/commonuis/CommonDialogs/src/CAknFileSelectionDialog.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/commonuis/CommonDialogs/src/CAknFileSelectionDialog.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -385,6 +385,7 @@ iEventHandler->ResetSoftkeyStatus(); iEventHandler->UpdateSoftkeysL( focus, popupList->ButtonGroupContainer() ); + iEventHandler->StartFileSystemNotifierL(popupList); TBool returnValue( popupList->ExecuteLD() ); if( returnValue ) @@ -402,6 +403,7 @@ } } } + iEventHandler->StopFileSystemNotifier(); CleanupStack::Pop(); // popupList CleanupStack::PopAndDestroy(); // listBox diff -r 9f56a4e1b8ab -r 08e69e956a8c commonuis/CommonDialogs/src/CAknFileSelectionEventHandler.cpp --- a/commonuis/CommonDialogs/src/CAknFileSelectionEventHandler.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/commonuis/CommonDialogs/src/CAknFileSelectionEventHandler.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -24,6 +24,8 @@ #include "CAknFileSelectionModel.h" #include "MAknFileSelectionObserver.h" +#include "CAknCommonDialogsPopupList.h" +#include "CAknCFDFileSystemEvent.h" #include "AknCFDUtility.h" @@ -93,6 +95,12 @@ // Destructor CAknFileSelectionEventHandler::~CAknFileSelectionEventHandler() { + if(iFSObserver) + { + iFSObserver->Cancel(); + delete iFSObserver; + iFSObserver = NULL; + } } @@ -384,4 +392,21 @@ return returnType; } +void CAknFileSelectionEventHandler::StartFileSystemNotifierL(CAknCommonDialogsPopupList* aPopupList) + { + iPopupList = aPopupList; + TPath path; + iModel->GetCurrentPath(path); + iFSObserver = CAknCFDFileSystemEvent::NewL(iCoeEnv->FsSession(),*this, + ENotifyEntry,path); + } +void CAknFileSelectionEventHandler::StopFileSystemNotifier() + { + iFSObserver->Cancel(); + } +void CAknFileSelectionEventHandler::NotifyFileSystemChangedL() + { + iModel->UpdateItemListL(); + iPopupList->HandleFileSystemChangedL(iModel); + } // End of File diff -r 9f56a4e1b8ab -r 08e69e956a8c commonuis/CommonDialogs/src/CAknFileSelectionEventHandler.h --- a/commonuis/CommonDialogs/src/CAknFileSelectionEventHandler.h Mon Mar 15 12:41:34 2010 +0200 +++ b/commonuis/CommonDialogs/src/CAknFileSelectionEventHandler.h Wed Mar 31 21:59:52 2010 +0300 @@ -25,10 +25,13 @@ #include "MAknCommonDialogsEventObserver.h" #include "CAknCommonDialogsBase.h" +#include "MAknCFDFileSystemObserver.h" // FORWARD DECLARATIONS class MAknFileSelectionObserver; class CAknFileSelectionModel; +class CAknCFDFileSystemEvent; +class CAknCommonDialogsPopupList; // CLASS DEFINITION /** @@ -37,7 +40,8 @@ * @lib CommonDialogs.lib * @since 1.2 */ -NONSHARABLE_CLASS(CAknFileSelectionEventHandler) : public CBase, public MAknCommonDialogsEventObserver +NONSHARABLE_CLASS(CAknFileSelectionEventHandler) : public CBase, public MAknCommonDialogsEventObserver, + public MAknCFDFileSystemObserver { public: // Constructors and destructors @@ -107,6 +111,9 @@ TInt& aTopItemIndex, CEikButtonGroupContainer* aContainer ); + void StartFileSystemNotifierL(CAknCommonDialogsPopupList* aPopupList); + void StopFileSystemNotifier(); + virtual void NotifyFileSystemChangedL(); private: // Enumerations /** @@ -198,6 +205,8 @@ // Ref: Softkey text const HBufC*& iRightSoftkeySubfolder; + CAknCFDFileSystemEvent* iFSObserver; + CAknCommonDialogsPopupList* iPopupList; }; diff -r 9f56a4e1b8ab -r 08e69e956a8c commonuis/CommonUi/EABI/CommonUIU.DEF --- a/commonuis/CommonUi/EABI/CommonUIU.DEF Mon Mar 15 12:41:34 2010 +0200 +++ b/commonuis/CommonUi/EABI/CommonUIU.DEF Wed Mar 31 21:59:52 2010 +0300 @@ -119,4 +119,5 @@ _ZTVN11CItemFinder12CFindItemExtE @ 118 NONAME ; ## _ZN13CFindItemMenu21SetMenuItemVisibilityENS_9TMenuItemEi @ 119 NONAME _ZN12MPBAiwNotify13HandleNotifyLEiiR20CAiwGenericParamListRKS0_ @ 120 NONAME + _ZN11CItemFinder22SetItemFinderObserverLEP22MAknItemFinderObserver @ 121 NONAME diff -r 9f56a4e1b8ab -r 08e69e956a8c commonuis/CommonUi/bwins/CommonUIU.def --- a/commonuis/CommonUi/bwins/CommonUIU.def Mon Mar 15 12:41:34 2010 +0200 +++ b/commonuis/CommonUi/bwins/CommonUIU.def Wed Mar 31 21:59:52 2010 +0300 @@ -89,4 +89,5 @@ ??1CFindItemExt@CItemFinder@@UAE@XZ @ 88 NONAME ; CItemFinder::CFindItemExt::~CFindItemExt(void) ?SetMenuItemVisibility@CFindItemMenu@@QAEXW4TMenuItem@1@H@Z @ 89 NONAME ; void CFindItemMenu::SetMenuItemVisibility(enum CFindItemMenu::TMenuItem, int) ?HandleNotifyL@MPBAiwNotify@@UAEHHHAAVCAiwGenericParamList@@ABV2@@Z @ 90 NONAME ; int MPBAiwNotify::HandleNotifyL(int, int, class CAiwGenericParamList &, class CAiwGenericParamList const &) + ?SetItemFinderObserverL@CItemFinder@@QAEXPAVMAknItemFinderObserver@@@Z @ 91 NONAME ; void CItemFinder::SetItemFinderObserverL(class MAknItemFinderObserver *) diff -r 9f56a4e1b8ab -r 08e69e956a8c commonuis/CommonUi/src/FindItemMenu.cpp --- a/commonuis/CommonUi/src/FindItemMenu.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/commonuis/CommonUi/src/FindItemMenu.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -356,6 +356,21 @@ *iFindItemUrlItemString ); } } + +// ----------------------------------------------------------------------------- +// HasSelection +// Returns ETrue if editor has highlighted text +// ----------------------------------------------------------------------------- +// +TBool CFindItemMenu::HasSelection() const + { + TBool retval ( EFalse ); + if ( iAutomaticFind ) + { + retval = iAutomaticFind->HasSelection(); + } + return retval; + } // ----------------------------------------------------------------------------- // AddMenuItemL @@ -541,15 +556,41 @@ TBuf tempBuf; // Adds menu items depending the selected item - switch ( itemType ) + if ( HasSelection() ) { - case CItemFinder::EPhoneNumber: + switch ( itemType ) { + case CItemFinder::EPhoneNumber: + { #ifdef RD_VOIP_REL_2_2 - if ( FeatureManager::FeatureSupported(KFeatureIdCommonVoip ) ) - { - // show call menu if allowed - if ( !( iMenuItemFlags & CFindItemMenu::ECallItem ) ) + if ( FeatureManager::FeatureSupported(KFeatureIdCommonVoip ) ) + { + // show call menu if allowed + if ( !( iMenuItemFlags & CFindItemMenu::ECallItem ) ) + { + // Call + iCoeEnv->ReadResourceL( tempBuf, R_FINDITEMMENU_CALL ); + AddMenuItemL( + *iMenuPane, + EFindItemCmdCall, + ( iIsContextMenu ? EFindItemContextMenuPlaceHolder : index ), + 0, + tempBuf ); + } + // if context menu, we will show call item anyway + else if ( iIsContextMenu ) + { + // Call + iCoeEnv->ReadResourceL( tempBuf, R_FINDITEMMENU_CALL ); + AddMenuItemL( + *iMenuPane, + EFindItemCmdCall, + EFindItemContextMenuPlaceHolder, + 0, + tempBuf ); + } + } + else { // Call iCoeEnv->ReadResourceL( tempBuf, R_FINDITEMMENU_CALL ); @@ -560,21 +601,8 @@ 0, tempBuf ); } - // if context menu, we will show call item anyway - else if ( iIsContextMenu ) - { - // Call - iCoeEnv->ReadResourceL( tempBuf, R_FINDITEMMENU_CALL ); - AddMenuItemL( - *iMenuPane, - EFindItemCmdCall, - EFindItemContextMenuPlaceHolder, - 0, - tempBuf ); - } - } - else - { + index = EFindItemCmdCall; +#else // Call iCoeEnv->ReadResourceL( tempBuf, R_FINDITEMMENU_CALL ); AddMenuItemL( @@ -583,141 +611,132 @@ ( iIsContextMenu ? EFindItemContextMenuPlaceHolder : index ), 0, tempBuf ); - } - index = EFindItemCmdCall; -#else - // Call - iCoeEnv->ReadResourceL( tempBuf, R_FINDITEMMENU_CALL ); - AddMenuItemL( - *iMenuPane, - EFindItemCmdCall, - ( iIsContextMenu ? EFindItemContextMenuPlaceHolder : index ), - 0, - tempBuf ); - index = EFindItemCmdCall; + index = EFindItemCmdCall; #endif // RD_VOIP_REL_2_2 - // Write - iCoeEnv->ReadResourceL( tempBuf, R_FINDITEMMENU_MESSAGE_SUB ); - AddMenuItemL( - *iMenuPane, - EFindItemSubMenuSend, - index, - 0,//R_FINDITEM_NUMBER_MESSAGE_SUBMENU, - tempBuf ); - index = EFindItemSubMenuSend; - - break; - } - case CItemFinder::EUrlAddress: - { - iCoeEnv->ReadResourceL( tempBuf, R_FINDITEMMENU_GOTO_URL ); - - // check if not rstp - if ( iAutomaticFind->CurrentItemExt().iItemDescriptor->FindF( KRtspUrlAddress ) == KErrNotFound ) - { - AddMenuItemL( - *iMenuPane, - EFindItemCmdGoToUrl, - ( iIsContextMenu ? EFindItemContextMenuPlaceHolder : index ), - 0, - tempBuf); - index = EFindItemCmdGoToUrl; - - if ( !iIsContextMenu ) - { - // Add bookmark - iCoeEnv->ReadResourceL( - tempBuf, R_FINDITEMMENU_ADD_BOOKMARK ); - AddMenuItemL( - *iMenuPane, - EFindItemCmdAddToBookmark, - index, - 0, - tempBuf ); - index = EFindItemCmdAddToBookmark; - } - } - else - { - AddMenuItemL( - *iMenuPane, - EFindItemCmdGoToRstp, - ( iIsContextMenu ? EFindItemContextMenuPlaceHolder : index ), - 0, - tempBuf ); - index = EFindItemCmdGoToRstp; - - if ( !iIsContextMenu ) - { - iCoeEnv->ReadResourceL( - tempBuf, R_FINDITEMMENU_ADD_TO_GALLERY ); - AddMenuItemL( - *iMenuPane, - EFindItemCmdAddToGallery, - index, - 0, - tempBuf ); - index = EFindItemCmdAddToGallery; - } - } - break; - } - case CItemFinder::EEmailAddress: - { - // Checks VoIP profile count and local variation - if ( iIsContextMenu && iFindItemVoIPExtension->VoIPProfilesExistL() ) - { - //Call - iCoeEnv->ReadResourceL( tempBuf, R_FINDITEMMENU_CALL ); - AddMenuItemL( - *iMenuPane, - EFindItemCmdCall, - EFindItemContextMenuPlaceHolder, - 0, - tempBuf ); - index = EFindItemCmdCall; // Replaces the call ui menu when email - // field is selected. - } - - // Write - if( iEmailOverSmsFeatureSupported || iMMSFeatureSupported || - iEmailUiFeatureSupported ) // Sometimes submenu can be empty. - { + // Write iCoeEnv->ReadResourceL( tempBuf, R_FINDITEMMENU_MESSAGE_SUB ); AddMenuItemL( *iMenuPane, EFindItemSubMenuSend, - ( ( iIsContextMenu && - !iFindItemVoIPExtension->VoIPProfilesExistL() ) ? - EFindItemContextMenuPlaceHolder : index ), - 0,//R_FINDITEM_EMAIL_MESSAGE_SUBMENU, + index, + 0,//R_FINDITEM_NUMBER_MESSAGE_SUBMENU, tempBuf ); index = EFindItemSubMenuSend; + + break; } - break; - } - case CItemFinder::EUriScheme: - { - // Use - iCoeEnv->ReadResourceL( tempBuf, R_QTN_OPTIONS_SCHEME_USE ); - AddMenuItemL( - *iMenuPane, - EFindItemCmdUse, - ( iIsContextMenu ? EFindItemContextMenuPlaceHolder : index ), - 0, - tempBuf ); - index = EFindItemCmdUse; - break; - } - default: - { - // Something else, probably nothing selected or new type which we - // don't support. - break; + case CItemFinder::EUrlAddress: + { + iCoeEnv->ReadResourceL( tempBuf, R_FINDITEMMENU_GOTO_URL ); + + // check if not rstp + if ( iAutomaticFind->CurrentItemExt().iItemDescriptor->FindF( KRtspUrlAddress ) == KErrNotFound ) + { + AddMenuItemL( + *iMenuPane, + EFindItemCmdGoToUrl, + ( iIsContextMenu ? EFindItemContextMenuPlaceHolder : index ), + 0, + tempBuf); + index = EFindItemCmdGoToUrl; + + if ( !iIsContextMenu ) + { + // Add bookmark + iCoeEnv->ReadResourceL( + tempBuf, R_FINDITEMMENU_ADD_BOOKMARK ); + AddMenuItemL( + *iMenuPane, + EFindItemCmdAddToBookmark, + index, + 0, + tempBuf ); + index = EFindItemCmdAddToBookmark; + } + } + else + { + AddMenuItemL( + *iMenuPane, + EFindItemCmdGoToRstp, + ( iIsContextMenu ? EFindItemContextMenuPlaceHolder : index ), + 0, + tempBuf ); + index = EFindItemCmdGoToRstp; + + if ( !iIsContextMenu ) + { + iCoeEnv->ReadResourceL( + tempBuf, R_FINDITEMMENU_ADD_TO_GALLERY ); + AddMenuItemL( + *iMenuPane, + EFindItemCmdAddToGallery, + index, + 0, + tempBuf ); + index = EFindItemCmdAddToGallery; + } + } + break; + } + case CItemFinder::EEmailAddress: + { + // Checks VoIP profile count and local variation + if ( iIsContextMenu && iFindItemVoIPExtension->VoIPProfilesExistL() ) + { + //Call + iCoeEnv->ReadResourceL( tempBuf, R_FINDITEMMENU_CALL ); + AddMenuItemL( + *iMenuPane, + EFindItemCmdCall, + EFindItemContextMenuPlaceHolder, + 0, + tempBuf ); + index = EFindItemCmdCall; // Replaces the call ui menu when email + // field is selected. + } + + // Write + if( iEmailOverSmsFeatureSupported || iMMSFeatureSupported || + iEmailUiFeatureSupported ) // Sometimes submenu can be empty. + { + iCoeEnv->ReadResourceL( tempBuf, R_FINDITEMMENU_MESSAGE_SUB ); + AddMenuItemL( + *iMenuPane, + EFindItemSubMenuSend, + ( ( iIsContextMenu && + !iFindItemVoIPExtension->VoIPProfilesExistL() ) ? + EFindItemContextMenuPlaceHolder : index ), + 0,//R_FINDITEM_EMAIL_MESSAGE_SUBMENU, + tempBuf ); + index = EFindItemSubMenuSend; + } + break; + } + case CItemFinder::EUriScheme: + { + // Use + iCoeEnv->ReadResourceL( tempBuf, R_QTN_OPTIONS_SCHEME_USE ); + AddMenuItemL( + *iMenuPane, + EFindItemCmdUse, + ( iIsContextMenu ? EFindItemContextMenuPlaceHolder : index ), + 0, + tempBuf ); + index = EFindItemCmdUse; + break; + } + default: + { + // Something else, probably nothing selected or new type which we + // don't support. + break; + } } } + // Call - if ( + if ( HasSelection() && ( ( itemType == CItemFinder::ENoneSelected ) && ( ( @@ -733,7 +752,7 @@ || ( itemType == CItemFinder::EEmailAddress && iFindItemVoIPExtension->VoIPProfilesExistL() && - !iIsContextMenu ) + !iIsContextMenu ) ) ) { #ifdef RD_VOIP_REL_2_2 @@ -823,10 +842,10 @@ CleanupStack::PopAndDestroy( ); } - if( (!iAutomaticFind || len != 0) && + if( HasSelection() && ( (!iAutomaticFind || len != 0) && highlight && ( itemType != CItemFinder::ENoneSelected || - iSenderHighlighted ) ) + iSenderHighlighted ) ) ) { iCoeEnv->ReadResourceL( tempBuf, R_FINDITEMMENU_COPY ); AddMenuItemL( @@ -841,14 +860,14 @@ } // Add to contacts - if ( ( itemType != CItemFinder::EUriScheme ) && + if ( HasSelection() && ( ( itemType != CItemFinder::EUriScheme ) && !( itemType == CItemFinder::EUrlAddress && iIsContextMenu ) && ( ( ( ( !iIsSenderKnown && iSenderDescriptor->Length() ) || iCallbackNumber ) && itemType == CItemFinder::ENoneSelected ) || - itemType != CItemFinder::ENoneSelected ) ) + itemType != CItemFinder::ENoneSelected ) ) ) { AddMenuItemL( *iMenuPane, @@ -1680,11 +1699,16 @@ { HBufC* item = 0; TInt len = 0; - if ( iAutomaticFind && iAutomaticFind->CurrentItemExt().iItemType != CItemFinder::ENoneSelected ) + if ( iAutomaticFind && iAutomaticFind->CurrentSelection().Length() > 0 ) { item = iAutomaticFind->CurrentSelection().AllocLC(); len = item->Length(); } + else if ( iAutomaticFind && iAutomaticFind->CurrentItemExt().iItemDescriptor ) + { + item = iAutomaticFind->CurrentItemExt().iItemDescriptor->AllocLC(); + len = item->Length(); + } else if( iSenderHighlighted ) { item = iSenderDisplayText->AllocLC(); @@ -1835,7 +1859,7 @@ User::Leave(err); } } - return KErrNone; + return ETrue; } // End of File diff -r 9f56a4e1b8ab -r 08e69e956a8c commonuis/CommonUi/src/ItemFinder.cpp --- a/commonuis/CommonUi/src/ItemFinder.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/commonuis/CommonUi/src/ItemFinder.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -21,7 +21,9 @@ // INCLUDES #include #include // for CRichText -#include "ItemFinder.h" +#include +#include +#include #include #include #include @@ -31,12 +33,14 @@ // scheme recog #include #include +#include #include #include // CONSTANTS const TInt KMINTAGLENGTH(5); +const TInt KDragTresholdDefault(20); _LIT( KHTTPPREFIX, "http://"); _LIT( RTSP, "rtsp"); _LIT( KTELPREFIX, "tel:"); @@ -196,9 +200,14 @@ { delete iSchemeResolver; } + if ( iItemFinderObserver && iCoeEnv ) // if still listening to events + { + iCoeEnv->RemoveMessageMonitorObserver( *this ); + } } -CItemFinder::CItemFinder( TInt aFindFlags ): iFlags( aFindFlags ) +CItemFinder::CItemFinder( TInt aFindFlags ): iFlags( aFindFlags ), + iCoeEnv( CCoeEnv::Static() ) {} void CItemFinder::ConstructL() @@ -240,6 +249,12 @@ { return EFalse; } + // if a key was not pressed, do not move highlight to next item. + if ( iItemFinderObserver && !iAllowHighlight ) + { + return EFalse; + } + if ( aDirection == EInit || aDirection == EInitUp || aDirection == EInitDown ) { if ( aDirection == EInitUp ) @@ -465,6 +480,7 @@ EXPORT_C void CItemFinder::SetEditor( CEikRichTextEditor** aEditor ) { iEditor=aEditor; + SetWindowControl( *aEditor ); if ( aEditor && *aEditor && (*aEditor)->TextLength() ) { TRAP_IGNORE( (*aEditor)->SetHighlightStyleL( EEikEdwinHighlightLink ) ); @@ -906,6 +922,11 @@ { return EFalse; } + if ( iItemFinderObserver && !iAllowHighlight ) + { + // if observer is given, return EFalse here + return EFalse; + } TInt pos = 0; TInt len = (*iEditor)->TextLayout()->PosRangeInBand( pos ); TRect rect; @@ -1111,6 +1132,84 @@ } } +// ----------------------------------------------------------------------------- +// CItemFinder::SetItemFinderObserverL() +// ----------------------------------------------------------------------------- +// +EXPORT_C void CItemFinder::SetItemFinderObserverL( + MAknItemFinderObserver* aObserver ) + { + if ( !iItemFinderObserver && aObserver ) // client registers + { + if ( iCoeEnv ) + { + iCoeEnv->AddMessageMonitorObserverL( *this ); + } + } + else if ( iItemFinderObserver && !aObserver ) // client unregisters + { + if ( iCoeEnv ) + { + iCoeEnv->RemoveMessageMonitorObserver( *this ); + } + } + + iItemFinderObserver = aObserver; + } + +// ----------------------------------------------------------------------------- +// CItemFinder::MonitorWsMessage +// ----------------------------------------------------------------------------- +// +void CItemFinder::MonitorWsMessage( const TWsEvent& aEvent ) + { + if ( !iItemFinderObserver ) + { + // if no observer given, nothing is done here. + return; + } + if ( !iEditor ) + { + return; + } + if ( EEventPointer == aEvent.Type() ) + { + CCoeControl* targetControl = + reinterpret_cast( aEvent.Handle() ); + if ( targetControl ) + { + TRAP_IGNORE ( MonitorPointerEventL( + *aEvent.Pointer(), targetControl ) ); + } + } + else if ( aEvent.Type() == EEventKeyDown ) + { + iAllowHighlight = ETrue; + + // if an item is selected and select was pressed, send key event + TKeyEvent* keyEvent = aEvent.Key(); + + if ( keyEvent && ( EStdKeyDevice3 == keyEvent->iScanCode + || EStdKeyEnter == keyEvent->iScanCode + || EStdKeyNkpEnter == keyEvent->iScanCode ) + && iItemFinderObserver + && ( KNullDesC().Compare ( CurrentSelection() ) ) ) + { + // calling observer + TRAP_IGNORE( iItemFinderObserver->HandleFindItemEventL( + *iCurrentItemExt, MAknItemFinderObserver::EKeyEvent ) ); + } + } + else if ( aEvent.Type() == EEventKeyUp ) + { + iAllowHighlight = EFalse; + } + } + +// ----------------------------------------------------------------------------- +// CItemFinder::RefreshEditor +// ----------------------------------------------------------------------------- +// TInt CItemFinder::RefreshEditor() { TInt error = KErrNone; @@ -1141,4 +1240,161 @@ return error; } +// --------------------------------------------------------------------------- +// CItemFinder::SetWindowControl +// --------------------------------------------------------------------------- +// +void CItemFinder::SetWindowControl( CCoeControl* aControl ) + { + if ( aControl ) + { + CCoeControl* windowControl( aControl ); + while ( windowControl && !windowControl->OwnsWindow() ) + { + if ( windowControl == windowControl->Parent() ) + { + return; + } + windowControl = windowControl->Parent(); + } + if ( windowControl ) + { + iWindowControl = windowControl; + } + } + } + +// -------------------------------------------------------------------------- +// CItemFinder::MonitorPointerEventL +// -------------------------------------------------------------------------- +// +void CItemFinder::MonitorPointerEventL( TPointerEvent &aPointerEvent, + CCoeControl* aTargetControl ) + { + if ( !iWindowControl ) + { + SetWindowControl( *iEditor ); + } + if ( aTargetControl == iWindowControl ) + { + TPoint tapPoint ( aPointerEvent.iPosition ); + ModifyPointerEvent( tapPoint ); + if ( aPointerEvent.iType == TPointerEvent::EButton1Down ) + { + iAllowHighlight = ETrue; + TBool tapped ( EFalse ); + // Trapping because iAllowHighlight needs to be set to value EFalse + // also if ItemWasTappedL leaves + TRAP_IGNORE( tapped = ItemWasTappedL( tapPoint ) ); + iAllowHighlight = EFalse; + // if no item was tapped remove selection + if ( tapped ) + { + iTapPoint = tapPoint; + } + else + { + (*iEditor)->ClearSelectionL(); + ResetCurrentItem(); + } + } + else if ( aPointerEvent.iType == TPointerEvent::EDrag ) + { + if ( iCurrentItemExt->iItemType != ENoneSelected ) + { + if ( Abs( iTapPoint.iX - tapPoint.iX ) > DragThresholdL() || + Abs( iTapPoint.iY - tapPoint.iY ) > DragThresholdL() ) + { + (*iEditor)->ClearSelectionL(); + ResetCurrentItem(); + } + } + } + else if ( aPointerEvent.iType == TPointerEvent::EButton1Up ) + { + if ( iCurrentItemExt->iItemType != ENoneSelected ) + { + if ( iItemFinderObserver ) + { + // calling observer + iItemFinderObserver->HandleFindItemEventL( + *iCurrentItemExt, + MAknItemFinderObserver::EPointerEvent ); + } + // remove selection with button up event + (*iEditor)->ClearSelectionL(); + if ( !(*iEditor)->IsFocused() ) + { + // ClearSelectionL() does not draw itself if focus was lost + + TRect rect = (*iEditor)->TextLayout()->GetLineRectL( + iCurrentItemExt->iStart, iCurrentItemExt->iEnd ); + rect.Move( (*iEditor)->Position() ); + rect.iTl.iX = 0; + rect.iBr.iX = (*iEditor)->Rect().iBr.iX; + + TPoint begin ( 0, 0 ); + TPoint end ( 0, 0 ); + (*iEditor)->TextLayout()->DocPosToXyPosL( + iCurrentItemExt->iStart, begin ); + (*iEditor)->TextLayout()->DocPosToXyPosL( + iCurrentItemExt->iEnd, end ); + + if ( begin.iY != end.iY ) + { + // item spawns two lines + // make rectangle cover both lines + rect.iBr.iY += ( end.iY - begin.iY ); + } + // draw clearable area + (*iEditor)->DrawNow( rect ); + } + } + } + } + } + +// -------------------------------------------------------------------------- +// CItemFinder::ModifyPointerEvent +// -------------------------------------------------------------------------- +// +void CItemFinder::ModifyPointerEvent( TPoint &aTapPoint ) + { + aTapPoint -= (*iEditor)->Position(); + } + +// -------------------------------------------------------------------------- +// CItemFinder::DragThresholdL +// -------------------------------------------------------------------------- +// +TInt CItemFinder::DragThresholdL() + { + if ( 0 == iDragThreshold ) + { + CRepository* cenrep ( NULL ); + TRAPD( err, cenrep = CRepository::NewL( KCRUidAknPhysicsSettings ) ); + if ( KErrNone == err && cenrep ) + { + CleanupStack::PushL( cenrep ); + cenrep->Get( KDragTreshold, iDragThreshold ); + CleanupStack::PopAndDestroy( cenrep ); + } + } + if ( 0 == iDragThreshold ) + { + // cenrep failed, use fallback value + iDragThreshold = KDragTresholdDefault; + } + return iDragThreshold; + } + +// -------------------------------------------------------------------------- +// CItemFinder::HasSelection +// -------------------------------------------------------------------------- +// +TBool CItemFinder::HasSelection() const + { + return static_cast( (*iEditor)->SelectionLength() ); + } + // End of File diff -r 9f56a4e1b8ab -r 08e69e956a8c psln/Group/102818E8.xml --- a/psln/Group/102818E8.xml Mon Mar 15 12:41:34 2010 +0200 +++ b/psln/Group/102818E8.xml Wed Mar 31 21:59:52 2010 +0300 @@ -1,7 +1,7 @@ @@ -9,8 +9,10 @@ + - + + diff -r 9f56a4e1b8ab -r 08e69e956a8c psln/Src/PslnGeneralThemeContainer.cpp --- a/psln/Src/PslnGeneralThemeContainer.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/psln/Src/PslnGeneralThemeContainer.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -282,6 +282,7 @@ } CleanupStack::PopAndDestroy( skinName ); + iActiveSkinItemIndex = currentlyActiveSkinIndex + downloadAdded; if ( iOldSkinNum != maxSkinIndex ) { iToBeUsedIndex = currentlyActiveSkinIndex + downloadAdded; @@ -290,12 +291,10 @@ ( iToBeUsedIndex <= ( maxSkinIndex + downloadAdded ) ) ) { SetCurrentItemIndex( iToBeUsedIndex ); - iActiveSkinItemIndex = iToBeUsedIndex; } else { - SetCurrentItemIndex( ( currentlyActiveSkinIndex + downloadAdded ) ); - iActiveSkinItemIndex = currentlyActiveSkinIndex + downloadAdded; + SetCurrentItemIndex( currentlyActiveSkinIndex + downloadAdded ); } iListBox->HandleItemAdditionL(); if ( iOldSkinNum != maxSkinIndex ) diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AknGlobalUI/AknCapServer/inc/AknCapServerEntry.h --- a/uifw/AknGlobalUI/AknCapServer/inc/AknCapServerEntry.h Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AknGlobalUI/AknCapServer/inc/AknCapServerEntry.h Wed Mar 31 21:59:52 2010 +0300 @@ -29,6 +29,7 @@ #include #include #endif +#include #include "AknEikSgcs.h" #include "AknNotiferAppServerApplicationInterface.h" @@ -198,6 +199,8 @@ void InitiateOFNStatus(); void LoadAlternateFsPlugin(); void ShowOrDismissAlternateFs(); + static TInt RemoveBlankCallBack( TAny* aThis ); + void DoRemoveBlank(); public: /** @@ -267,6 +270,8 @@ RProperty iTelephonyIdleUidProperty; CPropertySubscriber* iTelephonyIdleUidSubscriber; TBool iIdleActive; + RAlfDirectClient iAlfClient; + CPeriodic* iRemoveBlankCallBack; }; #endif // __AKNCAPSERVERENTRY__ diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AknGlobalUI/AknCapServer/inc/AknEikSgcs.h --- a/uifw/AknGlobalUI/AknCapServer/inc/AknEikSgcs.h Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AknGlobalUI/AknCapServer/inc/AknEikSgcs.h Wed Mar 31 21:59:52 2010 +0300 @@ -64,6 +64,9 @@ static TInt LayoutInstallationCallBack(TAny* aPtr); + void SetBackgroundAppsStateChangeDeferred(TBool aDeferred); + TBool BackgroundAppsStateChangeDeferred() const; + private: class TWgState { @@ -179,6 +182,7 @@ TInt iTouchCompaScreenMode; CEComPluginNotifier* iLayoutNotifier; // Owned REComPluginInfoArray iPrevPluginInfo; + TInt iBackgroundLayoutDeferred; }; #endif // EIKSGCS_H diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AknGlobalUI/AknCapServer/inc/AknKeyFilter.h --- a/uifw/AknGlobalUI/AknCapServer/inc/AknKeyFilter.h Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AknGlobalUI/AknCapServer/inc/AknKeyFilter.h Wed Mar 31 21:59:52 2010 +0300 @@ -54,11 +54,12 @@ void InitHardwareStateL(); TBool HandleHardwareStateKeyL(TInt aCode); void FreeHardwareStateKeys(); - void SetHardwareStateL(TInt aState); + void SetHardwareStateL(TInt aState, TBool& aChanged); #ifdef RD_INTELLIGENT_TEXT_INPUT TInt CAknServKeyFilter::HwKeyToKeyBoardType(TInt aKeyCode); #endif void RotateScreenL( TInt aState ); + void UpdateStateAndNotifyL( TInt aState ); void UpdateKeyboardLayout( TInt aKeyboardLayout ); private: diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AknGlobalUI/AknCapServer/inc/aknslidestatusnotifier.h --- a/uifw/AknGlobalUI/AknCapServer/inc/aknslidestatusnotifier.h Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AknGlobalUI/AknCapServer/inc/aknslidestatusnotifier.h Wed Mar 31 21:59:52 2010 +0300 @@ -2,7 +2,7 @@ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* under the terms of "Eclipse Public License v1.0" * which accompanies this distribution, and is available * at the URL "http://www.eclipse.org/legal/epl-v10.html". * diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AknGlobalUI/AknCapServer/src/AknCapServerEntry.cpp --- a/uifw/AknGlobalUI/AknCapServer/src/AknCapServerEntry.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AknGlobalUI/AknCapServer/src/AknCapServerEntry.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -33,7 +33,7 @@ #include "avkoninternalpskeys.h" // KAknIdleAppWindowGroupId #include #include -#include +#include #include #include #include @@ -107,7 +107,7 @@ const TInt KKeyEventICodeThreshold = 0x001f; const TInt KMaxLanguageCodeLength = 6; // 5 digits + separator - +const TInt KRemoveBlankDelay = 200000; // 0.2s _LIT(KEikSrvUIResFileName, "z:\\resource\\eiksrvui.rsc"); _LIT_SECURITY_POLICY_PASS(KPassReadPolicy); @@ -172,7 +172,8 @@ delete iMMCUnlock; delete iIdler; iEikSrv.Close(); // this shouldn't be connected here anyway - delete iPtiEngine; + delete iPtiEngine; + iAlfClient.Close(); } _LIT(KProductSpecificHalFile, "z:\\system\\data\\ProductSpecificHalParams.txt"); @@ -856,12 +857,26 @@ } } -void CAknCapAppServerAppUi::BlankScreenL(TBool aBlank, TBool aToForeground) +TInt CAknCapAppServerAppUi::RemoveBlankCallBack( TAny* aThis ) + { + static_cast( aThis )->DoRemoveBlank(); + return EFalse; + } + +void CAknCapAppServerAppUi::BlankScreenL(TBool aBlank, TBool /* aToForeground */) { if (aBlank) { if (++iBlankWinRefCount == 1) { + delete iRemoveBlankCallBack; + iRemoveBlankCallBack = NULL; + + // We are ignoring the foreground parameter because we only have one + // type of blanking behaviour in AlfClient. Act as if ETrue + iAlfClient.BlankScreen(ETrue); + iForegroundBlankScreen = ETrue; // always as if foreground blanking +/* ASSERT(!iBlankWin); if (aToForeground) { @@ -873,16 +888,30 @@ } iBlankWin = CAknServBlankWin::NewL(iBackdropWindowGroup, iStatusPane); iForegroundBlankScreen = aToForeground; +*/ } } else if (--iBlankWinRefCount <= 0) { iBlankWinRefCount = 0; - if (iForegroundBlankScreen) + + // Blanking IPC is delayed or restarted + delete iRemoveBlankCallBack; + iRemoveBlankCallBack = NULL; + iRemoveBlankCallBack = CPeriodic::NewL(CActive::EPriorityLow); + + iRemoveBlankCallBack->Start( + KRemoveBlankDelay, + KRemoveBlankDelay, + TCallBack(RemoveBlankCallBack, this)); + + +/* if (iForegroundBlankScreen) { + */ #ifdef RD_UI_TRANSITION_EFFECTS_LAYOUT_SWITCH + /* CWsScreenDevice* screen = iEikonEnv->ScreenDevice(); - /* RWsSession& ws = iEikonEnv->WsSession(); TInt wgId = ws.GetFocusWindowGroup(); CApaWindowGroupName* wgName = CApaWindowGroupName::NewL(ws, wgId); @@ -896,18 +925,28 @@ // AknTransEffect::GfxTransParam( KTfxServerUid ) // ); - GfxTransEffect::EndFullScreen(); +// GfxTransEffect::EndFullScreen(); #endif - iBackdropWindowGroup.SetOrdinalPosition(1, ECoeWinPriorityNormal); - } +/* iBackdropWindowGroup.SetOrdinalPosition(1, ECoeWinPriorityNormal); + } delete iBlankWin; iBlankWin = 0; +*/ iForegroundBlankScreen = EFalse; } } +void CAknCapAppServerAppUi::DoRemoveBlank() + { + RDebug::Print( _L("CAknCapAppServerAppUi::DoRemoveBlank")); + iAlfClient.BlankScreen(EFalse); + delete iRemoveBlankCallBack; + iRemoveBlankCallBack = NULL; + } + void CAknCapAppServerAppUi::SwapLayoutSwitchBlankScreenL() { + /* if (iBlankWin) { if (!iForegroundBlankScreen) @@ -920,6 +959,7 @@ delete iBlankWin; iBlankWin = newBlankWin; } + */ } TBool CAknCapAppServerAppUi::IsDisplayingForegroundBlankScreen() const diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AknGlobalUI/AknCapServer/src/AknEikSgcs.cpp --- a/uifw/AknGlobalUI/AknCapServer/src/AknEikSgcs.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AknGlobalUI/AknCapServer/src/AknEikSgcs.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -1025,9 +1025,15 @@ TInt modeIndex = mode.ModeNumber(); TBool blank = iLastScreenModeSet != -1; - if (modeIndex != iLastScreenModeSet) + + // We need to force a screen mode change if the new topState is not for a specified orientation + // and we have been doing any deferring of the state change + TBool forceScreenModeChange = (!topState.IsOrientationSpecified()) && BackgroundAppsStateChangeDeferred(); + + if (modeIndex != iLastScreenModeSet || forceScreenModeChange ) { - + SetBackgroundAppsStateChangeDeferred( EFalse ); + // Touch compatibility mode. Disable transition effects if compa-mode // application becomes foreground. Restore back in opposite case. if (iTouchCompaModeIf) @@ -1051,8 +1057,8 @@ } #endif - if (!tfxOn) - eikEnv->WsSession().ClearAllRedrawStores(); + // if (!tfxOn) + // eikEnv->WsSession().ClearAllRedrawStores(); // If AknNfySrv or EikSrv is displaying a global note, // the screen blanker is allowed to stay on until it times @@ -1075,8 +1081,8 @@ FadeColorGenerationL(); SetLayoutBlankScreenL(blank, ESetLayoutBlankBetweenLayoutLoadAndScreenRotate); - if (tfxOn) - eikEnv->WsSession().ClearAllRedrawStores(); + //if (tfxOn) + // eikEnv->WsSession().ClearAllRedrawStores(); // if layout change is preemptive for app change, move the app here DoMoveApp(); @@ -1092,7 +1098,9 @@ iAvkonAppUiBase->SetLayoutAwareApp(!topState.IsLegacyLayout()); // Start callback for handling new layout - if (newLayoutLoaded) + // Need to execute even if the layout is not new, but apps need to catch up + // to it because of deferred layout switches + if (newLayoutLoaded || forceScreenModeChange) { // Swap the screen blanker to update the foreground app's layout if (blank && iSetLayoutBlankStep < ESetLayoutBlankAfterScreenRotate) @@ -1132,7 +1140,10 @@ // The callback will not remove the screen blanker, // so remove it now. iBlankCount--; + +#ifndef RD_NO_SYSTEM_SCREEN_BLANKING iAknCapAppServerAppUi->BlankScreenL(EFalse); +#endif } } } @@ -1145,7 +1156,9 @@ { // blank the screen and keep track of how many times it's been blanked iBlankCount++; +#ifndef RD_NO_SYSTEM_SCREEN_BLANKING iAknCapAppServerAppUi->BlankScreenL(ETrue, ETrue); +#endif } } @@ -1386,7 +1399,9 @@ // remove any remaining screen blanker for (; iRemoveBlankCount>0; iRemoveBlankCount--) { +#ifndef RD_NO_SYSTEM_SCREEN_BLANKING TRAP_IGNORE( iAknCapAppServerAppUi->BlankScreenL( EFalse ) ); +#endif } iRemoveBlankCount = 0; @@ -1522,6 +1537,15 @@ return EFalse; } +void CEikSgcServer::SetBackgroundAppsStateChangeDeferred(TBool aDeferred) + { + iBackgroundLayoutDeferred = aDeferred; + } + +TBool CEikSgcServer::BackgroundAppsStateChangeDeferred() const + { + return iBackgroundLayoutDeferred; + } // // CAknSgcServerImpl // diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AknGlobalUI/AknCapServer/src/AknMemoryCardDialogImpl.cpp --- a/uifw/AknGlobalUI/AknCapServer/src/AknMemoryCardDialogImpl.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AknGlobalUI/AknCapServer/src/AknMemoryCardDialogImpl.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include "AknCapServerEntry.h" #include "AknCapServerDefs.h" #include "AknMemoryCardDialogImpl.h" diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AknGlobalUI/AknCapServer/src/aknKeyFilter.cpp --- a/uifw/AknGlobalUI/AknCapServer/src/aknKeyFilter.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AknGlobalUI/AknCapServer/src/aknKeyFilter.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -22,7 +22,7 @@ #include #include // KUikLayoutState, KUikFlipStatus #include // KAknQwertyInputModeActive -#include +#include #include #include #include @@ -292,27 +292,43 @@ if ( task.Exists() ) { + TVwsViewId idleView = TVwsViewId(); + AknDef::GetPhoneIdleViewId( idleView ); // If the task already exists, bring it to foreground. if ( aViewId.iAppUid == iHomeViewId.iAppUid ) { // special process for appshell - RThread menuThread; - TInt error = menuThread.Open(task.ThreadId()); + RThread thread; + TInt error = thread.Open(task.ThreadId()); if ( error == KErrNone ) { - menuThread.SetProcessPriority(EPriorityForeground); + thread.SetProcessPriority(EPriorityForeground); } - //start different fullscreen effect when launching appshell + // start different fullscreen effect when launching app by KUidApaMessageSwitchOpenFile GfxTransEffect::BeginFullScreen( AknTransEffect::EApplicationActivate, TRect(), AknTransEffect::EParameterType, - AknTransEffect::GfxTransParam( iHomeViewId.iAppUid ) ); - + AknTransEffect::GfxTransParam( aViewId.iAppUid ) ); + // matrix menu will bring itself foreground when getting the message below task.SendMessage( KUidApaMessageSwitchOpenFile , KNullDesC8 ); } + else if ( aViewId.iAppUid == idleView.iAppUid ) + { + // special process for idle + RThread thread; + TInt error = thread.Open( task.ThreadId() ); + if ( error == KErrNone ) + { + thread.SetProcessPriority( EPriorityForeground ); + } + + // idle will bring itself foreground when getting the message below + task.SendMessage( KUidApaMessageSwitchOpenFile , KNullDesC8 ); + + } else { CAknSgcClient::MoveApp(task.WgId(), ESgcMoveAppToForeground); @@ -392,18 +408,6 @@ iHomeTimer = NULL; if ( !iAppUi->HandleShortAppsKeyPressL() ) { - RWsSession& ws = iEikonEnv->WsSession(); - TApaTaskList apList( ws ); - TApaTask task = apList.FindApp( iHomeViewId.iAppUid ); - if( task.Exists() && task.WgId() == ws.GetFocusWindowGroup() ) - { - GfxTransEffect::BeginFullScreen( - AknTransEffect::EApplicationExit, - TRect(), - AknTransEffect::EParameterType, - AknTransEffect::GfxTransParam( iHomeViewId.iAppUid ) ); - } - ToggleShellL(); } @@ -503,19 +507,21 @@ // use a state that results in screen mode zero for normal apps. CAknLayoutConfig::THardwareStateArray hwStates = CAknSgcClient::LayoutConfig().HardwareStates(); + + TBool changed; TInt count = hwStates.Count(); for ( TInt ii = 0; ii < count; ii++ ) { const CAknLayoutConfig::THardwareState& hwState = hwStates.At( ii ); if ( hwState.ScreenMode() == 0 ) { - SetHardwareStateL( hwState.StateNumber() ); + SetHardwareStateL( hwState.StateNumber(), changed ); return; } } // Fall back to state 0. - SetHardwareStateL( 0 ); + SetHardwareStateL( 0, changed); } @@ -539,10 +545,11 @@ const CAknLayoutConfig::THardwareState& hwState = hwStates.At( ii ); if ( hwState.KeyCode() == aCode ) { + // Found the state iSensorOrientation = hwState.StateNumber(); if( !iSlideOpen ) { - RotateScreenL( hwState.StateNumber() ); + UpdateStateAndNotifyL( hwState.StateNumber() ); #ifdef RD_INTELLIGENT_TEXT_INPUT #if defined(__WINS__) @@ -639,9 +646,14 @@ // Updates the hardware state P&S key. // --------------------------------------------------------------------------- // -void CAknServKeyFilter::SetHardwareStateL( TInt aState ) +void CAknServKeyFilter::SetHardwareStateL( TInt aState, TBool& aChanged ) { - TInt err = RProperty::Set( KPSUidUikon, KUikLayoutState, aState ); + TInt currentState(-1); + RProperty::Get( KPSUidUikon, KUikLayoutState, currentState ); + aChanged = currentState != aState; + if ( aChanged ) + { + TInt err = RProperty::Set( KPSUidUikon, KUikLayoutState, aState ); #ifdef _DEBUG _LIT( KDMsg1, "xxxx KUikLayoutState err=%d" ); @@ -665,6 +677,7 @@ #ifdef _DEBUG User::LeaveIfError( err ); #endif + } } #ifdef RD_INTELLIGENT_TEXT_INPUT @@ -791,18 +804,19 @@ { CWsScreenDevice* screen = iEikonEnv->ScreenDevice(); TInt screenMode = screen->CurrentScreenMode(); - SetHardwareStateL( aState ); - - // Update the setting cache and get SGCS to process the screen - // mode change. This may broadcast a screen device change to - // the apps, to inform them of the update. - iAvkonEnv->SettingCache().Update( KAknHardwareLayoutSwitch ); - iAppUi->SgcServer()->HandleWindowGroupParamChangeL( - iEikonEnv->RootWin().Identifier(), - 0, - 0, - 0, - KAknScreenModeUnset ); + TBool changed; + SetHardwareStateL( aState, changed); + + // Update the setting cache and get SGCS to process the screen + // mode change. This may broadcast a screen device change to + // the apps, to inform them of the update. + iAvkonEnv->SettingCache().Update( KAknHardwareLayoutSwitch ); + iAppUi->SgcServer()->HandleWindowGroupParamChangeL( + iEikonEnv->RootWin().Identifier(), + 0, + 0, + 0, + KAknScreenModeUnset ); if ( screenMode == screen->CurrentScreenMode() ) { @@ -815,5 +829,39 @@ iEikonEnv->WsSession().SendEventToAllWindowGroups( 0, event ); } } + +// --------------------------------------------------------------------------- +// CAknServKeyFilter::UpdateStateAndNotifyL +// --------------------------------------------------------------------------- +// +void CAknServKeyFilter::UpdateStateAndNotifyL( TInt aState ) + { + CWsScreenDevice* screen = iEikonEnv->ScreenDevice(); + TInt screenMode = screen->CurrentScreenMode(); + TBool changed; + SetHardwareStateL( aState, changed); + + //Do something only if anything changed + if (changed) + { + // Update the setting cache and get SGCS to process the screen + // mode change. This may broadcast a screen device change to + // the apps, to inform them of the update. + iAvkonEnv->SettingCache().Update( KAknHardwareLayoutSwitch ); + iAppUi->SgcServer()->HandleWindowGroupParamChangeL( + iEikonEnv->RootWin().Identifier(), + 0, + 0, + 0, + KAknScreenModeUnset ); + + } + + if (screenMode == screen->CurrentScreenMode() ) + { + // Remember that there was at least one inhibited screen mode + iAppUi->SgcServer()->SetBackgroundAppsStateChangeDeferred( ETrue ); + } + } // End of file diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AknGlobalUI/AknCapServer/src/aknslidestatusnotifier.cpp --- a/uifw/AknGlobalUI/AknCapServer/src/aknslidestatusnotifier.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AknGlobalUI/AknCapServer/src/aknslidestatusnotifier.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -2,7 +2,7 @@ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* under the terms of "Eclipse Public License v1.0" * which accompanies this distribution, and is available * at the URL "http://www.eclipse.org/legal/epl-v10.html". * diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AknGlobalUI/NotifierWrapper/src/AknNotiferAppServerApplication.cpp --- a/uifw/AknGlobalUI/NotifierWrapper/src/AknNotiferAppServerApplication.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AknGlobalUI/NotifierWrapper/src/AknNotiferAppServerApplication.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -33,7 +33,7 @@ #include "AknNotiferAppServerApplicationInterface.h" #include -#include +#include #include //---- Awkward, but declaring base classes otherwise in Akncapserver entry would break app fw. diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AknGlobalUI/OldStyleNotif/Inc/AknNotifyPlugin.h --- a/uifw/AknGlobalUI/OldStyleNotif/Inc/AknNotifyPlugin.h Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AknGlobalUI/OldStyleNotif/Inc/AknNotifyPlugin.h Wed Mar 31 21:59:52 2010 +0300 @@ -28,7 +28,7 @@ #include #include #include -#include +#include class CAknIndicatorData; diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AknGlobalUI/OldStyleNotif/Inc/AknSoftNotificationPlugin.h --- a/uifw/AknGlobalUI/OldStyleNotif/Inc/AknSoftNotificationPlugin.h Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AknGlobalUI/OldStyleNotif/Inc/AknSoftNotificationPlugin.h Wed Mar 31 21:59:52 2010 +0300 @@ -27,7 +27,7 @@ #include #include #include // Not the best for the purpose but will do just fine. -#include +#include #include #include "AknSystemPopup.h" #include "AknGroupedNotifierNote.h" diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AknGlobalUI/OldStyleNotif/Inc/AknSystemPopup.h --- a/uifw/AknGlobalUI/OldStyleNotif/Inc/AknSystemPopup.h Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AknGlobalUI/OldStyleNotif/Inc/AknSystemPopup.h Wed Mar 31 21:59:52 2010 +0300 @@ -155,6 +155,7 @@ TPtrC iSoftkeyLeft; /// Custom text for right softkey. TPtrC iSoftkeyRight; + TBool iCaptured; }; diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AknGlobalUI/OldStyleNotif/Src/AknSystemListMsgPopup.cpp --- a/uifw/AknGlobalUI/OldStyleNotif/Src/AknSystemListMsgPopup.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AknGlobalUI/OldStyleNotif/Src/AknSystemListMsgPopup.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -35,7 +35,7 @@ #include #include -#include +#include #include "AknAppsKeyCleanup.inl" diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AknGlobalUI/OldStyleNotif/Src/AknSystemPopup.cpp --- a/uifw/AknGlobalUI/OldStyleNotif/Src/AknSystemPopup.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AknGlobalUI/OldStyleNotif/Src/AknSystemPopup.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -49,7 +49,7 @@ #include #include -#include +#include #include #include #include "GlobalWindowPriorities.h" @@ -766,6 +766,11 @@ void CAknGlobalNoteDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent) { + if (aPointerEvent.iType == TPointerEvent::EButton1Down) + { + iCaptured = ETrue; + } + if (Rect().Contains(aPointerEvent.iPosition) && (aPointerEvent.iType == TPointerEvent::EButton1Up) && iIsAlarm) { @@ -776,7 +781,7 @@ } else if ((iSoftkeys == R_AVKON_SOFTKEYS_EMPTY) && (iTimeoutInMicroseconds != ENoTimeout) && - (aPointerEvent.iType == TPointerEvent::EButton1Up)) + (aPointerEvent.iType == TPointerEvent::EButton1Up)&& iCaptured) { CEikDialog::TryExitL(EAknSoftkeyExit); } @@ -784,6 +789,10 @@ { CAknStaticNoteDialog::HandlePointerEventL(aPointerEvent); } + if (aPointerEvent.iType == TPointerEvent::EButton1Up) + { + iCaptured = EFalse; + } } // class CAknGlobalNoteSubject diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AknGlobalUI/OldStyleNotif/Src/aknkeylocknotifier.cpp --- a/uifw/AknGlobalUI/OldStyleNotif/Src/aknkeylocknotifier.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AknGlobalUI/OldStyleNotif/Src/aknkeylocknotifier.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -33,7 +33,7 @@ #include #include -#include +#include #include // KPSUidAvkonDomain, KAknKeyguardStatus, TAknKeyguardStatus #include // KStartupSecurityCodeQueryStatus #include // KCoreAppUIsAutolockStatus @@ -992,7 +992,10 @@ TBool touchEnabled( AknLayoutUtils::PenEnabled() ); TBool hasSlider(iHardwareSupport != EKeyguardDefaultHardware); - + if( FeatureManager::FeatureSupported( KFeatureIdFfPowerKeyAsKeyguard ) ) + { + hasSlider = ETrue; // the only purpose is to display empty sotkeys + } iKeyLockCba = CEikButtonGroupContainer::NewL( CEikButtonGroupContainer::ECba, CEikButtonGroupContainer::EHorizontal, diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AknGlobalUI/OldStyleNotif/Src/aknsystemconfirmationpopup.cpp --- a/uifw/AknGlobalUI/OldStyleNotif/Src/aknsystemconfirmationpopup.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AknGlobalUI/OldStyleNotif/Src/aknsystemconfirmationpopup.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -35,7 +35,7 @@ #include #include -#include +#include const TInt KCharsInTInt = 4; // TInt32 takes 4 chars. diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AknGlobalUI/OldStyleNotif/Src/aknsystemmsgpopup.cpp --- a/uifw/AknGlobalUI/OldStyleNotif/Src/aknsystemmsgpopup.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AknGlobalUI/OldStyleNotif/Src/aknsystemmsgpopup.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include "AknAppsKeyCleanup.inl" const TInt KCharsInTInt = 4; // TInt32 takes 4 chars. diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AknGlobalUI/OldStyleNotif/Src/aknsystemprogresspopup.cpp --- a/uifw/AknGlobalUI/OldStyleNotif/Src/aknsystemprogresspopup.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AknGlobalUI/OldStyleNotif/Src/aknsystemprogresspopup.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include "AknAppsKeyCleanup.inl" const TInt KCharsInTInt = 4; // TInt32 takes 4 chars. diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/EABI/AVKONU.DEF --- a/uifw/AvKon/EABI/AVKONU.DEF Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/EABI/AVKONU.DEF Wed Mar 31 21:59:52 2010 +0300 @@ -4599,4 +4599,8 @@ _ZTI17CAknSmileyManager @ 4598 NONAME _ZTV14CAknSmileyIcon @ 4599 NONAME _ZTV17CAknSmileyManager @ 4600 NONAME + _ZN20CAknPopupSettingPage15ProcessCommandLEi @ 4601 NONAME + _ZN26CAknRadioButtonSettingPage15ProcessCommandLEi @ 4602 NONAME + _ZThn84_N20CAknPopupSettingPage15ProcessCommandLEi @ 4603 NONAME + _ZThn84_N26CAknRadioButtonSettingPage15ProcessCommandLEi @ 4604 NONAME diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/aknhlist/inc/aknsinglecolumnstylecoredatarow.h --- a/uifw/AvKon/aknhlist/inc/aknsinglecolumnstylecoredatarow.h Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/aknhlist/inc/aknsinglecolumnstylecoredatarow.h Wed Mar 31 21:59:52 2010 +0300 @@ -51,7 +51,11 @@ /** Third text column is enabled. */ EThirdColumnEnabled = 0x00010000, /** Core data row is emphasised. */ - EEmphasis = 0x00020000 + EEmphasis = 0x00020000, + /** Enable smiley icon in first column */ + EFirstColumnSmiley = 0x00040000, + /** Enable smiley icon in second column */ + ESecondColumnSmiley = 0x00080000 }; /** Icon types for single column style core data row. */ diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/aknhlist/inc/aknsinglecolumnstylesubtitlerow.h --- a/uifw/AvKon/aknhlist/inc/aknsinglecolumnstylesubtitlerow.h Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/aknhlist/inc/aknsinglecolumnstylesubtitlerow.h Wed Mar 31 21:59:52 2010 +0300 @@ -59,6 +59,14 @@ EHighlightedOptIcon, }; + /** Single style subtitle row flags. */ + enum TItemFlags + { + /** Enable smiley icon */ + ESmiley = 0x00010000 + }; + + /** * Two phased constructor. Creates an instance of single column style * subtitle row and leaves the newly created object in the cleanup diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/aknhlist/inc/akntree.h --- a/uifw/AvKon/aknhlist/inc/akntree.h Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/aknhlist/inc/akntree.h Wed Mar 31 21:59:52 2010 +0300 @@ -22,6 +22,7 @@ #include // TScaleMode #include +#include #include "akntreenode.h" #include "akntreeobserver.h" @@ -63,7 +64,7 @@ * @lib aknhlist.lib * @since S60 v3.2 */ -NONSHARABLE_CLASS( CAknTree ) : public CAknTreeNode +NONSHARABLE_CLASS( CAknTree ) : public CAknTreeNode, public MAknSmileyObserver { public: @@ -867,6 +868,50 @@ */ void Collapse(); + /** + * Init smiley manager in this tree. + * @since S60 5.2 + */ + void InitSmiley(); + + /** + * Draw smiley icon when aText contains simely text, otherwise it is as same + * as @c DrawText. + * + * @param aGc Graphics context. + * + * @param aRect Parent rectangle for the text layout. + * + * @param aTextLayout Text layout. + * + * @param aText Text. + * + * @param aFont Font. @c NULL if the font defined in layout is used. + * + * @param aFocused @c ETrue, if the text is drawn for focused tree list + * item, otherwise @c EFalse. + * + * @since S60 5.2 + */ + void DrawSmiley( CWindowGc& aGc, const TRect& aRect, + const TAknTextComponentLayout& aTextLayout, + const TDesC& aText, const CFont* aFont, + TBool aFocused ); + + /** + * Use smiley manager to convert smiley text to placehodler. + * + * @param aText Text to be processed. + * @return How many smiley icon found in aText. Or leave code if there is + * any problem. + * @since S60 5.2 + */ + TInt ConvertTextToSmiley( TDes& aText ); + +private: // from MAknSmileyObserver + void SmileyStillImageLoaded( CAknSmileyIcon* aSmileyIcon ); + void SmileyAnimationChanged( CAknSmileyIcon* aSmileyIcon ); + private: /** @@ -995,6 +1040,15 @@ */ TBitFlags32 iFlags; + /** + * Smiley manager. owned + */ + CAknSmileyManager* iSmileyMan; + + /** + * Smiley icon size + */ + TSize iSmileySize; }; diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/aknhlist/inc/akntreelistview.h --- a/uifw/AvKon/aknhlist/inc/akntreelistview.h Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/aknhlist/inc/akntreelistview.h Wed Mar 31 21:59:52 2010 +0300 @@ -642,8 +642,10 @@ /** * Updates scrollbars. + * + * @param aDrawNow Whether or not to draw the scrollbar. */ - void UpdateScrollbars(); + void UpdateScrollbars( TBool aDrawNow ); /** * Updates the horizontal position of the view so that the beginning of @@ -1091,6 +1093,11 @@ * Last visible item index */ TInt iBottomIndex; + + /** + * Whether or not mirrored layout is currently in use. + */ + TBool iMirroredLayoutInUse; }; diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/aknhlist/src/aknsinglecolumnstylecoredatarow.cpp --- a/uifw/AvKon/aknhlist/src/aknsinglecolumnstylecoredatarow.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/aknhlist/src/aknsinglecolumnstylecoredatarow.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -23,6 +23,7 @@ #include "akntree.h" #include "aknsinglecolumnstylecoredatarow.h" #include "akntreelistinternalconstants.h" +#include "akntrace.h" using AknTreeListIconID::KDefault; using AknTreeListIconID::KNone; @@ -457,6 +458,7 @@ void CAknSingleColumnStyleCoreDataRow::Draw( CWindowGc& aGc, const TRect& aItemRect, const TRect& /*aRect*/, TBool aFocused ) const { + _AKNTRACE_FUNC_ENTER; CAknTree* root = Root(); __ASSERT_DEBUG( root, User::Invariant() ); @@ -493,9 +495,18 @@ if ( iFirstColumn ) { + if ( Flags() & EFirstColumnSmiley ) + { + root->DrawSmiley( aGc, aItemRect, AknLayoutScalable_Avkon:: + list_single_2heading_msg_pane_t2( textVariety), + *iFirstColumn, NULL, aFocused ); + } + else + { root->DrawText( aGc, aItemRect, AknLayoutScalable_Avkon:: list_single_2heading_msg_pane_t2( textVariety ), - *iFirstColumn, NULL, this, aFocused, EFalse ); + *iFirstColumn, NULL, this, aFocused, ETrue ); + } } } @@ -507,9 +518,20 @@ list_single_2heading_msg_pane_t3( textVariety ).LayoutLine() ); if ( iSecondColumn ) { + if ( Flags() & ESecondColumnSmiley ) + { + _AKNTRACE("Draw Smiley"); + root->DrawSmiley( aGc, aItemRect, AknLayoutScalable_Avkon:: + list_single_2heading_msg_pane_t3(textVariety), + *iSecondColumn, NULL, aFocused ); + } + else + { + _AKNTRACE("Draw Text "); root->DrawText( aGc, aItemRect, AknLayoutScalable_Avkon:: list_single_2heading_msg_pane_t3( textVariety ), - *iSecondColumn, NULL, this, aFocused, EFalse ); + *iSecondColumn, NULL, this, aFocused, ETrue ); + } } } @@ -546,6 +568,7 @@ root->DrawIcon( optIconId2, optIconRect2.Size(), aGc, optIconRect2.iTl, optIconRect2.Size() ); } + _AKNTRACE_FUNC_EXIT; } diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/aknhlist/src/aknsinglecolumnstylesubtitlerow.cpp --- a/uifw/AvKon/aknhlist/src/aknsinglecolumnstylesubtitlerow.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/aknhlist/src/aknsinglecolumnstylesubtitlerow.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -289,10 +289,18 @@ layoutText.LayoutText( aItemRect, AknLayoutScalable_Avkon:: list_single_2heading_msg_pane_t1( textVariety ).LayoutLine() ); - root->DrawText( aGc, aItemRect, AknLayoutScalable_Avkon:: - list_single_2heading_msg_pane_t1( textVariety ), *iText, NULL, - this, aFocused, ETrue ); - + if ( Flags() & ESmiley ) + { + root->DrawSmiley( aGc, aItemRect, AknLayoutScalable_Avkon:: + list_single_2heading_msg_pane_t1( textVariety), + *iText, NULL, aFocused ); + } + else + { + root->DrawText( aGc, aItemRect, AknLayoutScalable_Avkon:: + list_single_2heading_msg_pane_t1( textVariety ), + *iText, NULL, this, aFocused, ETrue ); + } // Optional indication icon. TInt optIconVariety = 1; // Sorting group. Marked. TRect optIconRect = RectFromLayout( aItemRect, AknLayoutScalable_Avkon:: diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/aknhlist/src/aknsinglecolumnstyletreelist.cpp --- a/uifw/AvKon/aknhlist/src/aknsinglecolumnstyletreelist.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/aknhlist/src/aknsinglecolumnstyletreelist.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -29,7 +29,7 @@ #include "aknsinglecolumnstylesimpledatarow.h" #include "aknsinglecolumnstylesubtitlerow.h" #include "aknsinglecolumnstyletreelist.h" - +#include "akntrace.h" /** Set of flags that are always set on for hierarchical column list. */ const TInt KMandatoryListFlags = NULL; @@ -169,6 +169,15 @@ { flags |= CAknSingleColumnStyleCoreDataRow::EEmphasis; } + if ( aFlags & ESmileyIcon ) + { + flags |= CAknSingleColumnStyleCoreDataRow::EFirstColumnSmiley; + } + if ( aFlags & ESmileyIconSecond ) + { + _AKNTRACE("Add ESecondColumnSmiley "); + flags |= CAknSingleColumnStyleCoreDataRow::ESecondColumnSmiley; + } CAknSingleColumnStyleCoreDataRow* row = CAknSingleColumnStyleCoreDataRow::NewLC( aFirstColumn, @@ -207,6 +216,15 @@ { flags |= CAknSingleColumnStyleCoreDataRow::EEmphasis; } + if ( aFlags & ESmileyIcon ) + { + flags |= CAknSingleColumnStyleCoreDataRow::EFirstColumnSmiley; + } + if ( aFlags & ESmileyIconSecond ) + { + _AKNTRACE("Add ESecondColumnSmiley "); + flags |= CAknSingleColumnStyleCoreDataRow::ESecondColumnSmiley; + } CAknSingleColumnStyleCoreDataRow* row = CAknSingleColumnStyleCoreDataRow::NewLC( aFirstColumn, @@ -247,7 +265,10 @@ { flags |= CAknTreeNode::ENonEmpty; } - + if ( aFlags & ESmileyIcon ) + { + flags |= CAknSingleColumnStyleSubtitleRow::ESmiley; + } CAknSingleColumnStyleSubtitleRow* row = CAknSingleColumnStyleSubtitleRow::NewLC( aText, flags ); TAknTreeItemID id = Tree().AddItemL( row, aParent, aDrawNow ); diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/aknhlist/src/akntree.cpp --- a/uifw/AvKon/aknhlist/src/akntree.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/aknhlist/src/akntree.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -33,6 +33,9 @@ #include "akntreelistinternalconstants.h" const TInt KObserverArrayGranularity = 1; +const TInt KMaxLength = 80; +// smiley text place holder +_LIT( KPlaceHolder, "\xFFF0i" ); // Tree flag definitions enum TAknTreeFlags @@ -63,6 +66,8 @@ // CAknTree::~CAknTree() { + delete iSmileyMan; + iSmileyMan = NULL; delete iOrdering; iOrdering = NULL; iCustomOrdering = NULL; iObservers.Close(); @@ -1243,6 +1248,74 @@ } } +// --------------------------------------------------------------------------- +// CAknTreeItem::InitSmiley(). +// Create smiley manager instance if there is not. +// --------------------------------------------------------------------------- +// +void CAknTree::InitSmiley() + { + if ( !iSmileyMan ) + { + TRAPD(err, iSmileyMan = CAknSmileyManager::NewL( this )); + if ( err != KErrNone ) + { + delete iSmileyMan; + iSmileyMan = NULL; + } + } + } + +// --------------------------------------------------------------------------- +// CAknTreeItem::DrawSmiley +// Draw smiley icon, if it is just plain text, just draw like DrawText. +// --------------------------------------------------------------------------- +// +void CAknTree::DrawSmiley(CWindowGc& aGc, const TRect& aRect, + const TAknTextComponentLayout& aTextLayout, + const TDesC& aText, const CFont* aFont, + TBool aFocused ) + { + TBuf buf = aText.Left(KMaxLength*2); + // it is possiable that this been called after ~CAknTree()... + if ( iSmileyMan && ConvertTextToSmiley(buf) > KErrNone ) + { + TRgb textColor; + TAknsQsnTextColorsIndex index = + aFocused ? EAknsCIQsnTextColorsCG10 : EAknsCIQsnTextColorsCG6; + AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), textColor, + KAknsIIDQsnTextColors, index ); + aGc.SetPenColor( textColor ); + + TAknLayoutText layoutText; + layoutText.LayoutText( aRect, aTextLayout.LayoutLine(), aFont ); + TInt l = Min( layoutText.Font()->TextWidthInPixels( KPlaceHolder ), + layoutText.Font()->FontMaxHeight()); + TSize s( l, l); + if ( iSmileySize != s ) + { + iSmileyMan->SetSize( s); + iSmileySize = s; + } + iSmileyMan->DrawText( aGc, buf, layoutText, ETrue ); + } + else + // no smiley existing... + { + DrawText( aGc, aRect, aTextLayout, aText, aFont, NULL, aFocused, EFalse); + } + } + +// --------------------------------------------------------------------------- +// CAknTreeItem::ConvertTextToSmiley +// --------------------------------------------------------------------------- +// +TInt CAknTree::ConvertTextToSmiley( TDes& aText ) + { + TInt count = 0; + TRAPD( err, count = iSmileyMan->ConvertTextToCodesL( aText )); + return err == KErrNone ? count : err; + } // --------------------------------------------------------------------------- // C++ constructor. @@ -1461,3 +1534,21 @@ __ASSERT_DEBUG( EFalse, User::Invariant() ); } +// --------------------------------------------------------------------------- +// From class MAknSmileyObserver. +// Redraw whole control when smiley image ready +// --------------------------------------------------------------------------- +// +void CAknTree::SmileyStillImageLoaded( CAknSmileyIcon* /*aSmileyIcon*/ ) + { + iList.DrawDeferred(); + } + +// --------------------------------------------------------------------------- +// From class MAknSmileyObserver. +// Empty implementation. +// --------------------------------------------------------------------------- +// +void CAknTree::SmileyAnimationChanged( CAknSmileyIcon* /*aSmileyIcon*/ ) + { + } diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/aknhlist/src/akntreelist.cpp --- a/uifw/AvKon/aknhlist/src/akntreelist.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/aknhlist/src/akntreelist.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -80,6 +80,11 @@ View().EnableMarking( aFlags & KAknTreeListMarkable ); } + if ( diff & KAknTreeListSmiley && !AknLayoutUtils::LayoutMirrored() ) + { + Tree().InitSmiley(); + } + iFlags = aFlags; } diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/aknhlist/src/akntreelistphysicshandler.cpp --- a/uifw/AvKon/aknhlist/src/akntreelistphysicshandler.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/aknhlist/src/akntreelistphysicshandler.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -911,7 +911,7 @@ } else if ( bottomItem == iTree->VisibleItemCount() ) { - if ( upperItem != iOldTopItem ) + if ( upperItem != iOldTopItem && ( upperItem != 0 || iOldTopItem != -1 ) ) { iFeedback->InstantFeedback( iTreeListView, ETouchFeedbackSensitiveList, diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/aknhlist/src/akntreelistview.cpp --- a/uifw/AvKon/aknhlist/src/akntreelistview.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/aknhlist/src/akntreelistview.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -32,7 +32,7 @@ #include "akntreeiterator.h" #include "akntreelistphysicshandler.h" - +#include "akntrace.h" #ifdef RD_UI_TRANSITION_EFFECTS_LIST @@ -163,7 +163,8 @@ { Window().Invalidate( Rect() ); } - UpdateScrollbars(); + + UpdateScrollbars( ETrue ); } @@ -213,7 +214,7 @@ // Draw always Window().Invalidate( Rect() ); - UpdateScrollbars(); + UpdateScrollbars( ETrue ); } @@ -422,7 +423,7 @@ delete iEmptyListText; iEmptyListText = NULL; iEmptyListText = aText.AllocL(); - UpdateScrollbars(); + UpdateScrollbars( ETrue ); } @@ -504,7 +505,7 @@ { CAknTreeItem* first = iTree.VisibleItem( aFirstItem ); UpdateVisibleItems( 0, first ); - UpdateScrollbars(); + UpdateScrollbars( ETrue ); UpdateAnimation(); if ( aDrawNow ) @@ -742,11 +743,7 @@ void CAknTreeListView::MakeVisible( TBool aVisible ) { CAknControl::MakeVisible( aVisible ); - - if ( aVisible ) - { - UpdateScrollbars(); - } + UpdateScrollbars( aVisible ); } @@ -771,6 +768,11 @@ iScrollbarFrame = new ( ELeave ) CEikScrollBarFrame( this, this ); iScrollbarFrame->CreateDoubleSpanScrollBarsL( EFalse, EFalse ); + if ( CAknEnv::Static()->TransparencyEnabled() && iPhysicsHandler ) + { + // disable background drawing of scrollbar + iScrollbarFrame->DrawBackground( EFalse, EFalse ); + } } @@ -782,62 +784,91 @@ void CAknTreeListView::HandleResourceChange( TInt aType ) { CAknControl::HandleResourceChange( aType ); - if ( aType == KAknsMessageSkinChange ) - { - TRAPD( error, CreateAnimationL() ) - if ( error ) - { - delete iAnimation; - iAnimation = NULL; - } - } - else if ( aType == KEikDynamicLayoutVariantSwitch && FocusedItem() ) + + switch ( aType ) { - if ( !FocusedItemVisible() ) + case KAknsMessageSkinChange: { - TInt firstItemIndex = 0; - if ( iItems.Count() && iItems[0].Item() ) + TRAPD( error, CreateAnimationL() ) + if ( error ) { - firstItemIndex = iTree.VisibleItemIndex( iItems[0].Item() ); - } - - TInt index = 0; - if ( firstItemIndex < iTree.VisibleItemIndex( FocusedItem() ) ) - { - index = iItems.Count() - 1; + delete iAnimation; + iAnimation = NULL; } - - SetFocusedItem( FocusedItem(), index, ETrue ); + break; } - else + + case KEikDynamicLayoutVariantSwitch: { - SetFocusedItem( FocusedItem(), FocusIndex(), ETrue ); - - - // This block moves visible view after layout switch - // if there are not enough items to fill whole screen - TInt visibleItemIndex = iTree.VisibleItemIndex( FocusedItem() ); - if ( visibleItemIndex != KErrNotFound) + iMirroredLayoutInUse = AknLayoutUtils::LayoutMirrored(); + + CAknTreeItem* focusedItem( FocusedItem() ); + if ( focusedItem ) { - TInt focusedItemIndex = FocusedItemIndex(); - if (focusedItemIndex != -1) + if ( !FocusedItemVisible() ) + { + TInt firstItemIndex = 0; + if ( iItems.Count() && iItems[0].Item() ) + { + firstItemIndex = + iTree.VisibleItemIndex( iItems[0].Item() ); + } + + TInt index = 0; + if ( firstItemIndex < iTree.VisibleItemIndex( focusedItem ) ) + { + index = iItems.Count() - 1; + } + + SetFocusedItem( focusedItem, index, ETrue ); + } + else { - TInt height = iTree.VisibleItemCount() - visibleItemIndex + focusedItemIndex; - TInt itemCountLimit = iItems.Count(); - - if ( height < itemCountLimit && height < iTree.VisibleItemCount() ) + SetFocusedItem( focusedItem, FocusIndex(), ETrue ); + + // This block moves visible view after layout switch + // if there are not enough items to fill whole screen + TInt visibleItemIndex = + iTree.VisibleItemIndex( focusedItem ); + if ( visibleItemIndex != KErrNotFound ) { - TInt move = itemCountLimit - height; - UpdateVisibleItems( focusedItemIndex + move, FocusedItem() ); + TInt focusedItemIndex = FocusedItemIndex(); + if ( focusedItemIndex != -1 ) + { + TInt visibleItemCount( iTree.VisibleItemCount() ); + + TInt height = + visibleItemCount - visibleItemIndex + focusedItemIndex; + TInt itemCountLimit = iItems.Count(); + + if ( height < itemCountLimit && + height < visibleItemCount ) + { + TInt move = itemCountLimit - height; + UpdateVisibleItems( + focusedItemIndex + move, focusedItem ); + } + } } + // end of block } } - // end of block + break; } - } - else if ( aType == KAknMessageFocusLost && HighlightEnabled() ) - { - EnableHighlight( EFalse ); + + case KAknMessageFocusLost: + { + if ( HighlightEnabled() ) + { + EnableHighlight( EFalse ); + } + break; + } + + default: + { + break; + } } } @@ -858,7 +889,7 @@ return; } - if ( GrabbingComponent() != NULL ) + if ( GrabbingComponent() ) { iPhysicsHandler->ResetEventBlockingStatus(); } @@ -913,7 +944,7 @@ } TInt thumbPosition = aScrollBar->ThumbPosition(); - if ( AknLayoutUtils::LayoutMirrored() && + if ( iMirroredLayoutInUse && aScrollBar != iScrollbarFrame->VerticalScrollBar() ) { const TEikScrollBarModel* model = aScrollBar->Model(); @@ -932,7 +963,7 @@ case EEikScrollPageLeft: case EEikScrollPageRight: iViewLevel = thumbPosition; - UpdateScrollbars(); + UpdateScrollbars( ETrue ); UpdateAnimation(); Window().Invalidate( Rect() ); break; @@ -944,15 +975,15 @@ break; case EEikScrollThumbReleaseHoriz: - UpdateScrollbars(); + UpdateScrollbars( ETrue ); break; case EEikScrollHome: - // Not in use! + // Not in use break; case EEikScrollEnd: - // Not in use! + // Not in use break; default: @@ -1051,9 +1082,8 @@ if ( aDrawNow ) { - // it should be DrawNow() here for fixing bug JLAI-7UE9RN + // DrawNow must be used here. DrawNow(); - //Window().Invalidate( Rect() ); } } @@ -1137,7 +1167,9 @@ } else if ( IsFocused() && FocusedItemVisible() ) { - TRect rect = iItems[FocusIndex()].HighlightRect( iViewLevel, Indention(), IndentionWidth() ); + TRect rect = iItems[FocusIndex()].HighlightRect( iViewLevel, + Indention(), + IndentionWidth() ); Window().Invalidate( rect ); } @@ -1157,7 +1189,7 @@ LayoutView(); // Update scrollbars. - UpdateScrollbars(); + UpdateScrollbars( ETrue ); UpdateIndexes(); AknsUtils::RegisterControlPosition( this, PositionRelativeToScreen() ); @@ -1270,6 +1302,8 @@ { EnableHighlight( ETrue ); } + + iMirroredLayoutInUse = AknLayoutUtils::LayoutMirrored(); } @@ -1282,10 +1316,7 @@ void CAknTreeListView::HandleItemAddedEvent( CAknTreeItem* /*aItem*/, TBool aDrawNow ) { UpdateVisibleItems(); - if (aDrawNow) - { - UpdateScrollbars(); - } + UpdateScrollbars( aDrawNow ); } @@ -1300,7 +1331,7 @@ // been changed, unless the it receives information from where the // specified item was moved. UpdateVisibleItems(); - UpdateScrollbars(); + UpdateScrollbars( ETrue ); } @@ -1355,10 +1386,7 @@ void CAknTreeListView::HandleItemRemovedEvent( CAknTreeItem* /*aItem*/, TBool aDrawNow ) { UpdateVisibleItems(); - if (aDrawNow) - { - UpdateScrollbars(); - } + UpdateScrollbars( aDrawNow ); } @@ -1381,7 +1409,8 @@ { UpdateVisibleItems(); } - UpdateScrollbars(); + + UpdateScrollbars( ETrue ); } @@ -1421,7 +1450,7 @@ } UpdateVisibleItems(); - UpdateScrollbars(); + UpdateScrollbars( ETrue ); } @@ -1473,10 +1502,8 @@ } } } - if ( aDrawNow ) - { - UpdateScrollbars(); - } + + UpdateScrollbars( aDrawNow ); } @@ -1626,7 +1653,7 @@ // void CAknTreeListView::HandleRightArrowKeyEvent() { - if ( AknLayoutUtils::LayoutMirrored() ) + if ( iMirroredLayoutInUse ) { AscendFocus(); } @@ -1643,7 +1670,7 @@ // void CAknTreeListView::HandleLeftArrowKeyEvent() { - if ( AknLayoutUtils::LayoutMirrored() ) + if ( iMirroredLayoutInUse ) { DescendFocus(); } @@ -1981,7 +2008,8 @@ // Fill whole control area with list items when physics enabled // and threre is no horizontal scrollbar. if ( iScrollbarFrame && - iScrollbarFrame->ScrollBarVisibility( CEikScrollBar::EHorizontal ) != CEikScrollBarFrame::EOn && + iScrollbarFrame->ScrollBarVisibility( + CEikScrollBar::EHorizontal ) != CEikScrollBarFrame::EOn && viewRect.Height() < Rect().Height() ) { viewRect.iTl.iY = Rect().iTl.iY; @@ -1999,10 +2027,24 @@ // scrollbars changes. // --------------------------------------------------------------------------- // -void CAknTreeListView::UpdateScrollbars() +void CAknTreeListView::UpdateScrollbars( TBool aDrawNow ) { if ( iScrollbarFrame ) { + TBool drawHorizontal; + TBool drawVertical; + if ( !aDrawNow ) + { + // Backup the old values. + iScrollbarFrame->DrawBackgroundState( drawHorizontal, + drawVertical ); + + // Disable the scrollbar background drawing for the duration + // of this call. + iScrollbarFrame->DrawBackground( EFalse, EFalse ); + } + + iPhysicsHandler->UpdateScrollIndex( iScrollPhysicsTop ); iScrollPhysicsTop = ETrue; @@ -2021,7 +2063,7 @@ hScrollSpan = Max( hThumbPos + hThumbSpan, c/b ); } - if ( AknLayoutUtils::LayoutMirrored() ) + if ( iMirroredLayoutInUse ) { hThumbPos = hScrollSpan - ( hThumbPos + hThumbSpan ); } @@ -2068,7 +2110,7 @@ iScrollbarFrame->Tile( &hModel, &vModel ); LayoutView(); - UpdateScrollbars(); // Recursion + UpdateScrollbars( aDrawNow ); // Recursion // Update animation in case that scrollbar visibility change // has affected the highlight size of focused item. @@ -2078,7 +2120,13 @@ { // Set new model for scrollbars. iScrollbarFrame->Tile( &hModel, &vModel ); - } + } + + if ( !aDrawNow ) + { + // Restore the previous draw background state values. + iScrollbarFrame->DrawBackground( drawHorizontal, drawVertical ); + } } } @@ -2782,6 +2830,12 @@ if ( iItems[ii].Item() ) { + if ( !aRect.Intersects(drawRect) ) + { + //invisible item yet + continue; + } + #ifdef RD_UI_TRANSITION_EFFECTS_LIST TRect tfxDrawRect( drawRect ); tfxDrawRect.Move( 0, -offset ); @@ -2791,7 +2845,6 @@ transApi->StartDrawing( MAknListBoxTfxInternal::EListNotSpecified ); } - TRect clippingRect( tfxDrawRect ); // If horizontal scrollbar on, reduce clipping rect @@ -2809,7 +2862,6 @@ // Set clipping rect. gc.SetClippingRect( clippingRect ); - if ( transApi ) { transApi->StopDrawing(); @@ -2817,7 +2869,9 @@ #endif if ( ii < iBottomIndex ) { - AknListUtils::DrawSeparator( gc, drawRect, textColor, skin ); + TRect offsetRect( drawRect ); + offsetRect.Move( 0, -offset ); + AknListUtils::DrawSeparator( gc, offsetRect, textColor, skin ); } TBool focused = ( IsFocused() && FocusedItem() && @@ -2845,7 +2899,8 @@ if ( transApi ) { transApi->Invalidate(MAknListBoxTfxInternal::EListHighlight ); - transApi->BeginRedraw( MAknListBoxTfxInternal::EListHighlight, tfxHighlightRect ); + transApi->BeginRedraw( MAknListBoxTfxInternal::EListHighlight, + tfxHighlightRect ); transApi->StartDrawing( MAknListBoxTfxInternal::EListHighlight ); } #endif //RD_UI_TRANSITION_EFFECTS_LIST @@ -2873,7 +2928,10 @@ { if ( transApi ) { - transApi->BeginRedraw(MAknListBoxTfxInternal::EListItem, tfxDrawRect, iTree.VisibleItemIndex(iItems[ii].Item())); + transApi->BeginRedraw( + MAknListBoxTfxInternal::EListItem, + tfxDrawRect, + iTree.VisibleItemIndex( iItems[ii].Item() ) ); transApi->StartDrawing( MAknListBoxTfxInternal::EListItem ); } #endif //RD_UI_TRANSITION_EFFECTS_LIST @@ -2886,7 +2944,9 @@ if ( transApi ) { transApi->StopDrawing(); - transApi->EndRedraw(MAknListBoxTfxInternal::EListItem, iTree.VisibleItemIndex(iItems[ii].Item())); + transApi->EndRedraw( + MAknListBoxTfxInternal::EListItem, + iTree.VisibleItemIndex( iItems[ii].Item() ) ); } } #endif //RD_UI_TRANSITION_EFFECTS_LIST diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/bwins/AVKONU.def --- a/uifw/AvKon/bwins/AVKONU.def Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/bwins/AVKONU.def Wed Mar 31 21:59:52 2010 +0300 @@ -3467,4 +3467,6 @@ ?DrawText@CAknSmileyManager@@QBEXAAVCWindowGc@@ABVTDesC16@@PBVCFont@@ABVTRect@@HW4TTextAlign@CGraphicsContext@@H@Z @ 3466 NONAME ; void CAknSmileyManager::DrawText(class CWindowGc &, class TDesC16 const &, class CFont const *, class TRect const &, int, enum CGraphicsContext::TTextAlign, int) const ??1CAknSmileyManager@@UAE@XZ @ 3467 NONAME ; CAknSmileyManager::~CAknSmileyManager(void) ?IsSmiley@CAknSmileyManager@@QBEHVTChar@@@Z @ 3468 NONAME ; int CAknSmileyManager::IsSmiley(class TChar) const + ?ProcessCommandL@CAknRadioButtonSettingPage@@MAEXH@Z @ 3469 NONAME ; void CAknRadioButtonSettingPage::ProcessCommandL(int) + ?ProcessCommandL@CAknPopupSettingPage@@MAEXH@Z @ 3470 NONAME ; void CAknPopupSettingPage::ProcessCommandL(int) diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/group/Iconlist.txt --- a/uifw/AvKon/group/Iconlist.txt Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/group/Iconlist.txt Wed Mar 31 21:59:52 2010 +0300 @@ -836,3 +836,5 @@ /1,8 qgn_stat_servtab_uni.svg /1,8 qgn_stat_hdmi_connect.svg + +/1,8 qgn_stat_joint_im_uni.svg diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/inc/AknPreviewPopUp.h --- a/uifw/AvKon/inc/AknPreviewPopUp.h Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/inc/AknPreviewPopUp.h Wed Mar 31 21:59:52 2010 +0300 @@ -242,10 +242,6 @@ // It is true when user clicks the popup, transfer pointer up event to its child control TBool iAllowUpEvent; - - // Used to remember the local variable address which used to be - // mark whether this object is deleted - TBool * iIsDeleted; }; diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/inc/AknSmileyModel.h --- a/uifw/AvKon/inc/AknSmileyModel.h Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/inc/AknSmileyModel.h Wed Mar 31 21:59:52 2010 +0300 @@ -36,6 +36,7 @@ const TInt KSmileyNameLength = 8; typedef TBuf TSmileyText; typedef RArray RSmileyTextArray; +typedef RArray RSmileyCodeArray; NONSHARABLE_CLASS(TSmileyIconInfo) { @@ -80,9 +81,10 @@ TBool StillImageIsReadyToDraw() const; TBool AnimationImageIsReadyToDraw() const; - void AddText(const TDesC& aText); - const TDesC& Text(TInt aVariate=0) const; - TInt TextVariate() const; + void AddVariant(const TDesC& aText, TChar aBaseCode); + TInt VariantCount() const; + const TDesC& Text(TInt aVariant=0) const; + TChar Code(TInt aVariant=0) const; private: MAknSmileyObserver* iSmileyIconObserver; @@ -90,9 +92,21 @@ CSmileyImage* iStillImage; CSmileyImage* iAnimationImage; RSmileyTextArray iTextArray; + RSmileyCodeArray iCodeArray; }; typedef RArray RSmileyIconPtrArray; +NONSHARABLE_CLASS(TSmileyCodeIndex) + { +public: + TSmileyCodeIndex(CSmileyIcon* aSmileyIcon, TInt aVariant=0) : iSmileyIcon(aSmileyIcon), iVariant(aVariant) {} + CSmileyIcon* Smiley() const { return iSmileyIcon; } + const TDesC& Text() const { return iSmileyIcon->Text(iVariant); } +private: + CSmileyIcon* iSmileyIcon; + TInt iVariant; + }; +typedef RArray RSmileyCodeIndexArray; //////////////////////////////////////////////////////////////////// @@ -161,22 +175,20 @@ TChar SwitchToSmileyCode() const; TChar SwitchToSctCode() const; - TChar SmileyCode(TInt aIndex, TInt aVariate=0) const; - TChar SmileyCode(CAknSmileyIcon* aSmileyIcon) const; + TChar SmileyCode(TInt aIndex, TInt aVariant=0) const; + TChar SmileyCode(const CAknSmileyIcon* aSmileyIcon) const; void LoadStillImagesL(const TDesC& aText); void LoadStillImageL(TChar aChar); private: - const TDesC& Text(TInt aIndex, TInt aVariate=0) const; + const TDesC& Text(TInt aIndex, TInt aVariant=0) const; TInt ArrayCount() const; - TChar EncodeSmileyCode(TInt aIndex, TInt aVariate) const; - TBool DecodeSmileyCode(TChar aCode, TInt& aIndex, TInt& aVariate) const; private: MAknSmileyObserver* iSmileyIconObserver; CSmileyTnumbnailAsynLoader iSmileyLoader; RSmileyIconPtrArray iSmileyIconArray; - TUint iBaseCode; + RSmileyCodeIndexArray iSmileyCodeIndexArray; CSmileyTextTreeNode* iTextSearchTree; TBuf<1024*2> iConvertBuffer; diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/inc/akncombinedpane.h --- a/uifw/AvKon/inc/akncombinedpane.h Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/inc/akncombinedpane.h Wed Mar 31 21:59:52 2010 +0300 @@ -2,7 +2,7 @@ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* under the terms of "Eclipse Public License v1.0" * which accompanies this distribution, and is available * at the URL "http://www.eclipse.org/legal/epl-v10.html". * diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/notifsrc/AknSDData.cpp --- a/uifw/AvKon/notifsrc/AknSDData.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/notifsrc/AknSDData.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -15,7 +15,7 @@ * */ -#include +#include #include #include "aknSDData.h" diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_angry.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_angry.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_coffee.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_coffee.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_coffee_static.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_coffee_static.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_connive.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_connive.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_connive_static.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_connive_static.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_denial.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_denial.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_denial_static.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_denial_static.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_flirt.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_flirt.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_flirt_static.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_flirt_static.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_frustrated.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_frustrated.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_frustrated_static.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_frustrated_static.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_gum.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_gum.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_gum_static.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_gum_static.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_idea.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_idea.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_idea_static.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_idea_static.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_innocent.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_innocent.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_innocent_static.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_innocent_static.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_laugh.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_laugh.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_laugh_static.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_laugh_static.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_party.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_party.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_party_static.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_party_static.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_run.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_run.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_run_static.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_run_static.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_silly.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_silly.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_silly_static.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_silly_static.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_sleep.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_sleep.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_sleep_static.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_sleep_static.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_surprised.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_surprised.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_anim_surprised_static.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_anim_surprised_static.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_bigsmile.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_bigsmile.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_cry.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_cry.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_evil.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_evil.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_eyebrows.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_eyebrows.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_heart.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_heart.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_irritated.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_irritated.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_kissing.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_kissing.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_nerd.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_nerd.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_neutral.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_neutral.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_pirate.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_pirate.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_sarcastic.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_sarcastic.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_sarcastic_mad.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_sarcastic_mad.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_smile.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_smile.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_spring.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_spring.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_suprised.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_suprised.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_tongue.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_tongue.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_unhappy.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_unhappy.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_verycool.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_verycool.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_wink.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_wink.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_wink_grin.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_wink_grin.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/smileyicons/qgn_indi_smiley_wondering.svg --- a/uifw/AvKon/smileyicons/qgn_indi_smiley_wondering.svg Mon Mar 15 12:41:34 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/AknAppUi.cpp --- a/uifw/AvKon/src/AknAppUi.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/AknAppUi.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -69,7 +69,7 @@ #include #include -#include +#include #include #include "transitionmanager.h" diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/AknCheckBoxSettingPage.cpp --- a/uifw/AvKon/src/AknCheckBoxSettingPage.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/AknCheckBoxSettingPage.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -362,6 +362,13 @@ switch (aCommandId) { case EAknSoftkeySelect: + { + if ( EnableSingleClickHighlight( aCommandId ) ) + { + break; + } + // no single click mode was enabled, fall through + } case EAknSoftkeyMark: case EAknSoftkeyUnmark: if ( AknLayoutUtils::PenEnabled() ) diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/AknListBoxSettingPage.cpp --- a/uifw/AvKon/src/AknListBoxSettingPage.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/AknListBoxSettingPage.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -168,6 +168,33 @@ return EFalse; } +//--------------------------------------------------------------------------------------- +// CAknListBoxSettingPage::EnableSingleClickHighlightL() +// Enables highlight to listbox control in single click mode if needed +//--------------------------------------------------------------------------------------- +// +TBool CAknListBoxSettingPage::EnableSingleClickHighlight( TInt aCommandId ) + { + TBool highLightEnabled = EFalse; + + if ( aCommandId == EAknSoftkeySelect && + ListBoxControl()->ItemDrawer()->Flags() + & CListItemDrawer::ESingleClickDisabledHighlight ) + { + TKeyEvent event; + event.iCode = EKeyOK; + // restore highlight with simulated key event + TKeyResponse response = + ListBoxControl()->OfferKeyEventL( event, EEventKey ); + + if ( response == EKeyWasConsumed ) + { + highLightEnabled = ETrue; + } + } + return highLightEnabled; + } + void CAknListBoxSettingPage::CreateIconAndAddToArrayL( CArrayPtr*& aIconArray, const TAknsItemID& aId, diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/AknPopupField.cpp --- a/uifw/AvKon/src/AknPopupField.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/AknPopupField.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -208,10 +208,7 @@ void CAknPopupField::SetUpScrollBarL() { - if ( !iExtension || !iExtension->iSingleClickEnabled ) - { - __ASSERT_DEBUG( iCba, Panic( EAknPanicPopupFieldCBADoesntExist ) ); - } + __ASSERT_DEBUG( iCba, Panic( EAknPanicPopupFieldCBADoesntExist ) ); __ASSERT_DEBUG(iSelectionList != NULL, Panic(EAknPanicPopupFieldSelectionListDoesntExist)); iSelectionList->SetMopParent(this); // to get remote scb iSelectionList->CreateScrollBarFrameL(ETrue, ETrue); @@ -832,10 +829,7 @@ void CAknPopupField::CreatePopoutL() { - if ( !iExtension || !iExtension->iSingleClickEnabled ) - { - CreateCbaL(); - } + CreateCbaL(); ConstructSelectionListL(); ChangeMode(EAknPopupFieldSelectionListMode); SetUpScrollBarL(); diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/AknPopupSettingPage.cpp --- a/uifw/AvKon/src/AknPopupSettingPage.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/AknPopupSettingPage.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -820,4 +820,18 @@ { } +//--------------------------------------------------------------------------------------- +// CAknPopupSettingPage::ProcessCommandL() +// Processes events from the softkeys. (Or translated from key events) +//--------------------------------------------------------------------------------------- +// +EXPORT_C void CAknPopupSettingPage::ProcessCommandL( TInt aCommandId ) + { + if ( !EnableSingleClickHighlight( aCommandId ) ) + { + // no single click mode was enabled, just call the base class method + CAknSettingPage::ProcessCommandL( aCommandId ); + } + } + // End of File diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/AknPreviewPopUp.cpp --- a/uifw/AvKon/src/AknPreviewPopUp.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/AknPreviewPopUp.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -67,8 +67,7 @@ : iContent( aContent ), iController( aController ), iFlags( aStyle ), - iAllowUpEvent(EFalse), - iIsDeleted(0) + iAllowUpEvent(EFalse) { GfxTransEffect::Register( this, KGfxPreviewPopupControlUid ); } @@ -81,12 +80,6 @@ { AKNTASHOOK_REMOVE(); - if( iIsDeleted ) - { - *iIsDeleted = ETrue ; - iIsDeleted = 0 ; - } - GfxTransEffect::Deregister( this ); if ( CapturesPointer() ) @@ -516,9 +509,6 @@ // void CAknPreviewPopUp::HandlePointerEventL( const TPointerEvent& aPointerEvent ) { - TBool isDelete = EFalse; - iIsDeleted = &isDelete; - if ( AknLayoutUtils::PenEnabled() ) { iCloseMenu = EFalse; @@ -532,10 +522,6 @@ { iAllowUpEvent = ETrue; CCoeControl::HandlePointerEventL( aPointerEvent ); - if( isDelete ) - { - return; - } if ( !( iFlags & CAknPreviewPopUpController::EPermanentMode ) && aPointerEvent.iType == TPointerEvent::EButton1Up && IsVisible() ) { // if pointer up is already redirected to the content, but the popup is still visible, @@ -607,10 +593,6 @@ (aPointerEvent.iType == TPointerEvent::EButton1Up && iAllowUpEvent ) ) { CCoeControl::HandlePointerEventL( aPointerEvent ); - if( isDelete ) - { - return; - } } } else @@ -619,10 +601,6 @@ aPointerEvent.iType == TPointerEvent::EButtonRepeat ) { CCoeControl::HandlePointerEventL( aPointerEvent ); - if( isDelete ) - { - return; - } } } @@ -632,8 +610,6 @@ iAllowUpEvent = EFalse; } } - - iIsDeleted = 0; } // ----------------------------------------------------------------------------- diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/AknRadioButtonSettingPage.cpp --- a/uifw/AvKon/src/AknRadioButtonSettingPage.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/AknRadioButtonSettingPage.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -500,4 +500,18 @@ { } +//--------------------------------------------------------------------------------------- +// CAknRadioButtonSettingPage::ProcessCommandL() +// Processes events from the softkeys. (Or translated from key events) +//--------------------------------------------------------------------------------------- +// +EXPORT_C void CAknRadioButtonSettingPage::ProcessCommandL( TInt aCommandId ) + { + if ( !EnableSingleClickHighlight( aCommandId ) ) + { + // no single click mode was enabled, just call the base class method + CAknSettingPage::ProcessCommandL( aCommandId ); + } + } + // End of File diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/AknSettingItemList.cpp --- a/uifw/AvKon/src/AknSettingItemList.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/AknSettingItemList.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -2640,7 +2640,7 @@ { // launch the setting page index SettingItemArray()->At(aIndex)->EditItemL( aCalledFromMenu ); - iSettingItemListBox->View()->DrawItem( iSettingItemListBox->CurrentItemIndex() ); + iSettingItemListBox->DrawDeferred(); } _AKNTRACE_FUNC_EXIT; diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/AknSettingPage.cpp --- a/uifw/AvKon/src/AknSettingPage.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/AknSettingPage.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -1391,17 +1391,6 @@ { AknItemActionMenuRegister::SetOverridingMenuBarOwnerL( NULL ); - if ( GfxTransEffect::IsRegistered( this ) ) - { - GfxTransEffect::Begin( this, KGfxControlDisappearAction ); - MakeVisible( EFalse ); - GfxTransEffect::End( this ); - } - else - { - MakeVisible( EFalse ); - } - if ( aAccept ) { AcceptSettingL(); @@ -1414,6 +1403,17 @@ if ( iSettingPageObserver ) iSettingPageObserver->HandleSettingPageEventL(this, MAknSettingPageObserver::EEventSettingCancelled); } + + if ( GfxTransEffect::IsRegistered( this ) ) + { + GfxTransEffect::Begin( this, KGfxControlDisappearAction ); + MakeVisible( EFalse ); + GfxTransEffect::End( this ); + } + else + { + MakeVisible( EFalse ); + } iEikonEnv->RemoveFromStack(iCba); delete iCba; diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/AknSmileyImage.cpp --- a/uifw/AvKon/src/AknSmileyImage.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/AknSmileyImage.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -234,7 +234,7 @@ if(iImageSkinItemId.iMinor > 0) { MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - TRAPD(err, AknsUtils::CreateColorIconL(skin, iImageSkinItemId, + TRAP_IGNORE( AknsUtils::CreateColorIconL(skin, iImageSkinItemId, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG19, iFrame, iFrameMask, smileyMifName, iImageMifPkgItemId, iImageMifPkgItemId, @@ -242,7 +242,7 @@ } else { - TRAPD(err, AknIconUtils::CreateIconL(iFrame, iFrameMask, smileyMifName, iImageMifPkgItemId, iImageMifPkgItemId)); + TRAP_IGNORE( AknIconUtils::CreateIconL(iFrame, iFrameMask, smileyMifName, iImageMifPkgItemId, iImageMifPkgItemId)); } if(iIsAnimation) // the first frame of animation svg is blank without correct content diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/AknSmileyModel.cpp --- a/uifw/AvKon/src/AknSmileyModel.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/AknSmileyModel.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -30,7 +30,7 @@ #include "AknSmileyModel.h" #include "AknSmileyImage.h" - +#include "akntrace.h" /////////////////////////////////////////////////////////////////////////////////////////////// // TSmileyIconInfo @@ -94,6 +94,7 @@ delete iAnimationImage; iTextArray.Close(); + iCodeArray.Close(); } const CFbsBitmap* CSmileyIcon::Image() const @@ -188,9 +189,10 @@ return (iAnimationImage && iAnimationImage->ReadyToDraw()); } -void CSmileyIcon::AddText(const TDesC& aText) // for spliting strings = ":P :p :-P :-p"; +void CSmileyIcon::AddVariant(const TDesC& aText, TChar aBaseCode) { TPtrC ptr(aText); + TUint16 baseCode = aBaseCode; while(ptr.Length()) { @@ -204,14 +206,19 @@ iTextArray.Append(ptr.Left(left)); ptr.Set(ptr.Right(right)); + iCodeArray.Append(baseCode++); } } -const TDesC& CSmileyIcon::Text(TInt aVariate) const +TInt CSmileyIcon::VariantCount() const { - if(aVariate>=0 && aVariate=0 && aVariant=0 && aVariantCount() - 1; - return iChildArray->At(index)->Char(); - } - else - { - return 0; - } - } -TChar CSmileyTextTreeNode::FirstChildChar() const - { - if(iChildArray) - { - return iChildArray->At(0)->Char(); - } - else - { - return 0; - } - } CSmileyTextTreeNode* CSmileyTextTreeNode::AddTreeL(const TDesC& aText, TChar aCode) { TInt length = aText.Length(); if(length > 0) { - CSmileyTextTreeNode* node = AddChildL(aText[0]); + CSmileyTextTreeNode* node = AddChildAscendingL(aText[0]); return node->AddTreeL(aText.Right(length-1), aCode); } else { - return AddChildL(aCode); + return AddChildAscendingL(aCode); } } @@ -399,7 +387,13 @@ { if(iChildArray) { - for(TInt i=iChildArray->Count()-1; i>=0; i--) + const TInt KFirstPos = 0; + const TInt KEndPos = iChildArray->Count() - 1; + if(aCharAt(KFirstPos)->Char() || aChar>iChildArray->At(KEndPos)->Char()) + { + return NULL; + } + for(TInt i=KEndPos; i>=KFirstPos; i--) { CSmileyTextTreeNode* node = iChildArray->At(i); if(node->Char() == aChar) @@ -412,7 +406,7 @@ return NULL; } -CSmileyTextTreeNode* CSmileyTextTreeNode::AddChildL(TChar aChar) +CSmileyTextTreeNode* CSmileyTextTreeNode::AddChildAscendingL(TChar aChar) { // new if(!iChildArray) @@ -447,8 +441,8 @@ // CSmileyModel /////////////////////////////////////////////////////////////////////////////////////////////// -const TUint16 KBaseCodeOn = 0xf880; -const TUint16 KBaseCodeOff = 0x7FFF; +const TUint16 KBaseCode = 0xf880; +//const TUint16 KBaseCodeOff = 0x7FFF; _LIT(KPlaceHolder, "\xf880i"); CSmileyModel::CSmileyModel(MAknSmileyObserver* aObserver) : iSmileyIconObserver(aObserver) @@ -460,6 +454,7 @@ ReleaseResource(); iSmileyIconArray.Close(); + iSmileyCodeIndexArray.Close(); } void CSmileyModel::LoadResourceL() @@ -473,7 +468,7 @@ TInt offset = CCoeEnv::Static()->AddResourceFileL(smileyRscName); CCoeEnv::Static()->CreateResourceReaderLC(reader, R_SMILEY_ICONS_INFO); - iBaseCode = KBaseCodeOn; + TUint16 codeRef = KBaseCode; TInt index = 0; iTextSearchTree = new (ELeave) CSmileyTextTreeNode(0); @@ -484,13 +479,12 @@ TSmileyIconInfo info; TBool isAnimation = (reader.ReadInt16() == 1); - TInt code = reader.ReadInt16(); + TInt16 code = reader.ReadInt16(); TInt bmpId1 = reader.ReadInt32(); TInt maskId1 = reader.ReadInt32(); TInt bmpId2 = reader.ReadInt32(); TInt maskId2 = reader.ReadInt32(); - if(iBaseCode > code) iBaseCode = code; info.iIndex = index++; @@ -508,13 +502,14 @@ TBuf<64> smileyName = reader.ReadTPtrC(); // strings CSmileyIcon* icon = CSmileyIcon::NewL(info, this); - icon->AddText(smileyName); + icon->AddVariant(smileyName, codeRef); iSmileyIconArray.Append(icon); // build text search tree - for(TInt j=0; jTextVariate(); j++) + for(TInt j=0; jVariantCount(); j++) { - iTextSearchTree->AddTreeL(icon->Text(j), SmileyCode(i,j)); + iTextSearchTree->AddTreeL(icon->Text(j), codeRef++); + iSmileyCodeIndexArray.Append(TSmileyCodeIndex(icon,j)); } } @@ -526,12 +521,16 @@ info.iIndex = index++; info.iSkinItemID = KAknsIIDQgnIndiSwitchSmiley2; info.iDefaultStillImageID = EMbmSmileyQgn_indi_switch_smiley2; - iSmileyIconArray.Append(CSmileyIcon::NewL(info,this)); + CSmileyIcon* switchSmileyIcon = CSmileyIcon::NewL(info, this); + iSmileyIconArray.Append(switchSmileyIcon); + iSmileyCodeIndexArray.Append(TSmileyCodeIndex(switchSmileyIcon)); info.iIndex = index++; info.iSkinItemID = KAknsIIDQgnIndiSwitchSct2; info.iDefaultStillImageID = EMbmSmileyQgn_indi_switch_sct2; - iSmileyIconArray.Append(CSmileyIcon::NewL(info,this)); + CSmileyIcon* switchSctIcon = CSmileyIcon::NewL(info,this); + iSmileyIconArray.Append(switchSctIcon); + iSmileyCodeIndexArray.Append(TSmileyCodeIndex(switchSctIcon)); } @@ -547,13 +546,13 @@ } iSmileyIconArray.Reset(); + iSmileyCodeIndexArray.Reset(); // reset task loader iSmileyLoader.DiscardAll(); delete iTextSearchTree; iTextSearchTree = NULL; - iBaseCode = 0x7FFF; // max value } TInt CSmileyModel::ConvertCodesToTextL(TDes& aText) @@ -589,12 +588,11 @@ TInt CSmileyModel::ConvertTextToCodesL(TDes& aText) { + _AKNTRACE_FUNC_ENTER; TInt converted = 0; iConvertBuffer.Zero(); CSmileyTextTreeNode* node = iTextSearchTree; - TChar lastChar = node->LastChildChar(); - TChar firstChar = node->FirstChildChar(); TInt matchedLength = 0; // deal all @@ -604,50 +602,52 @@ TChar character = aText[pos++]; iConvertBuffer.Append(character); - if(!(characterlastChar)) // is possible - { CSmileyTextTreeNode* find = node->Child(character); if(find) { matchedLength++; // character is mathed CSmileyTextTreeNode* child = find->Child(0); - if(child && child->ChildCount()==0) // whole combination is matched + TBool notFinished = (child && child->ChildCount()); + if(notFinished) // not ended { - converted++; - + node = find; // match next + continue; + } + else if(child) // whole combination is matched and ended + { TChar code = child->Char(); // replace with code iConvertBuffer.SetLength(iConvertBuffer.Length() - matchedLength); iConvertBuffer.Append(code); iConvertBuffer.Append('i'); - + converted++; // returned value added // load thumnail LoadStillImageL(code); // restart matchedLength = 0; node = iTextSearchTree; - } - else - { - node = find; + continue; } - - lastChar = node->LastChildChar(); - firstChar = node->FirstChildChar(); - continue; + else // in this case matchedLength already increased by 1 + { + matchedLength--; } } - // character is not matched + // matching failed if(matchedLength) { + // back to the 2nd char + TInt rollBack = matchedLength; + iConvertBuffer.SetLength(iConvertBuffer.Length() - rollBack); + pos -= rollBack; + + // reset matching context matchedLength = 0; node = iTextSearchTree; - lastChar = node->LastChildChar(); - firstChar = node->FirstChildChar(); } } @@ -657,20 +657,22 @@ aText.Copy(iConvertBuffer); } + _AKNTRACE_FUNC_EXIT; return converted; } TBool CSmileyModel::IsSmiley(TChar aCode) const { - return (aCode >= iBaseCode); + TInt smileyCodeIndex = (TUint16)aCode - KBaseCode; + return (smileyCodeIndex>=0 && smileyCodeIndexDes(); TInt maxWidth = textRect.Size().iWidth; - // Logical to visual conversion. AknBidiTextUtils::ConvertToVisualAndClip( aText, @@ -789,7 +791,6 @@ *font, maxWidth, maxWidth ); - // for smiley begin const TInt length = ptr.Length(); if(length>1 && IsSmiley(ptr[length-2])) @@ -841,6 +842,7 @@ } //aGc.DiscardFont(); // Release the font cache + _AKNTRACE_FUNC_EXIT; } void CSmileyModel::DrawText(CWindowGc& aGc, const TDesC& aText, const CFont* aFont, const TRect& aBox, TInt aBaselineOffset, @@ -880,7 +882,7 @@ aGc.UseFont(aFont); - TInt fontH = aFont->HeightInPixels(); + TInt fontH = aFont->FontMaxHeight(); TBool metSmileyNotReady = EFalse; @@ -911,8 +913,9 @@ if(icon) { TSize size = icon->Size(); - TPoint tl = aBox.iTl + offset; - tl.iY = tl.iY - (size.iHeight + fontH) / 2; + TPoint tl = aBox.iTl; + tl.iX += offset.iX; + //tl.iY = tl.iY - size.iHeight/*(size.iHeight + fontH) / 2*/; TRect imgWindow(tl, size); imgWindow.Intersection(aBox); if(!imgWindow.IsEmpty()) @@ -928,7 +931,8 @@ } } - offset += TPoint(aFont->TextWidthInPixels(ptr.Left(2)),0); + //offset += TPoint(aFont->TextWidthInPixels(ptr.Left(2)),0); + offset.iX += size.iWidth; } ptr.Set(ptr.Right(ptr.Length()-2)); @@ -938,10 +942,10 @@ CAknSmileyIcon* CSmileyModel::Smiley(TChar aCode) const { - TInt index, variate; - if(DecodeSmileyCode(aCode, index, variate)) + if(IsSmiley(aCode)) { - return (*this)[index]; + TInt smileyCodeIndex = (TUint16)aCode - KBaseCode; + return iSmileyCodeIndexArray[smileyCodeIndex].Smiley(); } else { @@ -986,17 +990,26 @@ return SmileyCode(Count()+1); } -TChar CSmileyModel::SmileyCode(TInt aIndex, TInt aVariate) const +TChar CSmileyModel::SmileyCode(TInt aIndex, TInt aVariant) const { - return EncodeSmileyCode(aIndex, aVariate); + const CAknSmileyIcon* iconWrapper = (*this)[aIndex]; + const CSmileyIcon* icon = static_cast(iconWrapper); + if(icon) + { + return icon->Code(aVariant); + } + else + { + return 0; + } } -TChar CSmileyModel::SmileyCode(CAknSmileyIcon* aSmileyIcon) const +TChar CSmileyModel::SmileyCode(const CAknSmileyIcon* aSmileyIcon) const { if(aSmileyIcon) { - CSmileyIcon* icon = static_cast(aSmileyIcon); - return EncodeSmileyCode(icon->Index(), 0); + const CSmileyIcon* icon = static_cast(aSmileyIcon); + return icon->Code(); } else { @@ -1018,12 +1031,12 @@ iSmileyLoader.AddTaskL(icon); } -const TDesC& CSmileyModel::Text(TInt aIndex, TInt aVariate) const +const TDesC& CSmileyModel::Text(TInt aIndex, TInt aVariant) const { CSmileyIcon* icon = static_cast((*this)[aIndex]); if(icon) { - return icon->Text(aVariate); + return icon->Text(aVariant); } else { @@ -1034,34 +1047,9 @@ TInt CSmileyModel::ArrayCount() const { return iSmileyIconArray.Count(); - } -TChar CSmileyModel::EncodeSmileyCode(TInt aIndex, TInt aVariate) const - { - if(aVariate) - { - return (iBaseCode + aIndex + (aVariate<<8)); - } - else - { - return (iBaseCode + aIndex); - } - } -#define KMaskL 0x00FF -TBool CSmileyModel::DecodeSmileyCode(TChar aCode, TInt& aIndex, TInt& aVariate) const - { - if(aCode >= iBaseCode) - { - aIndex = (aCode&KMaskL) - (iBaseCode&KMaskL); - aVariate = (aCode>>8) - (iBaseCode>>8); - return ETrue; - } - else - { - return EFalse; - } } void CSmileyModel::SmileyStillImageLoaded(CAknSmileyIcon* aSmileyIcon) diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/AknTextSettingPage.cpp --- a/uifw/AvKon/src/AknTextSettingPage.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/AknTextSettingPage.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -34,7 +34,132 @@ #include #include +#include +#include +#include +static _LIT_SECURITY_POLICY_PASS( KAllowAllPolicy ); +static _LIT_SECURITY_POLICY_C1( KPowerMgmtPolicy, ECapabilityPowerMgmt ); + +/* + * this class is a fixing for bug ESLM-8395MP + * Settingpage will keep watch the RProperty(set by Fep) to hide it self + */ +class CAknFepSettingDialogStatusWatcher : public CActive + { +public: + + static CAknFepSettingDialogStatusWatcher* NewL( CAknTextSettingPage* aControl ) + { + CAknFepSettingDialogStatusWatcher* watcher = new (ELeave) CAknFepSettingDialogStatusWatcher( aControl ); + CleanupStack::PushL( watcher ); + watcher->ConstructL(); + CleanupStack::Pop(watcher); + return watcher; + } + + CAknFepSettingDialogStatusWatcher( CAknTextSettingPage* aControl ) + : CActive( EPriorityNormal ) + , iControl( aControl ) + { + CActiveScheduler::Add( this ); + } + + ~CAknFepSettingDialogStatusWatcher() + { + StopWatching(); + iFepSettingDialogStatusProperty.Close(); + } + + void StartWatchingL() + { + if ( !IsActive() ) + { + iFepSettingDialogStatusProperty.Subscribe( iStatus ); + SetActive(); + } + } + + void StopWatching() + { + Cancel(); + } + +private: + + void ConstructL() + { + // Define PS Key + TInt err = RProperty::Define( + KPSUidAknFep, + KAknFepSettingDialogState, + RProperty::EInt, + KAllowAllPolicy, // None + KPowerMgmtPolicy ); + + if (err != KErrAlreadyExists) + { + User::LeaveIfError( err ); + } + User::LeaveIfError( iFepSettingDialogStatusProperty.Attach( KPSUidAknFep + , KAknFepSettingDialogState, EOwnerThread ) ); + } + + void HandleAknFepSettingDialogStatusChangeNotificationL() + { + TInt isOpen = 0; + TInt ret = iFepSettingDialogStatusProperty.Get( isOpen ); + if ( ret!=KErrOverflow ) + { + User::LeaveIfError( ret ); + } + + if ( !iControl ) + { + return; + } + + if ( isOpen ) + { + iControl->MakeVisible( EFalse ); + } + else + { + iControl->MakeVisible( ETrue ); + } + } + +private: // from CActive + + void RunL() + { + if ( iStatus.Int() == KErrNone ) + { + HandleAknFepSettingDialogStatusChangeNotificationL(); + StartWatchingL(); + } + } + + void DoCancel() + { + iFepSettingDialogStatusProperty.Cancel(); + } + +private: + // + // not owned + // + CAknTextSettingPage* iControl; + + RProperty iFepSettingDialogStatusProperty; + }; + + +// ============================================================================ +// text settingpage private extented class +// +// ============================================================================ +// class CAknTextSettingPageExtension : public CBase , public MEikEdwinObserver { @@ -51,16 +176,24 @@ ~CAknTextSettingPageExtension() { iExtensionOwner = 0; + + if( iAknFepSettingDialogStatusWatcher ) + { + iAknFepSettingDialogStatusWatcher->StopWatching(); + } + delete iAknFepSettingDialogStatusWatcher; } TInt PreviousCba() { return iPreviousCba; }; + void SetPreviousCba(TInt aCbaId) { iPreviousCba = aCbaId; } + TBool PopupState() { return iPopupState; @@ -82,10 +215,13 @@ private: void ConstructL() { + iAknFepSettingDialogStatusWatcher = CAknFepSettingDialogStatusWatcher::NewL( iExtensionOwner ); + iAknFepSettingDialogStatusWatcher->StartWatchingL(); } CAknTextSettingPageExtension(CAknTextSettingPage* aExtensionOwner ) - : iPreviousCba( 0 ), iExtensionOwner( aExtensionOwner ) + : iPreviousCba( 0 ) + , iExtensionOwner( aExtensionOwner ) , iPopupState( EFalse ) { } @@ -94,6 +230,11 @@ TInt iPreviousCba; CAknTextSettingPage* iExtensionOwner; TBool iPopupState; // when open the popup set popup state flag to 1 + + // + // active object keep watching Fep's property (Owned) + // + CAknFepSettingDialogStatusWatcher* iAknFepSettingDialogStatusWatcher; }; /** diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/AknTransparentCameraSettingPage.cpp --- a/uifw/AvKon/src/AknTransparentCameraSettingPage.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/AknTransparentCameraSettingPage.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -347,9 +347,16 @@ // Respond to softkey events switch (aCommandId) { + case EAknSoftkeySelect: + { + if ( EnableSingleClickHighlight( aCommandId ) ) + { + break; + } + // no single click mode was enabled, fall through + } case EAknSoftkeyOk: - case EAknSoftkeySelect: - case EAknSoftkeyDone: + case EAknSoftkeyDone: SelectCurrentItemL(); // has non-trivial implemenations in listbox type // controls to put the selection on the current item AttemptExitL(ETrue); diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/aknPopup.cpp --- a/uifw/AvKon/src/aknPopup.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/aknPopup.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -1162,10 +1162,6 @@ { AttemptExitL( ETrue ); } - else - { - AttemptExitL( EFalse ); - } } //EFTG-7HWDP6. @@ -1179,24 +1175,11 @@ break; case TPointerEvent::EButton1Down: _AKNTRACE("CAknPopupList::HandlePointerEventL: TPointerEvent::EButton1Down"); - // as in comments close popup if pointer goes outside of the popup list - if ( !Rect().Contains( aPointerEvent.iPosition ) ) + if ( FindBox() + && ( FindBox()->Editor().Rect().Contains( aPointerEvent.iPosition ) ) + && !( iPopupListExtension->iFlags & EPopupLayoutSwitchEvent ) ) { - MTouchFeedback* feedback = MTouchFeedback::Instance(); - if ( feedback ) - { - feedback->InstantFeedback( ETouchFeedbackPopUp ); - } - AttemptExitL( EFalse ); - } - else - { - if( FindBox() - && ( FindBox()->Editor().Rect().Contains( aPointerEvent.iPosition ) ) - && !( iPopupListExtension->iFlags & EPopupLayoutSwitchEvent ) ) - { - iPopupListExtension->iFlags |= EPopupFepStartEvent; - } + iPopupListExtension->iFlags |= EPopupFepStartEvent; } break; case TPointerEvent::EDrag: diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/akncolourselectiongrid.cpp --- a/uifw/AvKon/src/akncolourselectiongrid.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/akncolourselectiongrid.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -2021,13 +2021,6 @@ if ( !Rect().Contains( aPointerEvent.iPosition ) ) { - if ( aPointerEvent.iType == TPointerEvent::EButton1Down ) - { - TryExitL( EAknSoftkeyCancel ); - _AKNTRACE_FUNC_EXIT; - return; - } - if ( aPointerEvent.iType == TPointerEvent::EDrag ) { iExtension->iIsDragged = ETrue; diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/akncombinedpane.cpp --- a/uifw/AvKon/src/akncombinedpane.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/akncombinedpane.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -2,7 +2,7 @@ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" +* under the terms of "Eclipse Public License v1.0" * which accompanies this distribution, and is available * at the URL "http://www.eclipse.org/legal/epl-v10.html". * diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/akndiscreetpopupdrawer.cpp --- a/uifw/AvKon/src/akndiscreetpopupdrawer.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/akndiscreetpopupdrawer.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -219,7 +219,14 @@ { // draw background of the popup MAknsSkinInstance* skin = AknsUtils::SkinInstance(); - AknsDrawUtils::DrawFrame( skin, aGc, aRect, aRect, + TAknLayoutRect innerLayout; + // Use bg_popup_preview_window_pane_g1() for getting innerRect, + // no need to create a new layout id for discreet popup. + innerLayout.LayoutRect( aRect, + AknLayoutScalable_Avkon::bg_popup_preview_window_pane_g1() ); + TRect innerRect = innerLayout.Rect(); + + AknsDrawUtils::DrawFrame( skin, aGc, aRect, innerRect, KAknsIIDQsnFrPopupPreview, KAknsIIDDefault ); // Draw the texts diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/akngrid.cpp --- a/uifw/AvKon/src/akngrid.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/akngrid.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -1860,7 +1860,12 @@ if (vSbarModel.iScrollSpan-vSbarModel.iThumbPositionMoveToItemIndexL(currentIndex,CListBoxView::ENoSelection); // force a scroll if neccessary + if ( !iExtension->iSingleClickEnabled ) + { + // force a scroll if neccessary + gridView->MoveToItemIndexL( currentIndex, + CListBoxView::ENoSelection ); + } } } if (iSBFrame->ScrollBarVisibility(CEikScrollBar::EHorizontal)!=CEikScrollBarFrame::EOff) diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/aknindicator.cpp --- a/uifw/AvKon/src/aknindicator.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/aknindicator.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -975,6 +975,7 @@ case EAknIndicatorUSBMemActive: case EAknIndicatorStopWatch: case EAknIndicatorMecoServiceTab: + case EAknIndicatorIntegratedIM: { // Main pane TRect mainPaneRect; diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/akninfrm.cpp --- a/uifw/AvKon/src/akninfrm.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/akninfrm.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -278,7 +278,7 @@ TBool apac( AknLayoutUtils::Variant() == EApacVariant && ( iFlags & EShowIndicators ) ); - TAknWindowComponentLayout outline = AknLayoutScalable_Avkon::find_pane(); + TAknWindowComponentLayout outline = AknLayoutScalable_Avkon::input_find_pane(); TAknWindowLineLayout iconPos = AknLayoutScalable_Avkon::find_popup_pane_g1().LayoutLine(); TAknTextComponentLayout editor = AknLayoutScalable_Avkon::input_popup_find_pane_t1( apac ? 2 : 0 ); @@ -331,7 +331,7 @@ { _AKNTRACE( "[%s][%s] Standard Layout", "CAknInputFrame", __FUNCTION__ ); - outline = AknLayoutScalable_Avkon::find_pane(); + outline = AknLayoutScalable_Avkon::input_find_pane(); iconPos = AknLayoutScalable_Avkon::find_pane_g1(); editor = AknLayoutScalable_Avkon::input_find_pane_t2( apac ? 1: 0 ); r.LayoutRect( rect, AknLayoutScalable_Avkon::input_find_pane() ); diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/aknlistquerydialog.cpp --- a/uifw/AvKon/src/aknlistquerydialog.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/aknlistquerydialog.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include "aknPopupHeadingPane.h" #include "aknlistquerycontrol.h" @@ -713,32 +713,6 @@ EXPORT_C void CAknListQueryDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent) { - // list query is dismissed if tapped outside - if ( aPointerEvent.iType == TPointerEvent::EButton1Down ) - { - if( !Rect().Contains( aPointerEvent.iPosition ) ) - { - if ( !iIdle ) - { - MTouchFeedback* feedback = MTouchFeedback::Instance(); - if ( feedback ) - { - feedback->InstantFeedback( ETouchFeedbackPopUp ); - } - iIdle = CIdle::NewL(CActive::EPriorityIdle); - iIdle->Start(TCallBack(ClosePopup, this)); - return; - } - } - - TInt index; - if ( ListBox()->View()->XYPosToItemIndex( aPointerEvent.iPosition, index ) ) - { - ListBox()->View()->ItemDrawer()->SetFlags( - CListItemDrawer::EPressedDownState ); - } - } - CAknQueryDialog::HandlePointerEventL( aPointerEvent ); } diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/aknlists.cpp --- a/uifw/AvKon/src/aknlists.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/aknlists.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -616,28 +616,8 @@ aItemDrawer->SetHighlightedBackColor(AKN_LAF_COLOR_STATIC( AKN_LAYOUT_WINDOW_List_pane_highlight_graphics__various__Line_2(TRect(0,0,0,0)).iC)); } - -TInt AknListBoxLayouts::AdjustPopupLayoutData( const TRect& aScreenRect ) - { - _AKNTRACE( "[%s][%s][%d].", "AknListBoxLayouts", __FUNCTION__, __LINE__ ); - TInt width = aScreenRect.Width(); - TInt height = aScreenRect.Height(); - - if ( width ==640 && height ==360 ) //QHD - { - return 32; - } - else if(( width ==320 && height ==240 ) //QVGA, QVGA2 - ||( width ==640 && height ==480 )) //VGA, VAG3 - { - return 0; - } - else - { - Panic( EAknPopupLayoutUnknownResolution ); - return 0; - } - } + + // ----------------------------------------------------------------------------- // IdFromTextAlign // ----------------------------------------------------------------------------- @@ -1169,43 +1149,31 @@ SetupFormTextCell( aListBox, aItemDrawer, index, font, C, lm, rm, B, W, aAlign, p1, p2 ); } -// this is common popuplist setup code -static TSize PopupListItemSize(const TAknWindowLineLayout &aL) +// ---------------------------------------------------------------------------- +// This is common popup list setup code. +// ---------------------------------------------------------------------------- +// +static TSize PopupListItemSize( const TAknWindowLineLayout &aL ) { _AKNTRACE( "[%s][%d]", __FUNCTION__, __LINE__ ); - TAknLayoutRect temp, layout; + TAknLayoutRect temp; + TAknLayoutRect layout; TRect mainPane; AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EPopupParent, mainPane ); - temp.LayoutRect( mainPane, AknLayoutScalable_Avkon::popup_menu_window(13)); + temp.LayoutRect( mainPane, + AknLayoutScalable_Avkon::popup_menu_window( + Layout_Meta_Data::IsLandscapeOrientation() ? 43 : 13 ) ); TRect screenRect; AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, screenRect ); - TAknWindowLineLayout lineLayout = AknLayoutScalable_Avkon::listscroll_menu_pane(0).LayoutLine(); - - // Layout data of listscroll_menu_pane are changed for CR 417-35260. - // The change is just for QHD landscape model. - // The CR makes listscroll_menu_pane's ir or il bigger than normal, - // so that width of list item is smaller than needs. Then, first cell - // of list item can not be drawn on proper position. - // Adjustment of layout is a solution for this problem. This is not a perfect idea, but - // creating a new layout for popuplist is too complex to do that. Adjustment is a must. - if(Layout_Meta_Data::IsLandscapeOrientation()) - { - TInt offset = AknListBoxLayouts::AdjustPopupLayoutData( screenRect ); - if (!AknLayoutUtils::LayoutMirrored()) - { - lineLayout.ir -= offset; - } - else - { - lineLayout.il -= offset; - } - } - layout.LayoutRect( temp.Rect(), lineLayout); + + layout.LayoutRect( temp.Rect(), + AknLayoutScalable_Avkon::listscroll_menu_pane( 0 ) ); - temp.LayoutRect( layout.Rect(), AknLayoutScalable_Avkon::list_menu_pane(0)); - layout.LayoutRect( temp.Rect(), aL); + temp.LayoutRect( layout.Rect(), + AknLayoutScalable_Avkon::list_menu_pane( 0 ) ); + layout.LayoutRect( temp.Rect(), aL ); return layout.Rect().Size(); } @@ -3464,6 +3432,15 @@ itemDrawer->SetItemMarkPosition( 3 ); itemDrawer->SetItemMarkReplacement( KFirstMovingCSIconReplacement ); } + + // Mirrored layout does not have smiley. + if ( !AknLayoutUtils::LayoutMirrored() && + itemDrawer->Flags() & CListItemDrawer::EDrawSmileyIcon ) + { + formattedCellData->InitSmileyL(); + // only second lable can have smiley icon now. + formattedCellData->SetSmileySubCellL(2); + } _AKNTRACE_FUNC_EXIT; } @@ -3787,6 +3764,16 @@ itemDrawer->SetItemMarkReverse( ETrue ); itemDrawer->SetItemMarkPosition( 3 ); itemDrawer->SetItemMarkReplacement( KFirstMovingCSIconReplacement ); + + // Mirrored layout does not have smiley. + // for conversation + if ( !AknLayoutUtils::LayoutMirrored() && + itemDrawer->Flags() & CListItemDrawer::EDrawSmileyIcon ) + { + formattedCellData->InitSmileyL(); + // only second lable can have smiley icon now. + formattedCellData->SetSmileySubCellL(2); + } _AKNTRACE_FUNC_EXIT; } diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/aknpopuplayout.cpp --- a/uifw/AvKon/src/aknpopuplayout.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/aknpopuplayout.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -21,7 +21,6 @@ #include #include #include -#include #include #include @@ -34,8 +33,6 @@ #include #include -#include - #include #include #include @@ -44,6 +41,8 @@ #include #include +const AknLayoutUtils::SAknLayoutRect KEmptyLayout = + { ELayoutEmpty, 0, 0, 0, 0, ELayoutEmpty, ELayoutEmpty }; static CCoeControl *FindControl(TAknPopupLayoutsNode *aNode, TInt aId) { @@ -58,37 +57,15 @@ return NULL; } -static TInt GetMaxListHeight() + +static TInt GetMaxListHeight( const TRect& aClientRect ) { - TAknLayoutRect temp, layout; - - TRect mainPane; - TRect statusPane; - TRect controlPane; - AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EPopupParent, mainPane ); - AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EStatusPane, statusPane ); - AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EControlPane, controlPane ); - - // in landscape orientation popuplist can't go on top of statuspane - if ( !Layout_Meta_Data::IsLandscapeOrientation() ) - { - mainPane.iTl.iY -= statusPane.Height(); - } - - // treat mainpane+statuspane area as popup window - // too bad we can't use this, because e.g. QVGA landscape has border-size 7 - // in avkon layout and border-size 9 in skin drawing... - /*temp.LayoutRect( mainPane, AknLayoutScalable_Avkon::listscroll_menu_pane(0)); - layout.LayoutRect( temp.Rect(), AknLayoutScalable_Avkon::list_menu_pane(0)); - return layout.Rect().Height();*/ - - // shadow - TInt varietyIndex = Layout_Meta_Data::IsLandscapeOrientation(); + TBool isLandscape( Layout_Meta_Data::IsLandscapeOrientation() ); TAknLayoutRect insideArea; insideArea.LayoutRect( - mainPane, - AknLayoutScalable_Avkon::bg_popup_window_pane_g1(varietyIndex) ); + aClientRect, + AknLayoutScalable_Avkon::bg_popup_window_pane_g1( isLandscape ) ); return insideArea.Rect().Height(); } @@ -109,65 +86,83 @@ EXPORT_C -void AknPopupLayouts::HandleSizeChanged( TAknPopupWindowLayoutDef &aDef, +void AknPopupLayouts::HandleSizeChanged( TAknPopupWindowLayoutDef& aDef, TAknPopupLayouts aLayout_1, - TAknPopupLayoutsNode *aNode) + TAknPopupLayoutsNode* aNode ) { - CAknPopupHeadingPane *aHeading = (CAknPopupHeadingPane*)FindControl(aNode, EHeadingNode); - CEikListBox *aListBox = (CEikListBox*)FindControl(aNode, EListNode); - CCoeControl *aWindowOwningControl = FindControl(aNode, EWindowOwningNode); - CAknMessageQueryControl *aMsgQueryCtrl = (CAknMessageQueryControl*)FindControl(aNode, EMessageBoxNode); + CAknPopupHeadingPane* heading = + static_cast( + FindControl( aNode, EHeadingNode ) ); + + CEikListBox* listBox = + static_cast( FindControl( aNode, EListNode ) ); + + CCoeControl* windowOwningControl = FindControl( aNode, EWindowOwningNode ); + + CAknMessageQueryControl* msgQueryCtrl = + static_cast( + FindControl( aNode, EMessageBoxNode ) ); - TInt aLayout = aLayout_1; - TInt numofitems = aListBox->Model()->NumberOfItems(); - - aListBox->View()->ItemDrawer()->SetSkinEnabledL(ETrue); - - TInt maxListHeight = GetMaxListHeight(); + TInt layoutFlags = aLayout_1; + TInt numofitems = listBox->Model()->NumberOfItems(); - // position popup window's bottom correctly + // Position popup window's bottom correctly. TRect clientRect; - AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EPopupParent, clientRect); - // set windowrect to minimum size - this will be adjusted later - TAknLayoutRect windowRect; - windowRect.LayoutRect( clientRect, AknLayoutScalable_Avkon::popup_menu_window(8)); - aDef.iWindowRect = windowRect.Rect(); - TRAP_IGNORE( aListBox->View()->ItemDrawer()->SetSkinEnabledL(ETrue) ); + AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EPopupParent, + clientRect ); + + TInt maxListHeight = GetMaxListHeight( clientRect ); + + TRect nullRect( 0, 0, 0, 0 ); + + TBool isLandscape = Layout_Meta_Data::IsLandscapeOrientation(); - // Popup window when the size does not change based on - // the number of items. + // Set windowRect to minimum size - this will be adjusted later. + TAknLayoutRect windowRectLayout; + windowRectLayout.LayoutRect( + clientRect, + AknLayoutScalable_Avkon::popup_menu_window( isLandscape ? 19 : 8 ) ); + aDef.iWindowRect = windowRectLayout.Rect(); + + TRAP_IGNORE( listBox->View()->ItemDrawer()->SetSkinEnabledL( ETrue ) ); + + // Popup window when the size does not change based on the number of items. TBool fixedWindowSize = EFalse; - if ( (aLayout & EAknPopupLayoutsDynamic) || numofitems == 0 || - (aLayout & EAknPopupLayoutsFind) ) + if ( layoutFlags & EAknPopupLayoutsDynamic || + numofitems == 0 || + layoutFlags & EAknPopupLayoutsFind ) { - aLayout &= ~EAknPopupLayoutsDynamic; + layoutFlags &= ~EAknPopupLayoutsDynamic; fixedWindowSize = ETrue; } // heading ============================================================= TInt spaceForHeading = 0; - if (aHeading) + if ( heading ) { - aHeading->SetLayout( CAknPopupHeadingPane::EListHeadingPane ); + heading->SetLayout( CAknPopupHeadingPane::EListHeadingPane ); TAknLayoutRect tempHeadingRect; - tempHeadingRect.LayoutRect(clientRect, - AknLayoutScalable_Avkon::heading_pane(0)); + tempHeadingRect.LayoutRect( + clientRect, + AknLayoutScalable_Avkon::heading_pane( 0 ) ); spaceForHeading = tempHeadingRect.Rect().Height(); maxListHeight -= spaceForHeading; } - aDef.iPopupMenuWindowOffset=TPoint(0,spaceForHeading); + aDef.iPopupMenuWindowOffset.SetXY( 0, spaceForHeading ); // findbox ============================================================= TBool windowSizeFind = EFalse; TInt spaceForFind = 0; - if (aLayout & EAknPopupLayoutsFind) + if ( layoutFlags & EAknPopupLayoutsFind ) { - aLayout &= ~EAknPopupLayoutsFind; + layoutFlags &= ~EAknPopupLayoutsFind; windowSizeFind = ETrue; - // calculate space needed for find + // Calculate space needed for find box. TAknLayoutRect tempFindRect; - tempFindRect.LayoutRect(clientRect,AknLayoutScalable_Avkon::find_popup_pane_cp2(0)); + tempFindRect.LayoutRect( + clientRect, + AknLayoutScalable_Avkon::find_popup_pane_cp2( 0 ) ); spaceForFind = tempFindRect.Rect().Height(); maxListHeight -= spaceForFind; } @@ -175,321 +170,282 @@ // messagebox ========================================================== TRect messageRect; TInt messageNumOfLines = 0; + TInt messageBoxItemVariety = 0; TBool messageBox = EFalse; - if (aMsgQueryCtrl && aMsgQueryCtrl->Lines() > 0) + TAknWindowComponentLayout messageBoxItemLayout; + if ( msgQueryCtrl && msgQueryCtrl->Lines() > 0 ) { messageBox = ETrue; - messageNumOfLines = aMsgQueryCtrl->Lines(); - TInt varietyIndex = 0; - switch(messageNumOfLines) + messageNumOfLines = msgQueryCtrl->Lines(); + + switch ( messageNumOfLines ) { - case (0): - case (1): varietyIndex = 0; - break; - case (2): varietyIndex = 1; - break; - default : varietyIndex = 2; + case 0: + case 1: + { + messageBoxItemVariety = 0; + break; + } + case 2: + { + messageBoxItemVariety = 1; + break; + } + default: + { + messageBoxItemVariety = 2; + break; + } } - TAknWindowLineLayout lay = AknLayoutScalable_Apps::loc_type_pane(varietyIndex).LayoutLine(); - TAknLayoutRect layout; - layout.LayoutRect( TRect(0,0,0,0), lay ); - messageRect = layout.Rect(); + + messageBoxItemLayout = + AknLayoutScalable_Apps::loc_type_pane( messageBoxItemVariety ); + + TAknLayoutRect layoutRect; + layoutRect.LayoutRect( nullRect, messageBoxItemLayout ); + messageRect = layoutRect.Rect(); maxListHeight -= messageRect.Height(); } TInt minItems = 1; - TRect scrollBarRect(0,0,0,0); + TRect scrollBarRect( nullRect ); TAknWindowLineLayout listLayout; TAknLayoutScalableParameterLimits listLimits; - switch(aLayout) + switch ( layoutFlags ) { case EPopupSNotePopupWindow: case EMenuUnknownColumnWindow: case EMenuUnknownFormattedCellWindow: case EMenuWindow: { - minItems = aHeading ? 5 : 6; - listLayout = AknLayoutScalable_Avkon::list_single_pane_cp2(0); + minItems = heading ? 5 : 6; + listLayout = AknLayoutScalable_Avkon::list_single_pane_cp2( 0 ); listLimits = AknLayoutScalable_Avkon::list_single_pane_cp2_ParamLimits(); break; } case EMenuGraphicWindow: { minItems = 5; - listLayout = AknLayoutScalable_Avkon::list_single_graphic_pane_cp2(0); + listLayout = AknLayoutScalable_Avkon::list_single_graphic_pane_cp2( 0 ); listLimits = AknLayoutScalable_Avkon::list_single_graphic_pane_cp2_ParamLimits(); break; } case EMenuGraphicHeadingWindow: { minItems = 5; - listLayout = AknLayoutScalable_Avkon::list_single_graphic_heading_pane_cp2(0); + listLayout = AknLayoutScalable_Avkon::list_single_graphic_heading_pane_cp2( 0 ); listLimits = AknLayoutScalable_Avkon::list_single_graphic_heading_pane_cp2_ParamLimits(); break; } case EMenuDoubleWindow: { minItems = 3; - listLayout = AknLayoutScalable_Avkon::list_double_pane_cp2(0); + listLayout = AknLayoutScalable_Avkon::list_double_pane_cp2( 0 ); listLimits = AknLayoutScalable_Avkon::list_double_pane_cp2_ParamLimits(); break; } case EMenuDoubleLargeGraphicWindow: { minItems = 3; - listLayout = AknLayoutScalable_Avkon::list_double_large_graphic_pane_cp2(0); + listLayout = AknLayoutScalable_Avkon::list_double_large_graphic_pane_cp2( 0 ); listLimits = AknLayoutScalable_Avkon::list_double_large_graphic_pane_cp2_ParamLimits(); break; } + default: + { + break; + } } - if (!fixedWindowSize) + if ( !fixedWindowSize ) { minItems = 1; } - TInt maxLayoutItems = listLimits.LastRow() + 1; // last row is a zero based index, we need num items which is 1 based - - //aDef.iVertLineExt1.LayoutRect(TRect(1,1,1,1), 0, 0,0, ELayoutEmpty, ELayoutEmpty, 0,0); - //aDef.iVertLineExt2.LayoutRect(TRect(1,1,1,1), 0, 0,0, ELayoutEmpty, ELayoutEmpty, 0,0); + // Last row is a zero based index, we need num items which is 1 based. + TInt maxLayoutItems = listLimits.LastRow() + 1; TAknLayoutRect listItemRect; - listItemRect.LayoutRect( aDef.iWindowRect, listLayout); + listItemRect.LayoutRect( aDef.iWindowRect, listLayout ); TInt listItemHeight = listItemRect.Rect().Height(); TInt maxItems = maxListHeight / listItemHeight; + // minItems == 1 only if the popuplist is dynamically changeable - if ( (numofitems > 1) && (minItems == 1) ) + if ( ( numofitems > 1 ) && ( minItems == 1 ) ) { minItems = numofitems; } - if (minItems > maxItems) + + if ( minItems > maxItems ) { minItems = maxItems; } - // maxItems might be greater than max items from layout -> use layout's maximum - if (minItems > maxLayoutItems) + + // maxItems might be greater than max items from layout -> + // use layout's maximum. + if ( minItems > maxLayoutItems ) { minItems = maxLayoutItems; } - TRect window_rect = AknPopupLayouts::MenuRect(aDef); + TRect windowRect( AknPopupLayouts::MenuRect( aDef ) ); - TAknLayoutRect temp, layout; + TAknLayoutRect temp; + TAknLayoutRect layout; TRect screenRect; AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, screenRect ); - TAknWindowLineLayout lineLayout = AknLayoutScalable_Avkon::listscroll_menu_pane(0).LayoutLine(); + TAknWindowLineLayout lineLayout( + AknLayoutScalable_Avkon::listscroll_menu_pane( 0 ).LayoutLine() ); - // Layout data of listscroll_menu_pane are changed for CR 417-35260. - // The change is just for QHD landscape model. - // The CR makes listscroll_menu_pane's ir or il bigger than normal, - // so that width of list item is smaller than needs. Then, first cell - // of list item can not be drawn on proper position. - // Adjustment of layout is a solution for this problem. This is not a perfect idea, but - // creating a new layout for popuplist is too complex to do that. Adjustment is a must. - if(Layout_Meta_Data::IsLandscapeOrientation()) - { - TInt offset = AknListBoxLayouts::AdjustPopupLayoutData( screenRect ); - if (!AknLayoutUtils::LayoutMirrored()) - { - lineLayout.ir -= offset; - } - else - { - lineLayout.il -= offset; - } - } - temp.LayoutRect( window_rect, lineLayout); + temp.LayoutRect( windowRect, lineLayout ); + + layout.LayoutRect( temp.Rect(), + AknLayoutScalable_Avkon::list_menu_pane( 0 ) ); - layout.LayoutRect( temp.Rect(), AknLayoutScalable_Avkon::list_menu_pane(0)); - TRect tempListRect = layout.Rect(); // this is list's rect for the whole window + // This is list's rect for the whole window. + TRect tempListRect( layout.Rect() ); - // subtract heading, findbox and messagebox from tempListRect + // Subtract heading, find box and message box from tempListRect. tempListRect.iBr.iY -= spaceForFind; tempListRect.iTl.iY += spaceForHeading; tempListRect.iTl.iY += messageRect.Height(); - // We really don't want parent relative list layout here because findbox will be overwritten. - // Just calculate list height and use that. - TRect nullRect(0,0,0,0); - listLayout.iH = (TInt16)(minItems * listItemHeight); + // We really don't want parent relative list layout here because find box + // will be overwritten. Just calculate list height and use that. + listLayout.iH = (TInt16)( minItems * listItemHeight ); listLayout.ib = ELayoutEmpty; - aDef.iListRect.LayoutRect(tempListRect, - listLayout); + aDef.iListRect.LayoutRect( tempListRect, listLayout ); - // we have to scale iWindowRect to list rect - layout is not (yet) correct + // We have to scale iWindowRect to list rect - layout is not (yet) correct. TInt usedHeight = aDef.iListRect.Rect().Height() + spaceForFind + spaceForHeading + messageRect.Height(); - - // popupwindow's inside area - TInt varietyIndex = Layout_Meta_Data::IsLandscapeOrientation(); - - TAknLayoutRect insideArea; - insideArea.LayoutRect( - window_rect, - AknLayoutScalable_Avkon::bg_popup_window_pane_g1(varietyIndex) ); - if (layout.Rect().Height() < usedHeight) + if ( layout.Rect().Height() < usedHeight ) { - aDef.iWindowRect.iTl.iY -= (usedHeight - layout.Rect().Height()); + aDef.iWindowRect.iTl.iY -= (usedHeight - layout.Rect().Height() ); } AknLayoutUtils::TAknCbaLocation cbaLocation = AknLayoutUtils::CbaLocation(); - // In landscape we have to center (on y-axis) popup window (but not with bottom CBA) - if (varietyIndex == 1 && cbaLocation != AknLayoutUtils::EAknCbaLocationBottom) + // In landscape we have to center (on y-axis) popup window + // (but not with bottom CBA). + if ( isLandscape && + cbaLocation != AknLayoutUtils::EAknCbaLocationBottom ) { - TRect mainPane; - AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EPopupParent, mainPane ); - TInt diff = (mainPane.Height()-aDef.iWindowRect.Height()) / 2; + TInt diff = ( clientRect.Height() - aDef.iWindowRect.Height() ) / 2; aDef.iWindowRect.iTl.iY -= diff; aDef.iWindowRect.iBr.iY -= diff; - // with right CBA, move window to the right side of the screen - if (cbaLocation == AknLayoutUtils::EAknCbaLocationRight) + // With right CBA, move window to the right side of the screen. + if ( cbaLocation == AknLayoutUtils::EAknCbaLocationRight ) { - TInt offset = mainPane.Width()-aDef.iWindowRect.iBr.iX; + TInt offset = clientRect.Width() - aDef.iWindowRect.iBr.iX; aDef.iWindowRect.iTl.iX += offset; aDef.iWindowRect.iBr.iX += offset; - } - - //should this be uncommented?? - // If we have left CBA, we move window to left side of screen (on x-axis). - /*else if (cbaLocation == AknLayoutUtils::EAknCbaLocationLeft) - { - TInt xOffset = aDef.iWindowRect.iTl.iX; - if ( xOffset > 0 ) - { - aDef.iWindowRect.iTl.iX = 0; - aDef.iWindowRect.iBr.iX -= xOffset; - } - }*/ - } - - TRect screen; - AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, screen ); - + } + } + TAknLayoutRect cbaRect; - cbaRect.LayoutRect( screen, - AknLayoutScalable_Avkon::popup_sk_window( 0 ).LayoutLine() ); + cbaRect.LayoutRect( + screenRect, + AknLayoutScalable_Avkon::popup_sk_window( 0 ).LayoutLine() ); - if ( AknLayoutUtils::PenEnabled() ) + TSize size( aDef.iWindowRect.Size() ); + + // Add softkey height. + size.iHeight += cbaRect.Rect().Height(); + + // Reduce listbox's and popup's height if total height is more than + // screen height. + if ( size.iHeight > screenRect.Height() ) { - TSize size( aDef.iWindowRect.Size() ); - // add softkey height - size.iHeight += cbaRect.Rect().Height(); + listLayout.iH -= ( size.iHeight - screenRect.Height() ); + aDef.iListRect.LayoutRect( tempListRect, listLayout ); - // Reduce listbox's and popup's height if total height is more than - // screen height. - if ( size.iHeight > screen.Height() ) - { - listLayout.iH -= ( size.iHeight - screen.Height() ); - aDef.iListRect.LayoutRect( tempListRect, listLayout ); - - size.iHeight = screen.Height(); - } - - aDef.iWindowRect.SetRect( AknPopupUtils::Position( size, ETrue ), size ); + size.iHeight = screenRect.Height(); } - // now we finally know the window rect: first setup heading - if (aHeading) + aDef.iWindowRect.SetRect( AknPopupUtils::Position( size, ETrue ), size ); + + // Now we finally know the window rect: first setup heading. + if ( heading ) { - aDef.iHeadingRect.LayoutRect(AknPopupLayouts::MenuRect(aDef), - AknLayoutScalable_Avkon::heading_pane(0)); + aDef.iHeadingRect.LayoutRect( + AknPopupLayouts::MenuRect( aDef ), + AknLayoutScalable_Avkon::heading_pane( 0 ) ); } - MenuPopupWindowGraphics(aDef); - aWindowOwningControl->SetRect(WindowRect(aDef)); - HandleSizeAndPositionOfComponents(aDef, aListBox, aHeading); + MenuPopupWindowGraphics( aDef ); + windowOwningControl->SetRect( WindowRect( aDef ) ); + HandleSizeAndPositionOfComponents( aDef, listBox, heading ); - layout.LayoutRect(MenuRect(aDef), lineLayout); - TRect scrollBarClientRect(layout.Rect()); - - if ( AknLayoutUtils::PenEnabled() ) - { - // remove softkey height that was added earlier so that - // scroll bar doesn't get behind the softkey - scrollBarClientRect.iBr.iY -= cbaRect.Rect().Height(); - } + layout.LayoutRect( MenuRect( aDef ), lineLayout ); + TRect scrollBarClientRect( layout.Rect() ); - if (aHeading) + // Remove softkey height that was added earlier so that + // scroll bar doesn't get behind the softkey. + scrollBarClientRect.iBr.iY -= cbaRect.Rect().Height(); + + if ( heading ) { scrollBarClientRect.iTl.iY += spaceForHeading; } - if (windowSizeFind) + if ( windowSizeFind ) { scrollBarClientRect.iBr.iY -= spaceForFind; } - if (messageBox) + if ( messageBox ) { scrollBarClientRect.iTl.iY += messageRect.Height(); } - varietyIndex = 0; + AknLayoutUtils::LayoutVerticalScrollBar( - aListBox->ScrollBarFrame(), + listBox->ScrollBarFrame(), scrollBarClientRect, - AknLayoutScalable_Avkon::scroll_pane_cp25(varietyIndex).LayoutLine() ) ; + AknLayoutScalable_Avkon::scroll_pane_cp25( 0 ).LayoutLine() ); - if (messageBox) + if ( messageBox ) { TAknLayoutRect msgQuery; - - TInt varietyIndex = 0; - switch(messageNumOfLines) - { - case (0): - case (1): varietyIndex = 0; - break; - case (2): varietyIndex = 1; - break; - default : varietyIndex = 2; - } - msgQuery.LayoutRect( AknPopupLayouts::MenuRect(aDef), - AknLayoutScalable_Apps::loc_type_pane(varietyIndex).LayoutLine() ); - aMsgQueryCtrl->SetRect(msgQuery.Rect()); + msgQuery.LayoutRect( AknPopupLayouts::MenuRect( aDef ), + messageBoxItemLayout ); + msgQueryCtrl->SetRect( msgQuery.Rect() ); } - window_rect = WindowRect(aDef); - MAknsControlContext *cc = AknsDrawUtils::ControlContext( aListBox ); + windowRect = WindowRect( aDef ); + MAknsControlContext* cc = AknsDrawUtils::ControlContext( listBox ); TBool defaultContext = EFalse; - if (!cc) + if ( !cc ) { - cc = aListBox->View()->ItemDrawer()->SkinBackgroundControlContext(); + cc = listBox->View()->ItemDrawer()->SkinBackgroundControlContext(); defaultContext = ETrue; } - if (cc) + if ( cc ) { - CAknsBasicBackgroundControlContext *bcc = (CAknsBasicBackgroundControlContext*)cc; - TAknLayoutRect popupBgRect; - popupBgRect.LayoutRect(window_rect, - SkinLayout::Popup_windows_skin_placing__background_slice__Line_1(window_rect)); - bcc->SetBitmap(KAknsIIDQsnFrPopupCenter); - if (defaultContext) bcc->SetRect(popupBgRect.Rect()); - bcc->SetParentPos(aWindowOwningControl->PositionRelativeToScreen()); - if (defaultContext) - bcc->SetParentPos(TPoint(0,0)); + CAknsBasicBackgroundControlContext* bcc = + static_cast( cc ); + bcc->SetBitmap( KAknsIIDQsnFrPopupCenter ); + + if ( defaultContext ) + { + bcc->SetRect( windowRect ); + bcc->SetParentPos( TPoint( 0, 0 ) ); + } + else + { + bcc->SetParentPos( windowOwningControl->PositionRelativeToScreen() ); + } } -// handled in CFormattedCellListBoxDataExtension, since listbox does not always cover whole -// window rect (listquery/popup list), especially when items are added after construction -/* - // note, that cleanup is done in ~CFormattedCellListBoxData() - // or ( shudder ) in ~CColumnListBoxData() - MTouchFeedback* feedback = MTouchFeedback::Instance(); - if( feedback ) - { - feedback->SetFeedbackArea( aListBox, 0, aListBox->Rect(), - ETouchFeedbackBasic, ETouchEventStylusDown ); - } -*/ -} + } + EXPORT_C void AknPopupLayouts::HandleSizeAndPositionOfComponents(const TAknPopupWindowLayoutDef &aDef, CCoeControl *aContent, @@ -513,19 +469,25 @@ if (aValue < aMin) aValue = aMin; } + // Disable "unreferenced formal parameter" for when aEikEnv is not used in the AKN_LAF_COLOR_ENV macro. #pragma warning(disable : 4100) -EXPORT_C void AknPopupLayouts::HandleDraw(CEikonEnv* /*aEikEnv*/, - CWindowGc &aGc, - const TAknPopupWindowLayoutDef &aDef, - CEikListBox* aListBox, - CAknPopupHeadingPane* aHeading) +EXPORT_C void AknPopupLayouts::HandleDraw( CEikonEnv* /*aEikEnv*/, + CWindowGc& aGc, + const TAknPopupWindowLayoutDef& aDef, + CEikListBox* aListBox, + CAknPopupHeadingPane* aHeading ) { - TRect windowRect = MenuRect(const_cast(aDef)); - MAknsSkinInstance *skin = AknsUtils::SkinInstance(); - MAknsControlContext *cc = AknsDrawUtils::ControlContext( aListBox ); + TRect windowRect( + MenuRect( const_cast( aDef ) ) ); + MAknsSkinInstance* skin = AknsUtils::SkinInstance(); + MAknsControlContext* cc = AknsDrawUtils::ControlContext( aListBox ); TBool windowFrameDrawn = EFalse; - if (!cc) cc = aListBox->View()->ItemDrawer()->SkinBackgroundControlContext(); + + if ( !cc ) + { + cc = aListBox->View()->ItemDrawer()->SkinBackgroundControlContext(); + } TRegionFix<5> dontDrawRegion; TRegionFix<22> drawRegion; @@ -536,77 +498,114 @@ // If there are scroll bars and they draw their own background, take // them out of clipping region CEikScrollBarFrame* scrollBarFrame = aListBox->ScrollBarFrame(); - if (scrollBarFrame) + if ( scrollBarFrame ) { CEikScrollBar* hBar = scrollBarFrame->GetScrollBarHandle( - CEikScrollBar::EHorizontal); + CEikScrollBar::EHorizontal ); CEikScrollBar* vBar = scrollBarFrame->GetScrollBarHandle( - CEikScrollBar::EVertical); + CEikScrollBar::EVertical ); TBool drawHorizontal = ETrue; TBool drawVertical = ETrue; - scrollBarFrame->DrawBackgroundState(drawHorizontal, drawVertical); + scrollBarFrame->DrawBackgroundState( drawHorizontal, drawVertical ); drawHorizontal = drawHorizontal && hBar && hBar->IsVisible(); drawVertical = drawVertical && vBar && vBar->IsVisible(); - if (drawHorizontal) + + if ( drawHorizontal ) { - TRect scrollBarRect(hBar->Rect()); - if (hBar->OwnsWindow()) + TRect scrollBarRect( hBar->Rect() ); + if ( hBar->OwnsWindow() ) { - TPoint windowPos = aDef.iWindowRect.iTl; - TPoint scrollBarPos = hBar->PositionRelativeToScreen(); - scrollBarRect.Move(scrollBarPos - windowPos); + TPoint windowPos( aDef.iWindowRect.iTl ); + TPoint scrollBarPos( hBar->PositionRelativeToScreen() ); + scrollBarRect.Move( scrollBarPos - windowPos ); } - dontDrawRegion.AddRect(scrollBarRect); + dontDrawRegion.AddRect( scrollBarRect ); } - if (drawVertical) + + if ( drawVertical ) { - TRect scrollBarRect(vBar->Rect()); - if (vBar->OwnsWindow()) + TRect scrollBarRect( vBar->Rect() ); + if ( vBar->OwnsWindow() ) { - TPoint windowPos = aDef.iWindowRect.iTl; - TPoint scrollBarPos = vBar->PositionRelativeToScreen(); - scrollBarRect.Move(scrollBarPos - windowPos); + TPoint windowPos( aDef.iWindowRect.iTl ); + TPoint scrollBarPos( vBar->PositionRelativeToScreen() ); + scrollBarRect.Move( scrollBarPos - windowPos ); } - dontDrawRegion.AddRect(scrollBarRect); + + dontDrawRegion.AddRect( scrollBarRect ); } } } + if ( aHeading ) { dontDrawRegion.AddRect( aHeading->Rect() ); } + drawRegion.AddRect( windowRect ); drawRegion.SubRegion( dontDrawRegion ); - if (cc) + + if ( cc ) { - const TAknsItemID *popupBgId = &KAknsIIDQsnBgPopupBackground; - TAknLayoutRect popupBgRect; - popupBgRect.LayoutRect(windowRect, SkinLayout::Popup_windows_skin_placing__background_slice__Line_1(windowRect)); - AknsDrawUtils::DrawCachedImage(skin, aGc, popupBgRect.Rect(), *popupBgId); + const TAknsItemID* popupBgId = &KAknsIIDQsnBgPopupBackground; + AknsDrawUtils::DrawCachedImage( skin, aGc, windowRect, *popupBgId ); - const TAknsItemID *sliceId = &KAknsIIDQsnBgSlicePopup; + const TAknsItemID* sliceId = &KAknsIIDQsnBgSlicePopup; TAknLayoutRect sliceRect; - sliceRect.LayoutRect(windowRect, SkinLayout::Popup_windows_skin_placing__background_slice__Line_2()); - AknsDrawUtils::DrawCachedImage(skin, aGc, sliceRect.Rect(), *sliceId); - + sliceRect.LayoutRect( windowRect, + AknLayoutScalable_Avkon::bg_list_pane_g5( 0 ) ); + AknsDrawUtils::DrawCachedImage( skin, aGc, sliceRect.Rect(), *sliceId ); + + TAknWindowComponentLayout popupBgLayout( + AknLayoutScalable_Avkon::bg_popup_window_pane( 0 ) ); + + TAknWindowComponentLayout popupBgInnerLayout( + AknLayoutScalable_Avkon::bg_popup_window_pane_g1( + Layout_Meta_Data::IsLandscapeOrientation() ) ); + TAknLayoutRect topLeft; - topLeft.LayoutRect(windowRect, SkinLayout::Popup_windows_skin_placing__frame_general__Line_2()); + topLeft.LayoutRect( + windowRect, + TAknWindowComponentLayout::Compose( + popupBgLayout, + TAknWindowComponentLayout::Split( popupBgInnerLayout, 0 ) ) ); + TRect topLeftRect( topLeft.Rect() ); TAknLayoutRect bottomRight; - bottomRight.LayoutRect(windowRect, SkinLayout::Popup_windows_skin_placing__frame_general__Line_5()); + bottomRight.LayoutRect( + windowRect, + TAknWindowComponentLayout::Compose( + popupBgLayout, + TAknWindowComponentLayout::Split( popupBgInnerLayout, 8 ) ) ); + TRect bottomRightRect( bottomRight.Rect() ); + + TRect outerRect( topLeftRect.iTl, bottomRightRect.iBr ); + TRect innerRect( topLeftRect.iBr, bottomRightRect.iTl ); + + aGc.SetPenStyle( CGraphicsContext::ENullPen ); - TRect outerRect = TRect(topLeft.Rect().iTl, bottomRight.Rect().iBr); - TRect innerRect = TRect(topLeft.Rect().iBr, bottomRight.Rect().iTl); - aGc.SetPenStyle(CGraphicsContext::ENullPen); - const TAknsItemID *frameId = &KAknsIIDQsnFrPopup; - const TAknsItemID *frameCenterId = &KAknsIIDQsnFrPopupCenter; + const TAknsItemID* frameId = &KAknsIIDQsnFrPopup; + const TAknsItemID* frameCenterId = &KAknsIIDQsnFrPopupCenter; + aGc.SetClippingRegion( drawRegion ); - windowFrameDrawn = AknsDrawUtils::DrawFrame(skin, aGc, outerRect, innerRect, *frameId, *frameCenterId); + + windowFrameDrawn = AknsDrawUtils::DrawFrame( skin, + aGc, + outerRect, + innerRect, + *frameId, + *frameCenterId ); aGc.CancelClippingRegion(); } - if (!windowFrameDrawn) + + if ( !windowFrameDrawn ) { - AknDraw::DrawWindowShadow(aGc, aDef.iCover, aDef.iSecond, aDef.iFirst, aDef.iOutline, aDef.iInside); + AknDraw::DrawWindowShadow( aGc, + aDef.iCover, + aDef.iSecond, + aDef.iFirst, + aDef.iOutline, + aDef.iInside ); } } #pragma warning(default : 4100) @@ -618,308 +617,288 @@ } -EXPORT_C void AknPopupLayouts::MenuPopupWindowGraphics(TAknPopupWindowLayoutDef &aDef) - { - TRect window_rect = AknPopupLayouts::MenuRect(aDef); - TAknWindowLineLayout s0 = AKN_LAYOUT_WINDOW_Menu_pop_up_window_graphics_Line_1(window_rect); - TAknWindowLineLayout s1 = AKN_LAYOUT_WINDOW_Menu_pop_up_window_graphics_Line_2(window_rect); - TAknWindowLineLayout s2 = AKN_LAYOUT_WINDOW_Menu_pop_up_window_graphics_Line_3(window_rect); - TAknWindowLineLayout s3 = AKN_LAYOUT_WINDOW_Menu_pop_up_window_graphics_Line_4(window_rect); - TAknWindowLineLayout s4 = AKN_LAYOUT_WINDOW_Menu_pop_up_window_graphics_Line_5(window_rect); - - aDef.iCover.LayoutRect( window_rect, s0); - aDef.iSecond.LayoutRect( window_rect, s1); - aDef.iFirst.LayoutRect( window_rect, s2); - aDef.iOutline.LayoutRect(window_rect, s3); - aDef.iInside.LayoutRect( window_rect, s4); -} - -EXPORT_C void AknPopupLayouts::SetupMenuPopupWindow(TAknPopupWindowLayoutDef &aDef, TInt num, TBool heading) +EXPORT_C void AknPopupLayouts::MenuPopupWindowGraphics( + TAknPopupWindowLayoutDef& aDef ) { - SetupDefaults(aDef); - TRect window_rect = AknPopupLayouts::MenuRect(aDef); - TAknWindowLineLayout listLayout = AKN_LAYOUT_WINDOW_list_menu_pane(heading?1:0, num-1); - // We really don't want parent relative list layout here because findbox will be overwritten. - // Just calculate list height and use that. - TRect nullRect(0,0,0,0); - TRect listItemRect = RectFromLayout(nullRect, AknLayoutScalable_Avkon::list_single_number_heading_pane_cp2(0)); - listLayout.iH = (TInt16)(num * listItemRect.Height()); - listLayout.ib = ELayoutEmpty; - - aDef.iListRect.LayoutRect(window_rect, listLayout); + TRect windowRect( AknPopupLayouts::MenuRect( aDef ) ); - //aDef.iListRect.LayoutRect(window_rect, AKN_LAYOUT_WINDOW_list_menu_pane(heading?1:0, num-1)); - - TAknWindowLineLayout part1 = AKN_LAYOUT_WINDOW_Pop_up_window_list_pane_descendants_Line_8; - TAknWindowLineLayout part2 = AKN_LAYOUT_WINDOW_Menu_pop_up_window_descendants_Line_2; - - // Combine two layouts togeher. - if (part2.iC != ELayoutEmpty) part1.iC = part2.iC; - if (part2.il != ELayoutEmpty) part1.il = part2.il; - if (part2.it != ELayoutEmpty) part1.it = part2.it; - if (part2.ir != ELayoutEmpty) part1.ir = part2.ir; - if (part2.ib != ELayoutEmpty) part1.ib = part2.ib; - if (part2.iW != ELayoutEmpty) part1.iW = part2.iW; - if (part2.iH != ELayoutEmpty) part1.iH = part2.iH; - - aDef.iHeadingRect.LayoutRect(window_rect, part1); - - //MenuPopupWindowGraphics(aDef); + aDef.iCover.LayoutRect( + windowRect, AknLayoutScalable_Avkon::bg_popup_window_pane_cp2( 0 ) ); + aDef.iSecond.LayoutRect( windowRect, KEmptyLayout ); + aDef.iFirst.LayoutRect( windowRect, KEmptyLayout ); + aDef.iOutline.LayoutRect( + windowRect, AknLayoutScalable_Avkon::listscroll_menu_pane( 0 ) ); + aDef.iInside.LayoutRect( + windowRect, AknLayoutScalable_Avkon::list_menu_pane( 0 ) ); } -EXPORT_C void AknPopupLayouts::SetupPopupMenuGraphicWindow(TAknPopupWindowLayoutDef &aDef, TInt num, TBool heading) + +EXPORT_C void AknPopupLayouts::SetupMenuPopupWindow( TAknPopupWindowLayoutDef& aDef, + TInt aNum, + TBool aHeading ) { - SetupDefaults(aDef); - TRect window_rect = AknPopupLayouts::MenuRect(aDef); - TAknWindowLineLayout listLayout = AKN_LAYOUT_WINDOW_list_menu_graphic_pane(heading?1:0, num-1); - // We really don't want parent relative list layout here because findbox will be overwritten. - // Just calculate list height and use that. - TRect nullRect(0,0,0,0); - TRect listItemRect = RectFromLayout(nullRect, AknLayoutScalable_Avkon::list_single_graphic_heading_pane_cp2(0)); - listLayout.iH = (TInt16)(num * listItemRect.Height()); - listLayout.ib = ELayoutEmpty; - - aDef.iListRect.LayoutRect(window_rect, listLayout); + SetupDefaults( aDef ); + + CommonSetup( aDef, + AknLayoutScalable_Avkon::list_single_number_heading_pane_cp2( 0 ), + aNum, + aHeading, + ETrue ); + } - //aDef.iListRect.LayoutRect(window_rect, AKN_LAYOUT_WINDOW_list_menu_graphic_pane(heading?1:0, num-1)); - TAknWindowLineLayout part1 = AKN_LAYOUT_WINDOW_Pop_up_window_list_pane_descendants_Line_8; - TAknWindowLineLayout part2 = AKN_LAYOUT_WINDOW_Menu_pop_up_window_descendants_Line_2; - // Combine two layouts togeher. - if (part2.iC != ELayoutEmpty) part1.iC = part2.iC; - if (part2.il != ELayoutEmpty) part1.il = part2.il; - if (part2.it != ELayoutEmpty) part1.it = part2.it; - if (part2.ir != ELayoutEmpty) part1.ir = part2.ir; - if (part2.ib != ELayoutEmpty) part1.ib = part2.ib; - if (part2.iW != ELayoutEmpty) part1.iW = part2.iW; - if (part2.iH != ELayoutEmpty) part1.iH = part2.iH; - - aDef.iHeadingRect.LayoutRect(window_rect, part1); - - //MenuPopupWindowGraphics(aDef); +EXPORT_C void AknPopupLayouts::SetupPopupMenuGraphicWindow( + TAknPopupWindowLayoutDef &aDef, + TInt aNum, + TBool aHeading ) + { + SetupDefaults( aDef ); + + CommonSetup( aDef, + AknLayoutScalable_Avkon::list_single_graphic_heading_pane_cp2( 0 ), + aNum, + aHeading, + ETrue ); } -EXPORT_C void AknPopupLayouts::SetupPopupMenuGraphicHeadingWindow(TAknPopupWindowLayoutDef &aDef, TInt num, TBool heading) - { - TRect window_rect = AknPopupLayouts::MenuRect(aDef); - TAknWindowLineLayout listLayout = AKN_LAYOUT_WINDOW_list_menu_graphic_heading_pane(heading?1:0, num-1); - // We really don't want parent relative list layout here because findbox will be overwritten. - // Just calculate list height and use that. - TRect nullRect(0,0,0,0); - TRect listItemRect = RectFromLayout(nullRect, AknLayoutScalable_Avkon::list_single_graphic_heading_pane_cp2(0)); - listLayout.iH = (TInt16)(num * listItemRect.Height()); - listLayout.ib = ELayoutEmpty; - - aDef.iListRect.LayoutRect(window_rect, listLayout); - TAknWindowLineLayout part1 = AKN_LAYOUT_WINDOW_Pop_up_window_list_pane_descendants_Line_8; - TAknWindowLineLayout part2 = AKN_LAYOUT_WINDOW_Menu_pop_up_window_descendants_and_elements__single_graphic_heading__Line_2; - // Combine two layouts togeher. - if (part2.iC != ELayoutEmpty) part1.iC = part2.iC; - if (part2.il != ELayoutEmpty) part1.il = part2.il; - if (part2.it != ELayoutEmpty) part1.it = part2.it; - if (part2.ir != ELayoutEmpty) part1.ir = part2.ir; - if (part2.ib != ELayoutEmpty) part1.ib = part2.ib; - if (part2.iW != ELayoutEmpty) part1.iW = part2.iW; - if (part2.iH != ELayoutEmpty) part1.iH = part2.iH; +EXPORT_C void AknPopupLayouts::SetupPopupMenuGraphicHeadingWindow( + TAknPopupWindowLayoutDef &aDef, + TInt aNum, + TBool aHeading ) + { + CommonSetup( aDef, + AknLayoutScalable_Avkon::list_single_graphic_heading_pane_cp2( 0 ), + aNum, + aHeading, + EFalse ); - aDef.iHeadingRect.LayoutRect(window_rect, part1); - - //MenuPopupWindowGraphics(aDef); - - const TAknWindowLineLayout lines[] = - { - AKN_LAYOUT_WINDOW_Menu_pop_up_window_descendants_and_elements__single_graphic_heading__Line_3(heading?1:0), - AKN_LAYOUT_WINDOW_Menu_pop_up_window_descendants_and_elements__single_graphic_heading__Line_3(1) - }; - TRect inner_rect = window_rect; - aDef.iVertLineExt1.LayoutRect( inner_rect, lines[0]); - aDef.iVertLineExt2.LayoutRect( inner_rect, lines[1]); + TRect windowRect( AknPopupLayouts::MenuRect( aDef ) ); + aDef.iHeadingRect.LayoutRect( windowRect, + AknLayoutScalable_Avkon::heading_pane( 0 ) ); } -EXPORT_C void AknPopupLayouts::SetupPopupMenuDoubleWindow(TAknPopupWindowLayoutDef &aDef, TInt num, TBool heading) + +EXPORT_C void AknPopupLayouts::SetupPopupMenuDoubleWindow( + TAknPopupWindowLayoutDef& aDef, + TInt aNum, + TBool aHeading ) { - SetupDefaults(aDef); - TRect window_rect = AknPopupLayouts::MenuRect(aDef); - TAknWindowLineLayout listLayout = AKN_LAYOUT_WINDOW_list_menu_double_pane_list_menu_double2_pane(heading?1:0, num-1); - // We really don't want parent relative list layout here because findbox will be overwritten. - // Just calculate list height and use that. - TRect nullRect(0,0,0,0); - TRect listItemRect = RectFromLayout(nullRect, AknLayoutScalable_Avkon::list_double2_graphic_pane_cp2(0)); - listLayout.iH = (TInt16)(num * listItemRect.Height()); - listLayout.ib = ELayoutEmpty; - - aDef.iListRect.LayoutRect(window_rect, listLayout); - - //aDef.iListRect.LayoutRect(window_rect, AKN_LAYOUT_WINDOW_list_menu_double_pane_list_menu_double2_pane(heading?1:0, num-1 )); - TAknWindowLineLayout part1 = AKN_LAYOUT_WINDOW_Pop_up_window_list_pane_descendants_Line_8; - TAknWindowLineLayout part2 = AKN_LAYOUT_WINDOW_Menu_pop_up_window_descendants__double__Line_2; - // Combine two layouts togeher. - if (part2.iC != ELayoutEmpty) part1.iC = part2.iC; - if (part2.il != ELayoutEmpty) part1.il = part2.il; - if (part2.it != ELayoutEmpty) part1.it = part2.it; - if (part2.ir != ELayoutEmpty) part1.ir = part2.ir; - if (part2.ib != ELayoutEmpty) part1.ib = part2.ib; - if (part2.iW != ELayoutEmpty) part1.iW = part2.iW; - if (part2.iH != ELayoutEmpty) part1.iH = part2.iH; - - aDef.iHeadingRect.LayoutRect(window_rect, part1); - - //MenuPopupWindowGraphics(aDef); - } + SetupDefaults( aDef ); -EXPORT_C void AknPopupLayouts::SetupImageSelectionMenuPopupWindow(TAknPopupWindowLayoutDef &aDef, TInt num, TBool heading) - { - SetupDefaults(aDef); - TRect window_rect = AknPopupLayouts::MenuRect(aDef); - TAknWindowLineLayout listLayout = AKN_LAYOUT_WINDOW_list_menu_double_large_graphic_pane(heading?1:0, num-1); - // We really don't want parent relative list layout here because findbox will be overwritten. - // Just calculate list height and use that. - TRect nullRect(0,0,0,0); - TRect listItemRect = RectFromLayout(nullRect, AknLayoutScalable_Avkon::list_double_large_graphic_pane_cp2(0)); - listLayout.iH = (TInt16)(num * listItemRect.Height()); - listLayout.ib = ELayoutEmpty; + CommonSetup( aDef, + AknLayoutScalable_Avkon::list_double2_graphic_pane_cp2( 0 ), + aNum, + aHeading, + EFalse ); - aDef.iListRect.LayoutRect(window_rect, listLayout); + TRect windowRect( AknPopupLayouts::MenuRect( aDef ) ); + aDef.iHeadingRect.LayoutRect( windowRect, + AknLayoutScalable_Avkon::heading_pane( 0 ) ); + } + - //aDef.iListRect.LayoutRect(window_rect, AKN_LAYOUT_WINDOW_list_menu_double_large_graphic_pane(heading?1:0, num-1)); - - TAknWindowLineLayout part1 = AKN_LAYOUT_WINDOW_Pop_up_window_list_pane_descendants_Line_8; - TAknWindowLineLayout part2 = AKN_LAYOUT_WINDOW_Menu_pop_up_window_descendants__double__Line_2; +EXPORT_C void AknPopupLayouts::SetupImageSelectionMenuPopupWindow( + TAknPopupWindowLayoutDef& aDef, + TInt aNum, + TBool aHeading ) + { + SetupDefaults( aDef ); - // Combine two layouts togeher. - if (part2.iC != ELayoutEmpty) part1.iC = part2.iC; - if (part2.il != ELayoutEmpty) part1.il = part2.il; - if (part2.it != ELayoutEmpty) part1.it = part2.it; - if (part2.ir != ELayoutEmpty) part1.ir = part2.ir; - if (part2.ib != ELayoutEmpty) part1.ib = part2.ib; - if (part2.iW != ELayoutEmpty) part1.iW = part2.iW; - if (part2.iH != ELayoutEmpty) part1.iH = part2.iH; - aDef.iHeadingRect.LayoutRect(window_rect, part1); - - //MenuPopupWindowGraphics(aDef); + CommonSetup( aDef, + AknLayoutScalable_Avkon::list_double_large_graphic_pane_cp2( 0 ), + aNum, + aHeading, + EFalse ); + + TRect windowRect( AknPopupLayouts::MenuRect( aDef ) ); + aDef.iHeadingRect.LayoutRect( windowRect, + AknLayoutScalable_Avkon::heading_pane( 0 ) ); } -EXPORT_C void AknPopupLayouts::SetupPopupSNoteGroupWindow(TAknPopupWindowLayoutDef &aDef, TInt num, TBool /*heading*/) +EXPORT_C void AknPopupLayouts::SetupPopupSNoteGroupWindow( + TAknPopupWindowLayoutDef &aDef, + TInt aNum, + TBool /*aHeading*/ ) { - // not used (at least by AvKon) - no need to remove magic numbers - SetupDefaults(aDef); - TRect window_rect = AknPopupLayouts::MenuRect(aDef); - aDef.iListRect.LayoutRect(window_rect, 0, 3, 11, ELayoutEmpty, ELayoutEmpty, 168, 38+(57-38)*(num-2) ); - TAknWindowLineLayout part1 = AKN_LAYOUT_WINDOW_Pop_up_window_list_pane_descendants_Line_8; - TAknWindowLineLayout part2 = AKN_LAYOUT_WINDOW_Menu_pop_up_window_descendants_Line_2; + // Not used (at least by AvKon) - no need to remove magic numbers. + SetupDefaults( aDef ); + TRect windowRect( AknPopupLayouts::MenuRect( aDef ) ); + aDef.iListRect.LayoutRect( windowRect, + 0, + 3, + 11, + ELayoutEmpty, + ELayoutEmpty, + 168, + 38 + ( 57 - 38 ) * ( aNum - 2 ) ); + TAknWindowLineLayout part1( + AknLayoutScalable_Avkon::heading_pane( 0 ).LayoutLine() ); + + TAknWindowLineLayout part2( + TAknWindowComponentLayout::Compose( + TAknWindowComponentLayout::Compose( + TAknWindowComponentLayout::SiblingAsChild( + AknLayoutScalable_Avkon::popup_window_general( 1 ), + AknLayoutScalable_Avkon::popup_window_general( 0 ) ), + AknLayoutScalable_Avkon::listscroll_menu_pane( 0 ) ), + AknLayoutScalable_Avkon::list_menu_pane( 0 ) ).LayoutLine() ); + // Combine two layouts togeher. - if (part2.iC != ELayoutEmpty) part1.iC = part2.iC; - if (part2.il != ELayoutEmpty) part1.il = part2.il; - if (part2.it != ELayoutEmpty) part1.it = part2.it; - if (part2.ir != ELayoutEmpty) part1.ir = part2.ir; - if (part2.ib != ELayoutEmpty) part1.ib = part2.ib; - if (part2.iW != ELayoutEmpty) part1.iW = part2.iW; - if (part2.iH != ELayoutEmpty) part1.iH = part2.iH; + if ( part2.iC != ELayoutEmpty ) part1.iC = part2.iC; + if ( part2.il != ELayoutEmpty ) part1.il = part2.il; + if ( part2.it != ELayoutEmpty ) part1.it = part2.it; + if ( part2.ir != ELayoutEmpty ) part1.ir = part2.ir; + if ( part2.ib != ELayoutEmpty ) part1.ib = part2.ib; + if ( part2.iW != ELayoutEmpty ) part1.iW = part2.iW; + if ( part2.iH != ELayoutEmpty ) part1.iH = part2.iH; - aDef.iHeadingRect.LayoutRect(window_rect, part1); + aDef.iHeadingRect.LayoutRect( windowRect, part1 ); - TInt p = window_rect.Size().iHeight; + TInt p = windowRect.Size().iHeight; const AknLayoutUtils::SAknLayoutRect shadow[] = { - { 0,0,0,ELayoutEmpty, ELayoutEmpty, 176, p }, - { 86,7,12,ELayoutEmpty, ELayoutEmpty, 167, p -16 }, - { 221,4,10,ELayoutEmpty, ELayoutEmpty, 169, p -15 }, - { 215,2,8,ELayoutEmpty, ELayoutEmpty, 170, p -14 }, - { 0,3,9,ELayoutEmpty, ELayoutEmpty, 168, p -16 } + { 0, 0, 0, ELayoutEmpty, ELayoutEmpty, 176, p }, + { 86, 7, 12, ELayoutEmpty, ELayoutEmpty, 167, p - 16 }, + { 221, 4, 10, ELayoutEmpty, ELayoutEmpty, 169, p - 15 }, + { 215, 2, 8, ELayoutEmpty, ELayoutEmpty, 170, p - 14 }, + { 0, 3, 9, ELayoutEmpty, ELayoutEmpty, 168, p - 16 } }; - aDef.iCover.LayoutRect( window_rect, shadow[0]); - aDef.iSecond.LayoutRect( window_rect, shadow[1]); - aDef.iFirst.LayoutRect( window_rect, shadow[2]); - aDef.iOutline.LayoutRect(window_rect, shadow[3]); - aDef.iInside.LayoutRect( window_rect, shadow[4]); + aDef.iCover.LayoutRect( windowRect, shadow[0] ); + aDef.iSecond.LayoutRect( windowRect, shadow[1] ); + aDef.iFirst.LayoutRect( windowRect, shadow[2] ); + aDef.iOutline.LayoutRect(windowRect, shadow[3] ); + aDef.iInside.LayoutRect( windowRect, shadow[4] ); } - -EXPORT_C void AknPopupLayouts::CalcPopupMenuWindow(TAknPopupWindowLayoutDef &aDef,TRect aRect, TInt num) +EXPORT_C void AknPopupLayouts::CalcPopupMenuWindow( + TAknPopupWindowLayoutDef& aDef, + TRect aRect, + TInt aNum ) { - TAknLayoutRect popup_menu_window; - popup_menu_window.LayoutRect(aRect, AKN_LAYOUT_WINDOW_popup_menu_window(num-1)); - aDef.iWindowRect = popup_menu_window.Rect(); - aDef.iPopupMenuWindowOffset=TPoint(0,0); - } -EXPORT_C void AknPopupLayouts::CalcPopupMenuGraphicWindow(TAknPopupWindowLayoutDef &aDef,TRect aRect, TInt num) - { - TAknLayoutRect popup_menu_graphic_window; - popup_menu_graphic_window.LayoutRect(aRect, AKN_LAYOUT_WINDOW_popup_menu_graphic_window(num-1)); - aDef.iWindowRect = popup_menu_graphic_window.Rect(); - aDef.iPopupMenuWindowOffset=TPoint(0,0); + TInt variety; + if ( Layout_Meta_Data::IsLandscapeOrientation() ) + { + // Popup menu window is wider in landscape orientation. + variety = ( aNum < 7 ) ? 20 - aNum : 43; + } + else + { + variety = 7 + aNum; + } + + TAknLayoutRect popupMenuWindow; + popupMenuWindow.LayoutRect( + aRect, + AknLayoutScalable_Avkon::popup_menu_window( variety ) ); + aDef.iWindowRect = popupMenuWindow.Rect(); + aDef.iPopupMenuWindowOffset.SetXY( 0, 0 ); } -EXPORT_C void AknPopupLayouts::CalcPopupMenuGraphicHeadingWindow(TAknPopupWindowLayoutDef &aDef,TRect aRect, TInt num) + + +EXPORT_C void AknPopupLayouts::CalcPopupMenuGraphicWindow( + TAknPopupWindowLayoutDef& aDef, + TRect aRect, + TInt aNum ) { - TAknLayoutRect popup_menu_graphic_heading_window; - popup_menu_graphic_heading_window.LayoutRect(aRect,AKN_LAYOUT_WINDOW_popup_menu_graphic_heading_window(num-1)); - aDef.iWindowRect = popup_menu_graphic_heading_window.Rect(); - aDef.iPopupMenuWindowOffset=TPoint(0,0); + CalcPopupMenuWindow( aDef, aRect, aNum ); } -EXPORT_C void AknPopupLayouts::CalcPopupMenuDoubleWindow(TAknPopupWindowLayoutDef &aDef,TRect aRect, TInt num) + + +EXPORT_C void AknPopupLayouts::CalcPopupMenuGraphicHeadingWindow( + TAknPopupWindowLayoutDef& aDef, + TRect aRect, + TInt aNum ) { - TAknLayoutRect popup_menu_double_window; - TInt items = 2; - if (num == 2) items = 1; - if (num == 1) items = 0; - popup_menu_double_window.LayoutRect(aRect, AKN_LAYOUT_WINDOW_popup_menu_double_window(items)); - aDef.iWindowRect = popup_menu_double_window.Rect(); - aDef.iPopupMenuWindowOffset=TPoint(0,0); + CalcPopupMenuWindow( aDef, aRect, aNum ); } -EXPORT_C void AknPopupLayouts::CalcPopupMenuDoubleLargeGraphicWindow(TAknPopupWindowLayoutDef &aDef,TRect aRect, TInt num) + +EXPORT_C void AknPopupLayouts::CalcPopupMenuDoubleWindow( + TAknPopupWindowLayoutDef& aDef, + TRect aRect, + TInt aNum ) { - TAknLayoutRect popup_menu_double_large_graphic_window; - TInt items = 2; - if (num == 2) items = 1; - if (num == 1) items = 0; - popup_menu_double_large_graphic_window.LayoutRect(aRect, AKN_LAYOUT_WINDOW_popup_menu_double_large_graphic_window(items)); - aDef.iWindowRect = popup_menu_double_large_graphic_window.Rect(); - aDef.iPopupMenuWindowOffset=TPoint(0,0); - } + TBool isLandscape( Layout_Meta_Data::IsLandscapeOrientation() ); + + TInt variety = isLandscape ? 26 : 2; + if ( aNum == 2 ) + { + variety = isLandscape ? 25 : 1; + } + else if ( aNum == 1 ) + { + variety = isLandscape ? 24 : 0; + } + + TAknLayoutRect popupMenuDoubleWindow; + popupMenuDoubleWindow.LayoutRect( + aRect, AknLayoutScalable_Avkon::popup_menu_window( variety ) ); + aDef.iWindowRect = popupMenuDoubleWindow.Rect(); + aDef.iPopupMenuWindowOffset.SetXY( 0, 0 ); + } -EXPORT_C void AknPopupLayouts::CalcPopupSNoteGroupWindow(TAknPopupWindowLayoutDef &aDef,TRect aRect, TInt num) +EXPORT_C void AknPopupLayouts::CalcPopupMenuDoubleLargeGraphicWindow( + TAknPopupWindowLayoutDef& aDef, + TRect aRect, + TInt aNum ) { - TAknLayoutRect popup_menu_snote_window; - if (num-2 < 0) { num = 2; } - popup_menu_snote_window.LayoutRect(aRect, AKN_LAYOUT_WINDOW_popup_snote_group_window(num-2)); - aDef.iWindowRect = popup_menu_snote_window.Rect(); - aDef.iPopupMenuWindowOffset=TPoint(0,0); + CalcPopupMenuDoubleWindow( aDef, aRect, aNum ); + } + + +EXPORT_C void AknPopupLayouts::CalcPopupSNoteGroupWindow( + TAknPopupWindowLayoutDef& aDef, + TRect aRect, + TInt /*aNum*/ ) + { + // Layout for this isn't specified in the layout data, + // use the provided rect. + aDef.iWindowRect = aRect; + aDef.iPopupMenuWindowOffset.SetXY( 0, 0 ); } EXPORT_C TRect AknPopupLayouts::WindowRect(TAknPopupWindowLayoutDef &aDef) {return aDef.iWindowRect; } -EXPORT_C void AknPopupLayouts::ModifyWindowGraphicForHeading(TAknPopupWindowLayoutDef &aDef) + +EXPORT_C void AknPopupLayouts::ModifyWindowGraphicForHeading( + TAknPopupWindowLayoutDef& aDef ) { - TRect nullRect(0,0,0,0); + TRect nullRect( 0, 0, 0, 0 ); TAknLayoutRect nullHeadingRect; - // find out, how much space is needed for heading (spaceForHeading was 23) - nullHeadingRect.LayoutRect(nullRect,AKN_LAYOUT_WINDOW_Pop_up_menu_with_heading_window_graphics_Line_1(nullRect)); + + TAknWindowComponentLayout popupWindowLayout( + TAknWindowComponentLayout::SiblingAsChild( + AknLayoutScalable_Avkon::popup_window_general( 0 ), + AknLayoutScalable_Avkon::popup_window_general( 1 ) ) ); + + // Find out how much space is needed for heading. + nullHeadingRect.LayoutRect( nullRect, popupWindowLayout ); TInt spaceForHeading = nullHeadingRect.Rect().Height(); + // This is necessary to position it correctly. + aDef.iWindowRect.iTl.iY -= spaceForHeading; - aDef.iWindowRect.iTl.iY -= spaceForHeading; // This is necessary to position it correctly - // this is because b=0 in parent of coverrect and because - // parent's height is used in the child... - - TRect window_rect = aDef.iWindowRect; + // this is because b=0 in parent of coverrect and because + // parent's height is used in the child... + TRect windowRect( aDef.iWindowRect ); - aDef.iCover.LayoutRect( window_rect, AKN_LAYOUT_WINDOW_Pop_up_menu_with_heading_window_graphics_Line_1(window_rect)); - aDef.iSecond.LayoutRect( window_rect, AKN_LAYOUT_WINDOW_Pop_up_menu_with_heading_window_graphics_Line_2(window_rect)); - aDef.iFirst.LayoutRect( window_rect, AKN_LAYOUT_WINDOW_Pop_up_menu_with_heading_window_graphics_Line_3(window_rect)); - aDef.iOutline.LayoutRect(window_rect, AKN_LAYOUT_WINDOW_Pop_up_menu_with_heading_window_graphics_Line_4(window_rect)); - aDef.iInside.LayoutRect( window_rect, AKN_LAYOUT_WINDOW_Pop_up_menu_with_heading_window_graphics_Line_5(window_rect)); + aDef.iCover.LayoutRect( windowRect, popupWindowLayout ); + aDef.iSecond.LayoutRect( windowRect, KEmptyLayout ); + aDef.iFirst.LayoutRect( windowRect, KEmptyLayout ); + aDef.iOutline.LayoutRect( windowRect, KEmptyLayout ); + aDef.iInside.LayoutRect( windowRect, KEmptyLayout ); - aDef.iPopupMenuWindowOffset=TPoint(0,spaceForHeading); + aDef.iPopupMenuWindowOffset.SetXY( 0, spaceForHeading ); } + EXPORT_C void AknPopupLayouts::ModifyWindowGraphicForMessageBox(TAknPopupWindowLayoutDef &aDef, TInt aNumberOfLines) { TInt varietyIndex = 0; @@ -959,4 +938,59 @@ return layoutRect.Rect(); } + +void AknPopupLayouts::CommonSetup( TAknPopupWindowLayoutDef& aDef, + const TAknWindowComponentLayout& aItemLayout, + TInt aNum, + TBool aHeading, + TBool aLayoutHeading ) + { + TRect windowRect( AknPopupLayouts::MenuRect( aDef ) ); + + TAknWindowLineLayout listWithHeadingLayout( + TAknWindowComponentLayout::Compose( + TAknWindowComponentLayout::Compose( + TAknWindowComponentLayout::SiblingAsChild( + AknLayoutScalable_Avkon::popup_window_general( 1 ), + AknLayoutScalable_Avkon::popup_window_general( 0 ) ), + AknLayoutScalable_Avkon::listscroll_menu_pane( 0 ) ), + AknLayoutScalable_Avkon::list_menu_pane( 0 ) ).LayoutLine() ); + + TAknWindowLineLayout listLayout( listWithHeadingLayout ); + + if ( !aHeading ) + { + listLayout = TAknWindowComponentLayout::Compose( + AknLayoutScalable_Avkon::listscroll_menu_pane( 0 ), + AknLayoutScalable_Avkon::list_menu_pane( 0 ) ).LayoutLine(); + } + + // We really don't want parent relative list layout here because findbox + // will be overwritten. Just calculate list height and use that. + TRect nullRect( 0, 0, 0, 0 ); + TRect listItemRect( RectFromLayout( nullRect, aItemLayout ) ); + listLayout.iH = (TInt16)( aNum * listItemRect.Height() ); + listLayout.ib = ELayoutEmpty; + + aDef.iListRect.LayoutRect( windowRect, listLayout ); + + if ( aLayoutHeading ) + { + TAknWindowLineLayout part1( + AknLayoutScalable_Avkon::heading_pane( 0 ).LayoutLine() ); + TAknWindowLineLayout part2( listWithHeadingLayout ); + + // Combine two layouts togeher. + if ( part2.iC != ELayoutEmpty ) part1.iC = part2.iC; + if ( part2.il != ELayoutEmpty ) part1.il = part2.il; + if ( part2.it != ELayoutEmpty ) part1.it = part2.it; + if ( part2.ir != ELayoutEmpty ) part1.ir = part2.ir; + if ( part2.ib != ELayoutEmpty ) part1.ib = part2.ib; + if ( part2.iW != ELayoutEmpty ) part1.iW = part2.iW; + if ( part2.iH != ELayoutEmpty ) part1.iH = part2.iH; + + aDef.iHeadingRect.LayoutRect( windowRect, part1 ); + } + } + // End of File diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/aknstatuspanedatapublisher.cpp --- a/uifw/AvKon/src/aknstatuspanedatapublisher.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/aknstatuspanedatapublisher.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -1035,6 +1035,11 @@ pluginUid.iUid = KImplUIDUSBMEMIndicatorsPlugin; break; } + case EAknIndicatorIntegratedIM: + { + pluginUid.iUid = KImplUIDIIMIndicatorPlugin; + break; + } // currently uncategorized: case EAknIndicatorKeyguard: case EAknIndicatorHomeZone: diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/akntabgrp.cpp --- a/uifw/AvKon/src/akntabgrp.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/akntabgrp.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -2885,7 +2885,7 @@ } else if ( aPointerEvent.iType == TPointerEvent::EButton1Up ) { - if( newTab> -1 ) + if( newTab > -1 && newTab == iExtension->iPointerDownTab ) { MTouchFeedback* feedback = MTouchFeedback::Instance(); diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/aknutils.cpp --- a/uifw/AvKon/src/aknutils.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/aknutils.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -3411,8 +3411,8 @@ { TAknWindowComponentLayout line; TAknLayoutRect rect; - rect.LayoutRect( TRect( 0, 0, 0, 0 ), AknLayoutScalable_Avkon::Screen() ); - TRect screenRect( rect.Rect() ); + TRect screenRect(0, 0, AKN_LAYOUT_WINDOW_screen.iW, AKN_LAYOUT_WINDOW_screen.iH); + aRect.SetRect( 0, 0, 0, 0 ); // No stacon pane active etc. cheking is done here before the switch-case so that we can // have slightly better performance for some other lookups (e.g. screen). @@ -3574,18 +3574,16 @@ variety = 25; } - rect.LayoutRect( screenRect, TAknWindowComponentLayout::Compose( - AknLayoutScalable_Avkon::application_window( 0 ), - AknLayoutScalable_Avkon::main_pane( variety ) ) ); + rect.LayoutRect( screenRect, + AknLayoutScalable_Avkon::main_pane( variety ) ); aRect = rect.Rect(); return ETrue; } else if ( screenRect.iBr.iX == 360 && screenRect.iBr.iY == 640 ) { TInt variety = 1; - rect.LayoutRect( screenRect, TAknWindowComponentLayout::Compose( - AknLayoutScalable_Avkon::application_window( 0 ), - AknLayoutScalable_Avkon::main_pane( variety ) ) ); + rect.LayoutRect( screenRect, + AknLayoutScalable_Avkon::main_pane( variety ) ); aRect = rect.Rect(); return ETrue; } diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/eikfrlb.cpp --- a/uifw/AvKon/src/eikfrlb.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/eikfrlb.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -815,7 +815,7 @@ #ifdef RD_UI_TRANSITION_EFFECTS_LIST MAknListBoxTfxInternal* transApi = - CAknListLoader::TfxApiInternal( iGc ); + CAknListLoader::TfxApiInternal( itemDrawer->Gc() ); #endif // RD_UI_TRANSITION_EFFECTS_LIST if ( CAknEnv::Static()->TransparencyEnabled() ) @@ -847,7 +847,7 @@ } #endif // RD_UI_TRANSITION_EFFECTS_LIST - iGc->SetClippingRect( iViewRect ); + itemDrawer->Gc()->SetClippingRect( iViewRect ); #ifdef RD_UI_TRANSITION_EFFECTS_LIST if ( transApi ) @@ -865,7 +865,7 @@ } #endif // RD_UI_TRANSITION_EFFECTS_LIST - iGc->CancelClippingRect(); + itemDrawer->Gc()->CancelClippingRect(); #ifdef RD_UI_TRANSITION_EFFECTS_LIST if ( transApi ) @@ -938,27 +938,27 @@ AknsDrawUtils::BackgroundBetweenRects( skin, cc, control, - *iGc, + *itemDrawer->Gc(), iViewRect, usedPortionOfViewRect ); - AknsDrawUtils::Background( skin, cc, control, *iGc, sbbg ); + AknsDrawUtils::Background( skin, cc, control, *itemDrawer->Gc(), sbbg ); if ( AknLayoutUtils::LayoutMirrored() ) { - AknsDrawUtils::Background( skin, cc, control, *iGc, margin ); + AknsDrawUtils::Background( skin, cc, control, *itemDrawer->Gc(), margin ); } } } else { - iGc->SetBrushColor( BackColor() ); - DrawUtils::ClearBetweenRects( *iGc, iViewRect, usedPortionOfViewRect ); - iGc->Clear( sbbg ); + itemDrawer->Gc()->SetBrushColor( BackColor() ); + DrawUtils::ClearBetweenRects( *itemDrawer->Gc(), iViewRect, usedPortionOfViewRect ); + itemDrawer->Gc()->Clear( sbbg ); if ( AknLayoutUtils::LayoutMirrored() ) { - iGc->Clear( margin ); + itemDrawer->Gc()->Clear( margin ); } } } @@ -1417,7 +1417,7 @@ } #endif // RD_UI_TRANSITION_EFFECTS_LIST - if ( aDrawSeparator && + if ( aDrawSeparator && control && static_cast( control )->ItemsInSingleLine() == 1 ) { AknListUtils::DrawSeparator( *iGc, aItemTextRect, iTextColor, skin ); diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/src/eikfrlbd.cpp --- a/uifw/AvKon/src/eikfrlbd.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/src/eikfrlbd.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -48,6 +48,7 @@ #endif //RD_UI_TRANSITION_EFFECTS_LIST #include +#include #include "akntrace.h" // there are 17(!) subcells in qdial grid (0 ... 16) @@ -56,6 +57,8 @@ // colored tick marks support const TInt KColorIconFlag = -1; const TInt KColorIconIdx = 0; +// smiley text place holder +_LIT( KPlaceHolder, "\xFFF0i" ); /** * This class needs to be in .cpp file so that we do not accidentally make it @@ -77,7 +80,8 @@ public MAknPictographAnimatorCallBack, public MCoeForegroundObserver, public MAknsEffectAnimObserver, - public MListBoxItemChangeObserver + public MListBoxItemChangeObserver, + public MAknSmileyObserver { public: enum TFlag @@ -123,6 +127,7 @@ TAknWindowLineLayout iGraphicLayout; TInt iSubCellType; TInt iConditionValue; // used with conditional layouts for not always drawn subcells + TBool iSmileyCell; }; SRowAndSubCell& At(TInt aArrayIndex); @@ -131,8 +136,8 @@ TInt FindRowAndSubCellIndex(TInt& aArrayIndex,TInt aRow,TInt aSubCell) const; void FindRowAndSubCellIndexOrAddL(TInt& aArrayIndex,TInt aRow,TInt aSubCell); - SSLSubCell& AtSL(TInt aArrayIndex); - const SSLSubCell& AtSL(TInt aArrayIndex) const; + SSLSubCell& SLAt(TInt aArrayIndex); + const SSLSubCell& SLAt(TInt aArrayIndex) const; void AddSLSubCellL(TInt aSubCell); TInt FindSLSubCellIndex(TInt& aArrayIndex, TInt aSubCell) const; void FindSLSubCellIndexOrAddL(TInt& aArrayIndex, TInt aSubCell); @@ -173,6 +178,11 @@ CWindowGc& aGc, const TRect& aOutRect, const TRect& aInnerRect ) const; + void DrawSmileyWithText( CWindowGc& aGc, const TDesC& aSmileyText, + const TAknLayoutText& aLayout, + TBool aUseLogicalToVisualConversion, + const TRgb &aColor); + TInt ConvertTextToSmiley( TDes& aText ); private: // New internal methods TBool DrawHighlightBackground( CFbsBitGc& aGc ); void PostDeleteAnimation(); @@ -194,7 +204,9 @@ TInt FindSubCellExtIndex(TInt& aArrayIndex,TInt aSubCell) const; TBool SubCellLayoutAlignment(TInt aSubCellIndex) const; - +public: // from MAknSmileyObserver + void SmileyStillImageLoaded( CAknSmileyIcon* aSmileyIcon ); + void SmileyAnimationChanged( CAknSmileyIcon* aSmileyIcon ); private: // From MAknPictographAnimatorCallBack void DrawPictographArea(); @@ -263,6 +275,8 @@ TRect iMarginRect; TBool iKineticScrolling; + CAknSmileyManager* iSmileyMan; + TSize iSmileySize; // last set simley size }; @@ -322,6 +336,7 @@ // Stop receiving foreground events CCoeEnv* env = CCoeEnv::Static(); env->RemoveForegroundObserver( *this ); + delete iSmileyMan; delete iRowAndSubCellArray; iRowAndSubCellArray = NULL; @@ -409,6 +424,7 @@ subcell.iGraphicLayout = NULL; subcell.iSubCellType = 0; subcell.iConditionValue = -1; + subcell.iSmileyCell = EFalse; TKeyArrayFix key(0,ECmpTInt32); iSLSubCellArray->InsertIsqL(subcell,key); @@ -416,14 +432,14 @@ CFormattedCellListBoxDataExtension::SSLSubCell& -CFormattedCellListBoxDataExtension::AtSL(TInt aArrayIndex) +CFormattedCellListBoxDataExtension::SLAt(TInt aArrayIndex) { __ASSERT_DEBUG(aArrayIndex>=0 && aArrayIndexCount(),Panic(EAknPanicOutOfRange)); return(iSLSubCellArray->At(aArrayIndex)); } const CFormattedCellListBoxDataExtension::SSLSubCell& -CFormattedCellListBoxDataExtension::AtSL(TInt aArrayIndex) const +CFormattedCellListBoxDataExtension::SLAt(TInt aArrayIndex) const { __ASSERT_DEBUG(aArrayIndex>=0 && aArrayIndexCount(),Panic(EAknPanicOutOfRange)); return(iSLSubCellArray->At(aArrayIndex)); @@ -1191,7 +1207,16 @@ return(iSubCellExtArray->At(index).iLayoutAlign); } - +void CFormattedCellListBoxDataExtension::SmileyStillImageLoaded( + CAknSmileyIcon* /*aSmileyIcon*/) + { + iControl->DrawDeferred(); + } + +void CFormattedCellListBoxDataExtension::SmileyAnimationChanged( + CAknSmileyIcon* /*aSmileyIcon*/ ) + { + } ///////////handling TSubCellExt,end @@ -1255,6 +1280,31 @@ KAknsIIDQsnFrListCenterPressed ); } +void CFormattedCellListBoxDataExtension::DrawSmileyWithText( CWindowGc& aGc, + const TDesC& aSmileyText, + const TAknLayoutText& aLayout, + TBool aUseLogicalToVisualConversion, + const TRgb& aColor ) + { + __ASSERT_DEBUG( iSmileyMan, Panic(EAknPanicObjectNotFullyConstructed)); + TInt l = Min( aLayout.Font()->TextWidthInPixels(KPlaceHolder), + aLayout.Font()->HeightInPixels() ); + TSize s(l,l); + if ( iSmileySize != s ) + { + iSmileyMan->SetSize( s ); + iSmileySize = s; + } + aGc.SetPenColor( aColor ); // SmileyManager's DrawText does not accept aColor... + iSmileyMan->DrawText( aGc, aSmileyText, aLayout, aUseLogicalToVisualConversion ); + } +TInt CFormattedCellListBoxDataExtension::ConvertTextToSmiley( TDes& aText) + { + __ASSERT_DEBUG( iSmileyMan, Panic(EAknPanicObjectNotFullyConstructed)); + TInt count = 0; + TRAPD( err, count = iSmileyMan->ConvertTextToCodesL( aText )) ; + return err == KErrNone ? count : err; + } EXPORT_C CCoeControl *CFormattedCellListBoxData::Control() const { @@ -2191,6 +2241,7 @@ EXPORT_C void CFormattedCellListBoxData::Draw(TListItemProperties aProperties, CWindowGc& aGc,const TDesC* aText,const TRect& aRect,TBool aHighlight, const TColors& aColors) const { _AKNTRACE_FUNC_ENTER; + _AKNTRACE("Highlight width: %d, (%d,%d)", aRect.Width(), aRect.iTl.iX, aRect.iBr.iX ); DrawDefaultHighlight(aGc, aRect, aHighlight); // Draw the actual items. @@ -2207,8 +2258,8 @@ const TColors& aColors ) const { _AKNTRACE_FUNC_ENTER; - _AKNTRACE("DrawFormatted: aText=%S, aItemRect=(%d,%d,%d,%d)", - aText, aItemRect.iTl.iX, aItemRect.iTl.iY, aItemRect.iBr.iX, + _AKNTRACE("DrawFormatted: aItemRect=(%d,%d,%d,%d)", + aItemRect.iTl.iX, aItemRect.iTl.iY, aItemRect.iBr.iX, aItemRect.iBr.iY); CListBoxView* view = static_cast( iExtension->iControl )->View(); @@ -2236,7 +2287,8 @@ #else aGc.SetClippingRect( view->ViewRect() ); #endif //RD_UI_TRANSITION_EFFECTS_LIST - + TRect vr(view->ViewRect()); + _AKNTRACE("Clipping: Width %d, (%d,%d)", vr.Width(), vr.iTl.iX, vr.iBr.iX ); if ( UsesScalableLayoutData() ) { /* this is a AvKon list or list is created using methods in aknlists.cpp @@ -2337,8 +2389,8 @@ const TColors& aColors ) const { _AKNTRACE_FUNC_ENTER; - _AKNTRACE("DrawFormattedSimple: aText=%S, aItemRect=(%d,%d,%d,%d)", - aText, aItemRect.iTl.iX, aItemRect.iTl.iY, aItemRect.iBr.iX, + _AKNTRACE("DrawFormattedSimple: aItemRect=(%d,%d,%d,%d)", + aItemRect.iTl.iX, aItemRect.iTl.iY, aItemRect.iBr.iX, aItemRect.iBr.iY); TRect textRect(aItemRect); @@ -2427,7 +2479,7 @@ } // graphics or text column - if (iExtension->AtSL(SCindex).iSubCellType == CFormattedCellListBoxDataExtension::EAknSLText) + if (iExtension->SLAt(SCindex).iSubCellType == CFormattedCellListBoxDataExtension::EAknSLText) { const CFont* rowAndCellFont=RowAndSubCellFont(iExtension->iCurrentlyDrawnItemIndex,subcell); const CFont* cellFont=Font(aProperties, subcell); @@ -2443,7 +2495,7 @@ else { // check if there are icons affecting this text layout - TInt gSC = iExtension->AtSL(SCindex).iConditionValue; // graphical subcell which might affect this text subcell + TInt gSC = iExtension->SLAt(SCindex).iConditionValue; // graphical subcell which might affect this text subcell if (gSC > -1) { @@ -2454,16 +2506,16 @@ TextUtils::ColumnText(tempText,gSC, aText); if (tempText != KNullDesC) { - textLineLayout = iExtension->AtSL(tempIndex).iTextLayout; + textLineLayout = iExtension->SLAt(tempIndex).iTextLayout; break; } - gSC = iExtension->AtSL(tempIndex).iConditionValue; + gSC = iExtension->SLAt(tempIndex).iConditionValue; } } if (gSC == -1) // no affecting icons -> use default layout { - textLineLayout = iExtension->AtSL(SCindex).iTextLayout; + textLineLayout = iExtension->SLAt(SCindex).iTextLayout; } } @@ -2499,8 +2551,16 @@ SetUnderlineStyle( aProperties, aGc, subcell ); // * 2 == leave some room for marquee - const TInt maxlen( KMaxColumnDataLength * 2 ); + const TInt maxlen( KMaxColumnDataLength * 3 ); TBuf convBuf = text.Left(maxlen); + TBool smileyDraw = EFalse; + // do smiley convert before clipping. don't worry marquee now. + if ( iExtension->iSmileyMan && + iExtension->SLAt(SCindex).iSmileyCell && + iExtension->ConvertTextToSmiley( convBuf ) > 0 ) + { + smileyDraw = ETrue; + } // Note that this potentially modifies the text so its lenght in pixels // might increase. Therefore, this should always be done before @@ -2565,7 +2625,16 @@ marquee->Stop(); } + if ( smileyDraw ) + { + TRect tr(textLayout.TextRect()); + _AKNTRACE( "textLayout Width: %d (%d,%d)", tr.Width(), tr.iTl.iX, tr.iBr.iX ); + iExtension->DrawSmileyWithText( aGc, convBuf, textLayout, bidiConv, color ); + } + else + { textLayout.DrawText( aGc, convBuf, bidiConv, color ); + } } if ( iExtension->iPictoInterface ) @@ -2652,7 +2721,7 @@ index = index & 0xffff; // mask off possible highlight icon __ASSERT_DEBUG((index>=0 && indexCount()),Panic(EAknPanicFormattedCellListInvalidBitmapIndex)); - TAknWindowLineLayout graphicLayout = iExtension->AtSL(SCindex).iGraphicLayout; + TAknWindowLineLayout graphicLayout = iExtension->SLAt(SCindex).iGraphicLayout; TAknLayoutRect graphicRect; graphicRect.LayoutRect(textRect,graphicLayout); @@ -3406,9 +3475,9 @@ TInt index = 0; iExtension->FindSLSubCellIndexOrAddL(index,aSubCell); - iExtension->AtSL(index).iTextLayout=NULL; - iExtension->AtSL(index).iGraphicLayout=aGraphicLayout; - iExtension->AtSL(index).iSubCellType=CFormattedCellListBoxDataExtension::EAknSLGraphic; + iExtension->SLAt(index).iTextLayout=NULL; + iExtension->SLAt(index).iGraphicLayout=aGraphicLayout; + iExtension->SLAt(index).iSubCellType=CFormattedCellListBoxDataExtension::EAknSLGraphic; // For compabitility - needed at least for text wrapping. // Beware - some of these WILL be overriden if you got here trough @@ -3455,9 +3524,9 @@ TInt index = 0; iExtension->FindSLSubCellIndexOrAddL(index,aSubCell); - iExtension->AtSL(index).iTextLayout=aTextLayout; - iExtension->AtSL(index).iGraphicLayout=NULL; - iExtension->AtSL(index).iSubCellType=CFormattedCellListBoxDataExtension::EAknSLText; + iExtension->SLAt(index).iTextLayout=aTextLayout; + iExtension->SLAt(index).iGraphicLayout=NULL; + iExtension->SLAt(index).iSubCellType=CFormattedCellListBoxDataExtension::EAknSLText; // For compabitility - needed at least for text wrapping. @@ -3518,22 +3587,22 @@ TInt graphicalIndex = 0; if (iExtension->FindSLSubCellIndex(graphicalIndex, aSubCell)!=0) return; // subcell not found // conditional layoutline can be only added to graphical subcells - if (iExtension->AtSL(graphicalIndex).iSubCellType!=CFormattedCellListBoxDataExtension::EAknSLGraphic) return; + if (iExtension->SLAt(graphicalIndex).iSubCellType!=CFormattedCellListBoxDataExtension::EAknSLGraphic) return; TInt textIndex = 0; // index of affected subcell if (iExtension->FindSLSubCellIndex(textIndex, aAffectedSubCell)!=0) return; // subcell not found // affected subcell can only be text subcell - if (iExtension->AtSL(textIndex).iSubCellType==CFormattedCellListBoxDataExtension::EAknSLGraphic) return; + if (iExtension->SLAt(textIndex).iSubCellType==CFormattedCellListBoxDataExtension::EAknSLGraphic) return; - TInt gSC = iExtension->AtSL(textIndex).iConditionValue; // text subcell to be added in priority chain + TInt gSC = iExtension->SLAt(textIndex).iConditionValue; // text subcell to be added in priority chain while (gSC > -1) { if (iExtension->FindSLSubCellIndex(textIndex, gSC)!=0) return; // subcell not found - gSC = iExtension->AtSL(textIndex).iConditionValue; + gSC = iExtension->SLAt(textIndex).iConditionValue; } - iExtension->AtSL(textIndex).iConditionValue = aSubCell; // add next subcell to chain - iExtension->AtSL(graphicalIndex).iTextLayout=aTextLayout; + iExtension->SLAt(textIndex).iConditionValue = aSubCell; // add next subcell to chain + iExtension->SLAt(graphicalIndex).iTextLayout=aTextLayout; iExtension->CreateColorBitmapsL( SubCellSize( aSubCell ) ); @@ -3701,16 +3770,19 @@ TInt aNormalSubCell, TInt aStretchedSubCell ) { + _AKNTRACE_FUNC_ENTER; if ( Layout_Meta_Data::IsLandscapeOrientation() && Layout_Meta_Data::IsListStretchingEnabled() && StretchingEnabled() ) { + _AKNTRACE("Layout_Meta_Data::IsListStretchingEnabled"); SetConditionalSubCellL( aSubCell, aStretchedLayout.LayoutLine(), aStretchedSubCell ); } else { SetConditionalSubCellL( aSubCell, aNormalLayout.LayoutLine(), aNormalSubCell ); } + _AKNTRACE_FUNC_EXIT; } @@ -3903,9 +3975,9 @@ if ( aResults[subCell] ) { - if ( iExtension->AtSL( subCellIndex ).iSubCellType == CFormattedCellListBoxDataExtension::EAknSLText ) + if ( iExtension->SLAt( subCellIndex ).iSubCellType == CFormattedCellListBoxDataExtension::EAknSLText ) { - TAknTextLineLayout textLine = iExtension->AtSL( subCellIndex ).iTextLayout; + TAknTextLineLayout textLine = iExtension->SLAt( subCellIndex ).iTextLayout; textLine.iW = bRect.Width(); @@ -4576,7 +4648,25 @@ } return NULL; } - +void CFormattedCellListBoxData::InitSmileyL() + { + __ASSERT_DEBUG( iExtension, Panic( EAknPanicObjectNotFullyConstructed )); + if ( iExtension && !iExtension->iSmileyMan ) + { + iExtension->iSmileyMan = CAknSmileyManager::NewL( iExtension ); + } + } + +void CFormattedCellListBoxData::SetSmileySubCellL( TInt aSubCell ) + { + __ASSERT_DEBUG( iExtension, Panic( EAknPanicObjectNotFullyConstructed )); + TInt index = 0; + if ( iExtension ) + { + iExtension->FindSLSubCellIndexOrAddL( index,aSubCell ); + iExtension->SLAt(index).iSmileyCell = ETrue; + } + } #ifdef __ARMCC__ #pragma pop #endif // __ARMCC__ diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/srcdata/avkon.rss --- a/uifw/AvKon/srcdata/avkon.rss Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/srcdata/avkon.rss Wed Mar 31 21:59:52 2010 +0300 @@ -2108,7 +2108,26 @@ narrowbmpmask = EMbmAvkonQgn_stat_hdmi_connect_mask; }; }; - } + }, + + INDICATOR + { + uid = EAknIndicatorIntegratedIM; + npriority = 41; + wpriority = 41; + bmpfile = AVKON_BITMAP_FILE; + states = INDICATOR_STATE + { + id = EAknIndicatorStateOn; + icons = INDICATOR_ICON + { + widebmpid = EMbmAvkonQgn_stat_joint_im_uni; + widebmpmask = EMbmAvkonQgn_stat_joint_im_uni_mask; + narrowbmpid = EMbmAvkonQgn_stat_joint_im_uni; + narrowbmpmask = EMbmAvkonQgn_stat_joint_im_uni_mask; + }; + }; + } }; } @@ -9758,6 +9777,11 @@ { indicator_uid = EAknIndicatorMissedCalendarAlarm; text = qtn_uni_ind_caled_alarm_stat; + }, + AVKON_INDICATOR_POPUP_ITEM + { + indicator_uid = EAknIndicatorIntegratedIM; + text = qtn_iim_uni_ind_default; } }; } diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/group/bctestmixmcl.rss --- a/uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/group/bctestmixmcl.rss Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/group/bctestmixmcl.rss Wed Mar 31 21:59:52 2010 +0300 @@ -261,6 +261,68 @@ } }; } + +//---------------------------------------------------------------------------- +// +//r_bctestmixmcl_radiobutton_editor +// +//---------------------------------------------------------------------------- +// +RESOURCE POPUP_SETTING_LIST r_bctestmixmcl_radiobutton_editor + { + flags = 0; + } + +//---------------------------------------------------------------------------- +// +//r_bctestmixmcl_radiobutton_setting_page +// +//---------------------------------------------------------------------------- +// +RESOURCE AVKON_SETTING_PAGE r_bctestmixmcl_radiobutton_setting_page + { + label = "Radiobutton example"; + type = EAknCtPopupSettingList; + editor_resource_id = r_bctestmixmcl_radiobutton_editor; + } + +// --------------------------------------------------------------------------- +// r_bctestmixmcl_popup_editor +// --------------------------------------------------------------------------- +// +RESOURCE POPUP_SETTING_LIST r_bctestmixmcl_popup_editor + { + flags = EAknPopupSettingListFlagAllowsUserDefinedEntry; + width = 20; + } + +// --------------------------------------------------------------------------- +// r_bctestmixmcl_popup_setting_page +// --------------------------------------------------------------------------- +// +RESOURCE AVKON_SETTING_PAGE r_bctestmixmcl_popup_setting_page + { + number = 1; + label = "Popup example"; + type = EAknCtPopupSettingList; + editor_resource_id = r_bctestmixmcl_popup_editor; + } + +// --------------------------------------------------------------------------- +// r_bctestmixmcl_list_item_array +// --------------------------------------------------------------------------- +// +RESOURCE ARRAY r_bctestmixmcl_list_item_array + { + items = + { + LBUF + { + txt = "item1"; + } + }; + } + // End of File diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/inc/bctestmixmclgeneralcase.h --- a/uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/inc/bctestmixmclgeneralcase.h Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/inc/bctestmixmclgeneralcase.h Wed Mar 31 21:59:52 2010 +0300 @@ -20,6 +20,7 @@ #include #include +#include #include "bctestcase.h" @@ -32,7 +33,8 @@ */ class CBCTestMixMCLGeneralCase: public CBCTestCase, public MAknLongTapDetectorCallBack, - public MAknPhysicsObserver + public MAknPhysicsObserver, + public MAknItemFinderObserver { public: // constructor and destructor @@ -105,8 +107,7 @@ /* * Test one function in class AknPopupUtils */ - void TestAknPopupUtils(); - + void TestAknPopupUtilsL(); /* * Test one function in class AknListUtils */ @@ -115,7 +116,17 @@ /* * Test new APIs in CAknToolbar */ - void TestAknToolbar(); + void TestAknToolbarL(); + + /* + * Test ProcessCommandL in AknRadioButtonSettingPage + */ + void TestRadioButtonSettingPageL(); + + /* + * Test ProcessCommandL in AknPopupSettingPage + */ + void TestPopupSettingPageL(); /* * Tests editor's kinetic scrolling related functions. @@ -135,7 +146,17 @@ /* * Tests CBA APIs. */ - void TestCba(); + void TestCbaL(); + + /* + * Tests common dialogs APIs. + */ + void TestCommonDialogsL(); + + /* + * Tests ItemFinder. + */ + void TestItemFinder(); protected: // From base class MAknPhysicsObserver @@ -162,6 +183,18 @@ * @return Physics observer view position. */ TPoint ViewPosition() const; + + // From MAknItemFinderObserver + + /** + * Handles the activation event. + * + * @param aItem Activated item. + * @param aEvent Activation method. + * @param aFlags Additional information about the event. + */ + void HandleFindItemEventL( const CItemFinder::CFindItemExt& aItem, + MAknItemFinderObserver::TEventFlag aEvent, TUint aFlags); private: // constructor diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/src/bctestmixmclgeneralcase.cpp --- a/uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/src/bctestmixmclgeneralcase.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/src/bctestmixmclgeneralcase.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -25,17 +25,31 @@ #include #include #include +#include +#include #include #include #include +#include +#include +#include #include "bctestmixmclgeneralcase.h" #include "bctestmixmclcontainer.h" #include "bctestmixmcl.hrh" -// CONSTATNS +// CONSTANTS +// +// class CSettingPageTest +// Helper class for testing protected setting page methods. +// +NONSHARABLE_CLASS( CSettingPageTest ) : public CAknSettingPage + { +public: + virtual void ProcessCommandL( TInt aCommandId ); + }; // ======== MEMBER FUNCTIONS ======== @@ -110,13 +124,17 @@ TestOptionsMenuL(); TestTasObjectInfoAndTasHookL(); TestMiscApisFuncOneL(); - TestAknToolbar(); - TestAknPopupUtils(); + TestAknToolbarL(); + TestAknPopupUtilsL(); TestAknListUtilsL(); + TestRadioButtonSettingPageL(); + TestPopupSettingPageL(); + TestItemFinder(); TestEditorKineticScrollingL(); TestAknPhysicsSuspendPhysicsL(); TestAknPhysicsResumePhysicsL(); - TestCba(); + TestCbaL(); + TestCommonDialogsL(); } // --------------------------------------------------------------------------- @@ -189,7 +207,7 @@ _LIT( KItemsInSingleLine, "CEikListBox::ItemsInSingleLine() invoked" ); - CEikFormattedCellListBox * listbox = new CEikFormattedCellListBox(); + CEikFormattedCellListBox * listbox = new (ELeave) CEikFormattedCellListBox(); CleanupStack::PushL( listbox ); listbox->ConstructL( iContainer, EAknListBoxSelectionList ); @@ -341,10 +359,10 @@ } // --------------------------------------------------------------------------- -// CBCTestMixMCLGeneralCase::TestAknPopupUtils +// CBCTestMixMCLGeneralCase::TestAknPopupUtilsL // --------------------------------------------------------------------------- // -void CBCTestMixMCLGeneralCase::TestAknPopupUtils() +void CBCTestMixMCLGeneralCase::TestAknPopupUtilsL() { TSize size( 10, 10 ); TPoint point( AknPopupUtils::Position( size, ETrue ) ); @@ -384,10 +402,10 @@ // --------------------------------------------------------------------------- -// CBCTestMixMCLGeneralCase::TestAknToolbar +// CBCTestMixMCLGeneralCase::TestAknToolbarL // --------------------------------------------------------------------------- // -void CBCTestMixMCLGeneralCase::TestAknToolbar() +void CBCTestMixMCLGeneralCase::TestAknToolbarL() { _LIT( KAknToolbarNew, "CAknToolbar::New toolbar is constructed" ); _LIT( KAknToolbarSetBgId, "CAknToolbar::New background skin theme ID is set" ); @@ -402,6 +420,93 @@ } +// ----------------------------------------------------------------------------- +// CBCTestMixMCLGeneralCase::TestRadioButtonSettingPageL +// ----------------------------------------------------------------------------- +// +void CBCTestMixMCLGeneralCase::TestRadioButtonSettingPageL() + { + const TInt KBufSize = 32; + const TInt KZero = 0; + const TInt KOne = 1; + const TInt KTwo = 2; + _LIT( KTestString, "Radiobuttonsettingpage test" ); + _LIT( KTestRadioButtonSettingPage, + "CAknRadioButtonSettingPage::ProcessCommandL tested" ); + + CDesCArrayFlat* array = CCoeEnv::Static()-> + ReadDesCArrayResourceL( R_BCTESTMIXMCL_LIST_ITEM_ARRAY ); + CleanupStack::PushL( array ); + + TInt optin( KZero ); + TBuf< KBufSize > buffer( KTestString ); + CAknRadioButtonSettingPage* settingPage = new (ELeave) + CAknRadioButtonSettingPage( &buffer, KOne, EAknCtPopupSettingList, + R_BCTESTMIXMCL_RADIOBUTTON_EDITOR, + R_BCTESTMIXMCL_RADIOBUTTON_SETTING_PAGE, + optin, array ); + CleanupStack::PushL( settingPage ); + + settingPage->ConstructL(); + + // CSettingPageTest is used to access protected method + // CAknRadioButtonSettingPage::ProcessCommandL + CSettingPageTest* test = reinterpret_cast( settingPage ); + + CCoeEnv::Static()->AppUi()->AddToStackL( test ); + test->ProcessCommandL( EAknSoftkeySelect ); + CCoeEnv::Static()->AppUi()->RemoveFromStack( test ); + + CleanupStack::PopAndDestroy( KTwo ); + AssertTrueL( ETrue, KTestRadioButtonSettingPage ); + } + +// ----------------------------------------------------------------------------- +// CBCTestMixMCLGeneralCase::TestPopupSettingPageL +// ----------------------------------------------------------------------------- +// +void CBCTestMixMCLGeneralCase::TestPopupSettingPageL() + { + _LIT( KTestPopupSettingPage, + "CAknPopupSettingPage::ProcessCommandL tested" ); + + CDesCArrayFlat* item = CCoeEnv::Static()-> + ReadDesCArrayResourceL( R_BCTESTMIXMCL_LIST_ITEM_ARRAY ); + CleanupStack::PushL( item ); + + CAknQueryValueTextArray* textArray = CAknQueryValueTextArray::NewL(); + CleanupStack::PushL( textArray ); + textArray->SetArray( *item ); + + CAknQueryValueText* queryValueText = CAknQueryValueText::NewL(); + CleanupStack::PushL( queryValueText ); + queryValueText->SetArrayL( textArray ); + + CAknPopupSettingPage* popupSettingPage = new (ELeave) + CAknPopupSettingPage( R_BCTESTMIXMCL_POPUP_SETTING_PAGE, + *queryValueText ); + + CleanupStack::PushL( popupSettingPage ); + + popupSettingPage->ConstructL(); + + // CSettingPageTest is used to access protected method + // CAknPopupSettingPage::ProcessCommandL + CSettingPageTest* test = reinterpret_cast( popupSettingPage ); + + CCoeEnv::Static()->AppUi()->AddToStackL( popupSettingPage ); + test->ProcessCommandL( EAknSoftkeySelect ); + CCoeEnv::Static()->AppUi()->RemoveFromStack( popupSettingPage ); + + CleanupStack::PopAndDestroy( popupSettingPage ); + CleanupStack::PopAndDestroy( queryValueText ); + CleanupStack::PopAndDestroy( textArray ); + CleanupStack::PopAndDestroy( item ); + + AssertTrueL( ETrue, KTestPopupSettingPage ); + } + + // --------------------------------------------------------------------------- // CBCTestMixMCLGeneralCase::TestEditorKineticScrollingL // --------------------------------------------------------------------------- @@ -451,10 +556,10 @@ } // --------------------------------------------------------------------------- -// CBCTestMixMCLGeneralCase::TestCba +// CBCTestMixMCLGeneralCase::TestCbaL // --------------------------------------------------------------------------- // -void CBCTestMixMCLGeneralCase::TestCba() +void CBCTestMixMCLGeneralCase::TestCbaL() { CEikCba* cba = static_cast( iAvkonAppUi->Cba()->ButtonGroup()->AsControl() ); @@ -464,6 +569,37 @@ "CEikCba::EnableItemSpecificSoftkey tested" ); AssertTrueL( ETrue, CEikCbaEnableItemSpecificSoftkey ); } + +// --------------------------------------------------------------------------- +// CBCTestMixMCLGeneralCase::TestCommonDialogsL() +// common file test +// --------------------------------------------------------------------------- +// +void CBCTestMixMCLGeneralCase::TestCommonDialogsL() + { + _LIT( KSetIncludedMediasL, + "CAknMemorySelectionSettingItemMultiDrive::SetIncludedMediasL()invoked"); + + TInt id = 1; + TDriveNumber selDr = EDriveC; + + CAknMemorySelectionSettingItemMultiDrive* settingItem = + new ( ELeave ) CAknMemorySelectionSettingItemMultiDrive( + id, selDr ); + CleanupStack::PushL( settingItem ); + + TInt includedMedias = AknCommonDialogsDynMem:: EMemoryTypePhone | + AknCommonDialogsDynMem:: EMemoryTypeMMC | + AknCommonDialogsDynMem:: EMemoryTypeRemote; + + settingItem->SetIncludedMediasL( includedMedias ); + AssertTrueL( ETrue, KSetIncludedMediasL ); + + includedMedias &= (~AknCommonDialogsDynMem:: EMemoryTypePhone ); + settingItem->SetIncludedMediasL( includedMedias ); + + CleanupStack::PopAndDestroy( settingItem ); + } // --------------------------------------------------------------------------- // CBCTestMixMCLGeneralCase::ViewPositionChanged @@ -493,5 +629,36 @@ return TPoint( 0, 0 ); } +// ----------------------------------------------------------------------------- +// CBCTestMixMCLGeneralCase::TestItemFinder +// ----------------------------------------------------------------------------- +// +void CBCTestMixMCLGeneralCase::TestItemFinder() + { + _LIT( KSetItemFinderObserverL, + "CItemFinder::SetItemFinderObserverL() tested" ); + + CItemFinder* itemfinder = CItemFinder::NewL(); + CleanupStack::PushL ( itemfinder ); + + itemfinder->SetItemFinderObserverL( this ); + itemfinder->SetItemFinderObserverL( 0 ); + AssertTrueL( ETrue, KSetItemFinderObserverL ); + + CleanupStack::PopAndDestroy( itemfinder ); + } + + +// --------------------------------------------------------------------------- +// CBCTestMixMCLGeneralCase::HandleFindItemEventL +// --------------------------------------------------------------------------- +// +void CBCTestMixMCLGeneralCase::HandleFindItemEventL( + const CItemFinder::CFindItemExt& /*aItem*/, + MAknItemFinderObserver::TEventFlag /*aEvent*/, TUint /*aFlags*/) + { + // do nothing + } + //end of file diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/tsrc/bc/bctestdom3.2/bctestdomaiwakn/sis/bctestdomaiwakn.pkg Binary file uifw/AvKon/tsrc/bc/bctestdom3.2/bctestdomaiwakn/sis/bctestdomaiwakn.pkg has changed diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/AvKon/tsrc/bc/bctestdom5.0/bctestdomaiwakn/sis/bctestdomaiwakn.pkg Binary file uifw/AvKon/tsrc/bc/bctestdom5.0/bctestdomaiwakn/sis/bctestdomaiwakn.pkg has changed diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/EikStd/EABI/EIKCOCTLU.DEF --- a/uifw/EikStd/EABI/EIKCOCTLU.DEF Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/EikStd/EABI/EIKCOCTLU.DEF Wed Mar 31 21:59:52 2010 +0300 @@ -2008,4 +2008,5 @@ _ZNK11CEikListBox17ItemsInSingleLineEv @ 2007 NONAME _ZN18CEikStatusPaneBase17EnableTransparentEi @ 2008 NONAME _ZNK18CEikStatusPaneBase13IsTransparentEv @ 2009 NONAME + _ZN9CEikEdwin23EnableKineticScrollingLEP11CAknPhysics @ 2010 NONAME diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/EikStd/bwins/EIKCOCTLU.DEF --- a/uifw/EikStd/bwins/EIKCOCTLU.DEF Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/EikStd/bwins/EIKCOCTLU.DEF Wed Mar 31 21:59:52 2010 +0300 @@ -1619,3 +1619,4 @@ ?ItemsInSingleLine@CEikListBox@@QBEHXZ @ 1618 NONAME ; int CEikListBox::ItemsInSingleLine(void) const ?EnableTransparent@CEikStatusPaneBase@@QAEXH@Z @ 1619 NONAME ; void CEikStatusPaneBase::EnableTransparent(int) ?IsTransparent@CEikStatusPaneBase@@QBEHXZ @ 1620 NONAME ; int CEikStatusPaneBase::IsTransparent(void) const + ?EnableKineticScrollingL@CEikEdwin@@QAEXPAVCAknPhysics@@@Z @ 1621 NONAME ; void CEikEdwin::EnableKineticScrollingL(class CAknPhysics *) diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/EikStd/coctlinc/aknedwinphysicshandler.h --- a/uifw/EikStd/coctlinc/aknedwinphysicshandler.h Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/EikStd/coctlinc/aknedwinphysicshandler.h Wed Mar 31 21:59:52 2010 +0300 @@ -46,6 +46,17 @@ * Two-phased constructor. */ static CAknEdwinPhysicsHandler* NewLC( CEikEdwin& aEdwin ); + + /** + * Two-phased constructor. + */ + static CAknEdwinPhysicsHandler* NewL( CEikEdwin& aEdwin, CAknPhysics* aPhysics ); + + /** + * Two-phased constructor. + */ + static CAknEdwinPhysicsHandler* NewLC( CEikEdwin& aEdwin, CAknPhysics* aPhysics ); + /** * Destructor. */ @@ -164,7 +175,7 @@ /** * C++ constructor. */ - CAknEdwinPhysicsHandler( CEikEdwin& aEdwin ); + CAknEdwinPhysicsHandler( CEikEdwin& aEdwin, CAknPhysics* aPhysics = NULL ); /** * Symbian second-phase constructor. @@ -354,6 +365,11 @@ * Start position of drag. */ TPoint iStartPosition; + + /** + * ETrue if this class owns CAknPhysics instance. + */ + TBool iOwnsPhysics; }; #endif // C_AKNEDWINPHYSICSHANDLER_H diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/EikStd/coctlsrc/EIKEDWIN.CPP --- a/uifw/EikStd/coctlsrc/EIKEDWIN.CPP Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/EikStd/coctlsrc/EIKEDWIN.CPP Wed Mar 31 21:59:52 2010 +0300 @@ -1134,23 +1134,23 @@ // --------------------------------------------------------------------------- // CEikEdwin::CEikEdwinExtension::EnableKineticScrollingL // --------------------------------------------------------------------------- -// -void CEikEdwin::CEikEdwinExtension::EnableKineticScrollingL() +// +void CEikEdwin::CEikEdwinExtension::EnableKineticScrollingL( CAknPhysics* aPhysics ) { iFlags.Set( EKineticScrollingEnabled ); - EnablePhysicsL(); + EnablePhysicsL( aPhysics ); } // --------------------------------------------------------------------------- // CEikEdwin::CEikEdwinExtension::EnablePhysicsL // --------------------------------------------------------------------------- // -void CEikEdwin::CEikEdwinExtension::EnablePhysicsL() +void CEikEdwin::CEikEdwinExtension::EnablePhysicsL( CAknPhysics* aPhysics ) { if ( iFlags.IsSet( EKineticScrollingEnabled ) && !iPhysicsHandler && iEdwin->DrawableWindow() ) { - iPhysicsHandler = CAknEdwinPhysicsHandler::NewL( *iEdwin ); + iPhysicsHandler = CAknEdwinPhysicsHandler::NewL( *iEdwin, aPhysics ); InitPhysicsL(); if ( iEdwin->iLayout ) @@ -2876,18 +2876,12 @@ ( ( aPointerEvent.iType == TPointerEvent::EDrag ) || ( aPointerEvent.iType == TPointerEvent::EButtonRepeat ) ) ) { - - // selectionAfter.iCursorPos-1 below is because we need to select the previous char - TBool ltr = ( selectionAfter.iCursorPos >= selectionBefore.iCursorPos ); - TInt readPos = selectionAfter.iCursorPos; - if (ltr && readPos > 0) - { - readPos -= 1; // read previous char - } + TInt readPos = ( selectionAfter.iCursorPos >= selectionBefore.iCursorPos ) ? + selectionBefore.iCursorPos : selectionAfter.iCursorPos ; TChar currentSelectedChar = Text()->Read( readPos, 1 )[0]; TBool isSpace = currentSelectedChar.IsSpace(); - TBool isText = currentSelectedChar.IsAlpha() - || currentSelectedChar.IsDigit(); + TBool isSmiley = CSmileyManager::IsSmileyCode(currentSelectedChar); + TBool isText = currentSelectedChar.IsGraph(); // case line TInt prevLineNr = TextLayout()->GetLineNumber(selectionBefore.iCursorPos); @@ -2906,7 +2900,7 @@ iEdwinFepSupport->iFeedback->InstantFeedback( this, ETouchFeedbackBlankSelection ); } // case text - else if (isText) + else if ( isText || isSmiley ) { iEdwinFepSupport->iFeedback->InstantFeedback( this, ETouchFeedbackTextSelection ); } @@ -4833,6 +4827,7 @@ if (reportChange) { + iEdwinExtension->iThumbPos = KErrNotFound; ReportEdwinEventL( MEikEdwinObserver::EEventTextUpdate ); DoReportEventL( MCoeControlObserver::EEventStateChanged ); NotifyEditorStateObserverOfStateChangeL(); @@ -8052,7 +8047,15 @@ { if ( iEdwinExtension && aEnable ) { - iEdwinExtension->EnableKineticScrollingL(); + iEdwinExtension->EnableKineticScrollingL( NULL ); + } + } + +EXPORT_C void CEikEdwin::EnableKineticScrollingL( CAknPhysics* aPhysics ) + { + if ( iEdwinExtension ) + { + iEdwinExtension->EnableKineticScrollingL( aPhysics ); } } @@ -8573,8 +8576,8 @@ TChar::TCategory category = character.GetCategory(); - if ( !((category&TChar::ESeparatorGroup == TChar::ESeparatorGroup) || - (text[i]>=0x200B && text[i]<=0xFFFC)) ) + if ( !( ( ( category & TChar::ESeparatorGroup ) == TChar::ESeparatorGroup ) || + ( text[i] >= 0x200B && text[i] <= 0xFFFC ) ) ) { ret = ETrue; break; diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/EikStd/coctlsrc/EIKLBI.CPP --- a/uifw/EikStd/coctlsrc/EIKLBI.CPP Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/EikStd/coctlsrc/EIKLBI.CPP Wed Mar 31 21:59:52 2010 +0300 @@ -38,7 +38,7 @@ #include "laflbx.h" #include "akntrace.h" -const TUint KListItemDrawerAllowedFlags = 0x00ff; +const TUint KListItemDrawerAllowedFlags = 0x0fff; const TInt KDefaultMarkColumnWidth = 10; const TInt KDefaultMarkGutter = 2; diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/EikStd/coctlsrc/EIKLBX.CPP --- a/uifw/EikStd/coctlsrc/EIKLBX.CPP Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/EikStd/coctlsrc/EIKLBX.CPP Wed Mar 31 21:59:52 2010 +0300 @@ -944,7 +944,6 @@ { EnableHighlight( EFalse ); iListBox.iView->DrawItem( iLongTappedItem ); - iListBox.iView->SetCurrentItemIndex( 0 ); iLongTappedItem = KErrNotFound; } } @@ -2101,7 +2100,7 @@ { if ( iListBoxExt && iListBoxExt->iSingleClickEnabled ) { - // is single click is enabled, highlight must also be visible + // If single click is enabled, highlight must also be visible if ( iListBoxExt->CollectionState() & MAknCollection::EStateHighlightVisible ) { @@ -2402,7 +2401,7 @@ iView->SetDisableRedraw(redrawDisabled); if ( iListBoxExt && iListBoxExt->iPhysics && aItemIndex == 0 ) - { + { iView->SetItemOffsetInPixels( 0 ); } _AKNTRACE_FUNC_EXIT; @@ -3094,6 +3093,12 @@ UpdateScrollBarThumbs(); iView->ClearFlags(CListBoxView::EItemCountModified); + + if ( iListBoxExt->iLongTappedItem != KErrNotFound ) + { + iListBoxExt->EnableHighlight( EFalse ); + } + FireItemChange(); if ( iListBoxExt && iListBoxExt->iPhysics ) @@ -4693,13 +4698,6 @@ { iListBoxExt->iFeedbackType = ETouchFeedbackList; } - - if ( !iListBoxExt->iPhysics || itemIndex == iView->CurrentItemIndex() ) - { - iListBoxExt->ImmediateFeedback( iListBoxExt->iFeedbackType, - TTouchFeedbackType(ETouchFeedbackVibra | ETouchFeedbackAudio), - aPointerEvent ); - } } iListBoxExt->iEventModifiers = aPointerEvent.iModifiers; CListBoxView::TSelectionMode selectionMode = CListBoxView::ENoSelection; @@ -5809,11 +5807,6 @@ { Window().Invalidate( TRect( View()->ItemPos(index), View()->ItemSize() ) ); - if( iItemDrawer->Flags() & - CListItemDrawer::ESingleClickDisabledHighlight ) - { - iView->SetCurrentItemIndex( 0 ); - } } break; } diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/EikStd/coctlsrc/EIKMENUP.CPP --- a/uifw/EikStd/coctlsrc/EIKMENUP.CPP Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/EikStd/coctlsrc/EIKMENUP.CPP Wed Mar 31 21:59:52 2010 +0300 @@ -68,7 +68,7 @@ #include #include #include -#include +#include #include "aknitemactionmenudata.h" #include "akntrace.h" @@ -4000,7 +4000,7 @@ { RepaintHighlight(); } - else if ( highlightWasEnabled ) + else if ( highlightWasEnabled && !iCascadeMenuPane ) { DrawItem( SelectedItem(), ENoHighlight ); } @@ -4337,7 +4337,9 @@ } else { - ReportCanceled(); //Close main menu. + _AKNTRACE( "[%s]", "HandlePointerEventL return 12.5" ); + _AKNTRACE_FUNC_EXIT; + return; } } } diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/EikStd/coctlsrc/EIKSCRLB.CPP --- a/uifw/EikStd/coctlsrc/EIKSCRLB.CPP Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/EikStd/coctlsrc/EIKSCRLB.CPP Wed Mar 31 21:59:52 2010 +0300 @@ -2352,6 +2352,47 @@ TRect area; + if ( iParentControl ) + { + CCoeControl* windowOwningParent = iParentControl; + while ( windowOwningParent && !windowOwningParent->OwnsWindow() ) + { + windowOwningParent = windowOwningParent->Parent(); + } + + if ( windowOwningParent ) + { + TInt xGap = 0; + TRect scrollBarRect = Rect(); + TRect parentRect = windowOwningParent->Rect(); + + if ( OwnsWindow() ) + { + scrollBarRect.Move( Position().iX - + windowOwningParent->Position().iX, 0 ); + } + + // left to right layout in use + if ( !AknLayoutUtils::LayoutMirrored() ) + { + xGap = parentRect.iBr.iX - scrollBarRect.iBr.iX; + if ( Abs( xGap ) < scrollBarRect.Width() ) + { + extension.iBr.iX += xGap; + } + } + // right to left layout in use + else + { + xGap = parentRect.iTl.iX - scrollBarRect.iTl.iX; + if ( Abs( xGap ) < scrollBarRect.Width() ) + { + extension.iTl.iX += xGap; + } + } + } + } + if ( iOrientation == CEikScrollBar::EVertical ) { area.iTl.iX = extension.iTl.iX - scrollbar.iTl.iX; diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/EikStd/coctlsrc/aknedwincustomdrawbase.cpp --- a/uifw/EikStd/coctlsrc/aknedwincustomdrawbase.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/EikStd/coctlsrc/aknedwincustomdrawbase.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -37,8 +37,9 @@ // CONSTANTS // This is the last character that will be treated as requiring higher underline -// const TText KMaxSpecialUnderliningChar = 0x0E5B; + const TInt KWsBufferSize = 16000; +const TInt KOneHundred = 100; // MEMBER FUNCTIONS @@ -78,8 +79,6 @@ iPictographDrawer = CAknPictographInterface::NewL( static_cast( const_cast( iEdwin ) ), *static_cast( this ) ); - - iSkinInstance = AknsUtils::SkinInstance(); } // ----------------------------------------------------------------------------- @@ -94,7 +93,7 @@ new( ELeave ) CAknEdwinCustomDrawBase( aEnv, aControl ); CleanupStack::PushL( self ); self->ConstructL(); - CleanupStack::Pop(); + CleanupStack::Pop( self ); return self; } @@ -113,7 +112,7 @@ aEnv, aControl, aTextView, aSystemGc ); CleanupStack::PushL( self ); self->ConstructL(); - CleanupStack::Pop(); + CleanupStack::Pop( self ); return self; } @@ -167,7 +166,7 @@ aExtraPixels = 0; TInt underlinePos(0); - (void)TextNeedsCustomUnderline( aText, aParam, aFormat, underlinePos ) ; + TextNeedsCustomUnderline( aText, aParam, aFormat, underlinePos ) ; // always perform custom underlining TRect underlineRect(aParam.iDrawRect); @@ -318,53 +317,56 @@ } -TRgb CAknEdwinCustomDrawBase::SystemColor(TUint aColorIndex,TRgb aDefaultColor) const +TRgb CAknEdwinCustomDrawBase::SystemColor( TUint aColorIndex, TRgb aDefaultColor ) const { TRgb ret = aDefaultColor; + MAknsSkinInstance* skin = AknsUtils::SkinInstance(); if (aColorIndex==TLogicalRgb::ESystemForegroundIndex) { - if (iSkinInstance && iEdwin.SkinColorId() != KErrNotFound) + if ( skin && iEdwin.SkinColorId() != KErrNotFound ) { - AknsUtils::GetCachedColor(iSkinInstance, ret, KAknsIIDQsnTextColors, iEdwin.SkinColorId()); + AknsUtils::GetCachedColor( skin, ret, KAknsIIDQsnTextColors, + iEdwin.SkinColorId() ); } } - else if (aColorIndex==TLogicalRgb::ESystemBackgroundIndex) + else if ( aColorIndex==TLogicalRgb::ESystemBackgroundIndex ) { // Only override aDefaultColor if SetBackgroundColorL was called: - (void)iEdwin.EditorBackgroundColor(ret); + iEdwin.EditorBackgroundColor( ret ); // Insist on opaque background - ret.SetAlpha(0xFF); + ret.SetAlpha( 0xFF ); } - else if (aColorIndex==TLogicalRgb::ESystemSelectionForegroundIndex) { ret = KRgbWhite; - - if (iSkinInstance) + if ( skin ) { if ( iEdwin.HighlightStyle() == EEikEdwinHighlightLink ) { - AknsUtils::GetCachedColor(iSkinInstance, ret, KAknsIIDQsnHighlightColors, EAknsCIQsnTextColorsCG3); + AknsUtils::GetCachedColor( skin, ret, KAknsIIDQsnHighlightColors, + EAknsCIQsnTextColorsCG3 ); } else // default { - AknsUtils::GetCachedColor(iSkinInstance, ret, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG24); + AknsUtils::GetCachedColor( skin, ret, KAknsIIDQsnTextColors, + EAknsCIQsnTextColorsCG24 ); } } } - else if (aColorIndex==TLogicalRgb::ESystemSelectionBackgroundIndex) + else if ( aColorIndex==TLogicalRgb::ESystemSelectionBackgroundIndex ) { ret = KRgbBlue; - - if (iSkinInstance) + if ( skin ) { if ( iEdwin.HighlightStyle() == EEikEdwinHighlightLink ) { - AknsUtils::GetCachedColor(iSkinInstance, ret, KAknsIIDQsnHighlightColors, EAknsCIQsnTextColorsCG1); + AknsUtils::GetCachedColor( skin, ret, KAknsIIDQsnHighlightColors, + EAknsCIQsnTextColorsCG1 ); } else // default { - AknsUtils::GetCachedColor(iSkinInstance, ret, KAknsIIDQsnHighlightColors, EAknsCIQsnHighlightColorsCG2); + AknsUtils::GetCachedColor( skin, ret, KAknsIIDQsnHighlightColors, + EAknsCIQsnHighlightColorsCG2 ); } } } @@ -401,17 +403,21 @@ #endif //RD_UI_TRANSITION_EFFECTS_POPUPS if ( bitmapGc && iEdwin.SkinEnabled() ) { - if ( AknsDrawUtils::DrawBackground( - iSkinInstance, - iEdwin.SkinBackgroundControlContext(), - &iControl, - *bitmapGc, - aRect.iTl, - aRect, - KAknsDrawParamNoClearUnderImage ) ) + MAknsSkinInstance* skin = AknsUtils::SkinInstance(); + if ( skin ) { - aDrawnRect = aRect; - drawn = ETrue; + if ( AknsDrawUtils::DrawBackground( + skin, + iEdwin.SkinBackgroundControlContext(), + &iControl, + *bitmapGc, + aRect.iTl, + aRect, + KAknsDrawParamNoClearUnderImage ) ) + { + aDrawnRect = aRect; + drawn = ETrue; + } } } else @@ -715,7 +721,8 @@ } } - maxPercentOfALineDrawn = Max( maxPercentOfALineDrawn, (lengthDrawnOnThisLine * 100 )/aUnderlineRect.Width() ); + maxPercentOfALineDrawn = Max( maxPercentOfALineDrawn, + ( lengthDrawnOnThisLine * KOneHundred )/aUnderlineRect.Width() ); } // end of for loop over rows util.End(); diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/EikStd/coctlsrc/aknedwinphysicshandler.cpp --- a/uifw/EikStd/coctlsrc/aknedwinphysicshandler.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/EikStd/coctlsrc/aknedwinphysicshandler.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -52,12 +52,39 @@ } // --------------------------------------------------------------------------- +// CAknEdwinPhysicsHandler::NewL +// --------------------------------------------------------------------------- +// +CAknEdwinPhysicsHandler* CAknEdwinPhysicsHandler::NewL( CEikEdwin& aEdwin, CAknPhysics* aPhysics ) + { + CAknEdwinPhysicsHandler* self = CAknEdwinPhysicsHandler::NewLC( aEdwin, aPhysics ); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// CAknEdwinPhysicsHandler::NewLC +// --------------------------------------------------------------------------- +// +CAknEdwinPhysicsHandler* CAknEdwinPhysicsHandler::NewLC( CEikEdwin& aEdwin, CAknPhysics* aPhysics ) + { + CAknEdwinPhysicsHandler* self = new ( ELeave ) CAknEdwinPhysicsHandler( + aEdwin, aPhysics ); + CleanupStack::PushL( self ); + self->ConstructL(); + return self; + } + +// --------------------------------------------------------------------------- // CAknEdwinPhysicsHandler::~CAknEdwinPhysicsHandler // --------------------------------------------------------------------------- // CAknEdwinPhysicsHandler::~CAknEdwinPhysicsHandler() { - delete iPhysics; + if (iOwnsPhysics) + { + delete iPhysics; + } } // --------------------------------------------------------------------------- @@ -67,70 +94,72 @@ void CAknEdwinPhysicsHandler::HandlePointerEvent( const TPointerEvent& aPointerEvent ) { - if ( aPointerEvent.iType == TPointerEvent::EButton1Down && - iViewRect.Contains( aPointerEvent.iPosition ) && - iEventUnblockingAllowed ) - { - BlockEvents( EFalse ); - iPreviousYCoordinate = - KMaxWorldSize; - } - if ( iEventsBlocked ) - { - return; - } - - // Dragging/flicking logic - - if ( aPointerEvent.iType == TPointerEvent::EButton1Down && - iViewRect.Contains( aPointerEvent.iPosition ) ) + if (iOwnsPhysics) { - // Pointer down inside view rect, set flag to allow dragging - // and initialize values - iFlags.Set( EFlagDraggingAllowed ); - iStartPosition = aPointerEvent.iPosition; - StopPhysics(); - - iStartTime.HomeTime(); - iDragThresholdExceeded = EFalse; - iFlags.Clear( EFlagBouncingUp ); - iFlags.Clear( EFlagBouncingDown ); - return; - } - if ( iFlags.IsClear( EFlagDraggingAllowed ) ) - { - return; - } - - if ( aPointerEvent.iType == TPointerEvent::EDrag ) - { - if ( !iDragThresholdExceeded ) + if ( aPointerEvent.iType == TPointerEvent::EButton1Down && + iViewRect.Contains( aPointerEvent.iPosition ) && + iEventUnblockingAllowed ) + { + BlockEvents( EFalse ); + iPreviousYCoordinate = - KMaxWorldSize; + } + if ( iEventsBlocked ) { - TInt drag( iStartPosition.iY - aPointerEvent.iPosition.iY ); - if ( Abs( drag ) > DragThreshold() ) - { - iDragThresholdExceeded = ETrue; - } + return; } - else + + // Dragging/flicking logic + + if ( aPointerEvent.iType == TPointerEvent::EButton1Down && + iViewRect.Contains( aPointerEvent.iPosition ) ) { - TInt deltaY( iPrevPosition.iY - aPointerEvent.iPosition.iY ); - - TPoint deltaPoint( 0, deltaY ); - iPhysics->RegisterPanningPosition( deltaPoint ); + // Pointer down inside view rect, set flag to allow dragging + // and initialize values + iFlags.Set( EFlagDraggingAllowed ); + iStartPosition = aPointerEvent.iPosition; + StopPhysics(); + + iStartTime.HomeTime(); + iDragThresholdExceeded = EFalse; + iFlags.Clear( EFlagBouncingUp ); + iFlags.Clear( EFlagBouncingDown ); + return; } - - iPrevPosition = aPointerEvent.iPosition; - } - else if ( aPointerEvent.iType == TPointerEvent::EButton1Up ) - { if ( iFlags.IsClear( EFlagDraggingAllowed ) ) { return; } - - iFlags.Clear( EFlagDraggingAllowed ); - TPoint drag( 0, iStartPosition.iY - aPointerEvent.iPosition.iY ); - iPhysics->StartPhysics( drag, iStartTime ); + + if ( aPointerEvent.iType == TPointerEvent::EDrag ) + { + if ( !iDragThresholdExceeded ) + { + TInt drag( iStartPosition.iY - aPointerEvent.iPosition.iY ); + if ( Abs( drag ) > DragThreshold() ) + { + iDragThresholdExceeded = ETrue; + } + } + else + { + TInt deltaY( iPrevPosition.iY - aPointerEvent.iPosition.iY ); + + TPoint deltaPoint( 0, deltaY ); + iPhysics->RegisterPanningPosition( deltaPoint ); + } + iPrevPosition = aPointerEvent.iPosition; + } + else if ( aPointerEvent.iType == TPointerEvent::EButton1Up ) + { + if ( iFlags.IsClear( EFlagDraggingAllowed ) ) + { + return; + } + + iFlags.Clear( EFlagDraggingAllowed ); + TPoint drag( 0, iStartPosition.iY - aPointerEvent.iPosition.iY ); + iPhysics->StartPhysics( drag, iStartTime ); + } } } @@ -149,23 +178,26 @@ // void CAknEdwinPhysicsHandler::InitPhysicsL() { - TSize totalSize( iViewRect.Width(), iViewRect.Height() + KMaxWorldSize ); - TSize viewSize( iViewRect.Width(), iViewRect.Height() ); - - - CTextLayout* layout = iEdwin.TextLayout(); - - if ( layout ) + if (iOwnsPhysics) { - TInt pixelsAbove = layout->PixelsAboveBand(); - if ( pixelsAbove > 0 ) + TSize totalSize( iViewRect.Width(), iViewRect.Height() + + KMaxWorldSize ); + TSize viewSize( iViewRect.Width(), iViewRect.Height() ); + + CTextLayout* layout = iEdwin.TextLayout(); + + if ( layout ) { - MoveScrollIndex( -pixelsAbove ); - } - } - - iPhysics->InitPhysicsL( totalSize, viewSize, EFalse ); - } + TInt pixelsAbove = layout->PixelsAboveBand(); + if ( pixelsAbove > 0 ) + { + MoveScrollIndex( -pixelsAbove ); + } + } + + iPhysics->InitPhysicsL( totalSize, viewSize, EFalse ); + } + } // --------------------------------------------------------------------------- // CAknEdwinPhysicsHandler::MoveScrollIndex @@ -242,11 +274,16 @@ BlockEvents( ETrue ); } - // Disable background drawing while panning or flicking. Instead, - // background is drawn in one frame. - iEdwin.DrawViewBackground( ETrue ); - ScrollView( ETrue ); - iEdwin.DrawViewBackground( EFalse ); + // Check also world indexes here because those might still equal although + // y coordinates differ due to crossing world boundaries. + if ( iPreviousWorldIndex != iWorldIndex ) + { + // Disable background drawing while panning or flicking. Instead, + // background is drawn in one frame. + iEdwin.DrawViewBackground( ETrue ); + ScrollView( ETrue ); + iEdwin.DrawViewBackground( EFalse ); + } } // --------------------------------------------------------------------------- @@ -320,11 +357,13 @@ // CAknEdwinPhysicsHandler::CAknEdwinPhysicsHandler // --------------------------------------------------------------------------- // -CAknEdwinPhysicsHandler::CAknEdwinPhysicsHandler( CEikEdwin& aEdwin ) : +CAknEdwinPhysicsHandler::CAknEdwinPhysicsHandler( CEikEdwin& aEdwin, + CAknPhysics* aPhysics ) : iWorldIndex( 0 ), iPreviousWorldIndex( 0 ), - iPhysics( NULL ), - iEdwin( aEdwin ) + iPhysics( aPhysics ), + iEdwin( aEdwin ), + iOwnsPhysics( aPhysics == NULL ) { } @@ -334,7 +373,10 @@ // void CAknEdwinPhysicsHandler::ConstructL() { - iPhysics = CAknPhysics::NewL( *this, &iEdwin ); + if (iOwnsPhysics) + { + iPhysics = CAknPhysics::NewL( *this, &iEdwin ); + } } // --------------------------------------------------------------------------- @@ -369,7 +411,7 @@ if ( restOfPixels != 0) { - ScrollStep( pixelsToScroll, ETrue ); + ScrollStep( restOfPixels, ETrue ); } } else diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/EikStd/coctlsrc/aknstyluspopupmenu.cpp --- a/uifw/EikStd/coctlsrc/aknstyluspopupmenu.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/EikStd/coctlsrc/aknstyluspopupmenu.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -173,19 +173,23 @@ // EXPORT_C void CAknStylusPopUpMenu::ShowMenu() { - TRAPD( err, - iController = CAknPreviewPopUpController::NewL( *iContent, - CAknPreviewPopUpController::ELayoutSubMenu | - CAknPreviewPopUpController::EAutoMirror | - CAknPreviewPopUpController::EDontClose ) ); - if ( err ) + // if contoller exists, re-use it . + if ( !iController ) { - return; - } + TRAPD( err, + iController = CAknPreviewPopUpController::NewL( *iContent, + CAknPreviewPopUpController::ELayoutSubMenu | + CAknPreviewPopUpController::EAutoMirror | + CAknPreviewPopUpController::EDontClose ) ); + if ( err ) + { + return; + } - iController->SetPopUpShowDelay( KDefaultPopUpShowDelay ); - iController->SetPopUpHideDelay( KDefaultPopUpHideDelay ); - iContent->Parent()->DrawableWindow()->SetNonFading(ETrue); + iController->SetPopUpShowDelay( KDefaultPopUpShowDelay ); + iController->SetPopUpHideDelay( KDefaultPopUpHideDelay ); + iContent->Parent()->DrawableWindow()->SetNonFading(ETrue); + } TSize size(iController->Size()); iController->ShowPopUp(); @@ -379,6 +383,8 @@ if ( iMenuObserver ) { + TBool isAlreadySet = iFlags.IsSet( EIdleDisabled ); + iFlags.Set( EIdleDisabled ); TBool isDeleted = EFalse; iIsDeleted = &isDeleted; @@ -391,7 +397,10 @@ } iIsDeleted = NULL; - iFlags.Clear( EIdleDisabled ); + if( !isAlreadySet ) + { + iFlags.Clear( EIdleDisabled ); + } } StartControllerIdleL(); @@ -413,9 +422,16 @@ { if ( iMenuObserver ) { + TBool isAlreadySet = iFlags.IsSet( EIdleDisabled ); + iFlags.Set( EIdleDisabled ); iMenuObserver->ProcessCommandL( KErrCancel ); - iFlags.Clear( EIdleDisabled ); + + if( !isAlreadySet ) + { + iFlags.Clear( EIdleDisabled ); + } + } StartControllerIdleL(); diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/EikStd/coctlsrc/eikspane.cpp --- a/uifw/EikStd/coctlsrc/eikspane.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/EikStd/coctlsrc/eikspane.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -1177,11 +1177,14 @@ * be also passed if @c aParentWindowGroup * is specified. * @param aTransparent Whether or not the control is transparent. + * @param aIsFaded Whether or not the control's window should + * be faded or not. */ void SetParentWindowL( RWindowGroup* aParentWindowGroup, CCoeControl* aParentControl, CRedrawStoreHandler* aRedrawStoreHandler, - TBool aTransparent ); + TBool aTransparent, + TBool aIsFaded ); /** * Sets the container control transparency. @@ -2604,7 +2607,8 @@ RWindowGroup* aParentWindowGroup, CCoeControl* aParentControl, CRedrawStoreHandler* aRedrawStoreHandler, - TBool aTransparent ) + TBool aTransparent, + TBool aIsFaded ) { if ( aParentWindowGroup ) { @@ -2613,6 +2617,9 @@ SetMopParent( iEikonEnv->EikAppUi() ); SetParent( NULL ); + // Maintain the window's ordinal position. + TInt ordinalPos = Window().OrdinalPosition(); + if ( OwnsWindow() ) { CloseWindow(); @@ -2644,6 +2651,9 @@ EnableDragEvents(); SetContainersL( *iControl, *this ); + + window.SetFaded( aIsFaded, RWindowTreeNode::EFadeIncludeChildren ); + window.SetOrdinalPosition( ordinalPos ); ActivateL(); } @@ -3786,6 +3796,8 @@ // component controls. TInt count( combinedPaneControl->CountComponentControls() ); + TBool isFaded( IsFaded() ); + for ( TInt i = 0; i < count; ++i ) { CEikStatusPaneContainer* subPane = @@ -3798,7 +3810,9 @@ subPane->SetParentWindowL( NULL, combinedPaneControl, NULL, - transparencyEnabled ); + transparencyEnabled, + isFaded ); + // Background is drawn by the combined pane so remove // the subpane's own background drawer. subPane->SetBackground( NULL ); @@ -3809,7 +3823,8 @@ iParentWindowGroup, NULL, iExtension ? iExtension->iRedrawStoreHandler : NULL, - transparencyEnabled ); + transparencyEnabled, + isFaded ); subPane->SetBackground( transparencyEnabled ? NULL : iExtension ); diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/EikStd/dlgsrc/AknMediatorFacade.cpp --- a/uifw/EikStd/dlgsrc/AknMediatorFacade.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/EikStd/dlgsrc/AknMediatorFacade.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include "AknMediatorFacade.h" #include "AknMediatorObserver.h" diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/EikStd/dlgsrc/EIKDIALG.CPP --- a/uifw/EikStd/dlgsrc/EIKDIALG.CPP Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/EikStd/dlgsrc/EIKDIALG.CPP Wed Mar 31 21:59:52 2010 +0300 @@ -1918,9 +1918,9 @@ EXPORT_C void CEikDialog::TryExitL(TInt aButtonId) { _AKNTRACE_FUNC_ENTER; + _AKNTRACE("iDialogFlags = %d, buttonId = %d", iDialogFlags, aButtonId); if ( iDialogFlags & EEikDialogFlagNoUserExit ) { - _AKNTRACE_FUNC_EXIT; return; } @@ -1929,95 +1929,83 @@ { Extension()->iButtonId = aButtonId; Extension()->StartDelayedExit(); - _AKNTRACE_FUNC_EXIT; + _AKNTRACE("CEikDialog::TryExitL return with delayedExit"); return; } - - TBool effectTriggered = EFalse; - TBool effectButton = aButtonId == EEikBidCancel - || aButtonId == EAknSoftkeyExit - || aButtonId == EAknSoftkeyBack - || aButtonId == EAknSoftkeyNo; -#ifdef RD_UI_TRANSITION_EFFECTS_POPUPS - effectButton = effectButton - || aButtonId == EAknSoftkeyClose - || aButtonId == EAknSoftkeyDone; -#endif - CAknAppUi* aknAppUi = static_cast( iEikonEnv->EikAppUi() ); - if ( GfxTransEffect::IsRegistered( this ) && IsVisible() && effectButton -#ifdef RD_UI_TRANSITION_EFFECTS_POPUPS - && !(iDialogFlags&EEikDialogFlagSleeping) -#endif - && ( !aknAppUi->IsFullScreenApp() || aknAppUi->IsForeground() ) - && !IsBlankScreenDisplayed() - ) + + TBool needToCheckExit = ETrue; + + if (aButtonId != EEikBidCancel) + { + PrepareForFocusTransitionL(); + } + else if (!(iDialogFlags & EEikDialogFlagNotifyEsc)) + { + needToCheckExit = EFalse; + } + + if (needToCheckExit) { - CAknTransitionUtils::SetAllParents(this); - GfxTransEffect::Begin(this, KGfxControlDisappearAction); - GfxTransEffect::NotifyExternalState(ECaptureComponentsBegin, (const TDesC8*)this); - - TRect demarcation; - CAknTransitionUtils::GetDemarcation(CAknTransitionUtils::EPopup, - demarcation); - GfxTransEffect::SetDemarcation(this, demarcation); - effectTriggered = ETrue; - } - - if (aButtonId!=EEikBidCancel) - PrepareForFocusTransitionL(); - else if (!(iDialogFlags&EEikDialogFlagNotifyEsc)) - goto finished; - if (!OkToExitL(aButtonId)) + if (!OkToExitL(aButtonId)) + { + _AKNTRACE("CEikDialog::TryExitL return with OkToExitL false"); + return; + } + + if (aButtonId != EEikBidCancel) { - if ( effectTriggered ) - { - GfxTransEffect::NotifyExternalState( ECaptureComponentsAbort, - ( const TDesC8* ) this ); - GfxTransEffect::Abort( this ); + GetAutoValues(); } - _AKNTRACE_FUNC_EXIT; - return; - } - - if (aButtonId!=EEikBidCancel) - GetAutoValues(); -finished: + } + if (iExitConfirmed) - *iExitConfirmed=((MappedCommandId( aButtonId ) ==EEikBidCancel)? 0: aButtonId); - + { + *iExitConfirmed = (MappedCommandId(aButtonId) == EEikBidCancel) ? 0 : aButtonId; + } // Remove content observer in order to prevent unnecessary layout // calculations in dialog shutdown. - EnableContentObserver( EFalse ); - - if (iDialogFlags&EEikDialogFlagSleeping) - ExitSleepingDialog(); - else - { - // Remove content observer in order to prevent unnecessary layout - // calculations in dialog shutdown. - EnableContentObserver( EFalse ); - - if ( effectTriggered ) - { - MakeVisible(EFalse); - CAknTransitionUtils::MakeVisibleSubComponents( this, - CAknTransitionUtils::EForceInvisible ); - - GfxTransEffect::NotifyExternalState(ECaptureComponentsEnd, (const TDesC8*)this); - GfxTransEffect::End(this); - } - else - { - MakeVisible(EFalse); - CAknTransitionUtils::MakeVisibleSubComponents( this, - CAknTransitionUtils::EForceInvisible ); - GfxTransEffect::NotifyExternalState( ECaptureComponentsAbort, - ( const TDesC8* ) this ); - GfxTransEffect::Abort(this); - } - delete(this); - } - _AKNTRACE_FUNC_EXIT; + EnableContentObserver(EFalse); + + if (iDialogFlags & EEikDialogFlagSleeping) + { + ExitSleepingDialog(); + } + else + { + // Trigger the transition effects for the exiting dialog. + CAknAppUi* aknAppUi = static_cast(iEikonEnv->EikAppUi()); + TBool effectButton = aButtonId == EEikBidCancel + || aButtonId == EAknSoftkeyExit + || aButtonId == EAknSoftkeyBack + || aButtonId == EAknSoftkeyNo; +#ifdef RD_UI_TRANSITION_EFFECTS_POPUPS + effectButton = effectButton + || aButtonId == EAknSoftkeyClose + || aButtonId == EAknSoftkeyDone; +#endif + + if (GfxTransEffect::IsRegistered(this) && IsVisible() && effectButton + && (!aknAppUi->IsFullScreenApp() || aknAppUi->IsForeground()) + && !IsBlankScreenDisplayed()) + { + // Begin transition. + TRect demarcation; + CAknTransitionUtils::SetAllParents(this); + GfxTransEffect::Begin(this, KGfxControlDisappearAction); + GfxTransEffect::NotifyExternalState(ECaptureComponentsBegin, (const TDesC8*)this); + CAknTransitionUtils::GetDemarcation(CAknTransitionUtils::EPopup, demarcation); + GfxTransEffect::SetDemarcation(this, demarcation); + + // End transiton. + MakeVisible(EFalse); + CAknTransitionUtils::MakeVisibleSubComponents(this, + CAknTransitionUtils::EForceInvisible); + GfxTransEffect::NotifyExternalState(ECaptureComponentsEnd, (const TDesC8*)this); + GfxTransEffect::End(this); + } + delete(this); + } + _AKNTRACE_FUNC_EXIT; } /** diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/eikctl/src/EIKCLB.CPP --- a/uifw/eikctl/src/EIKCLB.CPP Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/eikctl/src/EIKCLB.CPP Wed Mar 31 21:59:52 2010 +0300 @@ -855,7 +855,7 @@ } TInt firstPotentialItemIndex = iTopItemIndex; - TInt lastPotentialItemIndex = iTopItemIndex + NumberOfItemsThatFitInRect(iViewRect) - 1; + TInt lastPotentialItemIndex = iTopItemIndex + NumberOfItemsThatFitInRect(iViewRect); if (iModel->NumberOfItems() == 0) { diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/eikctl/src/EIKCLBD.CPP --- a/uifw/eikctl/src/EIKCLBD.CPP Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/eikctl/src/EIKCLBD.CPP Wed Mar 31 21:59:52 2010 +0300 @@ -1944,6 +1944,12 @@ const TColors& aColors ) const { _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); + CListBoxView* view = static_cast( iExtension->iControl )->View(); + if ( !view->ViewRect().Intersects( aRect ) ) + { + // outside of the clipping rect -> don't process this item + return; + } TInt lastColumn = Min( LastColumn(), KMaxColumn ); TInt column=0; diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/ganes/src/HgScrollbar.cpp --- a/uifw/ganes/src/HgScrollbar.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/ganes/src/HgScrollbar.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -67,7 +67,8 @@ // ----------------------------------------------------------------------------- // CHgScrollbar::CHgScrollbar( MHgScrollbarObserver& aObserver ) - : iObserver( aObserver ) + : iObserver( aObserver ), + iStatic( ETrue ) { } diff -r 9f56a4e1b8ab -r 08e69e956a8c uifw/ganes/src/HgScroller.cpp --- a/uifw/ganes/src/HgScroller.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uifw/ganes/src/HgScroller.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -207,8 +207,11 @@ { if( aIndex >= 0 && aIndex < iItems.Count() ) { - iSelectedIndex = iItems.Count() - 1; - FitSelectionToView(); + if( !IsDisplayed( aIndex ) ) + { + iSelectedIndex = iItems.Count() - 1; + FitSelectionToView(); + } iSelectedIndex = aIndex; // Move view position so that it is fully visible. @@ -541,7 +544,7 @@ // void CHgScroller::InitScrollbarL() { - if( iScrollbar && iItemCount ) + if( iScrollbar ) { TBool prevStatic = iScrollbar->IsStatic(); iScrollbar->InitScrollBarL( Rect(), @@ -1083,8 +1086,12 @@ { iCurrentRow = newRow; + TBool needsFeedback = + ( iCurrentRow >= 0 && iCurrentRow <= iItems.Count() ) + || ( iItems.Count() - iCurrentRow > ItemsOnScreen() ); + TInt action = iPhysics->OngoingPhysicsAction(); - if( action != CAknPhysics::EAknPhysicsActionNone ) + if( action != CAknPhysics::EAknPhysicsActionNone && needsFeedback ) { TTouchFeedbackType type( ETouchFeedbackVibra ); if ( CAknPhysics::EAknPhysicsActionDragging == action ) @@ -1469,6 +1476,7 @@ // void CHgScroller::HandleLosingForeground() { + iPointerDown = EFalse; iPopupText1.Zero(); iPopupText2.Zero(); } diff -r 9f56a4e1b8ab -r 08e69e956a8c uiutils/Localizer/src/CDirectoryLocalizer.cpp --- a/uiutils/Localizer/src/CDirectoryLocalizer.cpp Mon Mar 15 12:41:34 2010 +0200 +++ b/uiutils/Localizer/src/CDirectoryLocalizer.cpp Wed Mar 31 21:59:52 2010 +0300 @@ -20,7 +20,7 @@ #include #include #include -#include +#include #ifdef RD_MULTIPLE_DRIVE #include #endif // RD_MULTIPLE_DRIVE