Merge workaround for bug 2012. Ignore workaround for bug 2584 as no longer appears applicable.
--- a/classicui_plat/extended_input_capabilities_api/inc/aknextendedinputcapabilities.h Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_plat/extended_input_capabilities_api/inc/aknextendedinputcapabilities.h Tue Jul 13 11:29:56 2010 +0100
@@ -148,7 +148,9 @@
/** Signals observer (FEP) to open a stylus menu with ccpu
options.
Parameter not used. */
- EOpenStylusMenuCcpu
+ EOpenStylusMenuCcpu,
+ /** Close pen input (VKB or HWR), parameter not used */
+ EClosePenInputRequest
};
/**
--- a/classicui_plat/extended_notifiers_api/inc/aknkeylocknotifier.h Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_plat/extended_notifiers_api/inc/aknkeylocknotifier.h Tue Jul 13 11:29:56 2010 +0100
@@ -136,6 +136,8 @@
// For screen lock
void CapturePointerEvents();
void UnCapturePointerEvents();
+ // whether Silder-key exists
+ TBool HasSliderKey();
private:
CEikButtonGroupContainer* iKeyLockCba;
--- a/classicui_plat/extended_options_menu_api/inc/akncollection.h Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_plat/extended_options_menu_api/inc/akncollection.h Tue Jul 13 11:29:56 2010 +0100
@@ -57,7 +57,11 @@
/**
* Collection is view-only (no highlight ever).
*/
- EStateViewOnly = 0x00000008
+ EStateViewOnly = 0x00000008,
+ /**
+ * Collection has marked items.
+ */
+ EStateMarkedItems = 0x00000010
};
/**
@@ -91,6 +95,7 @@
* @param aExtensionId Extension id.
* @param a0 First extension method parameter.
* @param a1 Second extension method parameter.
+ * @return Error code
*/
virtual TInt CollectionExtension(
TUint aExtensionId, TAny*& a0, TAny* a1 ) = 0;
@@ -123,7 +128,7 @@
/**
* Collection is in multiple marking mode.
*/
- EStateMarkingMode = 0x00000001,
+ EStateMarkingMode = 0x00000001,
/**
* Collection has marked items.
*/
--- a/classicui_plat/extended_options_menu_api/inc/aknitemactionmenu.h Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_plat/extended_options_menu_api/inc/aknitemactionmenu.h Tue Jul 13 11:29:56 2010 +0100
@@ -230,6 +230,14 @@
* @return Marking mode handler.
*/
CAknMarkingMode& MarkingMode();
+
+ /**
+ * Returns ETrue if collection has marked items.
+ *
+ * @internal
+ * @return ETrue if collection has marked items.
+ */
+ TBool CollectionHasMarkedItems();
private:
--- a/classicui_plat/extended_sounds_api/group/bld.inf Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_plat/extended_sounds_api/group/bld.inf Tue Jul 13 11:29:56 2010 +0100
@@ -33,7 +33,7 @@
// TEMP
// Temp solution to remove original version exported from audiothemes
// To be removed after one release cycle to platform
-../inc/ataudioeventapi.h MW_LAYER_PLATFORM_EXPORT_PATH(../../ataudioeventapi.h)
-../inc/mateventcompleteobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(../../mateventcompleteobserver.h)
+//../inc/ataudioeventapi.h MW_LAYER_PLATFORM_EXPORT_PATH(../../ataudioeventapi.h)
+//../inc/mateventcompleteobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(../../mateventcompleteobserver.h)
// TEMP
// TEMP
--- a/classicui_plat/find_item_ui_api/tsrc/inc/testdomfinditem.h Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_plat/find_item_ui_api/tsrc/inc/testdomfinditem.h Tue Jul 13 11:29:56 2010 +0100
@@ -134,7 +134,7 @@
* @param aItem never used.
* @return Symbian OS error code.
*/
- virtual TInt TestDialogEnableSingleClick( CStifItemParser& aItem );
+ virtual TInt TestDialogEnableSingleClickL( CStifItemParser& aItem );
private: // test functions in finditemmenu.h
--- a/classicui_plat/find_item_ui_api/tsrc/src/testdomfinditemblocks.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_plat/find_item_ui_api/tsrc/src/testdomfinditemblocks.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -44,7 +44,7 @@
ENTRY( "TestDialogExecuteLD", Ctestdomfinditem::TestDialogExecuteLDL ),
ENTRY( "TestDialogProcessCommandL", Ctestdomfinditem::TestDialogProcessCommandL ),
ENTRY( "TestDialogOfferKeyEventL", Ctestdomfinditem::TestDialogOfferKeyEventL ),
- ENTRY( "TestDialogEnableSingleClick", Ctestdomfinditem::TestDialogEnableSingleClick ),
+ ENTRY( "TestDialogEnableSingleClickL", Ctestdomfinditem::TestDialogEnableSingleClickL ),
// test functions in finditemmenu.h
ENTRY( "TestMenuNewL", Ctestdomfinditem::TestMenuNewL ),
--- a/classicui_plat/find_item_ui_api/tsrc/src/testdomfinditemblocksdialog.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_plat/find_item_ui_api/tsrc/src/testdomfinditemblocksdialog.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -133,10 +133,10 @@
// -----------------------------------------------------------------------------
-// Ctestdomfinditem::TestDialogEnableSingleClick
+// Ctestdomfinditem::TestDialogEnableSingleClickL
// -----------------------------------------------------------------------------
//
-TInt Ctestdomfinditem::TestDialogEnableSingleClick( CStifItemParser& /*aItem*/ )
+TInt Ctestdomfinditem::TestDialogEnableSingleClickL( CStifItemParser& /*aItem*/ )
{
// Print to UI
_LIT( Ktestdomfinditem, "testdomfinditem" );
--- a/classicui_plat/ganes_api/inc/ganes/HgScroller.h Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_plat/ganes_api/inc/ganes/HgScroller.h Tue Jul 13 11:29:56 2010 +0100
@@ -504,7 +504,7 @@
RBuf iPopupText1;
RBuf iPopupText2;
- TBool iFirstTime; // Flag to indicating first time run.
+ TBool iResetViewPosition; // ETrue on the first time run, and when iViewPosition must be reset.
TBool iPointerDown;
CPeriodic* iHighlightTimer; // Higlight timer, own.
@@ -516,6 +516,8 @@
TSelectionMode iSelectionMode;
CPeriodic* iKeyScrollingTimer; // Timer for key scrolling, own.
+ TInt iOldWinPos;
+
};
#endif /*HGSCROLLER_H_*/
--- a/classicui_plat/ganes_api/inc/ganes/HgVgMediaWall.h Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_plat/ganes_api/inc/ganes/HgVgMediaWall.h Tue Jul 13 11:29:56 2010 +0100
@@ -683,6 +683,11 @@
*/
void SetConstantsForStyle();
+ /**
+ *
+ */
+ TBool SearchItem( TChar& aFirstLetter );
+
protected:
CHgScrollBufferManager* iManager; // Own
--- a/classicui_plat/signal_pane_api/inc/aknsignal.h Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_plat/signal_pane_api/inc/aknsignal.h Tue Jul 13 11:29:56 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2006 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"
@@ -236,6 +236,9 @@
CFbsBitmap* SignalIconBitmapMask() const;
void SetContainerWindowNonFading(TBool aNonFading);
void LoadSignalIconL(TInt aIconState, TInt aColorIndex);
+ void StartTickerL( TTimeIntervalMicroSeconds32 aDelay,
+ TTimeIntervalMicroSeconds32 aInterval );
+ void StopTicker();
private:
// Private flags for internal statemachines, iSpare taken into use
--- a/classicui_pub/application_framework_api/inc/AknAppUi.h Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/application_framework_api/inc/AknAppUi.h Tue Jul 13 11:29:56 2010 +0100
@@ -105,7 +105,14 @@
*
* @since S60 5.2
*/
- EAknSingleClickCompatibleFlag = 0x01000000
+ EAknSingleClickCompatibleFlag = 0x01000000,
+
+ /**
+ * Application disables animation background
+ *
+ * @since S60 5.2
+ */
+ EAknDisableAnimationBackgroundFlag = 0x02000000
};
public:
@@ -169,7 +176,8 @@
// Since 5.0
EAknTouchCompatible = EAknTouchCompatibleFlag,
// Since 5.2
- EAknSingleClickCompatible = EAknSingleClickCompatibleFlag
+ EAknSingleClickCompatible = EAknSingleClickCompatibleFlag,
+ EAknDisableAnimationBackground = EAknDisableAnimationBackgroundFlag
};
enum TKeyEventFlag
{
--- a/classicui_pub/buttons_api/inc/eikcba.h Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/buttons_api/inc/eikcba.h Tue Jul 13 11:29:56 2010 +0100
@@ -956,11 +956,11 @@
void UpdateMultipleMarkingSoftkey();
/**
- * Checks wheter softkey command change is allowed.
+ * Checks whether softkey command change is allowed.
*
* @return ETrue if softkey command change is allowed.
*/
- TBool CommandChangeAllowed();
+ TBool CommandChangeAllowed() const;
private: // new methods
@@ -1084,6 +1084,12 @@
*/
void UpdateItemSpecificSoftkey( CCoeControl& aControl, TBool aEnable );
+ /**
+ * Creates the skin background contexts used in StaCon layout if they
+ * don't already exist.
+ */
+ void CheckAndCreateStaconContextsL();
+
private: // from CCoeControl
void SizeChanged();
--- a/classicui_pub/common_file_dialogs_api/inc/AknCommonDialogsDynMem.h Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/common_file_dialogs_api/inc/AknCommonDialogsDynMem.h Tue Jul 13 11:29:56 2010 +0100
@@ -131,7 +131,16 @@
* Removable external memory card
*
*/
- EMemoryTypeMMCExternal = 0x00000010
+ EMemoryTypeMMCExternal = 0x00000010,
+
+ /*
+ * EMemoryTypeMMCExternalInDevice
+ * Removable external memory card, but memory type which is
+ * DriveInfo::EDriveUsbMemory is not included.
+ * Do not use EMemoryTypeMMCExternalInDevice and EMemoryTypeMMCExternal
+ * at the same time. If doing so, EMemoryTypeMMCExternalInDevice works.
+ * */
+ EMemoryTypeMMCExternalInDevice = 0x00000020
};
--- a/classicui_pub/dialogs_api/inc/EIKDIALG.H Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/dialogs_api/inc/EIKDIALG.H Tue Jul 13 11:29:56 2010 +0100
@@ -61,6 +61,7 @@
// constant definitions
const TInt KAknMediatorFacade(0x10275076);
+const TUid KExIfTactileFeedbackUid = {0x2000B494};
class CEikMover;
--- a/classicui_pub/editors_api/inc/EIKEDWIN.H Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/editors_api/inc/EIKEDWIN.H Tue Jul 13 11:29:56 2010 +0100
@@ -490,6 +490,11 @@
* Not own.
*/
MAknsSkinInstance* iSkinInstance;
+
+ /**
+ * Record enableSmiley is supported.
+ */
+ TBool iEnableSmileySupported;
};
public:
--- a/classicui_pub/generic_button_api/inc/AknButton.h Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/generic_button_api/inc/AknButton.h Tue Jul 13 11:29:56 2010 +0100
@@ -353,7 +353,30 @@
* created by owning Button
*/
void SetGeneratedDimmedIcon( TBool aDimmedIconCreatedByButton );
+
+ /**
+ * Tells if frame update is needed, it is needed when the flag
+ * KAknButtonStateHasLatchedFrame has changed.
+ * @return ETrue if flag KAknButtonStateHasLatchedFrame has changed.
+ */
+ TBool FlagsChanged();
+ /**
+ * Frame has been updated. No need to update anymore.
+ */
+ void ResetFlagsChanged();
+
+ /**
+ * Checks if text has changed.
+ * @return ETrue is state's text has changed.
+ */
+ TBool TextChanged();
+
+ /**
+ * Visual text has been updated, so iTextChanged can be set to EFalse.
+ */
+ void ResetTextChanged();
+
friend class CAknButton;
protected: // data
@@ -1163,6 +1186,17 @@
*/
TRect TouchArea() const;
+ /**
+ * Enables or disables tactile feedback for button. By default it is
+ * enabled. Should be used to temporarily prevent updating of tactile
+ * feedback area for performance reasons when button is moved
+ * constantly.
+ *
+ * @param aEnable, ETrue to enable, EFalse to disable
+ * @since S60 5.2
+ */
+ IMPORT_C void EnableFeedback( TBool aEnable );
+
protected: // Constructors
/**
@@ -1305,6 +1339,12 @@
void DrawTextButton( CWindowGc& aGc ) const;
/**
+ * Continues drawing of the button which has text. Called from
+ * DrawTextButton and DrawTextAndIconButton
+ */
+ void DrawText( CWindowGc& aGc, TRect& aTextRect ) const;
+
+ /**
* Continues drawing of the button which has only an icon in it.
*/
void DrawIconButton( CWindowGc& aGc ) const;
@@ -1430,6 +1470,24 @@
* @param aNewIndex New state index
*/
void SetStateIndexL( TInt aNewIndex );
+
+ /**
+ * Sets frame IDs for background context. This is called when there
+ * are possible changes in frame ids.
+ */
+ void SetFrameIDs() const;
+
+ /**
+ * Sets frame rects for background context. This is called when
+ * button's size changes
+ */
+ void SetFrameRects();
+
+ /**
+ * Converts text to visual and clips it. This is called when there
+ * are possible changes in visual text.
+ */
+ void ConvertTextToVisualAndClip() const;
protected: // Data
--- a/classicui_pub/generic_button_api/tsrc/conf/tctestsdkgenericbutton.cfg Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/generic_button_api/tsrc/conf/tctestsdkgenericbutton.cfg Tue Jul 13 11:29:56 2010 +0100
@@ -455,4 +455,7 @@
run testscripter c:\testframework\ui_testsdkgenericbutton.cfg 90
[Endtest]
-
+[Test]
+title TestGBEnableFeedbackL
+run testscripter c:\testframework\ui_testsdkgenericbutton.cfg 91
+[Endtest]
--- a/classicui_pub/generic_button_api/tsrc/conf/ui_testsdkgenericbutton.cfg Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/generic_button_api/tsrc/conf/ui_testsdkgenericbutton.cfg Tue Jul 13 11:29:56 2010 +0100
@@ -637,5 +637,9 @@
delete test
[Endtest]
-
-
+[Test]
+title TestGBEnableFeedbackL
+create testsdkgenericbutton test
+test TestGBEnableFeedbackL
+delete test
+[Endtest]
--- a/classicui_pub/generic_button_api/tsrc/inc/testsdkgenericbutton.h Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/generic_button_api/tsrc/inc/testsdkgenericbutton.h Tue Jul 13 11:29:56 2010 +0100
@@ -727,26 +727,19 @@
* @return Symbian OS error code.
*/
virtual TInt TestGBHideHelpL( CStifItemParser& aItem );
+ /**
+ * TestGBEnableFeedbackL test function for testing the EnableFeedback
+ * function
+ * @since S60 5.2
+ * @param aItem never used
+ * @return Symbian OS error code.
+ */
+ virtual TInt TestGBEnableFeedbackL( CStifItemParser& aItem );
/**
* Method used to log version of test class
*/
void SendTestClassVersion();
-
- /**
- * Turn off ScreenSaver
- * @since S60 5.0
- * @return Symbian OS error code.
- */
- void TurnOffScreenSaver();
-
- /**
- * Restore ScreenSaver
- * @since S60 5.0
- * @return Symbian OS error code.
- */
- void RestoreScreenSaver();
-
private:
--- a/classicui_pub/generic_button_api/tsrc/src/testsdkgenericbutton.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/generic_button_api/tsrc/src/testsdkgenericbutton.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -22,7 +22,6 @@
*/
#include <stiftestinterface.h>
#include <settingserverclient.h>
-#include <screensaverinternalpskeys.h>
#include <e32property.h>
#include <coemain.h>
@@ -85,11 +84,15 @@
CStifLogger::EFile,
EFalse );
- iOffset = CCoeEnv::Static()->AddResourceFileL(_L("C:\\resource\\testsdkgenericbutton.rsc"));
+ TRAPD ( err, iOffset = CCoeEnv::Static()->AddResourceFileL(
+ _L("C:\\resource\\testsdkgenericbutton.rsc") ) );
+ if ( KErrNone != err )
+ {
+ _LIT ( KGenericbuttonRsc, "Z:\\resource\\testsdkgenericbutton.rsc" );
+ iOffset = CCoeEnv::Static()->AddResourceFileL( KGenericbuttonRsc );
+ }
SendTestClassVersion();
-
- TurnOffScreenSaver();
}
// -----------------------------------------------------------------------------
@@ -117,8 +120,6 @@
delete iLog;
CCoeEnv::Static()->DeleteResourceFile( iOffset );
-
- RestoreScreenSaver();
}
//-----------------------------------------------------------------------------
@@ -153,32 +154,6 @@
{
return ( CScriptBase* ) CTestSDKGENERICBUTTON::NewL( aTestModuleIf );
}
-
-// -----------------------------------------------------------------------------
-// Turn off ScreenSaver
-// -----------------------------------------------------------------------------
-//
-void CTestSDKGENERICBUTTON::TurnOffScreenSaver()
- {
- TInt err1 = RProperty::Get( KPSUidScreenSaver, KScreenSaverAllowScreenSaver,
- iOldScreenSaverProperty );
- TInt err2 = RProperty::Set( KPSUidScreenSaver, KScreenSaverAllowScreenSaver,
- KScreenSaverAllowScreenSaver );
- RDebug::Printf( "screensaver property=%d err1=%d err2=%d\n",
- iOldScreenSaverProperty, err1, err2 );
- }
-
-// -----------------------------------------------------------------------------
-// Restore ScreenSaver
-// -----------------------------------------------------------------------------
-//
-void CTestSDKGENERICBUTTON::RestoreScreenSaver()
- {
- RProperty::Set( KPSUidScreenSaver, KScreenSaverAllowScreenSaver,
- iOldScreenSaverProperty );
- User::ResetInactivityTime();
- }
-
//End file
--- a/classicui_pub/generic_button_api/tsrc/src/testsdkgenericbuttonblocks.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/generic_button_api/tsrc/src/testsdkgenericbuttonblocks.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -167,6 +167,7 @@
ENTRY( "TestGBGetCurrentIconL", CTestSDKGENERICBUTTON::TestGBGetCurrentIconL ),
ENTRY( "TestGBShowHelpLL", CTestSDKGENERICBUTTON::TestGBShowHelpLL ),
ENTRY( "TestGBHideHelpL", CTestSDKGENERICBUTTON::TestGBHideHelpL ),
+ ENTRY( "TestGBEnableFeedbackL", CTestSDKGENERICBUTTON::TestGBEnableFeedbackL ),
// [test cases entries]
};
@@ -2307,6 +2308,29 @@
}
// -----------------------------------------------------------------------------
+// CTestSDKGENERICBUTTON::TestGBEnableFeedbackL
+// -----------------------------------------------------------------------------
+//
+TInt CTestSDKGENERICBUTTON::TestGBEnableFeedbackL ( CStifItemParser& /*aItem*/ )
+ {
+ CTestButton* button = CTestButton::NewL();
+ CleanupStack::PushL( button );
+ button->ConstructFromResourceL( R_BUTTON );
+
+ button->EnableFeedback ( EFalse );
+ button->MakeVisible( ETrue );
+ button->SetDimmed( ETrue );
+
+ button->EnableFeedback ( ETrue );
+ button->MakeVisible( ETrue );
+ button->SetDimmed( ETrue );
+
+ CleanupStack::PopAndDestroy( button );
+
+ return KErrNone;
+ }
+
+// -----------------------------------------------------------------------------
// CTestSDKGENERICBUTTON::TestGBChangeStateL
// -----------------------------------------------------------------------------
//
--- a/classicui_pub/hierarchical_lists_api/inc/akntreelist.h Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/hierarchical_lists_api/inc/akntreelist.h Tue Jul 13 11:29:56 2010 +0100
@@ -24,12 +24,12 @@
#include <w32std.h>
#include <akntreelistobserver.h>
#include <AknIconUtils.h> // TScaleMode
-#include <aknmarkingmodeobserver.h>
class CAknTree;
class CAknTreeListView;
class MAknCustomTreeOrdering;
class TAknsItemID;
+class MAknMarkingModeObserver;
/** Flag to indicate that hierarchical list is looping. */
const TUint32 KAknTreeListLooping = 0x0001;
@@ -1154,6 +1154,7 @@
/**
* Marking mode observer
+ * Not own
*/
MAknMarkingModeObserver* iMarkingModeObserver;
};
--- a/classicui_pub/lists_api/inc/EIKCLBD.H Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/lists_api/inc/EIKCLBD.H Tue Jul 13 11:29:56 2010 +0100
@@ -448,6 +448,18 @@
IMPORT_C void SetColumnUnderlined( TBitFlags32 aUnderlinedColumns );
private:
+ /**
+ * Draws check boxes in marking mode
+ *
+ * @param aProperties Item properties
+ * @param aGc Graphics context
+ * @param aItemRect Item area
+ * @internal
+ */
+ void DrawMarkingModeIcons( const TListItemProperties& aProperties,
+ CWindowGc& aGc,
+ TRect& aItemRect ) const;
+private:
struct SColumn
{
TInt iColumn; // Must be first entry
--- a/classicui_pub/lists_api/inc/EIKLBX.H Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/lists_api/inc/EIKLBX.H Tue Jul 13 11:29:56 2010 +0100
@@ -242,8 +242,16 @@
/**
* Construction flag for disabling item specific stylus popup menu.
*/
- EDisableItemSpecificMenu = 0x00040000
+ EDisableItemSpecificMenu = 0x00040000,
+
+ /**
+ * Construction flag to make item specific stylus popup menu always
+ * shown regardless of list's marking state if the tapped item has
+ * associated commands.
+ */
+ EItemSpecificMenuAlwaysShown = 0x00080000
};
+
enum {KEikMaxMatchingBufferLength = 2};
/**
--- a/classicui_pub/lists_api/inc/aknmarkingmodeobserver.h Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/lists_api/inc/aknmarkingmodeobserver.h Tue Jul 13 11:29:56 2010 +0100
@@ -34,7 +34,7 @@
/**
* This method is called when marking mode is activated or deactivated.
*
- * @param aActivated @c ETrue if marking mode was activate, @c EFalse
+ * @param aActivated @c ETrue if marking mode was activated, @c EFalse
* if marking mode was deactivated.
*/
virtual void MarkingModeStatusChanged( TBool aActivated ) = 0;
--- a/classicui_pub/lists_api/inc/eikfrlbd.h Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/lists_api/inc/eikfrlbd.h Tue Jul 13 11:29:56 2010 +0100
@@ -985,6 +985,17 @@
const TRect& aItemRect,
TBool aHighlight,
const TColors& aColors ) const;
+ /**
+ * Draws check boxes in marking mode
+ *
+ * @param aProperties Item properties
+ * @param aGc Graphics context
+ * @param aItemRect Item area
+ * @internal
+ */
+ void DrawMarkingModeIcons( TListItemProperties& aProperties,
+ CWindowGc& aGc,
+ TRect& aItemRect ) const;
/**
* @internal helper
--- a/classicui_pub/options_menu_api/inc/EIKMENUP.H Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/options_menu_api/inc/EIKMENUP.H Tue Jul 13 11:29:56 2010 +0100
@@ -896,6 +896,15 @@
void SetItemCommandsStateL( TBool aDimmed );
/**
+ * Sets item action commands state.
+ *
+ * @internal
+ * @since S60 v5.2
+ * @param aDimmed If ETrue, item action commands are dimmed.
+ */
+ void SetItemActionsStateL( TBool aDimmed );
+
+ /**
* Adds menu items to this menu and item action menu data.
*
* @internal
@@ -929,6 +938,14 @@
* Enables the default highlight in menu
*/
void SetDefaultHighlight();
+
+ /**
+ * Updates flag which is used for hiding mark and unmark -commands from
+ * submenus. This is called with ETrue when collection has marked items.
+ *
+ * @param aHide ETrue to hide, EFalse to show
+ */
+ void HideMarkAndUnmark( TBool aHide );
private:
enum { EInvalidCurrentSize=0x01, EBackgroundFaded=0x02 };
@@ -1014,6 +1031,14 @@
* @return Item height.
*/
TInt CalculateItemHeight() const;
+
+ /**
+ * Cleans the internal pointer which is used
+ * to track object deletion.
+ *
+ * @param aParam Pointer to options menu object.
+ */
+ static void CleanLocalRef( TAny* aParam );
protected: // from CoeControl
--- a/classicui_pub/queries_api/inc/aknlistquerydialog.h Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/queries_api/inc/aknlistquerydialog.h Tue Jul 13 11:29:56 2010 +0100
@@ -282,13 +282,6 @@
*/
IMPORT_C CAknSearchField* FindBox() const;
- private:
- /**
- * Returns whether the left softkey is shown
- * @return ETrue If the left softkey is shown
- */
- TBool IsLeftSoftkeyShown();
-
public:
/**
* Sets the tone for the dialog.
--- a/classicui_pub/screen_clearer_api/inc/AknClearer.h Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/screen_clearer_api/inc/AknClearer.h Tue Jul 13 11:29:56 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2006 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"
@@ -86,6 +86,19 @@
* Sets skin background and shape for the cleared window.
*/
void SetSkinShapeL();
+
+ /**
+ * Creates the extension class.
+ */
+ void CreateExtensionL();
+
+ /**
+ * Sets the clearer as transparent or opaque.
+ *
+ * @param aTransparent @c ETrue to set transparency on,
+ * @c EFalse otherwise.
+ */
+ void SetTransparent( TBool aTransparent );
private:
CAknScreenClearerBaseExtension* iExtension;
@@ -115,7 +128,16 @@
* @c EFalse if not.
*/
IMPORT_C static CAknLocalScreenClearer* NewLC(TBool aBlankAppStatusPane);
-
+
+ /**
+ * Two-phased constructor.
+ * @param aBlankAppStatusPane @c ETrue if application status pane is blank,
+ * @c EFalse if not.
+ * @param aTransparent @c ETrue to construct a transparent clearer,
+ * @c EFalse to create an opaque one that draws
+ * the skin background.
+ */
+ IMPORT_C static CAknLocalScreenClearer* NewLC(TBool aBlankAppStatusPane, TBool aTranparent);
/**
* Two-phased constructor.
* @param aBlankAppStatusPane @c ETrue if application status pane is blank,
@@ -124,6 +146,16 @@
IMPORT_C static CAknLocalScreenClearer* NewL(TBool aBlankAppStatusPane);
/**
+ * Two-phased constructor.
+ * @param aBlankAppStatusPane @c ETrue if application status pane is blank,
+ * @c EFalse if not.
+ * @param aTransparent @c ETrue to construct a transparent clearer,
+ * @c EFalse to create an opaque one that draws
+ * the skin background.
+ */
+ IMPORT_C static CAknLocalScreenClearer* NewL(TBool aBlankAppStatusPane, TBool aTransparent);
+
+ /**
* From CCoeControl
*/
IMPORT_C void HandleResourceChange(TInt aType);
--- a/classicui_pub/stylus_popup_menu_api/inc/aknstyluspopupmenu.h Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/stylus_popup_menu_api/inc/aknstyluspopupmenu.h Tue Jul 13 11:29:56 2010 +0100
@@ -212,6 +212,14 @@
*/
void RemoveController();
+ /**
+ * Cleans the internal pointer which is used
+ * to track object deletion.
+ *
+ * @param aParam Pointer to stylus menu object.
+ */
+ static void CleanLocalRef( TAny* aParam );
+
private: // data
/**
--- a/classicui_pub/tsrc/bc/apps/bctestlauncher/group/uid_range.txt Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/tsrc/bc/apps/bctestlauncher/group/uid_range.txt Tue Jul 13 11:29:56 2010 +0100
@@ -1,3 +1,19 @@
+#
+# 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 "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:
+#
+
(1)
0x20004742 - 0x2000474B
--- a/classicui_pub/tsrc/bc/apps/bctestutil/group/release_note.txt Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/tsrc/bc/apps/bctestutil/group/release_note.txt Tue Jul 13 11:29:56 2010 +0100
@@ -1,3 +1,19 @@
+#
+# Copyright (c) 2006-2009 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:
+#
+
50.9.6
[what's new]
1.Moved the existing BC test cases from \s60\mw\classicui\uifw\AvKon\internal\tsrc to \s60\mw\classicui\uifw\AvKon\tsrc
--- a/classicui_pub/ui_framework_definitions_api/inc/EIKON.HRH Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/ui_framework_definitions_api/inc/EIKON.HRH Tue Jul 13 11:29:56 2010 +0100
@@ -59,7 +59,12 @@
*/
#define EEikCbaFlagSemiTransparent 0x100
-
+/**
+ * Button group app msk icon flag. This flag can be set with CBA resource
+ * or by using CEikCba::SetButtonGroupFlags(TInt) method. CBA using
+ * control_pane_g4(0) to draw the window rect
+ */
+#define EEikCbaFlagAppMskIcon 0x200
// EIKBUTB.HRH
//
//
@@ -214,6 +219,7 @@
#define EAknEditorFlagSelectionVisible 0x100000
#define EAknEditorFlagEnablePartialScreen 0x200000
#define EAknEditorFlagLaunchPenInputAutomatic 0x400000
+#define EAknEditorFlagHideTextView 0x800000
// NOTICE! Flag value 0x80000000 is reserved for internal use by FEP.
// EIKLABEL.HRH
--- a/classicui_pub/ui_framework_definitions_api/inc/avkon.hrh Tue Jun 29 16:35:47 2010 +0100
+++ b/classicui_pub/ui_framework_definitions_api/inc/avkon.hrh Tue Jul 13 11:29:56 2010 +0100
@@ -41,17 +41,18 @@
#define EEikStatusPaneLayoutAknLafDefined 0x10
// internal, do not use (maybe you might need to use LoopScrolling though, but use it with some other flags...)
-#define EAknListBoxMultipleSelection EEikListBoxMultipleSelection
-#define EAknListBoxIncrementalMatching EEikListBoxIncrementalMatching
-#define EAknListBoxScrollBarSizeExcluded 0x0080
-#define EAknListBoxLoopScrolling 0x1000
-#define EAknListBoxEnterMarks 0x2000
-#define EAknListBoxShiftEnterMarks 0x4000
+#define EAknListBoxMultipleSelection EEikListBoxMultipleSelection
+#define EAknListBoxIncrementalMatching EEikListBoxIncrementalMatching
+#define EAknListBoxScrollBarSizeExcluded 0x0080
+#define EAknListBoxLoopScrolling 0x1000
+#define EAknListBoxEnterMarks 0x2000
+#define EAknListBoxShiftEnterMarks 0x4000
// Note there's also EAknListBoxViewerFlags, which is better for apps.
-#define EAknListBoxViewerFlag 0x8000
-#define EAknListBoxPointerMultiselectionList 0x10000
-#define EAknListBoxPointerMarkableList 0x20000
-#define EAknListBoxDisableItemSpecificMenu 0x40000
+#define EAknListBoxViewerFlag 0x8000
+#define EAknListBoxPointerMultiselectionList 0x10000
+#define EAknListBoxPointerMarkableList 0x20000
+#define EAknListBoxDisableItemSpecificMenu 0x40000
+#define EAknListBoxAlwaysShowItemSpecificMenu 0x80000
// These are combined to the viewerflag to make it fit to WORD in resources.
@@ -93,6 +94,7 @@
#define EAknListBoxMenuGrid (EAknListBoxMenuList)
#define EAknListBoxItemSpecificMenuDisabled ( EAknListBoxDisableItemSpecificMenu )
+#define EAknListBoxItemSpecificMenuAlwaysShown ( EAknListBoxAlwaysShowItemSpecificMenu )
//
// Viewers (see Selection service)
//
@@ -1753,18 +1755,13 @@
EAknFepDualLanguageSettingDualInputSecondary
};
-enum TAknSctTableNaviButtons
+enum TAknSctPageNaviButtons
{
EAknSctTableNaviExit = 0,
+ EAknSctPageNaviPrevPage,
+ EAknSctPageNaviNextPage,
EAknSctTableNaviSpecialChar,
EAknSctTableNaviEmotion,
- EAknSctTableNaviLastId
- };
-
-enum TAknSctPageNaviButtons
- {
- EAknSctPageNaviPrevPage = 0,
- EAknSctPageNaviNextPage,
EAknSctPageNaviLastId
};
--- a/commonuis/CommonDialogs/group/CommonDialogs.rss Tue Jun 29 16:35:47 2010 +0100
+++ b/commonuis/CommonDialogs/group/CommonDialogs.rss Tue Jul 13 11:29:56 2010 +0100
@@ -27,6 +27,8 @@
#include <commondialogs.loc>
#include <CommonDialogs.rh>
+#include "commondialogsdata.hrh"
+#include "commondialogsdata.rh"
// RESOURCE DEFINITIONS
// ---------------------------------------------------------
@@ -235,6 +237,26 @@
buf = qtn_mem_named_memory_card_setting_list;
}
+RESOURCE TBUF R_CFD_QTN_MEMC_USB_AVAILABLE_SINGLE_LIST
+ {
+ buf = qtn_memc_usb_available_single_list;
+ }
+
+RESOURCE TBUF R_CFD_QTN_MEMC_USB_UNAVAILABLE_SINGLE_LIST
+ {
+ buf = qtn_memc_usb_unavailable_single_list;
+ }
+
+RESOURCE TBUF R_CFD_QTN_MEMC_USB_AVAILABLE_DOUBLE
+ {
+ buf = qtn_memc_usb_available_double;
+ }
+
+RESOURCE TBUF R_CFD_QTN_MEMC_USB_UNAVAILABLE_DOUBLE
+ {
+ buf = qtn_memc_usb_unavailable_double;
+ }
+
// ---------------------------------------------------------
//
// Softkey texts from AVKON.LOC
@@ -494,4 +516,247 @@
softkey_2 = text_softkey_cancel;
}
+
+RESOURCE FILEXTNAMEANDICONINDEXLIST r_cdf_file_type_icon_set
+ {
+ fileextnameandiconindex =
+ {
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".txt";
+ iconindex = ENoteFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".sdp";
+ iconindex = EVideoFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".3gp";
+ iconindex = EVideoFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".mpeg";
+ iconindex = EVideoFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".mpeg4";
+ iconindex = EVideoFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".mp4";
+ iconindex = EVideoFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".nim";
+ iconindex = EVideoFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".jpg";
+ iconindex = EImageFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".jpeg";
+ iconindex = EImageFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".gif";
+ iconindex = EImageFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".png";
+ iconindex = EImageFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".tif";
+ iconindex = EImageFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".mbm";
+ iconindex = EImageFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".wbmp";
+ iconindex = EImageFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".bmp";
+ iconindex = EImageFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".svg";
+ iconindex = EImageFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".wmf";
+ iconindex = EImageFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".awb";
+ iconindex = EVoiceRecFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".ota";
+ iconindex = EGmsFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".amr";
+ iconindex = EVoiceRecFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".rng";
+ iconindex = EVoiceRecFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".nrt";
+ iconindex = EVoiceRecFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".mid";
+ iconindex = ESoundFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".rmf";
+ iconindex = ESoundFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".aiff";
+ iconindex = ESoundFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".aif";
+ iconindex = ESoundFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".wav";
+ iconindex = ESoundFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".mp3";
+ iconindex = ESoundFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".m4a";
+ iconindex = ESoundFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".aac";
+ iconindex = ESoundFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".mxmf";
+ iconindex = ESoundFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".wma";
+ iconindex = ESoundFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".3g2";
+ iconindex = ESoundFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".au";
+ iconindex = ESoundFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".sisx";
+ iconindex = EAppFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".sis";
+ iconindex = EAppFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".zip";
+ iconindex = EAppFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".rar";
+ iconindex = EAppFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".jad";
+ iconindex = EAppFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".jar";
+ iconindex = EAppFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".pdf";
+ iconindex = ENoteFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".pptx";
+ iconindex = ENoteFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".ppt";
+ iconindex = ENoteFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".xls";
+ iconindex = ENoteFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".xlsx";
+ iconindex = ENoteFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".docx";
+ iconindex = ENoteFileIcon;
+ },
+ FILEXTNAMEANDICONINDEX
+ {
+ fileextnamet = ".doc";
+ iconindex = ENoteFileIcon;
+ }
+ };
+ }
+
// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/commonuis/CommonDialogs/group/commondialogsdata.hrh Tue Jul 13 11:29:56 2010 +0100
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2002-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: This is file dialog data enum value file.
+*
+*/
+/**
+ * Enumerations for file dialog list item icon.
+ */
+enum TFileTypeIcon
+ {
+ EFolderIcon,
+ EFileIcon,
+ ESubFolderIcon,
+ EThisFolderIcon,
+ EImageFileIcon,
+ EGmsFileIcon,
+ ELinkFileIcon,
+ EVoiceRecFileIcon,
+ ESoundFileIcon,
+ EPlaylistFileIcon,
+ ECompoFileIcon,
+ ENoteFileIcon,
+ EAppFileIcon,
+ EVideoFileIcon,
+ EGameFileIcon,
+ EUnknowTypeIcon,
+ EFolderEmptyIcon,
+ EFlashFileIcon
+ };
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/commonuis/CommonDialogs/group/commondialogsdata.rh Tue Jul 13 11:29:56 2010 +0100
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2002-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: This is file dialog data struct file.
+*
+*/
+
+// ---------------------------------------------------------
+// FILEXTNAMEANDICONINDEX
+// A structure for saving file ext name and icon index for listbox
+// ---------------------------------------------------------
+//
+STRUCT FILEXTNAMEANDICONINDEX
+ {
+ LTEXT fileextnamet; // file ext name
+ LONG iconindex; // icon index for listbox
+ }
+// ---------------------------------------------------------
+// FILEXTNAMEANDICONINDEX
+// A structure for list FILEXTNAMEANDICONINDEX
+// ---------------------------------------------------------
+//
+STRUCT FILEXTNAMEANDICONINDEXLIST
+ {
+ STRUCT fileextnameandiconindex[];
+ }
+// End of File
--- a/commonuis/CommonDialogs/group/iconlist.txt Tue Jun 29 16:35:47 2010 +0100
+++ b/commonuis/CommonDialogs/group/iconlist.txt Tue Jul 13 11:29:56 2010 +0100
@@ -18,4 +18,5 @@
/c8,1 qgn_prop_am_sis.bmp
/c8,1 qgn_prop_folder_empty.bmp
/c8,1 qgn_prop_file_swf_small.bmp
-/c8,1 qgn_prop_usb_memc_sub.svg
\ No newline at end of file
+/c8,1 qgn_prop_usb_memc.svg
+/c8,1 qgn_prop_usb_memc_sub.svg
--- a/commonuis/CommonDialogs/inc/caknmemoryselectionmodelmultidrive.h Tue Jun 29 16:35:47 2010 +0100
+++ b/commonuis/CommonDialogs/inc/caknmemoryselectionmodelmultidrive.h Tue Jul 13 11:29:56 2010 +0100
@@ -148,6 +148,8 @@
ETextRemoteDrive,
ETextInternalMassStorage,
ETextInternalMassStorageUnavailable,
+ ETextUSBDefaultName,
+ ETextUSBUnavailable,
ETextMMCNamed,
ETextCount // Count of the localized texts - must remain last!
};
--- a/commonuis/CommonDialogs/loc/commondialogs.loc Tue Jun 29 16:35:47 2010 +0100
+++ b/commonuis/CommonDialogs/loc/commondialogs.loc Tue Jul 13 11:29:56 2010 +0100
@@ -210,7 +210,7 @@
//d:Text for USB Memory (no name) in memory selection
//l:list_single_graphic_pane_t1_cp2
-#define qtn_memc_USB_available_single_list "%U USB memory"
+#define qtn_memc_usb_available_single_list "%U USB memory"
//d:Text for USB Memory in memory selection when USB memory is unavilable
//l:list_single_graphic_pane_t1_cp2
@@ -218,7 +218,7 @@
//d:Text for USB Memory (no name) in memory selection
//l:list_double_large_graphic_pane_t1_cp2
-#define qtn_memc_USB_available_double "%U USB memory"
+#define qtn_memc_usb_available_double "%U USB memory"
//d:Text for USB Memory in memory selection when USB memory is unavilable
//l:list_double_large_graphic_pane_t1_cp2
--- a/commonuis/CommonDialogs/src/CAknFileSelectionDialog.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/commonuis/CommonDialogs/src/CAknFileSelectionDialog.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -324,10 +324,10 @@
KAknsIIDQgnPropNrtypNote, KAvkonBitmapFile,
EMbmAvkonQgn_prop_nrtyp_note, EMbmAvkonQgn_prop_nrtyp_note_mask );
- // Add sis file icon.
+ // Add app file icon.
AknCFDUtility::AppendSkinnedImageToArrayL( *eikEnv, *iconArray, skin,
KAknsIIDQgnPropAmSis, KCommonDialogsBitmapFile,
- EMbmCommondialogsQgn_prop_am_sis, EMbmCommondialogsQgn_prop_am_sis_mask );
+ EMbmCommondialogsQgn_prop_fmgr_file_apps, EMbmCommondialogsQgn_prop_fmgr_file_apps_mask );
// Add video file icon.
AknCFDUtility::AppendSkinnedImageToArrayL( *eikEnv, *iconArray, skin,
@@ -338,11 +338,6 @@
AknCFDUtility::AppendSkinnedImageToArrayL( *eikEnv, *iconArray, skin,
KAknsIIDQgnPropFmgrFileGame, KCommonDialogsBitmapFile,
EMbmCommondialogsQgn_prop_fmgr_file_game, EMbmCommondialogsQgn_prop_fmgr_file_game_mask );
-
- // Add java file icon.
- AknCFDUtility::AppendSkinnedImageToArrayL( *eikEnv, *iconArray,
- skin, KAknsIIDQgnPropAmMidlet, KCommonDialogsBitmapFile,
- EMbmCommondialogsQgn_prop_am_midlet, EMbmCommondialogsQgn_prop_am_midlet_mask );
// Add unknow file type icon.
AknCFDUtility::AppendSkinnedImageToArrayL( *eikEnv, *iconArray,
--- a/commonuis/CommonDialogs/src/CAknFileSelectionModel.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/commonuis/CommonDialogs/src/CAknFileSelectionModel.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -31,29 +31,21 @@
#include "MAknFileFilter.h"
#include "AknCFDUtility.h"
#include "CAknDataCagingFilter.h"
-
+#include "commondialogsdata.hrh"
// CONSTANTS
+_LIT( KImageHeader, "%d\t" );
+const TInt KFileExtNameSize = 10;
const TInt KEntryArrayGranularity( 10 );
const TInt KFilterArrayGranularity( 2 );
+const TInt KIndexDataLen = 6;
-_LIT( KCFDMimeTypeImage, "image/*" );
-_LIT( KCFDMimeTypeImageGms, "image/x-ota-bitmap" );
-_LIT( KCFDMimeTypeRam, "audio/x-pn-realaudio-plugin" ); // = link
-_LIT( KCFDMimeTypeAudioVoiceRec, "audio/amr*" );
-_LIT( KCFDMimeTypeAudioVoiceRec2, "application/vnd.nokia.ringing-tone" );
-_LIT( KCFDMimeTypeAudio, "audio/*" ); // = other sound files
-_LIT( KCFDMimeTypePlaylist, "audio/*mpegurl*" );
-_LIT( KCFDMimeTypeVideo, "video/*" );
-_LIT( KCFDMimeTypeVideoRealMedia, "application/*n-realmedia" );
-_LIT( KCFDMimeTypeVideoSdp, "application/sdp" );
-_LIT( KCFDMimeTypeGame, "application/*game*" );
-_LIT( KCFDMimeTypeNote, "text/*" );
-_LIT( KCFDMimeTypeJava, "application/java-archive" );
-_LIT( KCFDMimeTypeFlash, "application/x-shockwave-flash" );
-
-_LIT( KCFDFileExtSis, ".sis" );
-_LIT( KCFDFileExtSisx, ".sisx");
-_LIT( KCFDFileExtMid, ".mid" );
+// Store file ext name and right icon index
+class TCFDFileTypes
+ {
+public:
+ TBuf<KFileExtNameSize> iFileType;
+ TInt iIconIndex;
+ };
// ============================ MEMBER FUNCTIONS ===============================
@@ -65,8 +57,7 @@
//
CAknFileSelectionModel::CAknFileSelectionModel(
const TCommonDialogType& aDialogType, CCoeEnv& aCoeEnv )
- : iImageIndexArray( KEntryArrayGranularity ),
- iDirectoryLevel( 0 ),
+ : iDirectoryLevel( 0 ),
iDialogType( aDialogType ),
iCoeEnv( aCoeEnv )
{
@@ -79,19 +70,47 @@
//
void CAknFileSelectionModel::ConstructL()
{
- User::LeaveIfError( iApaSession.Connect() );
iLocalizer = CDirectoryLocalizer::NewL();
iEntryArray = new( ELeave ) CArrayPakFlat<TEntry>( KEntryArrayGranularity );
iFilterArray = new( ELeave ) CArrayPtrSeg<MAknFileFilter>( KFilterArrayGranularity );
- iItemWithImageIndex = HBufC::NewL(KMaxPath);
+ iFileTypeArray = new ( ELeave ) CArrayFixFlat<TCFDFileTypes>( KEntryArrayGranularity );
+
+ // Directories should be shown in front of files in list,
+ // create two arrays to save it respectively
+ iLocalFileNameArray = new ( ELeave ) CDesC16ArraySeg( KEntryArrayGranularity );
+ iLocalDirNameArray = new ( ELeave ) CDesC16ArraySeg( KEntryArrayGranularity );
+
+ TResourceReader reader;
+ iCoeEnv.CreateResourceReaderLC( reader, R_CDF_FILE_TYPE_ICON_SET );
+ ReadFileExtNameAndIconIndexL( reader );
+ CleanupStack::PopAndDestroy();//reader
+
+ iStringBuf = HBufC::NewL(KMaxPath);
+
User::LeaveIfError( iFs.Connect() );
iRootFolderText = iCoeEnv.AllocReadResourceL( R_CFD_QTN_FLDR_ROOT_LEVEL );
-
AddFilterL( CAknDataCagingFilter::NewLC() );
CleanupStack::Pop(); //caging filter
}
// -----------------------------------------------------------------------------
+// CAknFileSelectionModel::ReadFileExtNameAndIconIndexL
+//
+// -----------------------------------------------------------------------------
+//
+void CAknFileSelectionModel::ReadFileExtNameAndIconIndexL( TResourceReader& aReader )
+ {
+ // File icon will be selected by file extname.
+ TInt count( aReader.ReadInt16() );
+ for ( TInt i = 0; i < count; i++ )
+ {
+ TCFDFileTypes type;
+ type.iFileType.Copy( aReader.ReadTPtrC() );
+ type.iIconIndex = aReader.ReadInt32();
+ iFileTypeArray->AppendL( type );
+ }
+ }
+// -----------------------------------------------------------------------------
// CAknFileSelectionModel::NewL
//
// -----------------------------------------------------------------------------
@@ -111,10 +130,23 @@
CAknFileSelectionModel::~CAknFileSelectionModel()
{
delete iRootFolderText;
- iImageIndexArray.Close();
iFs.Close();
-
- delete iItemWithImageIndex;
+ if ( iFileTypeArray )
+ {
+ iFileTypeArray->Reset();
+ delete iFileTypeArray;
+ }
+ if ( iLocalFileNameArray )
+ {
+ iLocalFileNameArray->Reset();
+ delete iLocalFileNameArray;
+ }
+ if ( iLocalDirNameArray )
+ {
+ iLocalDirNameArray->Reset();
+ delete iLocalDirNameArray;
+ }
+ delete iStringBuf;
if ( iFilterArray )
{
@@ -128,8 +160,6 @@
}
delete iLocalizer;
-
- iApaSession.Close();
}
@@ -171,9 +201,6 @@
// Set as current path
iCurrentPath = iParse;
- // Reset directory level
- iDirectoryLevel = 0;
-
errorCode = UpdateItemListL();
@@ -190,8 +217,8 @@
//
TInt CAknFileSelectionModel::AddFolderL( const TDesC& aFolder )
{
- // Cache the directory level because SetPath resets it
- TInt level( iDirectoryLevel );
+ // Open new sub-folder, directory level is increased
+ iDirectoryLevel++;
// The engine only supports adding one folder at a time
if ( AknCFDUtility::DirectoryCount( aFolder ) != 1 )
@@ -216,8 +243,6 @@
return errorCode;
}
- iDirectoryLevel = ++level;
-
return errorCode;
}
@@ -270,9 +295,11 @@
//
TInt CAknFileSelectionModel::UpdateItemListL()
{
+ // Clear array contents
iEntryArray->Reset();
- iImageIndexArray.Reset();
-
+ iLocalDirNameArray->Reset();
+ iLocalFileNameArray->Reset();
+
CDir* entryArray = ReadDirectory( iCurrentPath.DriveAndPath() );
if ( !entryArray )
{
@@ -281,157 +308,110 @@
CleanupStack::PushL( entryArray );
TInt itemCount( entryArray->Count() );
- if ( itemCount > 0 )
+ // entry index in iEntryArray
+ TInt entryIndex = 0;
+ for ( TInt i( 0 ); i < itemCount; i++ ) // Add entry or not
{
- TInt filterCount( iFilterArray->Count() );
- TInt filterIndex;
- TBool accepted;
- CDesC16Array* desC16FoldersArray = new ( ELeave )
- CDesC16ArrayFlat( KEntryArrayGranularity );
- CleanupStack::PushL( desC16FoldersArray );
- CDesC16Array* desC16FilesArray = new ( ELeave )
- CDesC16ArrayFlat( KEntryArrayGranularity );
- CleanupStack::PushL( desC16FilesArray );
- CArrayPakFlat<TEntry>* tmpFoldersArray = new( ELeave )
- CArrayPakFlat<TEntry>( KEntryArrayGranularity );
- CleanupStack::PushL( tmpFoldersArray );
- CArrayPakFlat<TEntry>* tmpFilesArray = new( ELeave )
- CArrayPakFlat<TEntry>( KEntryArrayGranularity );
- CleanupStack::PushL( tmpFilesArray );
-
- tmpFoldersArray->Reset();
- desC16FoldersArray->Reset();
- tmpFilesArray->Reset();
- desC16FilesArray->Reset();
-
- for ( TInt i( 0 ); i < itemCount; i++ ) // Generate filtered list
- {
- accepted = ETrue; // If there are no filters, accept the entry
- TEntry entry = ( *entryArray )[i];
- filterIndex = 0;
- // Go thru the filters while the entry is accepted
- while( ( filterIndex < filterCount ) && ( accepted ) )
- {
- accepted = iFilterArray->At( filterIndex )->Accept(
- iCurrentPath.DriveAndPath(), entry );
- filterIndex++;
- }
- if ( accepted ) // Directory entry has passed all filters
- {
- // Add filename to filtered list
- if ( entry.IsDir() )
- {
- desC16FoldersArray->AppendL( GetLocalizedName( entry.iName ) );
- tmpFoldersArray->AppendL( entry, sizeof( TEntry ) );
- }
- else
- {
- desC16FilesArray->AppendL( GetLocalizedName( entry.iName ) );
- tmpFilesArray->AppendL( entry, sizeof( TEntry ) );
- }
- }
- }
-
- TInt entryCount = 0;
- TInt index;
- TKeyArrayPak key( _FOFF( TEntry, iName ), ECmpCollated );
-
- // Add folder entries
- desC16FoldersArray->Sort( ECmpCollated );
- entryCount = desC16FoldersArray->MdcaCount();
- for( TInt j( 0 ); j < entryCount; j++ )
+ const TEntry& entry = ( *entryArray )[i];
+ if ( EntryIsAccepted( entry ) )
{
- for( TInt k( 0 ); k < entryCount; k++ )
+ // Add entry
+ if ( entry.IsDir() )
{
- if( ( *desC16FoldersArray )[j] ==
- GetLocalizedName( ( *tmpFoldersArray )[k].iName ) &&
- iEntryArray->Find( ( *tmpFoldersArray )[k], key, index ) != 0 )
+ // Entry is a directory
+ TFileTypeIcon folderIcon( EFolderIcon );
+
+ if( !AknCFDUtility::IsRemoteDrive( iCurrentPath.Drive() ) )
{
- TEntry tmpEntry = ( *tmpFoldersArray )[k];
-
- iEntryArray->AppendL( tmpEntry, sizeof( TEntry ) );
-
- // Entry is a directory
- TFileTypeIcon folderIcon( EFolderIcon );
-
- if( !AknCFDUtility::IsRemoteDrive( iCurrentPath.Drive() ) )
+ if ( ContainsSubfolders( entry.iName ) )
+ {
+ folderIcon = ESubFolderIcon;
+ }
+ else if ( !ContainsFiles( entry.iName ) )
{
- if ( ContainsSubfolders( tmpEntry.iName ) )
- {
- folderIcon = ESubFolderIcon;
- }
- else if ( !ContainsFiles( tmpEntry.iName ) )
- {
- folderIcon = EFolderEmptyIcon;
- }
+ folderIcon = EFolderEmptyIcon;
}
- iImageIndexArray.Append( folderIcon );
-
- break;
}
+ // List item uses localized name and icon index to show itself,
+ // common dialogs need to give user the entry's iName, list item
+ // need to bind unique entry. For sorting list and binding entry,
+ // save icon index, localized name and right entry index of iEntryArray
+ // in the element of iLocalDirNameArray and iLocalFileNameArray
+ TFileName name( GetLocalizedName( entry.iName ) );
+ // Append icon index number at the end of entry's localized name
+ name.AppendNumFixedWidth( folderIcon, EDecimal, KIndexDataLen );
+ // Append entry index number of iEntryArray in the end
+ name.AppendNumFixedWidth( entryIndex, EDecimal, KIndexDataLen );
+ iLocalDirNameArray->AppendL( name );
}
+ else
+ {
+ TInt icon(EUnknowTypeIcon);
+ icon = GetIconForFileL( entry.iName );
+ TFileName name( GetLocalizedName( entry.iName ) );
+ name.AppendNumFixedWidth( icon, EDecimal, KIndexDataLen );
+ name.AppendNumFixedWidth( entryIndex, EDecimal, KIndexDataLen );
+ iLocalFileNameArray->AppendL( name );
+ }
+ entryIndex++;
+ iEntryArray->AppendL( entry, sizeof( TEntry ) );
}
-
- // Add file entries
- desC16FilesArray->Sort( ECmpCollated );
- entryCount = desC16FilesArray->MdcaCount();
- for( TInt j( 0 ); j < entryCount; j++ )
- {
- for( TInt k( 0 ); k < entryCount; k++ )
- {
- if( ( *desC16FilesArray )[j] ==
- GetLocalizedName( ( *tmpFilesArray )[k].iName ) &&
- iEntryArray->Find( ( *tmpFilesArray )[k], key, index ) != 0 )
- {
- TEntry tmpFile = ( *tmpFilesArray )[k];
-
- iEntryArray->AppendL( tmpFile, sizeof( TEntry ) );
-
- // Entry is a file
- AppendIconForFileL( tmpFile.iName );
-
- break;
- }
- }
- }
-
- CleanupStack::PopAndDestroy( tmpFilesArray );
- CleanupStack::PopAndDestroy( tmpFoldersArray );
- CleanupStack::Pop( desC16FilesArray );
- desC16FilesArray->Reset();
- delete desC16FilesArray;
- CleanupStack::Pop( desC16FoldersArray );
- desC16FoldersArray->Reset();
- delete desC16FoldersArray;
}
CleanupStack::PopAndDestroy( entryArray );
-
+ // Sort list item to show
+ iLocalDirNameArray->Sort( ECmpCollated );
+ iLocalFileNameArray->Sort( ECmpCollated );
if ( AknCFDUtility::DirectoriesOnly( iDialogType ) )
{
// Set the current folder name as first item.
- // Current folder is for example "E:\Images\Holiday\"
- // Remove trailing backslash, we get "E:\Images\Holiday"
- // Parse the path with TParse and ask for NameAndExt().
- // TParse interpretes "Holiday" as file name and returns it.
-
- HBufC * bufFolder = HBufC::NewLC(KMaxPath);
- * bufFolder = iCurrentPath.DriveAndPath() ;
- TPtr folder = bufFolder->Des();
-
+ TPtr folder = iStringBuf->Des();
+ folder = iCurrentPath.DriveAndPath();
AknCFDUtility::RemoveTrailingBackslash( folder ); // ignore error
+ TParsePtr parsedFolder(folder);
+ folder = parsedFolder.NameAndExt();
+ TFileName name(folder);
+ TEntry folderEntry;
+ folderEntry.iName = name;
+ if ( iDirectoryLevel == 0 )
+ {
+ name = iRootFolderText->Des();
+ }
+ else
+ {
+ folder = iCurrentPath.DriveAndPath();
+ iLocalizer->SetFullPath( folder );
+ if( iLocalizer->IsLocalized() )
+ {
+ name = iLocalizer->LocalizedName();
+ }
+ }
+ name.AppendNumFixedWidth( EThisFolderIcon, EDecimal, KIndexDataLen );
+ name.AppendNumFixedWidth( entryIndex, EDecimal, KIndexDataLen );
+ iLocalDirNameArray->InsertL( 0, name );
+ iEntryArray->AppendL( folderEntry, sizeof(TEntry) );
+ }
+ return iEntryArray->Count();
+ }
- TParsePtr parsedFolder(folder);
-
- folder = parsedFolder.NameAndExt();
- iFolderEntry.iName = folder;
- iEntryArray->InsertL( 0, iFolderEntry, sizeof( TEntry ) );
- iImageIndexArray.Insert( EThisFolderIcon, 0 );
-
- CleanupStack::PopAndDestroy(); //bufFolder
+// -----------------------------------------------------------------------------
+// CAknFileSelectionModel::EntryIsAccepted
+// -----------------------------------------------------------------------------
+//
+TBool CAknFileSelectionModel::EntryIsAccepted( const TEntry& aEntry ) const
+ {
+ TInt filterCount( iFilterArray->Count() );
+ // Go through the filters while the entry is accepted
+ for ( TInt i = 0 ; i < filterCount ; ++i )
+ {
+ if ( !( iFilterArray->At( i )->Accept(
+ iCurrentPath.DriveAndPath(), aEntry ) ) )
+ {
+ // Some filter does not accept this entry
+ return EFalse;
+ }
}
-
- return iEntryArray->Count();
+ return ETrue;
}
// -----------------------------------------------------------------------------
@@ -442,7 +422,20 @@
//
const TEntry& CAknFileSelectionModel::Entry( const TInt& aIndex ) const
{
- return iEntryArray->At( aIndex );
+ TInt index = aIndex;
+ // List item sequence is arranged in MdcaPoint()
+ if ( aIndex < iLocalDirNameArray->Count() )
+ {
+ // Get right entry index of iEntryArray
+ TLex lex((*iLocalDirNameArray)[aIndex].Right(KIndexDataLen));
+ lex.Val( index );
+ }
+ else
+ {
+ TLex lex((*iLocalFileNameArray)[aIndex - iLocalDirNameArray->Count()].Right(KIndexDataLen));
+ lex.Val( index );
+ }
+ return iEntryArray->At( index );
}
// -----------------------------------------------------------------------------
@@ -519,60 +512,33 @@
//
TPtrC CAknFileSelectionModel::MdcaPoint( TInt aIndex ) const
{
- TEntry entry = iEntryArray->At( aIndex ); // reference
- TParsePtrC parsedEntry( entry.iName );
- TPtrC fileName( parsedEntry.NameAndExt() );
- TInt entryType( iImageIndexArray[ aIndex ] );
-
- TPtr itemWithImageIndex = iItemWithImageIndex->Des();
-
- switch( entryType )
+ // List items sequence follows the sequence of sorted array
+ TPtr listItem = iStringBuf->Des();
+ TInt icon(0);
+ if ( aIndex < iLocalDirNameArray->Count() )
{
- case EThisFolderIcon:
- {
- if ( iDirectoryLevel == 0 )
- {
- // Root folder
- fileName.Set( iRootFolderText->Des() );
- }
- else
- {
- // Not the root folder
- iLocalizer->SetFullPath( iCurrentPath.DriveAndPath() );
- if ( iLocalizer->IsLocalized() ) // Localized?
- {
- // Folder name is localized
- fileName.Set( iLocalizer->LocalizedName() );
- }
- }
- break;
- }
- case EFolderIcon: // fall through
- case ESubFolderIcon:
- case EFolderEmptyIcon:
- {
- itemWithImageIndex = iCurrentPath.DriveAndPath();
- itemWithImageIndex.Append( entry.iName );
- // ignore error:
- AknCFDUtility::AddTrailingBackslash( itemWithImageIndex );
- iLocalizer->SetFullPath( itemWithImageIndex );
- if( iLocalizer->IsLocalized() )
- {
- fileName.Set( iLocalizer->LocalizedName() );
- }
- break;
- }
- default: // EFileIcon
- {
- break;
- }
+ // Directories need to arrange at ahead of files
+ TInt len = (*iLocalDirNameArray)[aIndex].Length();
+ TLex lex( (*iLocalDirNameArray)[aIndex].Mid(
+ len - KIndexDataLen - KIndexDataLen, KIndexDataLen) );
+ // Get icon index for the item
+ lex.Val( icon );
+ listItem.Format( KImageHeader, icon );
+ // Append localized name as list item name
+ listItem.Append((*iLocalDirNameArray)[aIndex].Left(
+ len - KIndexDataLen - KIndexDataLen ) );
}
-
- _LIT( KImageHeader, "%d\t" );
- itemWithImageIndex.Format( KImageHeader, entryType );
- itemWithImageIndex.Append( fileName );
-
- return itemWithImageIndex;
+ else
+ {
+ TInt len = (*iLocalFileNameArray)[aIndex - iLocalDirNameArray->Count()].Length();
+ TLex lex( (*iLocalFileNameArray)[aIndex - iLocalDirNameArray->Count()].Mid(
+ len - KIndexDataLen - KIndexDataLen, KIndexDataLen) );
+ lex.Val( icon );
+ listItem.Format( KImageHeader, icon );
+ listItem.Append((*iLocalFileNameArray)[aIndex - iLocalDirNameArray->Count()].Left(
+ len - KIndexDataLen - KIndexDataLen ) );
+ }
+ return listItem;
}
// -----------------------------------------------------------------------------
@@ -622,26 +588,34 @@
//
TBool CAknFileSelectionModel::ContainsSubfolders( const TDesC& aFolder )
{
+ return ContainsContents( aFolder, KEntryAttDir | KEntryAttMatchExclusive );
+ }
+
+// -----------------------------------------------------------------------------
+// CAknFileSelectionModel::ContainsFiles
+//
+// -----------------------------------------------------------------------------
+//
+TBool CAknFileSelectionModel::ContainsFiles( const TDesC& aFolder )
+ {
+ return ContainsContents( aFolder, KEntryAttNormal );
+ }
+
+// -----------------------------------------------------------------------------
+// CAknFileSelectionModel::ContainsFiles
+//
+// -----------------------------------------------------------------------------
+//
+TBool CAknFileSelectionModel::ContainsContents(
+ const TDesC& aFolder, TUint aAttMask )
+ {
TPath directory( iCurrentPath.DriveAndPath() );
directory.Append( aFolder );
AknCFDUtility::AddTrailingBackslash( directory ); // ignore error
- // Keep old code for possible roll-back
- /*
- CDir* array = ReadDirectory( directory );
- if( ( !array ) || ( array->Count() == 0 ) || ( !(* array)[ 0 ].IsDir() ) )
- {
- delete array;
- return EFalse;
- }
- delete array;
- return ETrue;
- */
-
RDir dir;
TBool ret( EFalse );
- if ( dir.Open(
- iFs, directory, KEntryAttDir | KEntryAttMatchExclusive ) != KErrNone )
+ if ( dir.Open( iFs, directory, aAttMask ) != KErrNone )
{
return EFalse;
}
@@ -653,111 +627,23 @@
dir.Close();
return ret;
}
-
-void CAknFileSelectionModel::AppendIconForFileL(const TDesC& aFileName)
+// -----------------------------------------------------------------------------
+// CAknFileSelectionModel::AppendIconForFileL
+//
+// -----------------------------------------------------------------------------
+//
+TInt CAknFileSelectionModel::GetIconForFileL(const TDesC& aFileName ) const
{
- //TFileName absFileName( iCurrentPath.DriveAndPath() );
- HBufC *bufAbsFileName = HBufC::NewLC(KMaxPath);
- *bufAbsFileName = iCurrentPath.DriveAndPath();
- TPtr absFileName = bufAbsFileName->Des();
-
- absFileName.Append( aFileName );
- TUid uidIgnore;
- TDataType dataType;
- TInt err = iApaSession.AppForDocument( absFileName, uidIgnore, dataType );
- TInt iconIndex = EUnknowTypeIcon;
- CleanupStack::PopAndDestroy(); //bufAbsFileName
-
- if( err != KErrNone )
- {
- // Couldn't find out the data type, use generic file icon:
- iconIndex = EUnknowTypeIcon;
- }
- else
+ TParsePtrC ptr( aFileName );
+ TPtrC ptrc = ptr.Ext();
+ for ( TInt i = 0; i < iFileTypeArray->Count(); i++ )
{
- HBufC *bufDataTypeBuf = HBufC::NewLC(KMaxDataTypeLength);
- *bufDataTypeBuf = dataType.Des();
- TPtr dataTypeBuf = bufDataTypeBuf->Des();
-
- if( dataTypeBuf.MatchF( KCFDMimeTypeAudioVoiceRec ) == 0 ||
- dataTypeBuf.MatchF( KCFDMimeTypeAudioVoiceRec2 ) == 0 )
- {
- iconIndex = EVoiceRecFileIcon;
- }
- else if( dataTypeBuf.MatchF( KCFDMimeTypePlaylist ) == 0 )
+ if ( ptrc.MatchF( (*iFileTypeArray)[i].iFileType ) == 0 )
{
- iconIndex = EPlaylistFileIcon;
- }
- else if( dataTypeBuf.MatchF( KCFDMimeTypeRam ) == 0 )
- {
- iconIndex = ELinkFileIcon;
- }
- else if( dataTypeBuf.MatchF( KCFDMimeTypeAudio ) == 0 )
- {
- iconIndex = ESoundFileIcon;
- }
- else if( dataTypeBuf.MatchF( KCFDMimeTypeImageGms ) == 0 )
- {
- iconIndex = EGmsFileIcon;
- }
- else if( dataTypeBuf.MatchF( KCFDMimeTypeImage ) == 0 )
- {
- iconIndex = EImageFileIcon;
+ return (*iFileTypeArray)[i].iIconIndex;
}
- else if( dataTypeBuf.MatchF( KCFDMimeTypeVideo ) == 0 ||
- dataTypeBuf.MatchF( KCFDMimeTypeVideoRealMedia ) == 0 ||
- dataTypeBuf.MatchF( KCFDMimeTypeVideoSdp ) == 0 )
- {
- iconIndex = EVideoFileIcon;
- }
- else if( dataTypeBuf.MatchF( KCFDMimeTypeGame ) == 0 )
- {
- iconIndex = EGameFileIcon;
- }
- else if( dataTypeBuf.MatchF( KCFDMimeTypeNote ) == 0 )
- {
- iconIndex = ENoteFileIcon;
- }
- else if( dataTypeBuf.MatchF( KCFDMimeTypeJava ) == 0 )
- {
- iconIndex = EJavaFileIcon;
- }
- else if ( dataTypeBuf.MatchF( KCFDMimeTypeFlash ) == 0 )
- {
- iconIndex = EFlashFileIcon;
- }
- else
- {
- // Check from the file name extension, if it's a SIS file:
- //TParse fileName;
- //fileName.Set( aFileName, NULL, NULL );
-
- HBufC * bufFileName = aFileName.AllocLC();
- TPtr ptrFileName = bufFileName->Des();
- TParsePtr fileName(ptrFileName);
-
- TPtrC ext( fileName.Ext() );
- if( ext.CompareF( KCFDFileExtSis ) == 0
- || ext.CompareF( KCFDFileExtSisx ) == 0 )
- {
- iconIndex = ESisFileIcon;
- }
- // RApaLsSession does not recognize .mid's:
- else if( ext.CompareF( KCFDFileExtMid ) == 0 )
- {
- iconIndex = ESoundFileIcon;
- }
- else
- {
- iconIndex = EUnknowTypeIcon;
- }
- CleanupStack::PopAndDestroy(); //bufFileName
-
- }
-
- CleanupStack::PopAndDestroy(); //bufDataTypeBuf
}
- iImageIndexArray.Append( iconIndex );
+ return EUnknowTypeIcon;
}
TPtrC CAknFileSelectionModel::GetLocalizedName(const TDesC& aFileName)
@@ -765,7 +651,7 @@
TParsePtrC parsedEntry( aFileName );
TPtrC fileName( parsedEntry.NameAndExt() );
- TPtr itemWithImageIndex = iItemWithImageIndex->Des();
+ TPtr itemWithImageIndex = iStringBuf->Des();
itemWithImageIndex = iCurrentPath.DriveAndPath();
itemWithImageIndex.Append( aFileName);
@@ -779,30 +665,4 @@
return fileName;
}
-// -----------------------------------------------------------------------------
-// CAknFileSelectionModel::ContainsFiles
-//
-// -----------------------------------------------------------------------------
-//
-TBool CAknFileSelectionModel::ContainsFiles( const TDesC& aFolder )
- {
- TPath directory( iCurrentPath.DriveAndPath() );
- directory.Append( aFolder );
- AknCFDUtility::AddTrailingBackslash( directory ); // ignore error
-
- RDir dir;
- TBool ret( EFalse );
- if ( dir.Open(
- iFs, directory, KEntryAttNormal ) != KErrNone )
- {
- return EFalse;
- }
- TEntry entry;
- if ( dir.Read( entry ) == KErrNone )
- {
- ret = ETrue;
- }
- dir.Close();
- return ret;
- }
// End of File
--- a/commonuis/CommonDialogs/src/CAknFileSelectionModel.h Tue Jun 29 16:35:47 2010 +0100
+++ b/commonuis/CommonDialogs/src/CAknFileSelectionModel.h Tue Jul 13 11:29:56 2010 +0100
@@ -29,7 +29,8 @@
class MAknFileFilter;
class MAknFileSelectionObserver;
class CDirectoryLocalizer;
-
+class TResourceReader;
+class TCFDFileTypes;
/**
* A model class for file selection dialog. It is derived from
@@ -43,35 +44,7 @@
{
public:
-
-// Enumerations
-
- /**
- * Enumerations for images.
- */
- enum TFileTypeIcon
- {
- EFolderIcon,
- EFileIcon,
- ESubFolderIcon,
- EThisFolderIcon,
- EImageFileIcon,
- EGmsFileIcon,
- ELinkFileIcon,
- EVoiceRecFileIcon,
- ESoundFileIcon,
- EPlaylistFileIcon,
- ECompoFileIcon,
- ENoteFileIcon,
- ESisFileIcon,
- EVideoFileIcon,
- EGameFileIcon,
- EJavaFileIcon,
- EUnknowTypeIcon,
- EFolderEmptyIcon,
- EFlashFileIcon
- };
-
+
// Constructors and destructor
/**
@@ -186,23 +159,47 @@
CDir* ReadDirectory( const TDesC& aDirectory );
/**
- * Returns ETrue if a folder contains subfolders.
+ * Test if a folder contains subfolders.
* @param aFolder Relative folder to current path.
* @return Returns ETrue if a folder contains subfolders.
*/
TBool ContainsSubfolders( const TDesC& aFolder );
-
- void AppendIconForFileL(const TDesC& aFileName);
-
- TPtrC GetLocalizedName(const TDesC& aFileName);
/**
- * Returns ETrue if a folder contains files.
+ * Test if a folder contains files.
* @param aFolder Relative folder to current path.
* @return Returns ETrue if a folder contains files.
*/
TBool ContainsFiles( const TDesC& aFolder );
-
+ /**
+ * Test if a folder contains contents.
+ * @param aFolder Relative folder to current path.
+ * @return Returns ETrue if a folder contains contents.
+ */
+ TBool ContainsContents( const TDesC& aFolder, TUint aAttMask );
+ /**
+ * Get the file type icon.
+ * @param aFileName File name to get right icon.
+ * return Return incon index base on the extname of file.
+ */
+ TInt GetIconForFileL( const TDesC& aFileName ) const;
+ /**
+ * Get the file local name.
+ * @param aFileName File name to get its locallize name.
+ * @return Returns file's local name.
+ */
+ TPtrC GetLocalizedName(const TDesC& aFileName);
+ /**
+ * Test if a entry can be added in listbox.
+ * @param aEntry The entry which be added or not.
+ * @return Returns ETrue if a entry can be added.
+ */
+ TBool EntryIsAccepted( const TEntry& aEntry ) const;
+ /**
+ * Read file type and icon index from reader
+ * @param aReader Reader object
+ */
+ void ReadFileExtNameAndIconIndexL( TResourceReader& aReader );
// Constructors and destructor
void ConstructL();
@@ -217,9 +214,21 @@
// Own: An array of filtered directory entries.
CArrayPakFlat<TEntry>* iEntryArray;
-
- // Own: An array for image indices
- RArray<TInt> iImageIndexArray;
+
+ /* Own: An array which item has local name of file entry
+ * with icon index and entry index in iEntryArray
+ * */
+ CDesC16ArraySeg * iLocalFileNameArray;
+
+ /* Own: An array which item has local name of directory entry
+ * with icon index and entry index in iEntryArray
+ * */
+ CDesC16ArraySeg * iLocalDirNameArray;
+
+ /* Own: An array which item has extent name of file entry
+ * with icon index for the file type
+ * */
+ CArrayFixFlat<TCFDFileTypes>* iFileTypeArray;
// Own: // An array of filters.
CArrayPtrSeg<MAknFileFilter>* iFilterArray;
@@ -242,14 +251,9 @@
// Own: Root folder text
HBufC* iRootFolderText;
- // Own: RApaLsSession for getting mime-types for files:
- RApaLsSession iApaSession;
-
- TEntry iFolderEntry;
-
TParse iParse;
-
- HBufC * iItemWithImageIndex;
+ // Own: A buffer for using
+ HBufC * iStringBuf;
};
--- a/commonuis/CommonDialogs/src/caknmemoryselectiondialogmultidrive.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/commonuis/CommonDialogs/src/caknmemoryselectiondialogmultidrive.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -619,9 +619,9 @@
EMbmAknmemorycarduiQgn_prop_mmc_non_mask );
//For external USB Driver
AknCFDUtility::AppendSkinnedImageToArrayL( *eikEnv, *aIconArray,
- skin, KAknsIIDQgnPropFmgrUsbMemcSub, KCommonDialogsBitmapFile,
- EMbmCommondialogsQgn_prop_usb_memc_sub,
- EMbmCommondialogsQgn_prop_usb_memc_sub_mask );
+ skin, KAknsIIDQgnPropUsbMemc, KCommonDialogsBitmapFile,
+ EMbmCommondialogsQgn_prop_usb_memc,
+ EMbmCommondialogsQgn_prop_usb_memc_mask );
}
_LOG1( "[CAknMemorySelectionDialog] aIconArray count=%d",
aIconArray->Count() );
--- a/commonuis/CommonDialogs/src/caknmemoryselectionmodelmultidrive.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/commonuis/CommonDialogs/src/caknmemoryselectionmodelmultidrive.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -303,6 +303,18 @@
resource = R_CFD_QTN_MEMC_REMOTE_DRIVE;
break;
}
+ case ETextUSBDefaultName:
+ {
+ // qtn.memc.usb.available.single.list
+ resource = R_CFD_QTN_MEMC_USB_AVAILABLE_SINGLE_LIST;
+ break;
+ }
+ case ETextUSBUnavailable:
+ {
+ // qtn.memc.usb.unavailable.single.list
+ resource = R_CFD_QTN_MEMC_USB_UNAVAILABLE_SINGLE_LIST;
+ break;
+ }
}
return resource;
}
@@ -353,6 +365,13 @@
resource = R_CFD_QTN_MEMC_REMOTE_DRIVE;
break;
}
+ case ETextUSBDefaultName:
+ case ETextUSBUnavailable:
+ {
+ // qtn.memc.usb.available.single.list
+ resource = R_CFD_QTN_MEMC_USB_AVAILABLE_SINGLE_LIST;
+ break;
+ }
}
return resource;
}
@@ -380,13 +399,6 @@
resource = R_CFD_QTN_MEM_MASS_STORAGE_DOUBLE_LIST;
break;
}
- case ETextInternalMassStorageUnavailable:
- {
- // Unavailable:qtn.memc.mmc.unavailable.double
- // Only for second row
- resource = R_CFD_QTN_MEMC_MMC_UNAVAILABLE_DOUBLE;
- break;
- }
case ETextMMCNamed:
{
// If MMC's name is given.
@@ -407,18 +419,27 @@
resource = R_CFD_QTN_MEMC_MMC_LOCKED_DOUBLE;
break;
}
- case ETextMMCUnavailable:
- {
- // qtn.memc.mmc.unavailable.double
- resource = R_CFD_QTN_MEMC_MMC_UNAVAILABLE_DOUBLE;
- break;
- }
case ETextRemoteDrive:
{
// TODO: To be checked because of missing data in UI spec.
resource = R_CFD_QTN_MEMC_REMOTE_DRIVE_DOUBLE_LIST;
break;
}
+ case ETextUSBDefaultName:
+ {
+ // qtn.memc.usb.available.double
+ resource = R_CFD_QTN_MEMC_USB_AVAILABLE_DOUBLE;
+ break;
+ }
+ case ETextMMCUnavailable:
+ case ETextUSBUnavailable:
+ case ETextInternalMassStorageUnavailable:
+ {
+ // Unavailable:qtn.memc.mmc.unavailable.double
+ // Only for second row
+ resource = R_CFD_QTN_MEMC_MMC_UNAVAILABLE_DOUBLE;
+ break;
+ }
}
return resource;
@@ -959,7 +980,7 @@
{
StringLoader::Format(
textString,
- *iLocStringArray[ ETextInternalMassStorage ],
+ *iLocStringArray[ ETextUSBDefaultName ],
KNoIndex,
driveUnit.Name()
);
@@ -969,7 +990,7 @@
{
StringLoader::Format(
textString,
- *iLocStringArray[ ETextInternalMassStorageUnavailable ],
+ *iLocStringArray[ ETextUSBUnavailable ],
KNoIndex,
driveUnit.Name()
);
@@ -1001,7 +1022,7 @@
{
StringLoader::Format(
itemString,
- *iLocStringArray[ ETextInternalMassStorage ],
+ *iLocStringArray[ ETextUSBDefaultName ],
KNoIndex,
driveUnit.Name()
);
@@ -1034,7 +1055,7 @@
// Use default drive description
StringLoader::Format(
textString,
- *iLocStringArray[ ETextInternalMassStorage ],
+ *iLocStringArray[ ETextUSBDefaultName ],
KNoIndex,
driveUnit.Name()
);
@@ -1066,8 +1087,7 @@
else
{
itemString.Append(
- *iLocStringArray[
- ETextInternalMassStorageUnavailable ] );
+ *iLocStringArray[ ETextUSBUnavailable ] );
}
break;
}
@@ -1321,6 +1341,21 @@
driveNumber = TDriveNumber( i );
rootPath.Zero();
memoryType = AknCFDUtility::DriveMemoryTypeL( driveNumber );
+ if ( memoryType == AknCommonDialogsDynMem::EMemoryTypeMMCExternal &&
+ ( iIncludedMedias & AknCommonDialogsDynMem::EMemoryTypeMMCExternalInDevice ) )
+ {
+ // Hide usb memory
+ TCFDDriveInfo info;
+ AknCFDUtility::DriveInfoL( driveNumber, info );
+ if ( info.iStatus & DriveInfo::EDriveUsbMemory )
+ {
+ continue;
+ }
+ else
+ {
+ memoryType = AknCommonDialogsDynMem::EMemoryTypeMMCExternalInDevice;
+ }
+ }
if( memoryType & iIncludedMedias )
{
User::LeaveIfError(
@@ -1368,6 +1403,21 @@
if (drive)
{
memoryType = AknCFDUtility::DriveMemoryTypeL( driveNumber );
+ if ( memoryType == AknCommonDialogsDynMem::EMemoryTypeMMCExternal &&
+ ( iIncludedMedias & AknCommonDialogsDynMem::EMemoryTypeMMCExternalInDevice ) )
+ {
+ // Hide usb memory
+ TCFDDriveInfo info;
+ AknCFDUtility::DriveInfoL( driveNumber, info );
+ if ( info.iStatus & DriveInfo::EDriveUsbMemory )
+ {
+ continue;
+ }
+ else
+ {
+ memoryType = AknCommonDialogsDynMem::EMemoryTypeMMCExternalInDevice;
+ }
+ }
if( memoryType & iIncludedMedias )
{
User::LeaveIfError(
Binary file commonuis/CommonUi/CenRep/keys_commonui.xls has changed
Binary file commonuis/CommonUi/conf/commonui.confml has changed
--- a/commonuis/CommonUi/src/FindItemDialog.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/commonuis/CommonUi/src/FindItemDialog.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -2440,8 +2440,12 @@
if ( found && iEdwin && iEdwin->TextView() )
{
- iEdwin->TextView()->SetSelectionVisibilityL( ETrue );
- iEdwin->SetSelectionL( item.iStartPos, item.iStartPos + item.iLength );
+ TRAPD( err, iEdwin->TextView()->SetSelectionVisibilityL( ETrue ) );
+ if ( KErrNone == err )
+ {
+ //When set selection leaves, we can't highlight the item, so just ignore this leave.
+ TRAP_IGNORE( iEdwin->SetSelectionL( item.iStartPos, item.iStartPos + item.iLength ) );
+ }
}
}
--- a/commonuisupport/uikon/test/scripts/uiktest_T_Backup.script Tue Jun 29 16:35:47 2010 +0100
+++ b/commonuisupport/uikon/test/scripts/uiktest_T_Backup.script Tue Jul 13 11:29:56 2010 +0100
@@ -16,6 +16,10 @@
//
PRINT Run TBackup test
//
+
+// Init MTM before it will be used by backup service
+RUN_WS_PROGRAM mailinit.exe
+
LOAD_SUITE UiktestServer
RUN_TEST_STEP 1000 UiktestServer TBackup
--- a/lafagnosticuifoundation/animation/tef/TFrames.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/lafagnosticuifoundation/animation/tef/TFrames.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -265,8 +265,9 @@
iTransSpriteAnimWin->Window()->Invalidate();
iFrameWin->Window()->Invalidate();
iTransFrameWin->Window()->Invalidate();
- Ws().Flush();
+ Ws().Finish();
WaitForRedrawsToFinish();
+ Ws().Finish();
// Start the animations:
TAnimationConfig config;
@@ -288,17 +289,27 @@
break;
}
iBasicAnimations[frame]->Start(config);
+ Wait(KFramesFrameLength);
+ Ws().Finish();
+ WaitForRedrawsToFinish();
+
iSpriteAnimations[frame]->Start(config);
+ Wait(KFramesFrameLength);
+ Ws().Finish();
+ WaitForRedrawsToFinish();
}
// Why * 4? because we seem to go very slowly?
Wait(KFramesFrameLength * iBasicAnimations.Count() * 4);
-
- // Verify output:
+ Ws().Finish();
WaitForRedrawsToFinish();
- ANIMTESTRECT(TRect(iBasicAnimWinPosition, iWinSize), TRect(iFrameWinPosition, iWinSize));
+ Ws().Finish();
+
+ // When verifying output,
+ // Should have at least one animation frame drawn
+ ANIMTESTRECT(TRect(iBasicAnimWinPosition, TSize(KFramesWindowHeight,KFramesWindowHeight)), TRect(iFrameWinPosition, TSize(KFramesWindowHeight,KFramesWindowHeight)));
if(!(aFlags & ENoSprites))
- ANIMTESTRECT(TRect(iSpriteAnimWinPosition, iWinSize), TRect(iFrameWinPosition, iWinSize));
+ ANIMTESTRECT(TRect(iSpriteAnimWinPosition, TSize(KFramesWindowHeight,KFramesWindowHeight)), TRect(iFrameWinPosition, TSize(KFramesWindowHeight,KFramesWindowHeight)));
}
/**
@SYMTestCaseID UIF-animation-TFrames-TestFramesL2
--- a/lafagnosticuifoundation/bmpanimation/inc/bmpansrv.h Tue Jun 29 16:35:47 2010 +0100
+++ b/lafagnosticuifoundation/bmpanimation/inc/bmpansrv.h Tue Jul 13 11:29:56 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1997-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -272,7 +272,7 @@
// Returns ETrue every time the index frame is valid, otherwise it returns EFalse.
inline TBool CBitmapAnim::IsFrameDisplayable() const
- { return ( (iIndex >= 0) && iBitmapAnimFrameDataArray[iIndex]->iBitmap ); }
+ { return ( (iIndex >= 0) && (iIndex < Count()) && iBitmapAnimFrameDataArray[iIndex]->iBitmap ); }
// Returns ETrue if the animation is running, otherwise it returns EFalse.
inline TBool CBitmapAnim::IsRunning() const
--- a/psln/Group/101F8770.xml Tue Jun 29 16:35:47 2010 +0100
+++ b/psln/Group/101F8770.xml Tue Jul 13 11:29:56 2010 +0100
@@ -7,9 +7,9 @@
<PowerSaveModeConfig>
<Setting mode="1"><!-- PSM mode Full PSM -->
- <SetItem key="2" type="0" value="1"></SetItem>
+ <SetItem key="2" type="0" value="4"></SetItem>
</Setting>
<Setting mode="2"><!-- PSM mode Partial PSM-->
- <SetItem key="2" type="0" value="1"></SetItem>
- </Setting>
+ <SetItem key="2" type="0" value="4"></SetItem>
+ </Setting>
</PowerSaveModeConfig>
--- a/psln/Rss/Psln.rss Tue Jun 29 16:35:47 2010 +0100
+++ b/psln/Rss/Psln.rss Tue Jul 13 11:29:56 2010 +0100
@@ -243,9 +243,7 @@
{
items =
{
- LBUF { txt = qtn_sanim_object_none; },
- LBUF { txt = qtn_sanim_object_date; },
- LBUF { txt = qtn_sanim_object_text; }
+ LBUF { txt = qtn_sanim_object_none; }
};
}
--- a/psln/Src/PslnGeneralThemeView.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/psln/Src/PslnGeneralThemeView.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -597,8 +597,11 @@
//
void CPslnGeneralThemeView::HightlightDefaultSkin()
{
- CPslnGeneralThemeContainer* container = static_cast<CPslnGeneralThemeContainer*>(iContainer);
- TInt modifier = container->IsEmbeddedLinkVisible( );
- container->SetCurrentItemIndex( modifier );
+ if ( iContainer )
+ {
+ CPslnGeneralThemeContainer* container = static_cast<CPslnGeneralThemeContainer*>(iContainer);
+ TInt modifier = container->IsEmbeddedLinkVisible( );
+ container->SetCurrentItemIndex( modifier );
+ }
}
// End of File
--- a/psln/Src/PslnScreenSaverView.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/psln/Src/PslnScreenSaverView.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -48,7 +48,7 @@
// CONSTANTS
// Number of default system screensavers.
-const TInt KPslnSystemScreenSavers = 3;
+const TInt KPslnSystemScreenSavers = 1;
// Value in PubSub when screensaver preview is off.
const TInt KPslnScreenSaverPreviewOff = 0;
@@ -203,7 +203,7 @@
TInt newDefault = iModel->CurrentPropertyIndexL( KPslnScreenSettingId );
if ( newDefault == KErrNotFound )
{
- // If no default found, assume that date is default.
+ // If no default found, assume that None is default.
newDefault = 0;
iModel->SetCurrentPropertyTypeL(
KPslnScreenSettingId,
--- a/psln/Src/PslnSoundActivator.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/psln/Src/PslnSoundActivator.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -129,7 +129,7 @@
TPslnSoundActivatorEntry entry;
entry.iFullName = fullNamePtr;
entry.iID = KPslnSoundItems[i];
- iSoundArray.Append( entry );
+ iSoundArray.AppendL( entry );
}
CleanupStack::PopAndDestroy( 2, data ); // data, fullName
--- a/psln/Src/PslnUi.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/psln/Src/PslnUi.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -1076,12 +1076,12 @@
PSLN_TRACE_DEBUG("CPslnUi::ActivateSkinL directly");
shownote = iModel->ActivateSkinL( skinIndex );
- ShowProgressBarL();
if ( shownote )
{
PSLN_TRACE_DEBUG("CPslnUi::ActivateSkinL skin activated");
SetStateOn( EPslnSkinActivated );
+ ShowProgressBarL();
}
else
{
--- a/psln/pslnengine/src/PslnModel.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/psln/pslnengine/src/PslnModel.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -424,12 +424,6 @@
// Add descriptors for system screensavers
iScreensaverFilenameArr =
new (ELeave) CDesC16ArrayFlat( KPslnSsArrayGranularity );
- iScreensaverFilenameArr->AppendL( KPslnScreenSaverTypeDateTime );
- iScreensaverFilenameArr->AppendL( KPslnScreenSaverTypeText );
-
- // System screensavers have no capabilities
- User::LeaveIfError( iScreensaverCapsArr.Append( EFalse ) );
- User::LeaveIfError( iScreensaverCapsArr.Append( EScpCapsConfigure ) );
if ( IsSupportScreenSaverNoneOption() )
{
--- a/psln/pslnengine/src/PslnSkinStore.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/psln/pslnengine/src/PslnSkinStore.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -184,7 +184,7 @@
{
// Default skin found.
iSkinArray.Remove( i );
- iSkinArray.Insert( entry, 0 );
+ iSkinArray.InsertL( entry, 0 );
entry = NULL; // this is not owned by us.
break;
}
--- a/psln/pslnslidesetdialog/data/pslnslidesetdialogrsc.rss Tue Jun 29 16:35:47 2010 +0100
+++ b/psln/pslnslidesetdialog/data/pslnslidesetdialogrsc.rss Tue Jul 13 11:29:56 2010 +0100
@@ -238,7 +238,7 @@
RESOURCE SLIDER r_psln_duration_slider
{
layout = EAknSettingsItemSliderLayout;
- minvalue = 1;
+ minvalue = 5;
maxvalue = 60;
step = 1;
valuetype = EAknSliderValueBareFigure;
--- a/psln/pslnslidesetdialog/loc/pslnslidesetdialog.loc Tue Jun 29 16:35:47 2010 +0100
+++ b/psln/pslnslidesetdialog/loc/pslnslidesetdialog.loc Tue Jul 13 11:29:56 2010 +0100
@@ -112,7 +112,7 @@
// l:slider_set_pane_2
// r:3.2
//
-#define qtn_sanim_duration_slider_min "1 sec."
+#define qtn_sanim_duration_slider_min "5 sec."
// d:Text in slider control.
// d:Maximum setting value for Slide set duration.
--- a/psln/pslnslidesetdialog/src/pslnslidesetmodel.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/psln/pslnslidesetdialog/src/pslnslidesetmodel.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -47,8 +47,8 @@
const TInt KPslnSlideSetBacklightOff = 0;
// Slide set interval default value: 10min.
const TInt KPslnSlideSetDefaultInterval = EPslnSlideSetInterval10Min;
-// Slide set minimum duration is 1 second.
-const TInt KPslnSlideSetMinDuration = 1;
+// Slide set minimum duration is 5 second.
+const TInt KPslnSlideSetMinDuration = 5;
// Slide set maximum duration is 60 seconds.
const TInt KPslnSlideSetMaxDuration = 60;
// Slide set maximum backlight period is 30secs.
--- a/uifw/AknGlobalUI/AknCapServer/src/AknCapServerEntry.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AknGlobalUI/AknCapServer/src/AknCapServerEntry.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -371,10 +371,6 @@
TFileName fileName(KEikSrvUIResFileName);
BaflUtils::NearestLanguageFile(iEikonEnv->FsSession(),fileName);
iResourceFileOffset=iCoeEnv->AddResourceFileL(fileName);
-
- // Create FSW
- iFSControl= new (ELeave) CAknFastSwapWindowControl(*this);
- iFSControl->ConstructL();
// MMC unlocker
iMMCUnlock = CAknMMCPasswordRequester::NewL();
@@ -489,8 +485,14 @@
// Create capserver discreetpopuphandler
CAknCapServerDiscreetPopupHandler::CreateDiscreetPopupHandlerL();
- LoadAlternateFsPlugin();
-
+
+ LoadAlternateFsPlugin();
+ // Create FSW
+ if ( iAlternateFS == NULL )
+ {
+ iFSControl= new (ELeave) CAknFastSwapWindowControl(*this);
+ iFSControl->ConstructL();
+ }
ProcessInitFlipStatus();
}
@@ -584,19 +586,22 @@
}
else
{
- if ( aMessage.Int0() )
- {
- TInt err = KErrNone;
- TRAP( err, iFSControl->InitializeWindowGroupListL( EFalse ));
- if ( !err )
- {
- iFSControl->RunFastSwapL();
+ if ( iFSControl )
+ {
+ if ( aMessage.Int0() )
+ {
+ TInt err = KErrNone;
+ TRAP( err, iFSControl->InitializeWindowGroupListL( EFalse ));
+ if ( !err )
+ {
+ iFSControl->RunFastSwapL();
+ }
}
- }
- else
- {
- iFSControl->CloseFastSwap();
- }
+ else
+ {
+ iFSControl->CloseFastSwap();
+ }
+ }
}
}
aMessage.Complete(KErrNone);
@@ -607,7 +612,10 @@
TInt err = UpdateTaskListL( ETrue );
if ( err != KErrNone )
{
- iFSControl->CloseFastSwap();
+ if ( iFSControl )
+ {
+ iFSControl->CloseFastSwap();
+ }
}
aMessage.Complete(err);
break;
@@ -802,11 +810,15 @@
iAlternateFS->HandleShortAppKeyPress();
return ETrue;
}
- if (iFSControl->IsVisible())
- {
- iFSControl->HandleShortAppsKeyPressL();
- return ETrue;
- }
+ if ( iFSControl )
+ {
+ if (iFSControl->IsVisible())
+ {
+ iFSControl->HandleShortAppsKeyPressL();
+ return ETrue;
+ }
+ }
+
return EFalse;
}
@@ -821,21 +833,25 @@
}
else
{
- if (iFSControl->IsVisible())
- {
- iFSControl->HandleLongAppsKeyPressL();
- }
- else
- {
- if (iFSControl->VisibleWindowGroupsCountL()<1)
+ if ( iFSControl )
+ {
+ if ( iFSControl->IsVisible())
{
- return EFalse;
+ iFSControl->HandleLongAppsKeyPressL();
}
else
{
- iFSControl->RunFastSwapL();
+ if (iFSControl->VisibleWindowGroupsCountL()<1)
+ {
+ return EFalse;
+ }
+ else
+ {
+ iFSControl->RunFastSwapL();
+ }
}
- }
+ }
+
}
}
return ETrue;
@@ -1007,7 +1023,9 @@
void CAknCapAppServerAppUi::HandleWsEventL(const TWsEvent& aEvent,CCoeControl* aDestination)
{
- if ( iMessageReaderLongPressDetector && !IsAppsKeySuppressed() && !iFSControl->IsDisplayed() )
+ if ( iMessageReaderLongPressDetector &&
+ !IsAppsKeySuppressed() &&
+ ( iFSControl == NULL || !iFSControl->IsDisplayed() ) )
{
// Message Reader can be launched by long pressing left soft key
// events need to be intercepted/consumed before they are forwarded to cba
@@ -1067,7 +1085,7 @@
TInt CAknCapAppServerAppUi::UpdateTaskListL( TBool aTaskListRefreshNeeded )
{
TInt err = KErrNone;
- if ( iFSControl->IsDisplayed() )
+ if ( iFSControl && iFSControl->IsDisplayed() )
{
// update window group list (task list)
TInt windowGroupListChanged = ETrue;
--- a/uifw/AknGlobalUI/AknNfySrv/inc/AknNfySrv.h Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AknGlobalUI/AknNfySrv/inc/AknNfySrv.h Tue Jul 13 11:29:56 2010 +0100
@@ -57,7 +57,7 @@
RPointerArray<CAknNotifierEntry> iNotifierArray;
RPointerArray<CAknNotifLibraryEntry> iLibraryArray;
- CIdle* iLibraryRemover;
+ CPeriodic* iLibraryRemover;
private: // from MNotifLibraryOwningServer
void UnbalanceReferenceCount(TUid aUid, TBool aAddCount);
--- a/uifw/AknGlobalUI/AknNfySrv/src/AknNfySrv.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AknGlobalUI/AknNfySrv/src/AknNfySrv.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -20,7 +20,7 @@
#include "AknNfySrv.h"
const TUid KDllUid = {0x10000079};
-
+const TInt KCheckInterval = 1000000 / 64;
class CAknNotifierEntry: public CBase
{
@@ -65,6 +65,7 @@
if (me->iLibraryArray[ii]->iNestingLevel >= CActiveScheduler::Current()->StackDepth())
{
me->DoUnload(me->iLibraryArray[ii]->iLibraryName->Des());
+ me->iLibraryRemover->Cancel();
}
else
{
@@ -111,7 +112,7 @@
{
if (!iLibraryRemover)
{
- iLibraryRemover = CIdle::NewL(CActive::EPriorityIdle); // there is no hurry
+ iLibraryRemover = CPeriodic::NewL(CActive::EPriorityIdle); // there is no hurry
}
else if (iLibraryRemover->IsActive())
{
@@ -291,7 +292,7 @@
{
if (!iLibraryRemover->IsActive())
{
- iLibraryRemover->Start(TCallBack(CheckUnusedLibraries, this));
+ iLibraryRemover->Start(0, KCheckInterval, TCallBack(CheckUnusedLibraries, this));
}
}
}
--- a/uifw/AknGlobalUI/OldStyleNotif/Inc/AknSoftNotificationPlugin.h Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AknGlobalUI/OldStyleNotif/Inc/AknSoftNotificationPlugin.h Tue Jul 13 11:29:56 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2008 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"
@@ -31,7 +31,6 @@
#include <AknNotify.h>
#include "AknSystemPopup.h"
#include "AknGroupedNotifierNote.h"
-#include "AknNotifierControllerPlugin.h"
#include "aknprivatesoftnotificationparameters.h"
#include "aknmessagereaderlongpressdetector.h" // MAknGroupedNoteObserver
@@ -69,24 +68,15 @@
NONSHARABLE_CLASS(CAknSoftNotificationSubject) :
public CBase,
public MEikSrvNotifierBase2,
- public MAknGroupedNotifierNoteObserver,
- public MAknKeyLockObserver,
+ public MAknGroupedNotifierNoteObserver,
public MSoftNotificationObserver,
public MAknMessageNotifierObserver
{
public: // Constructors and destructor
static CAknSoftNotificationSubject* NewL(
- MAknKeyLockController* aKeyLockObserver,
- CAknGlobalNoteSubject* aGlobalNoteController);
+ CAknGlobalNoteSubject* aGlobalNoteController );
public: // Functions from base classes
- /**
- * From MAknKeyLockController
- * Called when the status of keylock changes.
- *
- * @param aStatus the new status of the keylock.
- */
- virtual void KeyLockStatusChange(TKeyLockStatus aStatus);
/**
* From MEikSrvNotifierBase.
@@ -222,8 +212,7 @@
* The constructor is private.
*/
CAknSoftNotificationSubject(
- MAknKeyLockController* aKeyLockObserver,
- CAknGlobalNoteSubject* aGlobalNoteController);
+ CAknGlobalNoteSubject* aGlobalNoteController );
void HandleNotifierMessageL(const TDesC8& aBuffer, TInt& aNoteId );
@@ -284,8 +273,6 @@
TBool CheckIfAlreadyExists(TAknSoftNotificationType aType);
- TBool AutoLockEnabled();
-
void SetNcnFlag(TBool aValue);
static TInt HandleNcnFlagStateChange(TAny *aPtr);
@@ -301,7 +288,7 @@
private: // Data
TNotifierInfo iInfo;
- MAknKeyLockController* iKeyLockController;
+
CAknGlobalNoteSubject* iGlobalNoteController;
// The array keeps track of unselected soft notifications in priority order.
@@ -351,7 +338,6 @@
TBool iNotificationsSaved;
CIdle* iIdle;
static TInt SetIdleStateFalse(TAny* aThis);
- TBool iKeysLocked;
public: // To allow static method above access this.
TBool iIdleStateActive;
--- a/uifw/AknGlobalUI/OldStyleNotif/Src/AknNotifyPlugin.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AknGlobalUI/OldStyleNotif/Src/AknNotifyPlugin.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -52,7 +52,7 @@
if (!err)
{
- iArray.Append(aId);
+ err = iArray.Append(aId);
}
}
--- a/uifw/AknGlobalUI/OldStyleNotif/Src/AknSoftNotificationPlugin.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AknGlobalUI/OldStyleNotif/Src/AknSoftNotificationPlugin.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2008 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"
@@ -409,12 +409,10 @@
// might leave.
//
CAknSoftNotificationSubject::CAknSoftNotificationSubject(
- MAknKeyLockController* aKeyLockController,
- CAknGlobalNoteSubject* aGlobalNoteController)
-:iKeyLockController(aKeyLockController),
- iGlobalNoteController(aGlobalNoteController),
- iNotificationsSaved(ETrue), // We'll have to assume there are saved notifications on startup
- iUniqueIdCounter(KMinimumUniqueId)
+ CAknGlobalNoteSubject* aGlobalNoteController )
+ : iGlobalNoteController( aGlobalNoteController ),
+ iNotificationsSaved( ETrue ), // We'll have to assume there are saved notifications on startup
+ iUniqueIdCounter( KMinimumUniqueId )
{
iMessagingRepository = NULL;
iDynamicSoftNoteManager = CAknDynamicSoftNoteEventManager::UniqueInstance();
@@ -424,8 +422,6 @@
// EPOC default constructor can leave.
void CAknSoftNotificationSubject::ConstructL()
{
- iKeyLockController->AddObserverL(this);
-
iSoftNoteEntryList = new(ELeave)CArrayFixFlat<TSoftNoteEntry>(KSoftNoteGranularity);
iGlobalNoteController->SetSoftNoteObserver(this);
// Set initial state to 'non-idle'
@@ -471,11 +467,6 @@
delete iIdle;
delete iCoverClient;
-
- if(iKeyLockController)
- {
- iKeyLockController->RemoveObserver(this);
- }
if ( iMessagingRepository )
{
@@ -486,52 +477,17 @@
// Two-phased constructor.
CAknSoftNotificationSubject* CAknSoftNotificationSubject::NewL(
- MAknKeyLockController* aKeyLockController,
CAknGlobalNoteSubject* aGlobalNoteController )
{
CAknSoftNotificationSubject* self = new (ELeave) CAknSoftNotificationSubject(
- aKeyLockController,
- aGlobalNoteController);
+ aGlobalNoteController );
CleanupStack::PushL( self );
self->ConstructL();
- CleanupStack::Pop( self);
+ CleanupStack::Pop( self );
return self;
}
-
-// ---------------------------------------------------------
-// CAknSoftNotificationSubject::KeyLockStatusChange
-// ---------------------------------------------------------
-//
-void CAknSoftNotificationSubject::KeyLockStatusChange(TKeyLockStatus aStatus)
- {
- if ( aStatus == EKeyLockEnabled )
- {
- iKeysLocked = ETrue;
- }
- else if ( aStatus == EKeyLockDisabled )
- {
- iKeysLocked = EFalse;
- }
-
- if ( iGroupedNote && iGroupedNote->ListBox())
- {
- if ( aStatus == EKeyLockEnabled )
- {
- iGroupedNote->ListBox()->View()->ItemDrawer()->SetFlags(
- CListItemDrawer::EDisableHighlight);
-
- iGroupedNote->DrawDeferred();
- }
- else if ( aStatus == EKeyLockDisabled )
- {
- iGroupedNote->ListBox()->View()->ItemDrawer()->ClearFlags(
- CListItemDrawer::EDisableHighlight);
-
- iGroupedNote->DrawDeferred();
- }
- }
- }
+
// ---------------------------------------------------------
// CAknSoftNotificationSubject::Release()
@@ -1651,11 +1607,6 @@
delete iGroupedNote;
iGroupedNote = note;
- if ( iKeysLocked && note )
- {
- iGroupedNote->ListBox()->View()->ItemDrawer()->SetFlags(
- CListItemDrawer::EDisableHighlight );
- }
}
// ---------------------------------------------------------
@@ -2323,11 +2274,6 @@
}
-TBool CAknSoftNotificationSubject::AutoLockEnabled()
- {
- return EFalse;
- }
-
void CAknSoftNotificationSubject::AddNewCustomNoteL(
RReadStream& readStream, TInt aCount, TBool aNewNote )
{
--- a/uifw/AknGlobalUI/OldStyleNotif/Src/OldStylePlugin.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AknGlobalUI/OldStyleNotif/Src/OldStylePlugin.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2008 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"
@@ -74,8 +74,7 @@
// Soft note notifier.
// ----------------------------
CAknSoftNotificationSubject* softNotificationSubject = CAknSoftNotificationSubject::NewL(
- keyLockNotifier,
- globalNoteSubject);
+ globalNoteSubject );
CleanupStack::PushL(softNotificationSubject);
subjects->AppendL(softNotificationSubject);
--- a/uifw/AknGlobalUI/OldStyleNotif/Src/aknkeylocknotifier.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AknGlobalUI/OldStyleNotif/Src/aknkeylocknotifier.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -50,7 +50,7 @@
#include <ctsydomainpskeys.h>
#include <bafindf.h>
#include "AknNotifyPlugin.hrh"
-
+#include "akntrace.h"
#ifdef _DEBUG
@@ -243,6 +243,8 @@
//
TInt CAknKeylockScreenSaverObserver::Start()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( IsActive() )
{
return KErrInUse;
@@ -250,7 +252,9 @@
iStatus = KRequestPending;
iScreenSaverActiveProperty.Subscribe( iStatus );
SetActive();
-
+
+ _AKNTRACE_FUNC_EXIT;
+
return KErrNone;
}
@@ -261,12 +265,16 @@
//
void CAknKeylockScreenSaverObserver::Stop()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( !IsActive() )
{
return;
}
Cancel();
iScreenSaverActiveProperty.Cancel();
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -293,6 +301,8 @@
//
void CAknKeylockScreenSaverObserver::ConstructL()
{
+ _AKNTRACE_FUNC_ENTER;
+
// Add this active object to the scheduler.
CActiveScheduler::Add( this );
User::LeaveIfError( iScreenSaverActiveProperty.Attach( KPSUidScreenSaver,
@@ -313,6 +323,8 @@
delete iDevicelockPolicyApi;
iDevicelockPolicyApi = NULL;
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -323,6 +335,8 @@
//
void CAknKeylockScreenSaverObserver::RunL()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( iKeylockEnabled || iAutolockEnabled )
{
// Resubscribe before processing new value to prevent missing updates.
@@ -349,6 +363,8 @@
}
iScreenSaverActive = EFalse;
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -359,6 +375,8 @@
void CAknKeylockScreenSaverObserver::SetLockStatus( TBool aKeylockEnabled,
TBool aAutolockEnabled )
{
+ _AKNTRACE_FUNC_ENTER;
+
iKeylockEnabled = aKeylockEnabled;
iAutolockEnabled = aAutolockEnabled;
@@ -376,6 +394,8 @@
// Screensaver is only observed when keylock is enabled.
Stop();
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -385,6 +405,8 @@
//
void CAknKeylockScreenSaverObserver::CapturePrimaryKeys( TBool aCapture )
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( aCapture )
{
if ( iScreenSaverActive && !iCaptured )
@@ -410,8 +432,10 @@
primaryKey,
secondaryKey ) == KErrNone )
{
- iPrimaryKeyCaptures.Append(
- iWindowGroup.CaptureKeyUpAndDowns( primaryKey, 0, 0 ) );
+ if (KErrNone != iPrimaryKeyCaptures.Append(iWindowGroup.CaptureKeyUpAndDowns(primaryKey, 0, 0)))
+ {
+ return;
+ }
index++;
}
}
@@ -437,8 +461,10 @@
TUint32 secondaryKey( 0 );
while ( iDevicelockPolicyApi->GetKeyCombination( index, primaryKey, secondaryKey ) == KErrNone )
{
- iPrimaryKeyCaptures.Append(
- iWindowGroup.CaptureKeyUpAndDowns( primaryKey, 0, 0 ) );
+ if (KErrNone != iPrimaryKeyCaptures.Append(iWindowGroup.CaptureKeyUpAndDowns(primaryKey, 0, 0)))
+ {
+ return;
+ }
index++;
}
}
@@ -468,6 +494,8 @@
iCaptured = EFalse;
}
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -478,7 +506,11 @@
//
void CAknKeylockScreenSaverObserver::DoCancel()
{
+ _AKNTRACE_FUNC_ENTER;
+
iScreenSaverActiveProperty.Cancel();
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -506,11 +538,16 @@
//
TBool CAknLockedNote::OkToExitL( TInt aCommand )
{
+ _AKNTRACE_FUNC_ENTER;
+
iLocked = EFalse;
if ( iCommandObserver )
{
iCommandObserver->ProcessCommandL( aCommand );
}
+
+ _AKNTRACE_FUNC_EXIT;
+
return ETrue;
}
@@ -532,12 +569,16 @@
//
void CAknLockedNote::CancelNote()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( iTimer )
{
iTimer->Cancel();
}
ExitSleepingDialog();
iLocked = EFalse;
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -548,10 +589,14 @@
//
void CAknLockedNote::FocusChanged( TDrawNow /*aDrawNow*/ )
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( !IsFocused() && iCommandObserver )
{
TRAP_IGNORE( iCommandObserver->ProcessCommandL( KNoteCmdFocusLost ) )
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -632,9 +677,14 @@
//
TInt CAknSleepingNote::ShowNote( const TInt aTimeout, const TTone aTone )
{
+ _AKNTRACE_FUNC_ENTER;
+
TRAP_IGNORE(AknGlobalPopupPriorityController::SetPopupPriorityL( *this, KGlobalWindowPriority_KeyLock ));
iTimeoutInMicroseconds = aTimeout;
iTone = aTone;
+
+ _AKNTRACE_FUNC_EXIT;
+
return RouseSleepingDialog();
}
@@ -646,10 +696,15 @@
//
TBool CAknSleepingNote::OkToExitL( TInt aCommand )
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( iCommandObserver )
{
iCommandObserver->ProcessCommandL( aCommand );
}
+
+ _AKNTRACE_FUNC_EXIT;
+
return ETrue;
}
@@ -661,6 +716,8 @@
//
void CAknSleepingNote::HandleResourceChange( TInt aType )
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( aType == KAknsMessageSkinChange )
{
TInt animationRes( 0 );
@@ -714,6 +771,8 @@
}
CAknNoteDialog::HandleResourceChange( aType );
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -806,6 +865,8 @@
//
void CAknEcsNote::SetEmergencyNumber( const TDesC& aMatchedNumber )
{
+ _AKNTRACE_FUNC_ENTER;
+
TRect mainPane;
AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EPopupParent,
mainPane );
@@ -869,6 +930,8 @@
number.Append( aMatchedNumber );
TRAP_IGNORE( SetTextL( number ) );
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -878,12 +941,16 @@
//
void CAknEcsNote::SleepNote()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( iNoteOnScreen )
{
// Causes flicker to other notes if called when note is not on screen.
ExitSleepingDialog();
}
iNoteOnScreen = EFalse;
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -910,7 +977,11 @@
CAknKeyLockControl::CAknKeyLockControl( CAknKeyLockNotifierSubject* aNotif ) :
iNotif( aNotif )
{
+ _AKNTRACE_FUNC_ENTER;
+
AKNTASHOOK_ADD( this, "CAknKeyLockControl" );
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -920,6 +991,8 @@
//
CAknKeyLockControl::~CAknKeyLockControl()
{
+ _AKNTRACE_FUNC_ENTER;
+
AKNTASHOOK_REMOVE();
// We implicitely trust that Eikon env exists
// (though in practice it does not make the
@@ -945,6 +1018,8 @@
delete iEcsNote; // Ecs change
delete iKeylockApi;
delete iKeylockScreenSaverObserver;
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -954,7 +1029,7 @@
//
void CAknKeyLockControl::ConstructL()
{
- TRACES( RDebug::Print(_L("(KeyGuard)CAknKeyLockControl::ConstructL ")); )
+ _AKNTRACE_FUNC_ENTER;
FeatureManager::InitializeLibL();
iFeatureKeypadNoSlider =
@@ -991,11 +1066,7 @@
TBool touchEnabled( AknLayoutUtils::PenEnabled() );
- TBool hasSlider(iHardwareSupport != EKeyguardDefaultHardware);
- if( FeatureManager::FeatureSupported( KFeatureIdFfPowerKeyAsKeyguard ) )
- {
- hasSlider = ETrue; // the only purpose is to display empty sotkeys
- }
+ TBool hasSlider = HasSliderKey();
iKeyLockCba = CEikButtonGroupContainer::NewL(
CEikButtonGroupContainer::ECba,
CEikButtonGroupContainer::EHorizontal,
@@ -1124,6 +1195,8 @@
iStatusProperty.Attach( KPSUidAvkonDomain, KAknKeyguardStatus );
iStatusProperty.Set( EKeyguardNotActive );
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1133,8 +1206,10 @@
//
void CAknKeyLockControl::EnableKeylock( TBool aShowNote, TBool aNotifySysApp )
{
- TRACES( RDebug::Print(_L("(KeyGuard)CAknKeyLockControl::EnableKeylock %d"), aShowNote); )
-
+ _AKNTRACE_FUNC_ENTER;
+ _AKNTRACE("aShowNote:%d",aShowNote);
+ _AKNTRACE("aNotifySysApp:%d",aNotifySysApp);
+
// Policy can be used to disable support for keyguard.
if ( !iAutolockEnabled && !CKeyLockPolicyApi::KeyguardAllowed() )
{
@@ -1157,8 +1232,8 @@
{
SendMessageToSysAp( EEikKeyLockEnabled );
}
-
- if ( !AknLayoutUtils::PenEnabled() || iHardwareSupport == EKeyguardDefaultHardware)
+ TBool hasSliderKey = HasSliderKey();
+ if ( !AknLayoutUtils::PenEnabled() || !hasSliderKey)
{
iKeyLockCba->MakeVisible( ETrue );
}
@@ -1190,7 +1265,7 @@
DisplayLockedNote();
}
- if ( !AknLayoutUtils::PenEnabled() || iHardwareSupport == EKeyguardDefaultHardware)
+ if ( !AknLayoutUtils::PenEnabled() || !hasSliderKey)
{
ShowKeylockCba();
}
@@ -1259,6 +1334,8 @@
// leave, but we trap it in just in case.
TRAP_IGNORE( static_cast<CAknCapAppServerAppUi*>( iEikonEnv->EikAppUi() )->HandleResourceChangeL(
KAknInternalFSWClose ); );
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1268,7 +1345,8 @@
//
void CAknKeyLockControl::DisableKeylock(TBool aNotifySysApp)
{
- TRACES( RDebug::Print(_L("(KeyGuard)CAknKeyLockControl::DisableKeylock")); )
+ _AKNTRACE_FUNC_ENTER;
+ _AKNTRACE("aShowNote:%d",aNotifySysApp);
// Keep locking status in sync.
iKeylockScreenSaverObserver->SetLockStatus( EFalse, iAutolockEnabled );
@@ -1329,13 +1407,14 @@
}
}
} // PenEnabled()
+ }
- if (aNotifySysApp)
- {
- SendMessageToSysAp( EEikKeyLockDisabled );
- }
- }
- if ( iNotif )
+ if (aNotifySysApp)
+ {
+ SendMessageToSysAp( EEikKeyLockDisabled );
+ }
+
+ if ( iNotif )
{
iNotif->NotifyStatusChange( EKeyLockDisabled );
}
@@ -1345,6 +1424,8 @@
iEikonEnv->EikAppUi() )->SuppressAppSwitching( EFalse );
iAutolockEnabled = EFalse;
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1354,6 +1435,8 @@
//
void CAknKeyLockControl::SendMessageToSysAp( TInt aMessage )
{
+ _AKNTRACE_FUNC_ENTER;
+
RWsSession& ws = iEikonEnv->WsSession();
TInt wgId = 0;
CApaWindowGroupName::FindByAppUid( KSysApUid, ws, wgId );
@@ -1364,6 +1447,8 @@
event.SetTimeNow();
ws.SendEventToWindowGroup( wgId, event );
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1373,9 +1458,13 @@
//
void CAknKeyLockControl::OfferKeylock()
{
+ _AKNTRACE_FUNC_ENTER;
+
iOfferLockNote->ShowNote( (CAknNoteDialog::TTimeout)KAknOfferKeyLockTimeout,
CAknNoteDialog::ENoTone );
iOfferLockEnabled = ETrue;
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1409,8 +1498,12 @@
//
void CAknKeyLockControl::DoUnlock()
{
+ _AKNTRACE_FUNC_ENTER;
+
DisableKeylock();
DisplayKeyActiveNote();
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1421,6 +1514,9 @@
//
void CAknKeyLockControl::HandleResourceChange( TInt aType )
{
+ _AKNTRACE_FUNC_ENTER;
+ _AKNTRACE("aType:%d",aType);
+
if ( aType == KEikDynamicLayoutVariantSwitch )
{
TRect screenRect;
@@ -1443,6 +1539,8 @@
}
}
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1453,7 +1551,8 @@
//
void CAknKeyLockControl::ProcessCommandL( TInt aCommandId )
{
- TRACES( RDebug::Print(_L("(KeyGuard)CAknKeyLockControl::ProcessCommandL %d"), aCommandId); )
+ _AKNTRACE_FUNC_ENTER;
+ _AKNTRACE("aCommandId:%d",aCommandId);
switch ( aCommandId )
{
@@ -1514,6 +1613,8 @@
break;
}
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1559,8 +1660,8 @@
//
void CAknKeyLockControl::LeftSoftKeyPressed()
{
- TRACES( RDebug::Print(_L("(KeyGuard)CAknKeyLockControl::LeftSoftKeyPressed")); )
-
+ _AKNTRACE_FUNC_ENTER;
+
// Check that the confirmation note exists, as it's not created on
// startup if touch layout is in use. In emulator this might cause
// a problem, as layout can be changed to a non-touch one, and
@@ -1583,6 +1684,8 @@
SendMessageToSysAp( EEikKeyLockLightsOnRequest );
iUnlockConfirmation = ETrue;
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1594,15 +1697,17 @@
TKeyResponse CAknKeyLockControl::OfferKeyEventL( const TKeyEvent& aKeyEvent,
TEventCode aType )
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( AknLayoutUtils::PenEnabled() )
{
- TRACES( RDebug::Print(_L("(KeyGuard)CAknKeyLockControl::OfferKeyEventL: PenEnabled"));)
+ _AKNTRACE("(KeyGuard)CAknKeyLockControl::OfferKeyEventL: PenEnabled");
if ( iAutolockEnabled )
{ // The case when touch device is locked and so must be unlocked by hold switch.
- TRACES( RDebug::Print(_L("(KeyGuard)CAknKeyLockControl::OfferKeyEventL: Autolock Enabled"));)
+ _AKNTRACE("(KeyGuard)CAknKeyLockControl::OfferKeyEventL: Autolock Enabled");
if ( aType == EEventKey && aKeyEvent.iCode == EKeyDeviceF )
{
- TRACES( RDebug::Print(_L("(KeyGuard)CAknKeyLockControl::OfferKeyEventL: SysAp message"));)
+ _AKNTRACE("(KeyGuard)CAknKeyLockControl::OfferKeyEventL: SysAp message");
SendMessageToSysAp( EEikKeyLockLightsOnRequest );
if ( iAutolockEnabled && !iKeylockApi )
{
@@ -1618,7 +1723,7 @@
autolocktask.SendKey( keyEvent );
}
}
- TRACES( RDebug::Print(_L("(KeyGuard)CAknKeyLockControl::OfferKeyEventL: return EKeyWasConsumed"));)
+ _AKNTRACE_FUNC_EXIT;
return EKeyWasConsumed;
}
}
@@ -1823,7 +1928,7 @@
ShowLockedNote();
}
}
-
+ _AKNTRACE_FUNC_EXIT;
return EKeyWasConsumed;
}
@@ -1834,10 +1939,14 @@
//
void CAknKeyLockControl::ShowLockedNote()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( !iLockedNoteDisplayed )
{
DoShowLockedNote();
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1859,11 +1968,15 @@
//
void CAknKeyLockControl::ShowKeylockCba()
{
+ _AKNTRACE_FUNC_ENTER;
+
RDrawableWindow* cbaWindow =
iKeyLockCba->ButtonGroup()->AsControl()->DrawableWindow();
cbaWindow->SetFaded( EFalse, RWindowTreeNode::EFadeWindowOnly );
cbaWindow->SetOrdinalPosition( 0, 1 );
cbaWindow->SetNonFading( ETrue );
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1873,6 +1986,8 @@
//
void CAknKeyLockControl::CaptureSystemKeys()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( !iKeysCaptured )
{
RWindowGroup& groupWin = iCoeEnv->RootWin();
@@ -1900,15 +2015,17 @@
if ( AknLayoutUtils::PenEnabled() )
{
- TRACES( RDebug::Print(_L("(KeyGuard)CAknKeyLockControl::CaptureSystemKeys PenEnabled"));)
+ _AKNTRACE("(KeyGuard)CAknKeyLockControl::CaptureSystemKeys PenEnabled");
if ( iAutolockEnabled )
{ //Capture Hold Switch
- TRACES( RDebug::Print(_L("(KeyGuard)CAknKeyLockControl::CaptureSystemKeys iAutolockEnabled"));)
+ _AKNTRACE("(KeyGuard)CAknKeyLockControl::CaptureSystemKeys iAutolockEnabled");
iHoldSwitch = groupWin.CaptureKey( EKeyDeviceF, 0, 0 );
}
}
iKeysCaptured = ETrue;
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1918,6 +2035,8 @@
//
void CAknKeyLockControl::UnCaptureSystemKeys()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( iKeysCaptured )
{
RWindowGroup& groupWin = iCoeEnv->RootWin();
@@ -1938,6 +2057,8 @@
iKeysCaptured = EFalse;
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1949,6 +2070,8 @@
void CAknKeyLockControl::HandleEcsEvent( CAknEcsDetector* aEcsDetector,
CAknEcsDetector::TState aState )
{
+ _AKNTRACE_FUNC_ENTER;
+
switch ( aState )
{
case CAknEcsDetector::ECompleteMatchThenSendKey:
@@ -1993,6 +2116,8 @@
break;
}
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2002,7 +2127,11 @@
//
void CAknKeyLockControl::DoExitOfferKeylock()
{
+ _AKNTRACE_FUNC_ENTER;
+
iOfferLockNote->CancelNote();
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2012,7 +2141,11 @@
//
void CAknKeyLockControl::OfferTimerExpired()
{
+ _AKNTRACE_FUNC_ENTER;
+
DoExitOfferKeylock();
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2022,7 +2155,11 @@
//
void CAknKeyLockControl::AutolockEnabled( TBool aAutoLockOn )
{
+ _AKNTRACE_FUNC_ENTER;
+
iAutolockEnabled = aAutoLockOn;
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2050,11 +2187,15 @@
//
void CAknKeyLockControl::CapturePointerEvents()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( AknLayoutUtils::PenEnabled() )
{
Window().SetPointerCapture( RWindowBase::TCaptureDragDrop );
Window().ClaimPointerGrab( ETrue );
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2064,11 +2205,31 @@
//
void CAknKeyLockControl::UnCapturePointerEvents()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( AknLayoutUtils::PenEnabled() )
{
Window().SetPointerCapture( RWindowBase::TCaptureDisabled );
Window().ClaimPointerGrab( EFalse );
}
+
+ _AKNTRACE_FUNC_EXIT;
+ }
+
+TBool CAknKeyLockControl::HasSliderKey()
+ {
+ _AKNTRACE_FUNC_ENTER;
+
+ TBool hasSlider(iHardwareSupport != EKeyguardDefaultHardware);
+ if( FeatureManager::FeatureSupported( KFeatureIdFfPowerKeyAsKeyguard ) )
+ {
+ hasSlider = ETrue; // the only purpose is to display empty sotkeys
+ }
+
+ _AKNTRACE( "hasSlider:%d",hasSlider);
+ _AKNTRACE_FUNC_EXIT;
+
+ return hasSlider;
}
@@ -2182,6 +2343,8 @@
//
TPtrC8 CAknKeyLockNotifierSubject::StartL( const TDesC8& aBuffer )
{
+ _AKNTRACE_FUNC_ENTER;
+
SAknNotifierPackage<SAknKeyLockNotifierParams>* params =
( SAknNotifierPackage<SAknKeyLockNotifierParams>*)aBuffer.Ptr();
@@ -2192,6 +2355,8 @@
User::Leave( KErrArgument );
}
+ _AKNTRACE( "params->iParamData.iReason:%d",params->iParamData.iReason);
+
switch ( params->iParamData.iReason )
{
case ELockEnabled:
@@ -2217,6 +2382,8 @@
}
}
+ _AKNTRACE_FUNC_EXIT;
+
return iRetPckg;
}
@@ -2230,6 +2397,8 @@
TInt /*aReplySlot*/,
const RMessagePtr2& aMessage )
{
+ _AKNTRACE_FUNC_ENTER;
+
SAknNotifierPackage<SAknKeyLockNotifierParams>* params =
( SAknNotifierPackage<SAknKeyLockNotifierParams>*)aBuffer.Ptr();
@@ -2240,6 +2409,8 @@
User::Leave( KErrArgument );
}
+ _AKNTRACE( "params->iParamData.iReason:%d",params->iParamData.iReason);
+
switch ( params->iParamData.iReason )
{
case ELockEnabled:
@@ -2323,6 +2494,8 @@
}
};
+ _AKNTRACE_FUNC_EXIT;
+
aMessage.Complete( KErrNone );
}
@@ -2377,10 +2550,14 @@
//
void CAknKeyLockNotifierSubject::UnlockKeys()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( IsKeyLockEnabled() )
{
iKeyLockControl->DisableKeylock();
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2391,6 +2568,9 @@
//
void CAknKeyLockNotifierSubject::LockKeys( TBool aAutoLockOn )
{
+ _AKNTRACE_FUNC_ENTER;
+ _AKNTRACE( "aAutoLockOn:%d",aAutoLockOn);
+
// We'll have to disable keylock if we are changing autolock status.
if ( IsKeyLockEnabled() && aAutoLockOn != iKeyLockControl->iAutolockEnabled )
{
@@ -2402,6 +2582,8 @@
iKeyLockControl->AutolockEnabled( aAutoLockOn );
iKeyLockControl->EnableKeylock(ETrue, EFalse);
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2412,6 +2594,8 @@
//
void CAknKeyLockNotifierSubject::AddObserverL( MAknKeyLockObserver* aObserver )
{
+ _AKNTRACE_FUNC_ENTER;
+
#if defined(_DEBUG)
TInt count = iObserverList->Count();
for ( TInt index = 0; index < count; index++ )
@@ -2426,6 +2610,8 @@
// Make sure that the observer isn't obscuring the keylock CBA
ShowKeylockCba();
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2436,6 +2622,8 @@
//
void CAknKeyLockNotifierSubject::RemoveObserver( MAknKeyLockObserver* aObserver )
{
+ _AKNTRACE_FUNC_ENTER;
+
TInt count = iObserverList->Count();
for ( TInt index = 0; index < count; index++ )
{
@@ -2448,6 +2636,8 @@
#if defined(_DEBUG)
Panic( EAknPanicKeyLockObserverNotFound );
#endif
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2457,11 +2647,16 @@
//
void CAknKeyLockNotifierSubject::NotifyStatusChange( TKeyLockStatus aStatus )
{
+ _AKNTRACE_FUNC_ENTER;
+ _AKNTRACE( "aStatus:%d",aStatus);
+
TInt count = iObserverList->Count();
for ( TInt index = count - 1; index >= 0; index-- )
{
((*iObserverList)[index])->KeyLockStatusChange( aStatus );
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2471,10 +2666,14 @@
//
void CAknKeyLockNotifierSubject::ShowKeylockCba()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( IsKeyLockEnabled() )
{
iKeyLockControl->ShowKeylockCba();
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2484,10 +2683,14 @@
//
void CAknKeyLockNotifierSubject::DoEnableKeyLock()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( !IsKeyLockEnabled() )
{
iKeyLockControl->EnableKeylock();
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2497,6 +2700,8 @@
//
void CAknKeyLockNotifierSubject::DoDisableKeyLock()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( IsKeyLockEnabled() )
{
iKeyLockControl->DisableKeylock();
@@ -2508,6 +2713,8 @@
// Remove the offer key lock CBA.
iKeyLockControl->OfferTimerExpired();
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2517,9 +2724,13 @@
//
void CAknKeyLockNotifierSubject::DoOfferKeyLock()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( !IsKeyLockEnabled() )
{
NotifyStatusChange( EKeyLockOffered );
iKeyLockControl->OfferKeylock();
}
+
+ _AKNTRACE_FUNC_EXIT;
}
--- a/uifw/AknGlobalUI/OldStyleNotif/group/AknOldStyleNotif.mmp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AknGlobalUI/OldStyleNotif/group/AknOldStyleNotif.mmp Tue Jul 13 11:29:56 2010 +0100
@@ -36,6 +36,7 @@
USERINCLUDE ../../CommonInc
USERINCLUDE ../../notpiinc
USERINCLUDE ../../../../inc
+USERINCLUDE ../../../inc
SOURCEPATH ../Src
--- a/uifw/AknGlobalUI/notpisrc/aknnotpi.rss Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AknGlobalUI/notpisrc/aknnotpi.rss Tue Jul 13 11:29:56 2010 +0100
@@ -810,6 +810,7 @@
layout = EGeneralLayout;
singular_label = qtn_battc_unplug;
plural_label = "";
+ animation = R_QGN_NOTE_INFO_ANIM;
}
// ---------------------------------------------------------------------------
--- a/uifw/AvKon/AknExtendedFader/group/perf.txt Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/AknExtendedFader/group/perf.txt Tue Jul 13 11:29:56 2010 +0100
@@ -1,3 +1,19 @@
+#
+# 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 "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:
+#
+
First:
------
--- a/uifw/AvKon/akncompamode/srv/src/akncompaserver.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/akncompamode/srv/src/akncompaserver.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -304,7 +304,7 @@
// This avoid possibility of memory allocation error when key is
// added to key state array due to key press while application is
// executing.
- iKeyState.Reserve(EKeyStateGranularity);
+ iKeyState.ReserveL(EKeyStateGranularity);
Server().AddSession();
}
--- a/uifw/AvKon/aknhlist/inc/akntreelistview.h Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/aknhlist/inc/akntreelistview.h Tue Jul 13 11:29:56 2010 +0100
@@ -29,7 +29,6 @@
#include <akntreelistobserver.h>
#include <akncollection.h>
#include <aknlongtapdetector.h>
-#include <aknmarkingmodeobserver.h>
#include "akntreeobserver.h"
#include "akntreelistviewitem.h"
@@ -1113,9 +1112,6 @@
*/
CAknTreeItem* iPreviouslyFocusedItem;
- TBool iIsPressedDownState;
-
- TBool iIsDragged;
/**
* Physics handler. Used only when physics feature is enabled.
@@ -1123,10 +1119,6 @@
*/
CAknTreeListPhysicsHandler* iPhysicsHandler;
- /**
- * ETrue if physics view should be adjusted according to top item.
- */
- TBool iScrollPhysicsTop;
/**
* Pointer to tfx redirect gc for effects
@@ -1150,10 +1142,6 @@
*/
TInt iBottomIndex;
- /**
- * Whether or not mirrored layout is currently in use.
- */
- TBool iMirroredLayoutInUse;
/**
* Remember pointer to bottom item. Use for drawing line seperator only.
@@ -1162,16 +1150,17 @@
*/
CAknTreeItem* iBottomItem;
- /**
- * Whether marking mode is activated or not.
- */
- TBool iMarkingMode;
/**
* Array for marking mode icons.
* Own.
*/
CAknIconArray* iMarkingIconArray;
+
+ /**
+ * Ordinal position of window, before stylus menu is opened.
+ */
+ TInt iOldWinPos;
};
#endif // C_AKNTREELISTVIEW_H
--- a/uifw/AvKon/aknhlist/src/akntreelistphysicshandler.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/aknhlist/src/akntreelistphysicshandler.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -446,7 +446,20 @@
// are not used in marking mode.
SetHighlight();
}
- }
+ }
+ else if ( aPointerEvent.iType == TPointerEvent::EDrag )
+ {
+ if ( iTreeListView->SingleClickEnabled() && !wasFlicking )
+ {
+ if ( ii != iTreeListView->FocusedItemIndex() )
+ {
+ iItemToBeSelected = NULL;
+ iTreeListView->EnableHighlight( EFalse );
+ iTreeListView->CancelLongTapDetectorL();
+ iTreeListView->DrawNow();
+ }
+ }
+ }
(*iItems)[ii].HandlePointerEventL( aPointerEvent, aViewLevel,
iTreeListView->Indention(), iTreeListView->IndentionWidth() );
}
--- a/uifw/AvKon/aknhlist/src/akntreelistview.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/aknhlist/src/akntreelistview.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -29,6 +29,7 @@
#include <AknIconArray.h>
#include <avkon.mbg>
#include <gulicon.h>
+#include <aknmarkingmodeobserver.h>
#include "akntreelistview.h"
#include "akntree.h"
#include "akntreelist.h"
@@ -52,8 +53,8 @@
// Number of additional items to draw
const TInt KAdditionalItems = 2;
-// Space for check box in marking mode
-const TInt KCheckBoxOffset = 30;
+// Number of icons in marking mode icon array
+const TInt KMarkingModeIconArraySize = 2;
// Tree list view flag definitions.
enum TAknTreeListViewFlags
@@ -73,7 +74,11 @@
EFlagSaveFocusAfterSorting,
EFlagSingleClickEnabled,
EFlagHighlightEnabled, // Is highlight drawing enabled
- EFlagIgnoreButtonUpEvent // Up event ignored (when styluspopup menu open)
+ EFlagIsPressedDownState,
+ EFlagIsDragged,
+ EFlagScrollPhysicsTop, // Physics view adjusted according to top item
+ EFlagMirroredLayoutInUse, // Mirrored layout in use
+ EFlagMarkingMode // Marking mode activated
};
@@ -482,7 +487,7 @@
//
void CAknTreeListView::SelectItem( CAknTreeItem* aSelectedItem )
{
- if ( iMarkingMode )
+ if ( iFlags.IsSet( EFlagMarkingMode ) )
{
if ( aSelectedItem->IsMarkable() )
{
@@ -518,7 +523,14 @@
//
void CAknTreeListView::SetPressedDownState( const TBool& aPressedDown )
{
- iIsPressedDownState = aPressedDown;
+ if ( aPressedDown )
+ {
+ iFlags.Set( EFlagIsPressedDownState );
+ }
+ else
+ {
+ iFlags.Clear( EFlagIsPressedDownState );
+ }
}
@@ -833,7 +845,14 @@
case KEikDynamicLayoutVariantSwitch:
{
- iMirroredLayoutInUse = AknLayoutUtils::LayoutMirrored();
+ if ( AknLayoutUtils::LayoutMirrored() )
+ {
+ iFlags.Set( EFlagMirroredLayoutInUse );
+ }
+ else
+ {
+ iFlags.Clear( EFlagMirroredLayoutInUse );
+ }
CAknTreeItem* focusedItem( FocusedItem() );
if ( focusedItem )
@@ -852,8 +871,27 @@
{
index = iItems.Count() - 1;
}
-
- SetFocusedItem( focusedItem, index, ETrue );
+
+ if( HighlightEnabled() )
+ {
+ SetFocusedItem( focusedItem, index, ETrue );
+ }
+ else
+ {
+ // 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 visibleItemCount( iTree.VisibleItemCount() );
+ TInt itemCountLimit = iItems.Count();
+ if ( visibleItemCount <= itemCountLimit - KAdditionalItems )
+ {
+ UpdateVisibleItems( visibleItemIndex, focusedItem );
+ }
+ }
+ }
+
}
else
{
@@ -877,9 +915,8 @@
if ( height < itemCountLimit &&
height < visibleItemCount )
{
- TInt move = itemCountLimit - height;
- UpdateVisibleItems(
- focusedItemIndex + move, focusedItem );
+ TInt move = itemCountLimit - height;
+ UpdateVisibleItems( focusedItemIndex + move, focusedItem );
}
}
}
@@ -891,7 +928,9 @@
case KAknMessageFocusLost:
{
- if ( HighlightEnabled() )
+ if ( SingleClickEnabled() && HighlightEnabled() &&
+ ( iOldWinPos == KErrNotFound ||
+ iOldWinPos == DrawableWindow()->OrdinalPosition() ) )
{
EnableHighlight( EFalse );
// Redraw item
@@ -918,12 +957,6 @@
//
void CAknTreeListView::HandlePointerEventL( const TPointerEvent& aPointerEvent )
{
- if ( iFlags.IsSet( EFlagIgnoreButtonUpEvent )
- && aPointerEvent.iType == TPointerEvent::EButton1Up )
- {
- return;
- }
-
if ( GrabbingComponent() )
{
iPhysicsHandler->ResetEventBlockingStatus();
@@ -932,7 +965,6 @@
{
if( aPointerEvent.iType == TPointerEvent::EButton1Down )
{
- iFlags.Clear( EFlagIgnoreButtonUpEvent );
iPreviouslyFocusedItem = FocusedItem();
}
@@ -980,7 +1012,7 @@
}
TInt thumbPosition = aScrollBar->ThumbPosition();
- if ( iMirroredLayoutInUse &&
+ if ( iFlags.IsSet( EFlagMirroredLayoutInUse ) &&
aScrollBar != iScrollbarFrame->VerticalScrollBar() )
{
const TEikScrollBarModel* model = aScrollBar->Model();
@@ -1269,13 +1301,13 @@
iStylusDownItemIndex( -1 ),
iAnimationIID( KAknsIIDQsnAnimList ),
iIndentionWidth( -1 ),
- iPhysicsHandler( NULL ),
- iScrollPhysicsTop( ETrue )
+ iPhysicsHandler( NULL )
#ifdef RD_UI_TRANSITION_EFFECTS_LIST
,iGc(NULL)
#endif //RD_UI_TRANSITION_EFFECTS_LIST
,iItemActionMenu( NULL ),
- iLongTapDetector( NULL )
+ iLongTapDetector( NULL ),
+ iOldWinPos( KErrNotFound )
{
if ( static_cast<CAknAppUi*>(
iCoeEnv->AppUi() )->IsSingleClickCompatible() )
@@ -1285,6 +1317,7 @@
iFlags.Set( EFlagStructureLines );
iFlags.Set( EFlagIndention );
+ iFlags.Set( EFlagScrollPhysicsTop );
}
@@ -1322,8 +1355,8 @@
&iItems );
}
- iIsPressedDownState = EFalse;
- iIsDragged = EFalse;
+ iFlags.Clear( EFlagIsPressedDownState );
+ iFlags.Clear( EFlagIsDragged );
iItemActionMenu = CAknItemActionMenu::RegisterCollectionL( *this, this );
if ( iItemActionMenu )
@@ -1339,8 +1372,14 @@
{
EnableHighlight( ETrue );
}
-
- iMirroredLayoutInUse = AknLayoutUtils::LayoutMirrored();
+ if ( AknLayoutUtils::LayoutMirrored() )
+ {
+ iFlags.Set( EFlagMirroredLayoutInUse );
+ }
+ else
+ {
+ iFlags.Clear( EFlagMirroredLayoutInUse );
+ }
LoadMarkingIconsL();
}
@@ -1673,7 +1712,7 @@
CAknTreeItem* item = FocusedItem();
if ( item )
{
- if ( iMarkingMode )
+ if ( iFlags.IsSet( EFlagMarkingMode ) )
{
if ( item->IsMarkable() )
{
@@ -1694,7 +1733,7 @@
//
void CAknTreeListView::HandleRightArrowKeyEvent()
{
- if ( iMirroredLayoutInUse )
+ if ( iFlags.IsSet( EFlagMirroredLayoutInUse ) )
{
AscendFocus();
}
@@ -1711,7 +1750,7 @@
//
void CAknTreeListView::HandleLeftArrowKeyEvent()
{
- if ( iMirroredLayoutInUse )
+ if ( iFlags.IsSet( EFlagMirroredLayoutInUse ) )
{
DescendFocus();
}
@@ -2012,7 +2051,10 @@
// This should not fail, if enough space was reserved for the
// array, and if it fails, it results only fewer items being
// shown in the list.
- iItems.Append( TAknTreeListViewItem() );
+ if ( KErrNone != iItems.Append( TAknTreeListViewItem() ) )
+ {
+ return;
+ }
}
}
@@ -2025,10 +2067,20 @@
iterator.SetCurrent( first );
iterator.Previous();
}
-
- if ( iMarkingMode )
+ if ( iFlags.IsSet( EFlagMarkingMode ) )
{
- itemRect.iBr.iX -= KCheckBoxOffset;
+ if ( iFlags.IsSet( EFlagMirroredLayoutInUse ))
+ {
+ itemRect.iBr.iX -=
+ AknLayoutScalable_Avkon::list_double_graphic_pane_t1(
+ 0 ).LayoutLine().ir;
+ }
+ else
+ {
+ itemRect.iBr.iX -=
+ AknLayoutScalable_Avkon::list_double_graphic_pane_t1(
+ 0 ).LayoutLine().il;
+ }
}
// Update items and their rectangles.
@@ -2090,9 +2142,10 @@
iScrollbarFrame->DrawBackground( EFalse, EFalse );
}
+ iPhysicsHandler->UpdateScrollIndex(
+ iFlags.IsSet( EFlagScrollPhysicsTop ) );
+ iFlags.Set( EFlagScrollPhysicsTop );
- iPhysicsHandler->UpdateScrollIndex( iScrollPhysicsTop );
- iScrollPhysicsTop = ETrue;
// Get values for horizontal scrollbar.
TInt hThumbPos = iViewLevel;
@@ -2108,8 +2161,8 @@
hThumbSpan = a/b;
hScrollSpan = Max( hThumbPos + hThumbSpan, c/b );
}
-
- if ( iMirroredLayoutInUse )
+ if ( iFlags.IsSet( EFlagMirroredLayoutInUse ) )
+
{
hThumbPos = hScrollSpan - ( hThumbPos + hThumbSpan );
}
@@ -2817,6 +2870,22 @@
CWindowGc& gc = SystemGc();
#endif
+ TInt checkBoxOffset ( 0 );
+ if ( iFlags.IsSet( EFlagMarkingMode ) )
+ {
+ if ( iFlags.IsSet( EFlagMirroredLayoutInUse ) )
+ {
+ checkBoxOffset =
+ AknLayoutScalable_Avkon::list_double_graphic_pane_t1(
+ 0 ).LayoutLine().ir;
+ }
+ else
+ {
+ checkBoxOffset =
+ AknLayoutScalable_Avkon::list_double_graphic_pane_t1(
+ 0 ).LayoutLine().il;
+ }
+ }
#ifdef RD_UI_TRANSITION_EFFECTS_LIST
MAknListBoxTfxInternal* transApi = CAknListLoader::TfxApiInternal( &gc );
if ( !empty && transApi )
@@ -2867,28 +2936,22 @@
textColor,
KAknsIIDQsnTextColors,
EAknsCIQsnTextColorsCG6 );
-
- if ( iMarkingMode && iMarkingIconArray && iMarkingIconArray->Count()== 2 )
+ if ( iFlags.IsSet( EFlagMarkingMode )
+ && iMarkingIconArray
+ && iMarkingIconArray->Count() == KMarkingModeIconArraySize )
+
{
// Set sizes for marking icon bitmaps
TRect drawRect;
- if ( iItems.Count() > 0 )
- {
- drawRect = iItems[0].Rect();
- drawRect.iBr.iX += KCheckBoxOffset;
- }
+ drawRect = iItems[0].Rect();
// Rect for the marking icon
TRect iconRect = RectFromLayout( drawRect,
AknLayoutScalable_Avkon::list_single_graphic_pane_g1( 0 ) );
- iconRect.Move( 0, -offset );
-
- gc.SetPenColor( textColor );
- gc.SetPenStyle( CGraphicsContext::ESolidPen );
for ( TInt ii = 0; ii < iMarkingIconArray->Count(); ++ii )
{
- CGulIcon* icon = (*iMarkingIconArray)[ii];
+ CGulIcon* icon = ( *iMarkingIconArray )[ii];
CFbsBitmap* bitmap = icon->Bitmap();
if ( bitmap )
@@ -2910,9 +2973,9 @@
{
TRect drawRect( iItems[ii].Rect() );
- if ( iMarkingMode )
+ if ( iFlags.IsSet( EFlagMarkingMode ) )
{
- drawRect.iBr.iX += KCheckBoxOffset;
+ drawRect.iBr.iX += checkBoxOffset;
}
if ( iItems[ii].Item() )
@@ -2958,43 +3021,13 @@
}
#endif
- if ( iMarkingMode && iMarkingIconArray && iMarkingIconArray->Count()== 2 )
- {
- // Rect for the marking icon
- TRect iconRect = RectFromLayout( drawRect,
- AknLayoutScalable_Avkon::list_single_graphic_pane_g1( 0 ) );
-
- iconRect.Move( 0, -offset );
- CGulIcon* icon = (*iMarkingIconArray)[1]; // unchecked
-
- TBool marked = ( iItems[ii].Item()->IsMarked() );
- if ( marked )
- {
- icon = (*iMarkingIconArray)[0];
- }
-
- CFbsBitmap* bitmap = icon->Bitmap();
-
- if ( bitmap )
- {
- gc.BitBltMasked( iconRect.iTl, bitmap,
- iconRect.Size(), icon->Mask(), EFalse );
- }
- }
-
if ( iItems[ii].Item() != iBottomItem )
{
TRect offsetRect( drawRect );
offsetRect.Move( 0, -offset );
AknListUtils::DrawSeparator( gc, offsetRect, textColor, skin );
}
-
- if ( iMarkingMode )
- {
- gc.SetOrigin( TPoint( KCheckBoxOffset, 0 ) );
- drawRect.iBr.iX -= KCheckBoxOffset;
- }
-
+
TBool focused = ( FocusedItem() &&
iItems[ii].Item() == FocusedItem() );
@@ -3008,13 +3041,20 @@
// Draw highlight for focused item.
TRect highlightRect( iItems[ii].HighlightRect(
iViewLevel, Indention(), IndentionWidth() ) );
+
+ if ( iFlags.IsSet( EFlagMarkingMode ) )
+ {
+ highlightRect.iBr.iX = drawRect.iBr.iX;
+ highlightRect.iTl.iX = drawRect.iTl.iX;
+ }
#ifdef RD_UI_TRANSITION_EFFECTS_LIST
TRect tfxHighlightRect( highlightRect );
tfxHighlightRect.Move( 0, -offset );
#endif //RD_UI_TRANSITION_EFFECTS_LIST
- if ( iIsPressedDownState || !DrawAnimation( gc, highlightRect ) )
+ if ( iFlags.IsSet( EFlagIsPressedDownState )
+ || !DrawAnimation( gc, highlightRect ) )
{
#ifdef RD_UI_TRANSITION_EFFECTS_LIST
if ( transApi )
@@ -3025,8 +3065,9 @@
transApi->StartDrawing( MAknListBoxTfxInternal::EListHighlight );
}
#endif //RD_UI_TRANSITION_EFFECTS_LIST
-
- DrawHighlight( gc, highlightRect, iIsPressedDownState );
+ DrawHighlight( gc, highlightRect,
+ iFlags.IsSet( EFlagIsPressedDownState ) );
+
#ifdef RD_UI_TRANSITION_EFFECTS_LIST
if ( transApi )
@@ -3044,6 +3085,42 @@
#endif //RD_UI_TRANSITION_EFFECTS_LIST
}
+ if ( iFlags.IsSet( EFlagMarkingMode ) && iMarkingIconArray
+ && iMarkingIconArray->Count() ==
+ KMarkingModeIconArraySize )
+ {
+ // Rect for the marking icon
+ TRect iconRect = RectFromLayout( drawRect,
+ AknLayoutScalable_Avkon::list_single_graphic_pane_g1( 0 ) );
+
+ iconRect.Move( 0, -offset );
+ // unchecked icon
+ CGulIcon* icon = ( *iMarkingIconArray )[1];
+
+ TBool marked = ( iItems[ii].Item()->IsMarked() );
+ if ( marked )
+ {
+ icon = (*iMarkingIconArray)[0];
+ }
+
+ CFbsBitmap* bitmap = icon->Bitmap();
+
+ if ( bitmap )
+ {
+ gc.BitBltMasked( iconRect.iTl, bitmap,
+ iconRect.Size(), icon->Mask(), EFalse );
+ }
+ }
+
+ if ( iFlags.IsSet( EFlagMarkingMode ) )
+ {
+ drawRect.iBr.iX -= checkBoxOffset;
+ if ( iFlags.IsClear( EFlagMirroredLayoutInUse ) )
+ {
+ gc.SetOrigin( TPoint( checkBoxOffset, 0 ) );
+ }
+ }
+
#ifdef RD_UI_TRANSITION_EFFECTS_LIST
if (iItems[ii].Item())
{
@@ -3057,7 +3134,7 @@
}
#endif //RD_UI_TRANSITION_EFFECTS_LIST
- if ( iMarkingMode )
+ if ( iFlags.IsSet( EFlagMarkingMode ) )
{
TBool marked = iItems[ii].Item()->IsMarked();
if ( marked )
@@ -3089,7 +3166,7 @@
}
#endif //RD_UI_TRANSITION_EFFECTS_LIST
- if ( iMarkingMode )
+ if ( iFlags.IsSet( EFlagMarkingMode ) )
{
gc.SetOrigin( TPoint( 0, 0 ) );
}
@@ -3183,7 +3260,7 @@
item = iterator.Previous();
}
}
- iScrollPhysicsTop = EFalse;
+ iFlags.Clear( EFlagScrollPhysicsTop );
}
}
@@ -3268,7 +3345,12 @@
{
state |= MAknCollection::EStateMultipleSelection;
}
-
+ TBool markedItems( EFalse );
+ TRAP_IGNORE( markedItems = HasMarkedItemsL() );
+ if ( markedItems )
+ {
+ state |= MAknCollection::EStateMarkedItems;
+ }
return state;
}
@@ -3278,7 +3360,7 @@
//
void CAknTreeListView::ItemActionMenuClosed()
{
- iFlags.Clear( EFlagIgnoreButtonUpEvent );
+ iOldWinPos = KErrNotFound;
EnableHighlight( EFalse );
DrawDeferred();
}
@@ -3305,7 +3387,7 @@
//
void CAknTreeListView::SetMultipleMarkingState( TBool aActive )
{
- if ( iMarkingMode != aActive )
+ if ( iFlags.IsSet( EFlagMarkingMode ) != aActive )
{
if ( !aActive )
{
@@ -3318,7 +3400,19 @@
}
EnableMarking( aActive );
- iMarkingMode = aActive;
+ if ( aActive )
+ {
+ iFlags.Set( EFlagMarkingMode );
+ }
+ else
+ {
+ iFlags.Clear( EFlagMarkingMode );
+ }
+ if ( aActive )
+ {
+ // Expand all items when entering marking mode
+ iTree.Expand();
+ }
LayoutView();
DrawDeferred();
@@ -3338,7 +3432,7 @@
{
TUint state( 0 );
- if ( iMarkingMode )
+ if ( iFlags.IsSet( EFlagMarkingMode ) )
{
state |= MAknMarkingCollection::EStateMarkingMode;
@@ -3363,7 +3457,8 @@
//
void CAknTreeListView::MarkCurrentItemL()
{
- if ( iMarkingMode && FocusedItem() && FocusedItem()->IsMarkable() )
+ if ( iFlags.IsSet( EFlagMarkingMode ) && FocusedItem() &&
+ FocusedItem()->IsMarkable() )
{
MarkItem( FocusedItem(), ETrue, ETrue );
}
@@ -3376,7 +3471,7 @@
//
void CAknTreeListView::MarkAllL()
{
- if ( iMarkingMode )
+ if ( iFlags.IsSet( EFlagMarkingMode ) )
{
TAknTreeIterator iterator = iTree.Iterator();
CAknTreeItem* item = NULL;
@@ -3400,7 +3495,7 @@
//
void CAknTreeListView::UnmarkAll()
{
- if ( iMarkingMode )
+ if ( iFlags.IsSet( EFlagMarkingMode ) )
{
TAknTreeIterator iterator = iTree.Iterator();
CAknTreeItem* item = NULL;
@@ -3463,8 +3558,9 @@
const TPoint& /*aPenEventLocation*/,
const TPoint& aPenEventScreenLocation)
{
- iFlags.Set( EFlagIgnoreButtonUpEvent );
iItemActionMenu->ShowMenuL( aPenEventScreenLocation, 0 );
+ iOldWinPos = DrawableWindow()->OrdinalPosition();
+ IgnoreEventsUntilNextPointerUp();
}
// ---------------------------------------------------------------------------
@@ -3505,11 +3601,7 @@
iList.GetMarkedItemsL( selection );
TInt count( selection.Count() );
CleanupStack::PopAndDestroy( &selection );
- if ( count > 0 )
- {
- return ETrue;
- }
- return EFalse;
+ return ( count > 0 );
}
@@ -3586,7 +3678,8 @@
{
if ( !iMarkingIconArray )
{
- iMarkingIconArray = new ( ELeave ) CAknIconArray( 2 );
+ iMarkingIconArray = new ( ELeave )
+ CAknIconArray( KMarkingModeIconArraySize );
}
else
{
--- a/uifw/AvKon/aknphysics/src/aknphysics.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/aknphysics/src/aknphysics.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009, 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -931,6 +931,7 @@
void CAknPhysics::DrawViewInCurrentPosition()
{
NotifyViewPositionChanged( iObserver.ViewPosition(), ETrue );
+ iPanningDrawOmitted = EFalse;
}
// --------------------------------------------------------------------------
--- a/uifw/AvKon/animdllsrc/AknKeyEventMap.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/animdllsrc/AknKeyEventMap.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -859,7 +859,11 @@
if ( (*(*iCombos)[i])[2] == aComboCandidate[0] &&
((*iCombos)[i])->Count()-2 == aComboCandidate.Count() )
{
- possibleMatch.Append(i);
+ if (KErrNone != possibleMatch.Append(i))
+ {
+ possibleMatch.Close();
+ return mapValue;
+ }
__AKNANIMLOGSTRING1("CAknKeyEventMap::GetComboMapping ComboCandidate might hit iCombos[%d]",i);
}
}
--- a/uifw/AvKon/inc/AknPreviewPopUp.h Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/inc/AknPreviewPopUp.h Tue Jul 13 11:29:56 2010 +0100
@@ -207,6 +207,13 @@
* @param aRect Rect to draw.
*/
void DrawBackground( CWindowGc& aGc, const TRect& aRect ) const;
+
+ /**
+ * Cleans the internal pointer which is used
+ * to track object deletion.
+ * @param aParam Pointer to preview popup object.
+ */
+ static void CleanLocalRef( TAny* aParam );
private: // Data
@@ -242,6 +249,10 @@
// It is true when user clicks the popup, transfer pointer up event to its child control
TBool iAllowUpEvent;
+
+ // Stores the local variable address, which is used
+ // to mark whether this object has been deleted
+ TBool* iIsDeleted;
};
--- a/uifw/AvKon/src/AknAdaptiveSearchGrid.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/AknAdaptiveSearchGrid.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -534,9 +534,20 @@
const TRect& aRect ) const
{
MAknsSkinInstance* skin = AknsUtils::SkinInstance();
- MAknsControlContext* cc = AknsDrawUtils::ControlContext( this );
- aGc.SetBrushColor( KRgbWhite );
- aGc.SetPenColor( KRgbBlack );
+
+ TRgb color;
+ TInt error = AknsUtils::GetCachedColor(skin, color, KAknsIIDFsTextColors,
+ EAknsCIFsTextColorsCG3 );
+ if( error == KErrNone )
+ {
+ aGc.SetBrushColor( color );
+ aGc.SetPenColor( color );
+ }
+ else
+ {
+ aGc.SetBrushColor( KRgbWhite );
+ aGc.SetPenColor( KRgbBlack );
+ }
aGc.SetBrushStyle( CGraphicsContext::ESolidBrush );
aGc.DrawRect( aRect );
}
--- a/uifw/AvKon/src/AknAppUi.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/AknAppUi.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -1410,6 +1410,12 @@
{
AknsUtils::SetAvkonHighlightAnimationEnabledL( EFalse );
}
+
+ if (( aAppUiFlags & EAknDisableAnimationBackground ) != 0)
+ {
+ AknsUtils::SetAnimationBackgroundDisabledL( ETrue );
+
+ }
#ifdef RD_SCALABLE_UI_V2
if ( CAknTouchPane* tp = TouchPane() )
--- a/uifw/AvKon/src/AknCharMap.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/AknCharMap.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -94,8 +94,6 @@
const TUint KHistoryEmptyChar = CEditableText::ETabCharacter;
const TUint KHistoryEmptyCharForDisplay = CEditableText::ESpace;
-const TInt KAknSctRadioOn = 1;
-const TInt KAknSctRadioOff = 0;
const TInt KAreaIdRecent = 0;
const TInt KAreaIdMain = 1;
const TInt KAreaIdTail = 2;
@@ -245,60 +243,6 @@
};
// ----------------------------------------------------------------------------
-// Table Navi class definition
-// ----------------------------------------------------------------------------
-//
-NONSHARABLE_CLASS(CAknSctTableNavi) : public CAknControl, public MAknSctFocusHandler, public MCoeControlObserver
- {
- public:
- CAknSctTableNavi(CAknCharMap* aCharMap, CAknCharMapExtension* aExtension);
- ~CAknSctTableNavi();
-
- public: // from CCoeControl
- TInt CountComponentControls() const;
- CCoeControl* ComponentControl( TInt aIndex ) const;
- virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode);
- void ConstructFromResourceL(TResourceReader& aReader);
- virtual TSize MinimumSize();
- virtual void SizeChanged();
-
- public: // from MCoeControlObserver
- void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType);
-
- public: // from MAknSctFocusHandler
- virtual CCoeControl* FocusedControl();
- virtual TBool EnterControl(TInt aX, TInt aY);
- virtual void MoveFocus(TInt aX, TInt aY);
- virtual TBool ExitWithKey(TInt aKeycode);
- virtual TBool LeaveControl();
-
- public:
- TInt TableCount();
- void UpdateNextTableButtonL();
-
- private:
- void TableExitL();
- static TInt TableExitCallBackL(TAny* aThis);
- void DoTableExitL();
-
- void NextTableL();
- static TInt NextTableCallBackL(TAny* aThis);
- void DoNextTableL();
-
- private:
- TInt ButtonPosition(TInt aButtonIndex) const;
-
- private: // data
- TInt iButtonIndex;
- RPointerArray<CAknSctNaviButton> iButtonArray;
- CAknCharMap* iCharMap;
- CAknCharMapExtension* iExtension;
- CIdle *iIdle;
-
- TInt iPressedButtonIndex;
- };
-
-// ----------------------------------------------------------------------------
// Navigator class definition
// ----------------------------------------------------------------------------
//
@@ -331,8 +275,21 @@
virtual TBool ExitWithKey(TInt aKeycode);
virtual TBool LeaveControl();
+ public:
+ void UpdateNextTableButtonL();
+ TInt LastButton() const;
+
private:
+ void MoveFocus(TBool aInternalMove, TInt aX, TInt aY );
TBool IsNextButton() const;
+ TBool CalcNextStep( TUint aKey, TInt& aX, TInt& aY );
+ void TableExitL();
+ static TInt TableExitCallBackL(TAny* aThis);
+ void DoTableExitL();
+
+ void NextTableL();
+ static TInt NextTableCallBackL(TAny* aThis);
+ void DoNextTableL();
private: // data
TInt iButtonIndex;
@@ -340,8 +297,8 @@
CAknCharMap* iCharMap;
CAknCharMapExtension* iExtension;
CEikLabel* iTitle;
+ CIdle *iIdle;
};
-
// ----------------------------------------------------------------------------
// Category button class defintion
// ----------------------------------------------------------------------------
@@ -377,60 +334,27 @@
// Radio button class defintion
// ----------------------------------------------------------------------------
//
-class CAknSctRadioButton : public CAknControl, public MAknSctFocusHandler
- {
- public:
- enum TAknSctRadioButtonFlags
- {
- EAknSctRadioButtonResize = 0x1,
- EAknSctRadioButtonEnd
- };
+// stay for BC
+class CAknSctRadioButton : public CAknControl
+ {
public:
CAknSctRadioButton();
- CAknSctRadioButton(CAknCharMap* aCharMap,
- CAknCharMapExtension* aExtension);
~CAknSctRadioButton();
- public: // from MAknSctFocusHandler
- virtual CCoeControl* FocusedControl();
- virtual TBool EnterControl(TInt aX, TInt aY);
- virtual void MoveFocus(TInt aX, TInt aY);
- virtual TBool ExitWithKey(TInt aKeycode);
- virtual TBool LeaveControl();
-
- public: // from CCoeControl
- TInt CountComponentControls() const;
- CCoeControl* ComponentControl( TInt aIndex ) const;
- virtual TKeyResponse OfferKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode);
- void ConstructFromResourceL(TResourceReader& aReader);
-
- /**
- * This function handles pointer events directed at the charmapdialog.
- * @param aPointerEvent The pointer event directed at the charmapdialog.
- */
- virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent);
-
- virtual TSize MinimumSize();
- virtual void SizeChanged();
- virtual void Draw(const TRect& aRect) const;
-
- public: // New function
- // The number of Buttons
- inline TInt Count() const;
-
- void SetCurrentCategory(TInt aCategory);
- void SetValidSctCase(TInt aSctCase);
- void RemoveInvalidButton();
private: // data
RPointerArray<CAknSctCategoryButton> iButtonArray;
- MCoeControlObserver* iObserver;
- TInt iFlags;
- CAknCharMapExtension* iExtension;
- CAknCharMap* iCharMap;
- TInt iButtonIndex;
- TInt iEntryIndex;
};
+
+CAknSctRadioButton::CAknSctRadioButton()
+ {
+ }
+
+CAknSctRadioButton::~CAknSctRadioButton()
+ {
+ iButtonArray.ResetAndDestroy();
+ iButtonArray.Close();
+ }
+
// end of CAknSctRadioButton class definition
// ----------------------------------------------------------------------------
@@ -497,15 +421,11 @@
// FeatureManager
TBool iPictographsBuffer; // ETrue means Picto is valid.
TBool iPictographsBufferGrouping; // ETrue means Picto grouping is valid.
- TBool iJapaneseSctUi; // Title and Softkey for Japanese varinat
- TBool iHasCategoryButtonUi; // Has Category button UI
- CAknSctRadioButton* iRadioButton;
TInt iCurrentCategory; // defined enum TAknSCTCategoryButton on avkon.hrh
// QHD layout.
CAknCharMap* iCharMapProxy;
MAknSctFocusHandler* iFocusHandler;
- CAknSctTableNavi* iTableNavi;
CAknSctPageNavi* iPageNavi;
HBufC* iEntryBuf;
CEikLabel* iCategoryTitle;
@@ -540,6 +460,9 @@
* Is keyboard event
*/
TBool iKeyBrdEvent;
+
+ private:
+ CAknSctRadioButton iForBCDoNotUse;
};
// ----------------------------------------------------------------------------
@@ -603,518 +526,6 @@
}
// ----------------------------------------------------------------------------
-// Table navi class implementation
-// ----------------------------------------------------------------------------
-//
-CAknSctTableNavi::CAknSctTableNavi(CAknCharMap* aCharMap, CAknCharMapExtension* aExtension) :
-iCharMap(aCharMap), iExtension(aExtension)
- {
- }
-
-CAknSctTableNavi::~CAknSctTableNavi()
- {
- if (iButtonArray.Count())
- {
- iButtonArray.ResetAndDestroy();
- }
- iButtonArray.Close();
- delete iIdle;
- }
-
-TInt CAknSctTableNavi::CountComponentControls() const
- {
- return iButtonArray.Count();
- }
-
-CCoeControl* CAknSctTableNavi::ComponentControl( TInt aIndex ) const
- {
- CCoeControl* rtn;
- if (aIndex < iButtonArray.Count())
- {
- rtn = iButtonArray[aIndex]->iButtonControl;
- }
- else
- {
- rtn = NULL;
- }
- return rtn;
- }
-
-TKeyResponse CAknSctTableNavi::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aModifiers)
- {
- CAknSctNaviButton* buttonObj = iButtonArray[iButtonIndex];
- buttonObj->iButtonControl->OfferKeyEventL(aKeyEvent,aModifiers);
- TKeyResponse response = EKeyWasNotConsumed;
- TUint code=aKeyEvent.iCode;
- switch (code)
- {
- case EKeyEnter:
- case EKeyOK:
- {
- switch (buttonObj->iButtonId)
- {
- case EAknSctTableNaviExit:
- {
- iExtension->iKeyOkEvent = ETrue;
- TableExitL();
- response = EKeyWasConsumed;
- }
- break;
- // add all supported table types here.
- case EAknSctTableNaviSpecialChar:
- case EAknSctTableNaviEmotion:
- {
- NextTableL();
- response = EKeyWasConsumed;
- }
- break;
- default:
- break;
- }
- }
- break;
- case EKeyLeftArrow:
- case '4':
- {
- MoveFocus(-1,0);
- response = EKeyWasConsumed;
- }
- break;
- case EKeyRightArrow:
- case '6':
- {
- MoveFocus(1,0);
- response = EKeyWasConsumed;
- }
- break;
- case EKeyUpArrow:
- case '2':
- {
- response = EKeyWasConsumed;
- if ((iButtonIndex==0) && !Layout_Meta_Data::IsLandscapeOrientation())
- {
- // Left page button.
- if (iExtension->iPageNavi && iExtension->iPageNavi->EnterControl(0,0))
- {
- LeaveControl();
- }
- }
- else
- {
- // Last radio button.
- if ((iButtonIndex==0) && iExtension->iRadioButton)
- {
- if (iExtension->iRadioButton->EnterControl(0,iExtension->iRadioButton->Count()-1))
- {
- LeaveControl();
- }
- break;
- }
-
- // Grid bottom row.
- TInt xPos = ButtonPosition(iButtonIndex);
- if (iCharMap->ColMax(0) > iCharMap->ColMax(xPos))
- {
- xPos = iCharMap->RowMax(iCharMap->ColMax(0));
- }
-
- if (iExtension->EnterControl(xPos,iCharMap->ColMax(xPos)))
- {
- LeaveControl();
- break;
- }
- }
- }
- break;
-
- case EKeyDownArrow:
- case '8':
- {
- response = EKeyWasConsumed;
-
- // First radio button.
- if ((iButtonIndex==0) && iExtension->iRadioButton)
- {
- if (iExtension->iRadioButton->EnterControl(0,0))
- {
- LeaveControl();
- }
- break;
- }
-
- // Grid top row.
- TInt xPos = ButtonPosition(iButtonIndex);
- if (iExtension->EnterControl(xPos,iCharMap->ColMin(xPos)))
- {
- LeaveControl();
- break;
- }
- }
- break;
-
- default:
- break;
- }
- return response;
- }
-
-void CAknSctTableNavi::TableExitL()
- {
- if(!iIdle)
- {
- iIdle = CIdle::NewL(CActive::EPriorityStandard);
- }
-
- iIdle->Cancel();
- iIdle->Start(TCallBack(TableExitCallBackL, this));
- }
-
-TInt CAknSctTableNavi::TableExitCallBackL(TAny* aThis)
- {
- ((CAknSctTableNavi*)aThis)->DoTableExitL();
- return KErrNone;
- }
-
-void CAknSctTableNavi::DoTableExitL()
- {
- iCharMap->SetStatusChanged(EAknCharSelectedTableExitButton);
- }
-
-void CAknSctTableNavi::NextTableL()
- {
- if(!iIdle)
- {
- iIdle = CIdle::NewL(CActive::EPriorityStandard);
- }
-
- iIdle->Cancel();
- iIdle->Start(TCallBack(NextTableCallBackL, this));
- }
-
-TInt CAknSctTableNavi::NextTableCallBackL(TAny* aThis)
- {
- ((CAknSctTableNavi*)aThis)->DoNextTableL();
- return KErrNone;
- }
-
-void CAknSctTableNavi::DoNextTableL()
- {
- iCharMap->SetStatusChanged(EAknCharSelectedNextTableButton);
- }
-
-TInt CAknSctTableNavi::ButtonPosition(TInt aButtonIndex) const
- {
- // buttons behind the 1th are behavior as one button
- return (aButtonIndex==0) ? 0 : 1;
- }
-
-void CAknSctTableNavi::ConstructFromResourceL(TResourceReader& aReader)
- {
- // Table navi buttons.
- TInt counts = aReader.ReadInt16();
- for (TInt i = 0; i < counts; i++)
- {
- TInt buttonId = aReader.ReadInt16();
- TInt resId = aReader.ReadInt32();
- TResourceReader buttonReader;
- iCoeEnv->CreateResourceReaderLC(buttonReader, resId);
- CAknSctNaviButton* buttonObj = CAknSctNaviButton::NewL(*this, buttonId, buttonReader);
- buttonObj->SetObserver(this);
- iButtonArray.Append(buttonObj);
- CleanupStack::PopAndDestroy(); // buttonReader
- }
- }
-
-TSize CAknSctTableNavi::MinimumSize()
- {
- return Rect().Size();
- }
-
-void CAknSctTableNavi::SizeChanged()
- {
- if (iButtonArray.Count()>0)
- {
-
- TInt ctrlVariety = 2;
- TInt cellVariety = 1;
- if(!iCharMap->IsJapaneseSctUi())
- {
- ctrlVariety = (iCharMap->TableCount()>1) ? 0 : 1;
- cellVariety = 0;
- }
-
- TAknLayoutRect cellLayRect, buttonLayRect;
- TRect buttonRect;
-
- // Table exit.
- cellLayRect.LayoutRect(Rect(), AknLayoutScalable_Avkon::cell_graphic2_control_pane(ctrlVariety,0));
- buttonLayRect.LayoutRect(cellLayRect.Rect(), AknLayoutScalable_Avkon::bg_button_pane_cp05(cellVariety));
- buttonRect = buttonLayRect.Rect();
-
- TAknLayoutRect iconLayRect;
- iconLayRect.LayoutRect(buttonRect, AknLayoutScalable_Avkon::cell_graphic2_control_pane_g1(cellVariety));
- TSize iconSize = iconLayRect.Rect().Size();
-
- CAknSctNaviButton* buttonObj = iButtonArray[0];
- buttonObj->iButtonControl->SetRect(buttonRect);
- buttonObj->iButtonControl->SetHighlightRect(buttonRect);
- buttonObj->iButtonControl->SetIconScaleMode(EAspectRatioPreserved);
- buttonObj->iButtonControl->SetIconSize(iconSize);
- buttonObj->SetEnabled(ETrue);
-
- // Table change.
- if (iCharMap->TableCount() > 1)
- {
- cellLayRect.LayoutRect(Rect(), AknLayoutScalable_Avkon::cell_graphic2_control_pane(ctrlVariety,1));
- buttonLayRect.LayoutRect(cellLayRect.Rect(), AknLayoutScalable_Avkon::bg_button_pane_cp05(cellVariety));
- buttonRect = buttonLayRect.Rect();
-
- for (TInt i(1); i<iButtonArray.Count(); i++)
- {
- CAknSctNaviButton* buttonObj = iButtonArray[i];
- buttonObj->iButtonControl->SetRect(buttonRect);
- buttonObj->iButtonControl->SetHighlightRect(buttonRect);
- buttonObj->iButtonControl->SetIconScaleMode(EAspectRatioPreserved);
- buttonObj->iButtonControl->SetIconSize(iconSize);
- buttonObj->SetEnabled(ETrue);
- }
- }
-
- TRAP_IGNORE(UpdateNextTableButtonL());
- }
- }
-
-void CAknSctTableNavi::HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType)
- {
- if(aEventType == EEventStateChanged)
- {
- for(TInt i=0; i<iButtonArray.Count(); i++)
- {
- CAknSctNaviButton* button = iButtonArray[i];
- if(button->iButtonControl == aControl)
- {
- switch(button->iButtonId)
- {
- case EAknSctTableNaviExit:
- {
- iExtension->iKeyOkEvent = ETrue;
- TableExitL();
- }
- return;
-
- case EAknSctTableNaviSpecialChar:
- case EAknSctTableNaviEmotion:
- {
- NextTableL();
- }
- return;
-
- default:
- break;
- }
-
- break;
- }
- }
- }
- }
-
-
-void CAknSctTableNavi::UpdateNextTableButtonL()
- {
-
- TBool isFocused = EFalse;
-
- // table switch buttons stay in one place.
- for(TInt index(1); index<iButtonArray.Count(); index++)
- {
- CAknSctNaviButton* buttonObj = iButtonArray[index];
- if(buttonObj->IsEnabled())
- {
- isFocused = buttonObj->IsFocused();
- }
- }
-
- // fresh focused button
- for (TInt index(1); index<iButtonArray.Count(); index++)
- {
- CAknSctNaviButton* buttonObj = iButtonArray[index];
- if (iCharMap->TableCount() > 1)
- {
- switch (iCharMap->NextTableCase())
- {
- case EAknCharMapTableSpecialChar:
- {
- TBool isShown = EFalse;
- if(iExtension->IsShowingEmotion())
- {
- isShown = (buttonObj->iButtonId==EAknSctTableNaviSpecialChar);
- }
- else
- {
- isShown = (buttonObj->iButtonId==EAknSctTableNaviEmotion);
- }
- buttonObj->SetEnabled(isShown);
- buttonObj->SetFocused(isShown && isFocused);
- if(isShown && isFocused)
- {
- iButtonIndex = index;
- }
- }
- break;
-
- default:
- buttonObj->SetEnabled(EFalse);
- break;
- }
- }
- else
- {
- buttonObj->SetEnabled(EFalse);
- }
- }
- }
-
-CCoeControl* CAknSctTableNavi::FocusedControl()
- {
- return this;
- }
-
-TBool CAknSctTableNavi::EnterControl(TInt aX, TInt /*aY*/)
- {
- if (IsVisible())
- {
- if ((aX >= 0) && (aX < iButtonArray.Count()))
- {
- TInt index = aX;
- if (AknLayoutUtils::LayoutMirrored()) // reverse.
- {
- index = (iButtonArray.Count() - 1) - aX;
- }
-
- index = ButtonPosition(index);
-
- for(; index<iButtonArray.Count(); index++)
- {
- CAknSctNaviButton* buttonObj = iButtonArray[index];
- if (buttonObj->IsEnabled())
- {
- iButtonIndex = index;
- iExtension->iFocusHandler = this;
- buttonObj->SetFocused(ETrue);
- return ETrue;
- }
- }
- }
- }
- return EFalse;
- }
-
-void CAknSctTableNavi::MoveFocus(TInt aX, TInt /*aY*/)
- {
- TInt delta = aX;
- if (AknLayoutUtils::LayoutMirrored()) // reverse.
- {
- delta = -aX;
- }
-
- TInt buttonIndex = iButtonIndex + delta;
-
- // loop until find next position
- for (TInt i = 0; i < iButtonArray.Count(); i++)
- {
-
- if (buttonIndex > iButtonArray.Count() - 1) // goto Next control
- {
- if (!Layout_Meta_Data::IsLandscapeOrientation())
- {
- // First radio button.
- if (iExtension->iRadioButton)
- {
- if (iExtension->iRadioButton->EnterControl(0,0))
- {
- LeaveControl();
- }
- break;
- }
- // Grid start.
- if (iExtension->EnterControl(0,iCharMap->ColMin(0)))
- {
- LeaveControl();
- }
- }
- else
- {
- // Left page button.
- if (iExtension->iPageNavi &&
- iExtension->iPageNavi->EnterControl(0,0))
- {
- LeaveControl();
- }
- }
- break;
- }
-
- else if (buttonIndex < 0) // goto Prev control
- {
- if (!Layout_Meta_Data::IsLandscapeOrientation())
- {
- // Right page button.
- if (iExtension->iPageNavi &&
- iExtension->iPageNavi->EnterControl(1,0))
- {
- LeaveControl();
- }
- }
- else
- {
- // Grid end.
- TInt posY = iCharMap->ColMax(0);
- if (iExtension->EnterControl(iCharMap->RowMax(posY),posY))
- {
- LeaveControl();
- }
- }
- break;
- }
-
- if (iButtonArray[buttonIndex]->IsEnabled()) // goto next button in This control
- {
- CAknSctNaviButton* buttonObj;
- buttonObj = iButtonArray[iButtonIndex];
- buttonObj->SetFocused(EFalse);
- iButtonIndex = buttonIndex;
- buttonObj = iButtonArray[iButtonIndex];
- buttonObj->SetFocused(ETrue);
- break;
- }
-
- buttonIndex += (delta < 0) ? -1 : 1; // get next position
- }
- }
-
-TBool CAknSctTableNavi::LeaveControl()
- {
- for (TInt i = 0; i < iButtonArray.Count(); i++ )
- {
- iButtonArray[i]->SetFocused(EFalse);
- }
- return ETrue;
- }
-
-TBool CAknSctTableNavi::ExitWithKey(TInt /*aKeycode*/)
- {
- if (iButtonArray[iButtonIndex]->iButtonId != EAknSctTableNaviExit)
- {
- return EFalse;
- }
- else
- {
- return ETrue;
- }
- }
-
-// ----------------------------------------------------------------------------
// Page Navi class implementation
// ----------------------------------------------------------------------------
//
@@ -1134,6 +545,7 @@
}
iButtonArray.Close();
delete iTitle;
+ delete iIdle;
}
TInt CAknSctPageNavi::CountComponentControls() const
@@ -1182,6 +594,12 @@
{
switch (buttonObj->iButtonId)
{
+ case EAknSctTableNaviExit:
+ {
+ iExtension->iKeyOkEvent = ETrue;
+ TableExitL();
+ }
+ break;
case EAknSctPageNaviPrevPage:
{
iCharMap->PrevPageL();
@@ -1192,6 +610,13 @@
iCharMap->NextPageL();
}
break;
+ // add all supported table types here.
+ case EAknSctTableNaviSpecialChar:
+ case EAknSctTableNaviEmotion:
+ {
+ NextTableL();
+ }
+ break;
default:
return EKeyWasConsumed;
}
@@ -1202,110 +627,18 @@
break;
case EKeyLeftArrow:
case '4':
- {
- MoveFocus(-1,0);
- response = EKeyWasConsumed;
- }
- break;
case EKeyRightArrow:
case '6':
- {
- MoveFocus(1,0);
- response = EKeyWasConsumed;
- }
- break;
case EKeyUpArrow:
case '2':
- {
- response = EKeyWasConsumed;
- if (!Layout_Meta_Data::IsLandscapeOrientation())
- {
- if (iExtension->iRadioButton && !IsNextButton())
- {
- // Last radio button.
- if (iExtension->iRadioButton->EnterControl(
- 0,iExtension->iRadioButton->Count()-1))
- {
- LeaveControl();
- }
- break;
- }
- }
- TInt xPos;
- if (!Layout_Meta_Data::IsLandscapeOrientation())
- {
- xPos = IsNextButton() ? iCharMap->MaxCols() - 1 : 0;
- }
- else
- {
- if (IsNextButton())
- {
- xPos = iCharMap->MaxCols() - 1;
- }
- else
- {
- xPos = !iExtension->iRadioButton ?
- iCharMap->TableCount() : iCharMap->MaxCols()-2;
- }
- }
- if (iCharMap->ColMax(0) > iCharMap->ColMax(xPos))
- {
- xPos = iCharMap->RowMax(iCharMap->ColMax(0));
- }
- // Grid bottom row.
- if (iExtension->EnterControl(xPos,iCharMap->ColMax(xPos)))
- {
- LeaveControl();
- break;
- }
- }
- break;
case EKeyDownArrow:
case '8':
{
+ TInt gridX;
+ TInt gridY;
+ TBool gridInvolved = CalcNextStep( code, gridX, gridY );
+ MoveFocus( !gridInvolved, gridX, gridY );
response = EKeyWasConsumed;
- if (!Layout_Meta_Data::IsLandscapeOrientation())
- {
- if (!IsNextButton())
- {
- // First table button.
- if (iExtension->iTableNavi &&
- iExtension->iTableNavi->EnterControl(0,0))
- {
- LeaveControl();
- break;
- }
- }
- else
- {
- // Grid top row.
- TInt xPos = iCharMap->MaxCols() - 1;
- if (iExtension->EnterControl(xPos,iCharMap->ColMin(xPos)))
- {
- LeaveControl();
- break;
- }
- }
- }
- else
- {
- TInt xPos;
- if (IsNextButton())
- {
- xPos = iCharMap->MaxCols() - 1;
- }
- else
- {
- xPos = !iExtension->iRadioButton ?
- iCharMap->TableCount() : iCharMap->MaxCols() - 2;
- }
- // Grid top row.
- if (iExtension->EnterControl(xPos,iCharMap->ColMin(xPos)))
- {
- LeaveControl();
- break;
- }
- }
}
break;
default:
@@ -1314,6 +647,176 @@
return response;
}
+TBool CAknSctPageNavi::CalcNextStep( TUint aKey, TInt& aX, TInt& aY )
+ {
+ TBool landscape = Layout_Meta_Data::IsLandscapeOrientation();
+ TBool mirrored = AknLayoutUtils::LayoutMirrored();
+ TBool emotionEnabled = iExtension->IsEmotionEnabled();
+ TInt scPages = iCharMap->PageCount();
+
+ aX = 0;
+ aY = 0;
+ TInt xOffset = 0;
+ TInt yOffset = 0;
+
+ // Simplify key events to two variants
+ switch ( aKey )
+ {
+ case EKeyLeftArrow:
+ case '4':
+ {
+ xOffset = -1;
+ }
+ break;
+ case EKeyRightArrow:
+ case '6':
+ {
+ xOffset = 1;
+ }
+ break;
+ case EKeyDownArrow:
+ case '8':
+ {
+ yOffset = 1;
+ }
+ break;
+ case EKeyUpArrow:
+ case '2':
+ {
+ yOffset = -1;
+ }
+ break;
+ default:
+ break;
+ }
+
+ TInt runtimeIndex = iButtonIndex;
+ if ( !emotionEnabled )
+ {
+ // SC/Emotion unabled, button regrouped!
+ if ( ( mirrored && iButtonIndex == EAknSctPageNaviPrevPage && xOffset != 1 )
+ || ( !mirrored && iButtonIndex == EAknSctPageNaviNextPage && xOffset != -1) )
+ {
+ runtimeIndex = iExtension->IsShowingEmotion()?EAknSctTableNaviSpecialChar:EAknSctTableNaviEmotion;
+ }
+ }
+ // calculate when moving from PageNavi to grid, the column position
+ switch ( runtimeIndex )
+ {
+ case EAknSctTableNaviExit:
+ {
+ aX = 0;
+ if ( ( !mirrored && xOffset == -1 ) || ( mirrored && xOffset == 1 ) )
+ {
+ // Grid end
+ aY = iCharMap->ColMax(0);
+ aX = iCharMap->RowMax( aY );
+ return ETrue;
+ }
+ else if ( mirrored && xOffset == -1 && scPages >= 2 )
+ {
+ xOffset = EAknSctPageNaviNextPage;
+ }
+ else if ( scPages < 2
+ && ( ( !mirrored && xOffset == 1 ) || ( mirrored && xOffset == -1 ) ) )
+ {
+ if ( !emotionEnabled )
+ {
+ // Grid start
+ aX = 0;
+ aY = iCharMap->ColMin( aX );
+ return ETrue;
+ }
+ else
+ {
+ xOffset = LastButton();
+ }
+ }
+ else
+ {
+ xOffset = EAknSctTableNaviExit + xOffset;
+ }
+ }
+ break;
+ case EAknSctPageNaviPrevPage:
+ {
+ aX = mirrored ? iCharMap->MaxCols()-2 : 1;
+ if ( mirrored && xOffset == -1 )
+ {
+ xOffset = LastButton();
+ }
+ else
+ {
+ xOffset = xOffset + EAknSctPageNaviPrevPage;
+ }
+ }
+ break;
+ case EAknSctPageNaviNextPage:
+ {
+ aX = mirrored ? 1 : iCharMap->MaxCols()-2;
+ if ( mirrored && xOffset == 1 )
+ {
+ xOffset = 0;
+ }
+ else if ( !mirrored && xOffset == 1 )
+ {
+ xOffset = LastButton();
+ }
+ else
+ {
+ xOffset = EAknSctPageNaviNextPage + xOffset;
+ }
+ }
+ break;
+ case EAknSctTableNaviSpecialChar:
+ case EAknSctTableNaviEmotion:
+ {
+ aX = iCharMap->MaxCols()-1;
+ if ( ( !mirrored && xOffset == 1 ) || ( mirrored && xOffset == -1 ) )
+ {
+ // Grid start
+ aX = 0;
+ aY = iCharMap->ColMin( aX );
+ return ETrue;
+ }
+ else if ( scPages < 2
+ && ( ( !mirrored && xOffset == -1 ) || ( mirrored && xOffset == 1 ) ) )
+ {
+ xOffset = EAknSctTableNaviExit;
+ }
+ else if ( mirrored && xOffset == 1 )
+ {
+ xOffset = EAknSctPageNaviPrevPage;
+ }
+ else
+ {
+ xOffset = EAknSctPageNaviNextPage;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+
+ if ( yOffset == 1 )
+ {
+ // DOWN
+ aY = iCharMap->ColMin( aX );
+ return ETrue;
+ }
+ else if ( yOffset == -1 )
+ {
+ // and UP
+ aY = iCharMap->ColMax( aX );
+ return ETrue;
+ }
+
+ // Return False means it's internal moving focus within Page Navi
+ aX = xOffset;
+ aY = 0;
+ return EFalse;
+ }
+
TBool CAknSctPageNavi::IsNextButton() const
{
if (iButtonIndex < iButtonArray.Count() && iButtonArray[iButtonIndex])
@@ -1335,7 +838,9 @@
CAknSctNaviButton* buttonObj =
CAknSctNaviButton::NewL(*this, buttonId, oneButtonReader);
buttonObj->iButtonControl->SetObserver(this); // for handling control events.
- iButtonArray.Append(buttonObj);
+ CleanupStack::PushL( buttonObj );
+ iButtonArray.AppendL(buttonObj);
+ CleanupStack::Pop( buttonObj );
CleanupStack::PopAndDestroy(); // oneButtonReader
}
iTitle = new (ELeave) CEikLabel;
@@ -1350,7 +855,6 @@
for (TInt index=0; index < iButtonArray.Count(); index++)
{
CAknSctNaviButton* buttonObj = iButtonArray[index];
- TRect buttonRect = buttonObj->iButtonControl->Rect();
if (buttonObj->iButtonControl == aControl)
{
if (buttonObj->IsEnabled() && buttonObj->iPressed)
@@ -1364,14 +868,14 @@
iCharMap->PrevPageL();
UpdatePageTitleL();
}
- break;
+ return;
case EAknSctPageNaviNextPage:
{
buttonObj->iRepeat = ETrue; // Set button repeat.
iCharMap->NextPageL();
UpdatePageTitleL();
}
- break;
+ return;
default:
break;
}
@@ -1392,13 +896,19 @@
CAknSctNaviButton* buttonObj = iButtonArray[index];
buttonObj->iPressed = EFalse;
buttonObj->iRepeat = EFalse;
+ TInt buttonIndex = buttonObj->iButtonId;
TRect buttonRect = buttonObj->iButtonControl->Rect();
- if (buttonRect.Contains(aPointerEvent.iPosition))
+ if ( buttonRect.Contains(aPointerEvent.iPosition))
{
if (buttonObj->IsEnabled())
{
- buttonObj->iButtonControl->SetButtonFlags(KAknButtonKeyRepeat);
buttonObj->iPressed = ETrue; // Set button pressed.
+ if ( buttonIndex == EAknSctPageNaviPrevPage
+ || buttonIndex == EAknSctPageNaviNextPage )
+ {
+ // Only Prev/Next button can repeat
+ buttonObj->iButtonControl->SetButtonFlags( KAknButtonKeyRepeat );
+ }
}
}
}
@@ -1430,6 +940,18 @@
UpdatePageTitleL();
}
break;
+ case EAknSctTableNaviExit:
+ {
+ iExtension->iKeyOkEvent = ETrue;
+ TableExitL();
+ }
+ break;
+ case EAknSctTableNaviSpecialChar:
+ case EAknSctTableNaviEmotion:
+ {
+ NextTableL();
+ }
+ break;
default:
break;
}
@@ -1452,59 +974,111 @@
void CAknSctPageNavi::SizeChanged()
{
- TAknLayoutRect pageButtonLayRect;
- TInt pageVariate = !iCharMap->IsJapaneseSctUi() ? ((iCharMap->TableCount() > 1) ? 0 : 1) : 2;
-
+ TAknLayoutRect pageButtonLayRect, buttonLayRect;
+ TInt cellVar = Layout_Meta_Data::IsLandscapeOrientation()? 3 : 2;
+ TInt bgVar = 2;
+ TBool landScape = Layout_Meta_Data::IsLandscapeOrientation();
+ TBool emotionEnabled = ETrue;
+ TBool mirrored = AknLayoutUtils::LayoutMirrored();
CAknSctNaviButton* buttonObj;
TRect rect;
- buttonObj = iButtonArray[0];
+ if ( iExtension )
+ {
+ emotionEnabled = iExtension->IsEmotionEnabled();
+ }
+
+ // Prev button
+ buttonObj = iButtonArray[1];
buttonObj->iButtonControl->SetButtonFlags(0);
- if (!AknLayoutUtils::LayoutMirrored())
- {
- buttonObj->iButtonId = EAknSctPageNaviPrevPage;
- pageButtonLayRect.LayoutRect(Rect(),AknLayoutScalable_Avkon::bg_button_pane_cp10(pageVariate));
+ TInt col = 0;
+ if ( !landScape )
+ {
+ col = mirrored ? ( !emotionEnabled?4:3 ) : 1;
}
else
{
- buttonObj->iButtonId = EAknSctPageNaviNextPage;
- pageButtonLayRect.LayoutRect(Rect(),AknLayoutScalable_Avkon::bg_button_pane_cp11(pageVariate));
- }
- rect = pageButtonLayRect.Rect();
+ col = mirrored ? ( !emotionEnabled?6:5 ) : 1;
+ }
+ pageButtonLayRect.LayoutRect( Rect(), AknLayoutScalable_Avkon::cell_graphic2_control_pane(cellVar,col) );
+ buttonLayRect.LayoutRect( pageButtonLayRect.Rect(), AknLayoutScalable_Avkon::bg_button_pane_cp05(bgVar));
+ rect = buttonLayRect.Rect();
buttonObj->iButtonControl->SetRect(rect);
buttonObj->iButtonControl->SetHighlightRect(rect);
- TAknLayoutRect pageButtonIconLayRect;
- pageButtonIconLayRect.LayoutRect(pageButtonLayRect.Rect(), AknLayoutScalable_Avkon::graphic2_pages_pane_g1(pageVariate));
- buttonObj->iButtonControl->SetIconScaleMode(EAspectRatioPreserved);
- TSize iconSize = pageButtonIconLayRect.Rect().Size();
+
+ // ...Prev button icon
+ TAknLayoutRect iconLayRect;
+ iconLayRect.LayoutRect(rect, AknLayoutScalable_Avkon::cell_graphic2_control_pane_g1(bgVar));
+ TSize iconSize = iconLayRect.Rect().Size();
buttonObj->iButtonControl->SetIconSize(iconSize);
-
- buttonObj = iButtonArray[1];
+
+ // Next button
+ buttonObj = iButtonArray[2];
buttonObj->iButtonControl->SetButtonFlags(0);
- if (!AknLayoutUtils::LayoutMirrored())
- {
- buttonObj->iButtonId = EAknSctPageNaviNextPage;
- pageButtonLayRect.LayoutRect(Rect(), AknLayoutScalable_Avkon::bg_button_pane_cp11(pageVariate));
+ if ( !landScape )
+ {
+ col = mirrored ? 1 : ( !emotionEnabled?4:3 );
}
else
{
- buttonObj->iButtonId = EAknSctPageNaviPrevPage;
- pageButtonLayRect.LayoutRect(Rect(), AknLayoutScalable_Avkon::bg_button_pane_cp10(pageVariate));
- }
- rect = pageButtonLayRect.Rect();
+ col = mirrored ? 1 : ( !emotionEnabled?6:5 );
+ }
+ pageButtonLayRect.LayoutRect( Rect(), AknLayoutScalable_Avkon::cell_graphic2_control_pane(cellVar,col) );
+ buttonLayRect.LayoutRect( pageButtonLayRect.Rect(), AknLayoutScalable_Avkon::bg_button_pane_cp05(bgVar));
+ rect = buttonLayRect.Rect();
+ buttonObj->iButtonControl->SetRect(rect);
+ buttonObj->iButtonControl->SetHighlightRect(rect);
+
+ // ...Next button icon
+ buttonObj->iButtonControl->SetIconSize(iconSize);
+
+ // Exit button
+ buttonObj = iButtonArray[0];
+ buttonObj->iButtonControl->SetButtonFlags(0);
+ pageButtonLayRect.LayoutRect( Rect(), AknLayoutScalable_Avkon::cell_graphic2_control_pane(cellVar,0) );
+ buttonLayRect.LayoutRect( pageButtonLayRect.Rect(), AknLayoutScalable_Avkon::bg_button_pane_cp05(bgVar));
+ rect = buttonLayRect.Rect();
buttonObj->iButtonControl->SetRect(rect);
buttonObj->iButtonControl->SetHighlightRect(rect);
- buttonObj->iButtonControl->SetIconScaleMode(EAspectRatioPreserved);
+
+ // ...Exit button icon
buttonObj->iButtonControl->SetIconSize(iconSize);
-
+
+ // Emotion/Special-char button
+ col = landScape? 6 : 4;
+ pageButtonLayRect.LayoutRect( Rect(), AknLayoutScalable_Avkon::cell_graphic2_control_pane(cellVar,col) );
+ buttonLayRect.LayoutRect( pageButtonLayRect.Rect(), AknLayoutScalable_Avkon::bg_button_pane_cp05(bgVar));
+ rect = buttonLayRect.Rect();
+ for ( TInt i = 3; i < iButtonArray.Count();i++ )
+ {
+ buttonObj = iButtonArray[i];
+ buttonObj->iButtonControl->SetButtonFlags(0);
+ buttonObj->iButtonControl->SetRect(rect);
+ buttonObj->iButtonControl->SetHighlightRect(rect);
+
+ // ...its icon
+ buttonObj->iButtonControl->SetIconSize(iconSize);
+ }
+ TRAP_IGNORE(UpdateNextTableButtonL());
+
// Page text.
- TRect parentRect = Rect();
- AknLayoutUtils::LayoutLabel(iTitle, parentRect, AknLayoutScalable_Avkon::graphic2_pages_pane_t1(pageVariate).LayoutLine());
+ col = landScape? 3 : 2;
+ pageButtonLayRect.LayoutRect(Rect(), AknLayoutScalable_Avkon::cell_graphic2_control_pane(cellVar,col));
+ TAknTextComponentLayout textlayout = AknLayoutScalable_Avkon::cell_graphic2_control_pane_t1();
+ TRect titleRect( pageButtonLayRect.Rect() );
+ if ( !emotionEnabled )
+ {
+ // start complex dynamic logic to locate title rect when emotion is unable
+ TInt orientation = mirrored ? -1 : 1;
+ TInt newLeft = titleRect.iTl.iX + orientation*rect.Width()/2;
+ TPoint titleTL( newLeft, titleRect.iTl.iY );
+ titleRect.SetRect( titleTL, titleRect.Size() );
+ }
+ AknLayoutUtils::LayoutLabel(iTitle, titleRect, textlayout.LayoutLine());
// Page text color
TAknLayoutText textLayout;
- textLayout.LayoutText(parentRect, AknLayoutScalable_Avkon::graphic2_pages_pane_t1(pageVariate));
- TRect textRect = textLayout.TextRect();
+ textLayout.LayoutText( titleRect, textlayout );
TRgb color = textLayout.Color();
MAknsSkinInstance* skin = AknsUtils::SkinInstance();
if (skin)
@@ -1522,10 +1096,16 @@
void CAknSctPageNavi::UpdatePageTitleL() const
{
+ TInt pages = iCharMap->PageCount();
+ if ( pages < 2 )
+ {
+ iTitle->MakeVisible( EFalse );
+ return;
+ }
CArrayFix<TInt>* numbers = new(ELeave)CArrayFixFlat<TInt>(2);
- CleanupStack::PushL(numbers);
- numbers->AppendL(iCharMap->CurrentPage());
- numbers->AppendL(iCharMap->PageCount());
+ CleanupStack::PushL( numbers );
+ numbers->AppendL( iCharMap->CurrentPage() );
+ numbers->AppendL( pages );
HBufC* page =
StringLoader::LoadL(
R_AVKON_SPECIAL_CHARACTERS_PAGE_INDICATOR, *numbers, iEikonEnv);
@@ -1542,6 +1122,7 @@
TBool CAknSctPageNavi::EnterControl(TInt aX, TInt /*aY*/)
{
+ // Note, the button index is fixed on spite of mirrored case
if (IsVisible())
{
if ((aX >= 0) && (aX < iButtonArray.Count()))
@@ -1550,10 +1131,6 @@
buttonObj = iButtonArray[iButtonIndex];
buttonObj->SetFocused(EFalse);
TInt index = aX;
- if (AknLayoutUtils::LayoutMirrored()) // reverse.
- {
- index = iButtonArray.Count() - 1 - aX;
- }
buttonObj = iButtonArray[index];
if (buttonObj->IsEnabled())
{
@@ -1567,131 +1144,24 @@
return EFalse;
}
-void CAknSctPageNavi::MoveFocus(TInt aX, TInt /*aY*/)
- {
- TInt delta = aX;
- TInt buttonIndex = iButtonIndex + delta;
- for (TInt i = 0; i < iButtonArray.Count(); i++)
- {
- if (buttonIndex > iButtonArray.Count() - 1) // Next control.
- {
- if (!AknLayoutUtils::LayoutMirrored())
- {
- if (!Layout_Meta_Data::IsLandscapeOrientation())
- {
- // First table button.
- if (iExtension->iTableNavi &&
- iExtension->iTableNavi->EnterControl(0,0))
- {
- LeaveControl();
- break;
- }
- }
- else
- {
- // First radio button.
- if (iExtension->iRadioButton &&
- iExtension->iRadioButton->EnterControl(0,0))
- {
- LeaveControl();
- break;
- }
- // Grid start.
- TInt yPos = iCharMap->ColMin(0);
- if (iExtension->EnterControl(iCharMap->RowMin(yPos),yPos))
- {
- LeaveControl();
- break;
- }
- }
- }
- else
- {
- if (!Layout_Meta_Data::IsLandscapeOrientation())
- {
- // Grid end.
- TInt yPos = iCharMap->ColMax(0);
- if (iExtension->EnterControl(iCharMap->RowMax(yPos),yPos))
- {
- LeaveControl();
- break;
- }
- }
- else
- {
- // Last table button.
- TInt xPos = iCharMap->TableCount() - 1;
- if (iExtension->iTableNavi &&
- iExtension->iTableNavi->EnterControl(xPos,0))
- {
- LeaveControl();
- break;
- }
- }
- }
- break;
- }
- else if (buttonIndex < 0) // Prev control
- {
- if (!AknLayoutUtils::LayoutMirrored())
- {
- if (!Layout_Meta_Data::IsLandscapeOrientation())
- {
- // Grid end.
- TInt yPos = iCharMap->ColMax(0);
- if (iExtension->EnterControl(iCharMap->RowMax(yPos),yPos))
- {
- LeaveControl();
- break;
- }
- }
- else
- {
- // Last table button.
- if (iExtension->iTableNavi &&
- iExtension->iTableNavi->EnterControl(iCharMap->TableCount()-1,0))
- {
- LeaveControl();
- break;
- }
- }
- }
- else
- {
- if (!Layout_Meta_Data::IsLandscapeOrientation())
- {
- // First table button.
- if (iExtension->iTableNavi &&
- iExtension->iTableNavi->EnterControl(0,0))
- {
- LeaveControl();
- break;
- }
- }
- else
- {
- // Grid start.
- TInt yPos = iCharMap->ColMin(0);
- if (iExtension->EnterControl(iCharMap->RowMin(yPos),yPos))
- {
- LeaveControl();
- break;
- }
- }
- }
- }
-
- if (iButtonArray[buttonIndex]->IsEnabled()) // This control
- {
- CAknSctNaviButton* buttonObj;
- buttonObj = iButtonArray[iButtonIndex];
- buttonObj->SetFocused(EFalse);
- iButtonIndex = buttonIndex;
- buttonObj = iButtonArray[iButtonIndex];
- buttonObj->SetFocused(ETrue);
- break;
- }
- buttonIndex += (delta < 0) ? -1 : 1;
+void CAknSctPageNavi::MoveFocus(TInt aX, TInt aY )
+ {
+ (void)aX;
+ (void)aY;
+ }
+
+void CAknSctPageNavi::MoveFocus(TBool aInternalMove, TInt aX, TInt aY )
+ {
+ if ( aInternalMove )
+ {
+ EnterControl( aX, 0 );
+ }
+ else
+ {
+ if (iExtension->EnterControl( aX, aY ) )
+ {
+ LeaveControl();
+ }
}
}
@@ -1706,7 +1176,144 @@
TBool CAknSctPageNavi::ExitWithKey(TInt /*aKeycode*/)
{
- return EFalse;
+ if (iButtonArray[iButtonIndex]->iButtonId != EAknSctTableNaviExit)
+ {
+ return EFalse;
+ }
+ else
+ {
+ return ETrue;
+ }
+ }
+
+
+void CAknSctPageNavi::TableExitL()
+ {
+ if(!iIdle)
+ {
+ iIdle = CIdle::NewL(CActive::EPriorityStandard);
+ }
+
+ iIdle->Cancel();
+ iIdle->Start(TCallBack(TableExitCallBackL, this));
+ }
+
+TInt CAknSctPageNavi::TableExitCallBackL(TAny* aThis)
+ {
+ ((CAknSctPageNavi*)aThis)->DoTableExitL();
+ return KErrNone;
+ }
+
+void CAknSctPageNavi::DoTableExitL()
+ {
+ iCharMap->SetStatusChanged(EAknCharSelectedTableExitButton);
+ }
+
+void CAknSctPageNavi::NextTableL()
+ {
+ if(!iIdle)
+ {
+ iIdle = CIdle::NewL(CActive::EPriorityStandard);
+ }
+
+ iIdle->Cancel();
+ iIdle->Start(TCallBack(NextTableCallBackL, this));
+ }
+
+TInt CAknSctPageNavi::NextTableCallBackL(TAny* aThis)
+ {
+ ((CAknSctPageNavi*)aThis)->DoNextTableL();
+ return KErrNone;
+ }
+
+void CAknSctPageNavi::DoNextTableL()
+ {
+ iCharMap->SetStatusChanged(EAknCharSelectedNextTableButton);
+ }
+
+void CAknSctPageNavi::UpdateNextTableButtonL()
+ {
+
+ TBool isFocused = EFalse;
+
+ // table switch buttons stay in one place.
+ for(TInt index(3); index<iButtonArray.Count(); index++)
+ {
+ CAknSctNaviButton* buttonObj = iButtonArray[index];
+ if(buttonObj->IsEnabled())
+ {
+ isFocused = buttonObj->IsFocused();
+ }
+ }
+
+ // fresh focused button
+ for (TInt index(1); index<iButtonArray.Count(); index++)
+ {
+ CAknSctNaviButton* buttonObj = iButtonArray[index];
+ if ( index == EAknSctPageNaviPrevPage
+ || index == EAknSctPageNaviNextPage )
+ {
+ // No need to display Prev/Next
+ if ( iCharMap->PageCount() < 2 )
+ {
+ buttonObj->SetEnabled(EFalse);
+ }
+ continue;
+ }
+ if (iCharMap->TableCount() > 1)
+ {
+ switch (iCharMap->NextTableCase())
+ {
+ case EAknCharMapTableSpecialChar:
+ {
+ TBool isShown = EFalse;
+ if(iExtension->IsShowingEmotion())
+ {
+ isShown = (buttonObj->iButtonId==EAknSctTableNaviSpecialChar);
+ }
+ else
+ {
+ isShown = (buttonObj->iButtonId==EAknSctTableNaviEmotion);
+ }
+ buttonObj->SetEnabled(isShown);
+ buttonObj->SetFocused(isShown && isFocused);
+ if(isShown && isFocused)
+ {
+ iButtonIndex = index;
+ }
+ }
+ break;
+
+ default:
+ buttonObj->SetEnabled(EFalse);
+ break;
+ }
+ }
+ else
+ {
+ buttonObj->SetEnabled(EFalse);
+ }
+ }
+ }
+
+TInt CAknSctPageNavi::LastButton() const
+ {
+ TBool emotionEnable = iExtension->IsEmotionEnabled();
+ if ( emotionEnable )
+ {
+ return iExtension->IsShowingEmotion()?EAknSctTableNaviSpecialChar:EAknSctTableNaviEmotion;
+ }
+ else if ( iCharMap->PageCount() < 2 && !emotionEnable )
+ {
+ // Only one page, must have no SC/Emotion also, left Exit only.
+ return EAknSctTableNaviExit;
+ }
+ else
+ {
+ // emotion doesn't support, no SC/Emotion icon then
+ TBool mirrored = AknLayoutUtils::LayoutMirrored();
+ return mirrored ? EAknSctPageNaviPrevPage : EAknSctPageNaviNextPage;
+ }
}
// ----------------------------------------------------------------------------
@@ -1758,680 +1365,6 @@
// ----------------------------------------------------------------------------
-// Radio button class implementation
-// ----------------------------------------------------------------------------
-//
-CAknSctRadioButton::CAknSctRadioButton()
- {
- }
-
-CAknSctRadioButton::CAknSctRadioButton(
- CAknCharMap* aCharMap,
- CAknCharMapExtension* aExtension)
- :iExtension(aExtension),
- iCharMap(aCharMap)
- {
- }
-
-CAknSctRadioButton::~CAknSctRadioButton()
- {
- iButtonArray.ResetAndDestroy();
- iButtonArray.Close();
- }
-
-TInt CAknSctRadioButton::CountComponentControls() const
- {
- return iButtonArray.Count();
- }
-
-CCoeControl* CAknSctRadioButton::ComponentControl( TInt aIndex ) const
- {
- if (aIndex < iButtonArray.Count())
- {
- return iButtonArray[aIndex]->iButtonControl;
- }
- return NULL;
- }
-
-TKeyResponse CAknSctRadioButton::OfferKeyEventL(
- const TKeyEvent& aKeyEvent,
- TEventCode /*aModifiers*/)
- {
- TKeyResponse responce = EKeyWasNotConsumed;
- TUint code=aKeyEvent.iCode;
- switch (code)
- {
- case EKeyEnter:
- case EKeyOK:
- {
- if (AknLayoutUtils::PenEnabled())
- {
- // Grid.
- TInt yPos = iCharMap->ColMin(0);
- TInt xPos = iCharMap->RowMin(yPos);
- if (iExtension->EnterControl(xPos,yPos))
- {
- CAknButton* buttonCtrlObj;
- TInt currentIndex;
- TInt newIndex;
- for (TInt index=0; index < iButtonArray.Count(); index++)
- {
- buttonCtrlObj = iButtonArray[index]->iButtonControl;
- currentIndex = buttonCtrlObj->StateIndex();
- if (index == iButtonIndex)
- {
- newIndex = KAknSctRadioOn;
- }
- else
- {
- newIndex = KAknSctRadioOff;
- }
- if (currentIndex != newIndex)
- {
- buttonCtrlObj->SetCurrentState(newIndex, ETrue);
- if (newIndex == KAknSctRadioOn)
- {
- iExtension->iCurrentCategory =
- iButtonArray[index]->iButtonId;
- iCharMap->SetStatusChanged(EAknCharChangedCategory);
- }
- }
- }
- LeaveControl();
- }
- }
- responce = EKeyWasConsumed;
- }
- break;
- case EKeyLeftArrow:
- case '4':
- {
- responce = EKeyWasConsumed;
- if (AknLayoutUtils::PenEnabled())
- {
- TInt yPos = iButtonIndex - 1;
- if (iCharMap->RowMax(yPos) < 0)
- {
- if (Layout_Meta_Data::IsLandscapeOrientation())
- {
- if (iExtension->iRadioButton)
- {
- // Right page button.
- if (iExtension->iPageNavi &&
- iExtension->iPageNavi->EnterControl(1,0))
- {
- LeaveControl();
- break;
- }
- }
- }
- // Next button up.
- MoveFocus(0,-1);
- break;
- }
- else
- {
- //Previous row end.
- TInt xPos = iCharMap->RowMax(yPos);
- if (iExtension->EnterControl(xPos,yPos))
- {
- LeaveControl();
- break;
- }
- }
- break;
- }
- // Move by grid.
- iCharMap->TakeFocus();
- TInt xPos = iCharMap->CursorPos().iX;
- TInt yPos = iCharMap->CursorPos().iY;
- if (xPos == 0)
- {
- iCharMap->MoveFocus(-1,0);
- }
- iCharMap->ShowFocus();
- }
- break;
- case EKeyRightArrow:
- case '6':
- {
- responce = EKeyWasConsumed;
- if (AknLayoutUtils::PenEnabled())
- {
- TInt yPos = iButtonIndex;
- if (iCharMap->RowMax(yPos) < 0)
- {
- // Next button down.
- MoveFocus(0,1);
- break;
- }
- else
- {
- // 1st cell in the row.
- if (iExtension->EnterControl(0,yPos))
- {
- LeaveControl();
- break;
- }
- }
- break;
- }
- // Move by grid.
- iCharMap->TakeFocus();
- TInt xPos = iCharMap->CursorPos().iX;
- TInt yPos = iCharMap->CursorPos().iY;
- if (xPos == iCharMap->RowMax(yPos))
- {
- iCharMap->MoveFocus(1,0);
- }
- iCharMap->ShowFocus();
- }
- break;
- case EKeyDownArrow:
- case '8':
- {
- MoveFocus(0, 1);
- responce = EKeyWasConsumed;
- }
- break;
- case EKeyUpArrow:
- case '2':
- {
- MoveFocus(0,-1);
- responce = EKeyWasConsumed;
- }
- break;
- default:
- break;
- }
- return responce;
- }
-
-void CAknSctRadioButton::ConstructFromResourceL(TResourceReader& aReader)
- {
- TInt counts = aReader.ReadInt16();
- TResourceReader reader;
- TInt categorybutton_id;
- TInt sctcase_id;
- TInt resId;
- CAknSctCategoryButton* buttonObj;
- TBool allowCreation;
-
- for (TInt index=0; index < counts; index++)
- {
- allowCreation = EFalse;
- // button id
- categorybutton_id = aReader.ReadInt16();
- sctcase_id = aReader.ReadInt16();
- switch (categorybutton_id)
- {
- case EAknSCTCategoryButtonHalfCase:
- case EAknSCTCategoryButtonFullCase:
- allowCreation = ETrue;
- break;
- case EAknSCTCategoryButtonPicto:
- if (iExtension->iPictographsBuffer)
- {
- allowCreation = ETrue;
- }
- break;
- case EAknSCTCategoryButtonPicto1:
- case EAknSCTCategoryButtonPicto2:
- if (iExtension->iPictographsBuffer &&
- iExtension->iPictographsBufferGrouping)
- {
- allowCreation = ETrue;
- }
- break;
- default:
- break;
- }
-
- if (allowCreation)
- {
- // read the button resource
- resId = aReader.ReadInt32();
- iCoeEnv->CreateResourceReaderLC( reader, resId );
- // create Category button object
- buttonObj = CAknSctCategoryButton::NewL(
- *this, reader, categorybutton_id, sctcase_id);
- // Append button
- iButtonArray.Append(buttonObj);
- CleanupStack::PopAndDestroy(); // reader
- }
- else
- {
- // Skip data
- resId = aReader.ReadInt32();
- }
- }
-
- }
-
-void CAknSctRadioButton::HandlePointerEventL(const TPointerEvent& aPointerEvent)
- {
- TRect rect(Rect());
- if (AknLayoutUtils::PenEnabled() && rect.Contains(aPointerEvent.iPosition))
- {
- if (aPointerEvent.iType == TPointerEvent::EButton1Down)
- {
- CAknButton* buttonCtrlObj;
- TRect rectButton;
- TInt currentIndex;
- TInt newIndex;
- for (TInt index=0; index < iButtonArray.Count(); index++)
- {
- buttonCtrlObj = iButtonArray[index]->iButtonControl;
- rectButton = buttonCtrlObj->Rect();
- currentIndex = buttonCtrlObj->StateIndex();
-
- if (rectButton.Contains(aPointerEvent.iPosition))
- {
- newIndex = KAknSctRadioOn;
- }
- else
- {
- newIndex = KAknSctRadioOff;
- }
- if (currentIndex != newIndex)
- {
- buttonCtrlObj->SetCurrentState(newIndex, ETrue);
- if (newIndex == KAknSctRadioOn)
- {
- if (AknLayoutUtils::PenEnabled())
- {
- iButtonIndex = index;
- }
- iExtension->iCurrentCategory =
- iButtonArray[index]->iButtonId;
- iCharMap->SetStatusChanged(EAknCharChangedCategory);
- }
- }
- }
- }
- else if (aPointerEvent.iType == TPointerEvent::EDrag)
- {
- }
- else if (aPointerEvent.iType == TPointerEvent::EButton1Up)
- {
- }
- }
- else
- {
- CCoeControl::HandlePointerEventL(aPointerEvent);
- }
- }
-
-TSize CAknSctRadioButton::MinimumSize()
- {
- TAknLayoutRect oneButtonLayRect;
- if (!AknLayoutUtils::PenEnabled())
- {
- TAknLayoutScalableParameterLimits charMapDialogVariety =
- AknLayoutScalable_Avkon::popup_grid_graphic_window_ParamLimits();
-
- // Main pane without softkeys
- TRect mainPaneRect;
- if(!AknLayoutUtils::LayoutMetricsRect(
- AknLayoutUtils::EPopupParent, mainPaneRect))
- {
- mainPaneRect = iAvkonAppUi->ClientRect();
- }
-
- // Calc the variety
- TInt maxVariety = charMapDialogVariety.LastVariety();
-
- TAknLayoutRect popupGridLayRect;
- popupGridLayRect.LayoutRect(mainPaneRect,
- AknLayoutScalable_Avkon::popup_grid_graphic_window(maxVariety));
-
- // Calculate the size relatively
- TRect relativeDialog(TPoint(0,0),popupGridLayRect.Rect().Size());
-
- // Get the layout of the actual character grid with scrollbar
- TAknLayoutRect gridWithScrollLayRect;
- gridWithScrollLayRect.LayoutRect(relativeDialog,
- AknLayoutScalable_Avkon::listscroll_popup_graphic_pane());
-
- TAknLayoutRect categoryButtonLayRect;
- categoryButtonLayRect.LayoutRect(gridWithScrollLayRect.Rect(),
- AknLayoutScalable_Avkon::grid_sct_catagory_button_pane());
-
- oneButtonLayRect.LayoutRect(categoryButtonLayRect.Rect(),
- AknLayoutScalable_Avkon::cell_sct_catagory_button_pane());
- }
- else
- {
- TAknLayoutRect popupGridLayRect;
- popupGridLayRect.LayoutRect(iAvkonAppUi->ApplicationRect(),
- AknLayoutScalable_Avkon::popup_grid_graphic2_window(0));
-
- TAknLayoutRect oneButtonLayRect;
- TAknLayoutRect categoryButtonLayRect;
- if (!Layout_Meta_Data::IsLandscapeOrientation())
- {
- oneButtonLayRect.LayoutRect(popupGridLayRect.Rect(),
- AknLayoutScalable_Avkon::grid_graphic2_control_pane(4));
-
- categoryButtonLayRect.LayoutRect(popupGridLayRect.Rect(),
- AknLayoutScalable_Avkon::grid_graphic2_catg_pane(0));
- }
- else
- {
- oneButtonLayRect.LayoutRect(popupGridLayRect.Rect(),
- AknLayoutScalable_Avkon::grid_graphic2_control_pane(5));
-
- categoryButtonLayRect.LayoutRect(popupGridLayRect.Rect(),
- AknLayoutScalable_Avkon::grid_graphic2_catg_pane(1));
-
- }
- }
-
- TSize size(oneButtonLayRect.Rect().Width(),
- oneButtonLayRect.Rect().Height() * iButtonArray.Count());
- return size;
- }
-
-void CAknSctRadioButton::SizeChanged()
- {
- TRect base;
- if (!AknLayoutUtils::PenEnabled())
- {
- TAknLayoutScalableParameterLimits charMapDialogVariety =
- AknLayoutScalable_Avkon::popup_grid_graphic_window_ParamLimits();
-
- // Main pane without softkeys
- TRect mainPaneRect;
- if(!AknLayoutUtils::LayoutMetricsRect(
- AknLayoutUtils::EPopupParent, mainPaneRect))
- {
- mainPaneRect = iAvkonAppUi->ClientRect();
- }
-
- // Calc the variety
- TInt maxVariety = charMapDialogVariety.LastVariety();
-
- TAknLayoutRect popupGridLayRect;
- popupGridLayRect.LayoutRect(mainPaneRect,
- AknLayoutScalable_Avkon::popup_grid_graphic_window(maxVariety));
-
- // Calculate the size relatively
- TRect relativeDialog(TPoint(0,0), popupGridLayRect.Rect().Size());
-
- // Get the layout of the actual character grid with scrollbar
- TAknLayoutRect gridWithScrollLayRect;
- gridWithScrollLayRect.LayoutRect(relativeDialog,
- AknLayoutScalable_Avkon::listscroll_popup_graphic_pane());
-
- TAknLayoutRect categoryButtonLayRect;
- categoryButtonLayRect.LayoutRect(gridWithScrollLayRect.Rect(),
- AknLayoutScalable_Avkon::grid_sct_catagory_button_pane());
-
- TAknLayoutRect oneButtonLayRect;
- oneButtonLayRect.LayoutRect(categoryButtonLayRect.Rect(),
- AknLayoutScalable_Avkon::cell_sct_catagory_button_pane());
-
- base = oneButtonLayRect.Rect();
- }
- else
- {
- TAknLayoutRect popupGridLayRect;
- popupGridLayRect.LayoutRect(iAvkonAppUi->ApplicationRect(),
- AknLayoutScalable_Avkon::popup_grid_graphic2_window(0));
-
- TAknLayoutRect oneButtonLayRect;
- TAknLayoutRect categoryButtonLayRect;
- if ( !Layout_Meta_Data::IsLandscapeOrientation() )
- {
- oneButtonLayRect.LayoutRect(popupGridLayRect.Rect(),
- AknLayoutScalable_Avkon::grid_graphic2_control_pane(4));
-
- categoryButtonLayRect.LayoutRect(popupGridLayRect.Rect(),
- AknLayoutScalable_Avkon::grid_graphic2_catg_pane(0));
- }
- else
- {
- oneButtonLayRect.LayoutRect(popupGridLayRect.Rect(),
- AknLayoutScalable_Avkon::grid_graphic2_control_pane(5));
-
- categoryButtonLayRect.LayoutRect(popupGridLayRect.Rect(),
- AknLayoutScalable_Avkon::grid_graphic2_catg_pane(1));
-
- }
- base.iTl = categoryButtonLayRect.Rect().iTl;
- base.SetSize(oneButtonLayRect.Rect().Size());
- }
-
- if (iButtonArray.Count() > 0)
- {
- CAknButton* buttonCtrlObj;
-
- TMargins8 margins;
- margins.iTop = 1;
- margins.iBottom = 0;
- margins.iLeft = 0;
- margins.iRight = 0;
-
- // Change the size of buttons
- for (TInt index=0; index < iButtonArray.Count(); index++)
- {
- buttonCtrlObj = iButtonArray[index]->iButtonControl;
- if (buttonCtrlObj)
- {
- if (AknLayoutUtils::PenEnabled())
- {
- buttonCtrlObj->SetHighlightRect(base);
- }
- buttonCtrlObj->SetRect( base );
- buttonCtrlObj->SetIconSize( base.Size() );
- buttonCtrlObj->SetMargins( margins );
- buttonCtrlObj->SetIconScaleMode(EAspectRatioPreserved);
- base.Move(TPoint(0, base.Size().iHeight));
- }
- }
- }
- }
-
-void CAknSctRadioButton::Draw(const TRect& /*aRect*/) const
- {
- // no draw
- }
-
-/**
- * Returns ETrue if the aFlag bitfield in iFlags is set, EFalse if it
- * is clear
- */
-inline TInt CAknSctRadioButton::Count() const
- {
- return iButtonArray.Count();
- }
-
-void CAknSctRadioButton::SetCurrentCategory(TInt aCategory)
- {
- CAknSctCategoryButton* buttonObj;
- TInt status;
-
- for (TInt index=0; index < iButtonArray.Count(); index++)
- {
- buttonObj = iButtonArray[index];
- status = (buttonObj->iButtonId == aCategory)?
- KAknSctRadioOn : KAknSctRadioOff;
- buttonObj->iButtonControl->SetCurrentState(status, ETrue);
- }
- }
-
-void CAknSctRadioButton::SetValidSctCase(TInt aSctCase)
- {
- CAknSctCategoryButton* buttonObj;
-
- for (TInt index=0; index < iButtonArray.Count(); index++)
- {
- buttonObj = iButtonArray[index];
- if (buttonObj->iSctCaseId == aSctCase)
- {
- buttonObj->iValid = ETrue;
- break;
- }
- // Here is the special case for Half-width/Lower/Upper
- else if (buttonObj->iSctCaseId == EAknSCTHalfCase
- && (aSctCase == EAknSCTLowerCase
- || aSctCase == EAknSCTUpperCase)
- )
- {
- buttonObj->iValid = ETrue;
- break;
- }
- }
- }
-
-void CAknSctRadioButton::RemoveInvalidButton()
- {
- CAknSctCategoryButton* buttonObj;
-
- for (TInt index=iButtonArray.Count()-1; index >= 0; index--)
- {
- buttonObj = iButtonArray[index];
- if (!buttonObj->iValid)
- {
- if (buttonObj->iSctCaseId == EAknSCTHalfCase)
- {
- if (iButtonArray.Count() > 1)
- {
- delete buttonObj;
- iButtonArray.Remove(index);
- }
- }
- else
- {
- delete buttonObj;
- iButtonArray.Remove(index);
- }
- }
- }
- }
-
-CCoeControl* CAknSctRadioButton::FocusedControl()
- {
- return this;
- }
-
-TBool CAknSctRadioButton::EnterControl(TInt /*aX*/, TInt aY)
- {
- if (IsVisible())
- {
- if ((aY >= 0) && (aY < Count()))
- {
- if (iExtension->iHasCategoryButtonUi)
- {
- iEntryIndex = aY;
- iExtension->iFocusHandler = this;
- if (AknLayoutUtils::PenEnabled())
- {
- iButtonIndex = aY;
- CAknSctCategoryButton* buttonObj =
- iButtonArray[iButtonIndex];
- buttonObj->SetFocused(ETrue);
- }
- return ETrue;
- }
- }
- }
- return EFalse;
- }
-
-void CAknSctRadioButton::MoveFocus(TInt /*aX*/, TInt aY)
- {
- CAknSctCategoryButton* buttonObj;
- CAknButton* buttonCtrlObj;
- TInt buttonIndex = iButtonIndex + aY;
- if (buttonIndex > iButtonArray.Count() - 1)
- {
- if (!AknLayoutUtils::PenEnabled())
- {
- // First radio button.
- buttonIndex = 0;
- }
- else
- {
- if (!Layout_Meta_Data::IsLandscapeOrientation())
- {
- // Left page button.
- if (iExtension->iPageNavi &&
- iExtension->iPageNavi->EnterControl(0,0))
- {
- LeaveControl();
- return;
- }
- }
- else
- {
- // First table button.
- if (iExtension->iTableNavi &&
- iExtension->iTableNavi->EnterControl(0,0))
- {
- LeaveControl();
- return;
- }
- }
- }
- }
- else if (buttonIndex < 0)
- {
- if (!AknLayoutUtils::PenEnabled())
- {
- // Last radio button.
- buttonIndex = iButtonArray.Count() - 1;
- }
- else
- {
- // First table button.
- if (iExtension->iTableNavi &&
- iExtension->iTableNavi->EnterControl(0,0))
- {
- LeaveControl();
- return;
- }
- }
- }
-
- if (!AknLayoutUtils::PenEnabled())
- {
- buttonObj = iButtonArray[iButtonIndex];
- buttonCtrlObj = buttonObj->iButtonControl;
- buttonCtrlObj->SetCurrentState(KAknSctRadioOff, ETrue);
- iButtonIndex = buttonIndex;
- buttonObj = iButtonArray[iButtonIndex];
- buttonCtrlObj = buttonObj->iButtonControl;
- buttonCtrlObj->SetCurrentState(KAknSctRadioOn, ETrue);
- iExtension->iCurrentCategory =
- iButtonArray[buttonIndex]->iButtonId;
- iCharMap->SetStatusChanged(EAknCharChangedCategory);
- }
- else
- {
- buttonObj = iButtonArray[iButtonIndex];
- buttonObj->SetFocused(EFalse);
- iButtonIndex = buttonIndex;
- buttonObj = iButtonArray[iButtonIndex];
- buttonObj->SetFocused(ETrue);
- }
- }
-
-TBool CAknSctRadioButton::LeaveControl()
- {
- for (TInt i = 0; i < iButtonArray.Count(); i++ )
- {
- iButtonArray[i]->SetFocused(EFalse);
- }
- return ETrue;
- }
-
-TBool CAknSctRadioButton::ExitWithKey(TInt /*aKeycode*/)
- {
- return EFalse;
- }
-
-// ----------------------------------------------------------------------------
// Extension class implementation
// ----------------------------------------------------------------------------
//
@@ -2464,11 +1397,9 @@
delete iCharsQwerty;
delete iBgContext;
- delete iRadioButton;
delete iTitleBuf;
delete iPageNavi;
- delete iTableNavi;
delete iCategoryTitle;
delete iCategoryEntry;
delete iEntryBuf;
@@ -2567,7 +1498,9 @@
void CAknCharMapExtension::LoadEmotionTumbnails(const TDesC& aChars)
{
- iSmileyModel->LoadStillImagesL(aChars);
+ //If emotion tumbbails can't be load,
+ // no emotion tumbnail will be dispalyed.
+ TRAP_IGNORE( iSmileyModel->LoadStillImagesL(aChars) );
}
void CAknCharMapExtension::SetEmotionSize(const TSize& aSize)
@@ -2901,20 +1834,9 @@
return;
iExtension->iFlags = 0x00;
-
- // if feature language is Japanese
- CAknEnv* env = CAknEnv::Static();
- if (env)
- {
- if (env->IsFeatureLanguage(KFeatureIdJapanese))
- {
- iExtension->iJapaneseSctUi = ETrue;
- iExtension->iHasCategoryButtonUi = ETrue;
- }
- }
iExtension->iFocusHandler = iExtension;
iExtension->SetCharMapControl(this);
-
+
if ( iExtension->iSingleClickEnabled )
{
iExtension->iHighlightVisible = EFalse;
@@ -2962,6 +1884,7 @@
iPictographCases.Close();
iPictographPages.Close();
MTouchFeedback* feedback = MTouchFeedback::Instance();
+
if ( feedback != NULL )
{
feedback->RemoveFeedbackForControl( this );
@@ -2978,11 +1901,6 @@
specialCharItemLayout =
AknLayoutScalable_Avkon::cell_graphic2_pane_t1(1);
}
- else if (IsJapaneseSctUi())
- {
- specialCharItemLayout =
- AknLayoutScalable_Avkon::cell_graphic2_pane_t1(2);
- }
else
{
specialCharItemLayout =
@@ -3006,11 +1924,21 @@
CountMaxColumnsAndCellSizes();
SizeChanged();
- // load Emotion icon resource, but not load images
- TSize iconSize(iGridItemWidth,iGridItemHeight);
- iconSize.iWidth = iconSize.iWidth * 3 / 4;
- iconSize.iHeight = iconSize.iHeight * 3 / 4;
- Extension()->SetEmotionSize(iconSize);
+ // set smiley size
+ TAknWindowComponentLayout cellGraphicsLayout;
+ if ( Layout_Meta_Data::IsLandscapeOrientation() )
+ {
+ cellGraphicsLayout = AknLayoutScalable_Avkon::cell_graphic2_pane_g5(1);
+ }
+ else
+ {
+ cellGraphicsLayout = AknLayoutScalable_Avkon::cell_graphic2_pane_g5(0);
+ }
+
+ TAknLayoutRect cellGraphicsRect;
+ cellGraphicsRect.LayoutRect(TRect(TSize(iGridItemWidth,iGridItemHeight)), cellGraphicsLayout);
+
+ Extension()->SetEmotionSize(cellGraphicsRect.Rect().Size());
}
@@ -3074,20 +2002,8 @@
// Alternate components.
if (AknLayoutUtils::PenEnabled())
{
- if (iExtension->iHasCategoryButtonUi)
- {
- EnableCategoryInputFieldL();
- EnableCategoryButtonsL();
- }
EnableNavigationButtonsL();
}
- else
- {
- if (iExtension->iHasCategoryButtonUi)
- {
- EnableCategoryButtonsL();
- }
- }
// Offscreen background.
if (offscreen)
@@ -3243,10 +2159,6 @@
}
iExtension->iCurrentCategory = Category();
- if (iExtension->iRadioButton)
- {
- iExtension->iRadioButton->SetCurrentCategory(iExtension->iCurrentCategory);
- }
// Create and set the scb visible even though there is nothing to scroll
delete iSBFrame;
@@ -3262,12 +2174,6 @@
}
iExtension->LoadEmotionTumbnails(*iChars);
-
- CAknSctPageNavi* pageNavi = Extension()->iPageNavi;
- if(pageNavi)
- {
- pageNavi->MakeVisible(PageCount()>1);
- }
SetSmileyAnimationActivityInCurrentPageL(ETrue);
@@ -3448,7 +2354,7 @@
}
TUint code=aKeyEvent.iCode;
-
+
// First key event enables the highlight
if ( iExtension->iSingleClickEnabled && !iExtension->iHighlightVisible )
{
@@ -3469,36 +2375,17 @@
case EKeyLeftArrow:
case '4':
{
- if (iExtension->iRadioButton && (iCursorPos.iX == 0)) // Radio button.
- {
- if (iExtension->iRadioButton->EnterControl(iCursorPos.iX,iCursorPos.iY))
- {
- LeaveControl();
- break;
- }
- }
-
if (AknLayoutUtils::PenEnabled())
{
if (!iIsMirrored)
{
if ((iCursorPos.iX == 0) && (iCursorPos.iY == ColMin(0)))
{
- if (!Layout_Meta_Data::IsLandscapeOrientation())
+ // western, move left from first one in grid, focus pageNavi last button
+ if ( iExtension->iPageNavi )
{
- // Last table button.
- if (iExtension->iTableNavi &&
- iExtension->iTableNavi->EnterControl(TableCount() - 1,0))
- {
- LeaveControl();
- break;
- }
- }
- else
- {
- // Right page button.
- if (iExtension->iPageNavi &&
- iExtension->iPageNavi->EnterControl(1,0))
+ TInt maxButt = iExtension->iPageNavi->LastButton();
+ if ( iExtension->iPageNavi->EnterControl( maxButt,0 ) )
{
LeaveControl();
break;
@@ -3510,25 +2397,12 @@
{
if (((iCursorPos.iY == ColMax(0)) && (iCursorPos.iX == RowMax(ColMax(0)))))
{
- if (!Layout_Meta_Data::IsLandscapeOrientation())
+ // mirrored, move left from last one in grid, focus pgNavi first button
+ if (iExtension->iPageNavi &&
+ iExtension->iPageNavi->EnterControl(0,0))
{
- // Left page button.
- if (iExtension->iPageNavi &&
- iExtension->iPageNavi->EnterControl(0,0))
- {
- LeaveControl();
- break;
- }
- }
- else
- {
- // First table button.
- if (iExtension->iTableNavi &&
- iExtension->iTableNavi->EnterControl(0,0))
- {
- LeaveControl();
- break;
- }
+ LeaveControl();
+ break;
}
}
}
@@ -3539,17 +2413,6 @@
case EKeyRightArrow:
case '6':
{
- if (iExtension->iRadioButton &&
- (iCursorPos.iX == RowMax(iCursorPos.iY)) &&
- (iCursorPos.iY <= (iExtension->iRadioButton->Count() - 2)))
- {
- // Radio button.
- if (iExtension->iRadioButton->EnterControl(iCursorPos.iX,iCursorPos.iY+1))
- {
- LeaveControl();
- break;
- }
- }
if (AknLayoutUtils::PenEnabled())
{
if (!iIsMirrored)
@@ -3557,25 +2420,12 @@
if ((iCursorPos.iY == ColMax(0)) &&
(iCursorPos.iX == RowMax(ColMax(0))))
{
- if (!Layout_Meta_Data::IsLandscapeOrientation())
+ // western, move right from last one in grid, focus pgNavi first button
+ if (iExtension->iPageNavi &&
+ iExtension->iPageNavi->EnterControl(0,0))
{
- // Left page button.
- if (iExtension->iPageNavi &&
- iExtension->iPageNavi->EnterControl(0,0))
- {
- LeaveControl();
- break;
- }
- }
- else
- {
- // First table button.
- if (iExtension->iTableNavi &&
- iExtension->iTableNavi->EnterControl(0,0))
- {
- LeaveControl();
- break;
- }
+ LeaveControl();
+ break;
}
}
}
@@ -3584,22 +2434,11 @@
if ((iCursorPos.iY == ColMin(0)) &&
(iCursorPos.iX == 0))
{
- if (!Layout_Meta_Data::IsLandscapeOrientation())
+ // mirrored, move right from first one in grid, focus pgNavi last button
+ if ( iExtension->iPageNavi )
{
- // First table button.
- if (iExtension->iTableNavi &&
- iExtension->iTableNavi->EnterControl(0,0))
- {
- LeaveControl();
- break;
- }
-
- }
- else
- {
- // Left page button.
- if (iExtension->iPageNavi &&
- iExtension->iPageNavi->EnterControl(1,0))
+ TInt maxButt = iExtension->iPageNavi->LastButton();
+ if ( iExtension->iPageNavi->EnterControl( maxButt,0 ) )
{
LeaveControl();
break;
@@ -3616,59 +2455,54 @@
{
if (AknLayoutUtils::PenEnabled())
{
- if (iCursorPos.iY == ColMin(iCursorPos.iX))
+ if ( iCursorPos.iY == ColMin(iCursorPos.iX) )
{
- if (!iExtension->iRadioButton && iCursorPos.iX < TableCount())
+ // cell is at the top row, need to go on to PageNavi
+ if ( iExtension->iPageNavi )
{
- // Table button up.
- if ( iExtension->iTableNavi &&
- iExtension->iTableNavi->EnterControl(iCursorPos.iX,0))
+ TInt aX = 0;
+
+ if ( iCursorPos.iX == MaxCols() - 1 )
+ {
+ aX = iExtension->iPageNavi->LastButton();
+ }
+ else if ( iCursorPos.iX == MaxCols() - 2 )
+ {
+ // a bit complex as unable-emotion SCT has no SC/Emotion icon
+ if ( iExtension->IsEmotionEnabled() )
+ {
+ aX = iIsMirrored? 1 : 2;
+ }
+ else
+ {
+ aX = -1;
+ }
+ }
+ else if (iCursorPos.iX == 1 )
+ {
+ aX = iIsMirrored? 2 : 1;
+ }
+ else if ( iCursorPos.iX == 0 )
+ {
+ // first button in PageNavi
+ aX = 0;
+ }
+ else
+ {
+ aX = -1;
+ }
+ if ( iExtension->iPageNavi->EnterControl( aX,0 ) )
{
LeaveControl();
break;
}
}
- else
- {
- if (iCursorPos.iX == MaxCols() - 1)
- {
- // Right page button.
- if ( iExtension->iPageNavi &&
- iExtension->iPageNavi->EnterControl(1,0))
- {
- LeaveControl();
- break;
- }
- }
- if (Layout_Meta_Data::IsLandscapeOrientation())
- {
- if ((!iExtension->iRadioButton &&
- (iCursorPos.iX == TableCount())) ||
- ((iExtension->iRadioButton) &&
- (iCursorPos.iX == MaxCols()-2)))
- {
- // Left page button.
- if ( iExtension->iPageNavi &&
- iExtension->iPageNavi->EnterControl(0,0))
- {
- LeaveControl();
- break;
- }
- }
- }
- // Grid bottom row.
- if (ColMax(0) > ColMax(iCursorPos.iX))
- {
- EnterControl(RowMax(ColMax(0)), ColMax(0));
- break;
- }
- EnterControl(iCursorPos.iX, ColMax( iCursorPos.iX));
- break;
- }
+ EnterControl(iCursorPos.iX, ColMax( iCursorPos.iX));
+ break;
}
}
- MoveFocus(0,-1);
- break;
+ MoveFocus(0,-1);
+ break;
}
case EKeyDownArrow:
case '8':
@@ -3677,52 +2511,51 @@
{
if (iCursorPos.iY == ColMax(iCursorPos.iX))
{
- if (iCursorPos.iX > RowMax(ColMax(0)))
+ if ( iExtension->iPageNavi )
{
- // Grid last item.
- EnterControl(RowMax(ColMax(0)), ColMax(0));
- break;
- }
- if ((iCursorPos.iX == MaxCols() - 1) ||
- (!Layout_Meta_Data::IsLandscapeOrientation() &&
- iExtension->iRadioButton &&
- (iCursorPos.iX == MaxCols() - 2)))
- {
- // Right page button.
- if (iExtension->iPageNavi &&
- iExtension->iPageNavi->EnterControl(1,0))
+ TInt aX = 0;
+
+ if ( iCursorPos.iX == MaxCols() - 1 )
+ {
+ aX = iExtension->iPageNavi->LastButton();
+ }
+ else if ( iCursorPos.iX == MaxCols() - 2 )
+ {
+ // a bit complex as unable-emotion SCT has no SC/Emotion icon
+ if ( iExtension->IsEmotionEnabled() )
+ {
+ aX = iIsMirrored? 1 : 2;
+ }
+ else
+ {
+ aX = -1;
+ }
+ }
+ else if ( iCursorPos.iX == 1 )
+ {
+ aX = iIsMirrored? 2 : 1;
+ }
+ else if ( iCursorPos.iX == 0 )
+ {
+ // default: first button in PageNavi
+ aX = 0;
+ }
+ else
+ {
+ aX = -1;
+ }
+ if ( iExtension->iPageNavi->EnterControl( aX,0 ) )
{
LeaveControl();
break;
}
}
- if ((Layout_Meta_Data::IsLandscapeOrientation() &&
- !iExtension->iRadioButton &&
- (iCursorPos.iX == TableCount())) ||
- (!Layout_Meta_Data::IsLandscapeOrientation() &&
- (iCursorPos.iX == 0)) ||
- (Layout_Meta_Data::IsLandscapeOrientation() &&
- iExtension->iRadioButton &&
- (iCursorPos.iX == MaxCols() - 2)))
+ // cell is at bottom row
+ if (iCursorPos.iX > RowMax(ColMax(0)))
{
- // Left page button.
- if (iExtension->iPageNavi &&
- iExtension->iPageNavi->EnterControl(0,0))
- {
- LeaveControl();
- break;
- }
- }
- if (!iExtension->iRadioButton &&
- iCursorPos.iX < TableCount())
- {
- // Table button down.
- if (iExtension->iTableNavi &&
- iExtension->iTableNavi->EnterControl(iCursorPos.iX,0))
- {
- LeaveControl();
- break;
- }
+ // Grid last item.
+ EnterControl(RowMax(ColMax(0)), ColMax(0));
+ break;
}
// Grid top row.
EnterControl(iCursorPos.iX, ColMin(iCursorPos.iX));
@@ -3820,14 +2653,7 @@
gridWithScrollLayRect.LayoutRect(relativePopup, AknLayoutScalable_Avkon::listscroll_popup_graphic_pane());
TAknLayoutRect gridLayRect;
- if (iExtension->iHasCategoryButtonUi)
- {
- gridLayRect.LayoutRect(gridWithScrollLayRect.Rect(), AknLayoutScalable_Avkon::grid_graphic_popup_pane(2));
- }
- else
- {
- gridLayRect.LayoutRect(gridWithScrollLayRect.Rect(), AknLayoutScalable_Avkon::grid_graphic_popup_pane(0));
- }
+ gridLayRect.LayoutRect(gridWithScrollLayRect.Rect(), AknLayoutScalable_Avkon::grid_graphic_popup_pane(0));
// Grid.
TRect contentRect = Extension()->iMenuSct ? Rect() : gridLayRect.Rect();
@@ -3848,24 +2674,6 @@
iGridTopLeft.iX = contentRect.iTl.iX;
}
- // Category buttons.
- if (iExtension && iExtension->iHasCategoryButtonUi)
- {
- if (iExtension->iRadioButton)
- {
- TAknLayoutRect categoryButtonLayRect;
- categoryButtonLayRect.LayoutRect(gridWithScrollLayRect.Rect(),AknLayoutScalable_Avkon::grid_sct_catagory_button_pane());
-
- TAknLayoutRect oneButtonLayRect;
- oneButtonLayRect.LayoutRect(categoryButtonLayRect.Rect(),AknLayoutScalable_Avkon::cell_sct_catagory_button_pane());
-
- TSize size(oneButtonLayRect.Rect().Width(), oneButtonLayRect.Rect().Height()*iExtension->iRadioButton->Count());
- TRect rectRadio(categoryButtonLayRect.Rect().iTl, size);
- iExtension->iRadioButton->SetRect(rectRadio);
- }
- }
-
-
// Background context.
if(iExtension && iExtension->iBgContext)
{
@@ -3879,17 +2687,7 @@
}
else
{
-
- TInt variety;
- if (!IsJapaneseSctUi())
- {
- variety = Layout_Meta_Data::IsLandscapeOrientation() ? 3 : 1;
- if(TableCount() > 1) variety--;
- }
- else
- {
- variety = Layout_Meta_Data::IsLandscapeOrientation() ? 5 : 4;
- }
+ TInt variety = Layout_Meta_Data::IsLandscapeOrientation() ? 7 : 6;
// Popup.
TAknLayoutRect popupGridLayRect;
@@ -3914,56 +2712,14 @@
iGridTopLeft.iX = gridRect.iTl.iX;
}
- // Category
- if (iExtension->iHasCategoryButtonUi && iExtension->iRadioButton) // Radio buttons.
- {
- TAknLayoutRect oneButtonLayRect;
- TAknLayoutRect categoryButtonLayRect;
- TInt oneButtonLayVariety, categoryButtonLayVariety;
-
- if (Layout_Meta_Data::IsLandscapeOrientation())
- {
- oneButtonLayVariety = 5;
- categoryButtonLayVariety = 1;
- }
- else
- {
- oneButtonLayVariety = 4;
- categoryButtonLayVariety = 0;
- }
-
- oneButtonLayRect.LayoutRect(popupGridRect, AknLayoutScalable_Avkon::grid_graphic2_control_pane(oneButtonLayVariety));
- categoryButtonLayRect.LayoutRect(popupGridRect, AknLayoutScalable_Avkon::grid_graphic2_catg_pane(categoryButtonLayVariety));
-
- TSize size(oneButtonLayRect.Rect().Width(),
- oneButtonLayRect.Rect().Height() * iExtension->iRadioButton->Count());
- TRect rectRadio(categoryButtonLayRect.Rect().iTl, size);
- iExtension->iRadioButton->SetRect(rectRadio);
- }
-
- // Table navigation.
- if (iExtension->iTableNavi)
- {
- TAknLayoutRect tableNaviLayRect;
- tableNaviLayRect.LayoutRect(popupGridRect, AknLayoutScalable_Avkon::grid_graphic2_control_pane(variety));
- iExtension->iTableNavi->SetRect(tableNaviLayRect.Rect());
- }
-
// Page navigation.
if (iExtension->iPageNavi)
{
- if (PageCount() > 1)
- {
- iExtension->iPageNavi->MakeVisible(ETrue);
-
- TAknLayoutRect pageNaviLayRect;
- pageNaviLayRect.LayoutRect(popupGridRect, AknLayoutScalable_Avkon::graphic2_pages_pane(variety));
- iExtension->iPageNavi->SetRect(pageNaviLayRect.Rect());
- }
- else
- {
- iExtension->iPageNavi->MakeVisible(EFalse);
- }
+ iExtension->iPageNavi->MakeVisible(ETrue);
+
+ TAknLayoutRect pageNaviLayRect;
+ pageNaviLayRect.LayoutRect(popupGridRect, AknLayoutScalable_Avkon::grid_graphic2_control_pane(variety));
+ iExtension->iPageNavi->SetRect(pageNaviLayRect.Rect());
}
// Background context.
@@ -4007,9 +2763,9 @@
// Sets the character case because the buffer content may have changed.
SetCharacterCaseL(iSpecialCharCase);
-
+
SetSmileyAnimationActivityInCurrentPageL(ETrue);
-
+
TInt cursorIndexAfterSwitch;
if ( !iExtension->iKeyBrdEvent )
{
@@ -4058,33 +2814,15 @@
}
// Sets alternate UI controls.
- if (iExtension->iHasCategoryButtonUi)
- {
- if (AknLayoutUtils::PenEnabled())
- {
- EnableCategoryInputFieldL();
- EnableNavigationButtonsL();
- }
- else
- {
- DisableCategoryInputFieldL();
- DisableNavigationButtonsL();
- }
- EnableCategoryButtonsL();
+ if (AknLayoutUtils::PenEnabled())
+ {
+ EnableNavigationButtonsL();
}
else
{
- DisableCategoryInputFieldL();
- DisableCategoryButtonsL();
- if (AknLayoutUtils::PenEnabled())
- {
- EnableNavigationButtonsL();
- }
- else
- {
- DisableNavigationButtonsL();
- }
- }
+ DisableNavigationButtonsL();
+ }
+
// and finally updates the page counts (from setcasetable)
iSpecialCharPages.Reset(); // reset the current page count for different charsets
@@ -4131,33 +2869,19 @@
else if(aType == KAknMessageFocusLost) // focus lost
{
SetSmileyAnimationActivityInCurrentPageL(EFalse);
-
- if ( iExtension->iHighlightVisible )
- {
- iExtension->iHighlightVisible = EFalse;
- DrawCursor();
- }
- }
+
+ if ( iExtension->iHighlightVisible )
+ {
+ iExtension->iHighlightVisible = EFalse;
+ DrawCursor();
+ }
+ }
}
void CAknCharMap::EnableNavigationButtonsL()
{
if ( iExtension )
{
- if ( !iExtension->iTableNavi )
- {
- iExtension->iTableNavi = new(ELeave) CAknSctTableNavi(this, iExtension);
- iExtension->iTableNavi->SetContainerWindowL(*this);
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC(reader, R_AVKON_SCT_TABLE_NAVI_CONTROL);
- iExtension->iTableNavi->ConstructFromResourceL(reader);
- iExtension->iTableNavi->SetNonFocusing();
- iExtension->iTableNavi->SetMopParent(iExtension);
- CleanupStack::PopAndDestroy(); // reader
- }
-
- iExtension->iTableNavi->MakeVisible(ETrue);
-
if ( !iExtension->iPageNavi )
{
iExtension->iPageNavi = new(ELeave) CAknSctPageNavi(this, iExtension);
@@ -4176,40 +2900,12 @@
void CAknCharMap::DisableNavigationButtonsL()
{
- if ( iExtension && iExtension->iTableNavi )
- {
- iExtension->iTableNavi->MakeVisible( EFalse );
- }
if ( iExtension && iExtension->iPageNavi )
{
iExtension->iPageNavi->MakeVisible( EFalse );
}
}
-void CAknCharMap::EnableCategoryButtonsL()
- {
- if (!iExtension->iRadioButton)
- {
- iExtension->iRadioButton = new(ELeave) CAknSctRadioButton(this, iExtension);
- iExtension->iRadioButton->SetContainerWindowL(*this);
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC(reader, R_AVKON_SCT_CATEGORY_BUTTON_CONTROL);
- iExtension->iRadioButton->ConstructFromResourceL(reader);
- iExtension->iRadioButton->SetNonFocusing();
- iExtension->iRadioButton->SetMopParent(iExtension);
- CleanupStack::PopAndDestroy(); // reader
- }
- iExtension->iRadioButton->MakeVisible(ETrue);
- }
-
-void CAknCharMap::DisableCategoryButtonsL()
- {
- if (iExtension && iExtension->iRadioButton)
- {
- iExtension->iRadioButton->MakeVisible(EFalse);
- }
- }
-
void CAknCharMap::EnableCategoryInputFieldL()
{
TAknLayoutRect popupGridLayRect;
@@ -4299,24 +2995,20 @@
MAknsSkinInstance* skin = AknsUtils::SkinInstance();
MAknsControlContext* cc = AknsDrawUtils::ControlContext( this );
+ AknLayoutUtils::TAknCbaLocation location = AknLayoutUtils::CbaLocation();
TRect rect = Rect();
if (!AknLayoutUtils::PenEnabled() || Extension()->iMenuSct)
{
TRect mainPaneRect;
- if(!AknLayoutUtils::LayoutMetricsRect(
- AknLayoutUtils::EPopupParent, mainPaneRect))
+ if(!AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EPopupParent, mainPaneRect))
{
mainPaneRect = iAvkonAppUi->ClientRect();
}
- TAknLayoutScalableParameterLimits charMapDialogVariety =
- AknLayoutScalable_Avkon::popup_grid_graphic_window_ParamLimits();
-
+ TAknLayoutScalableParameterLimits charMapDialogVariety = AknLayoutScalable_Avkon::popup_grid_graphic_window_ParamLimits();
TInt maxVariety = charMapDialogVariety.LastVariety();
-
- AknLayoutUtils::TAknCbaLocation location = AknLayoutUtils::CbaLocation();
TInt maxVarietyOffset = 0;
TInt varietyOffset = maxVariety + 1;
@@ -4347,25 +3039,19 @@
varietyNumber += maxVarietyOffset;
TAknLayoutRect popupGridLayRect;
- popupGridLayRect.LayoutRect(mainPaneRect,
- AknLayoutScalable_Avkon::popup_grid_graphic_window(varietyNumber));
+ popupGridLayRect.LayoutRect(mainPaneRect, AknLayoutScalable_Avkon::popup_grid_graphic_window(varietyNumber));
// Background height.
- TInt backgroundHeightOffset =
- popupGridLayRect.Rect().Height() - rect.iBr.iY;
-
+ TInt backgroundHeightOffset = popupGridLayRect.Rect().Height() - rect.iBr.iY;
rect.iBr.iY += backgroundHeightOffset;
}
else
{
TAknLayoutRect popupGridLayRect;
- popupGridLayRect.LayoutRect(iAvkonAppUi->ApplicationRect(),
- AknLayoutScalable_Avkon::popup_grid_graphic2_window(0));
+ popupGridLayRect.LayoutRect(iAvkonAppUi->ApplicationRect(), AknLayoutScalable_Avkon::popup_grid_graphic2_window(0));
// Background height.
- TInt backgroundHeightOffset =
- popupGridLayRect.Rect().Height() - rect.iBr.iY;
-
+ TInt backgroundHeightOffset = popupGridLayRect.Rect().Height() - rect.iBr.iY;
rect.iBr.iY += backgroundHeightOffset * 2;
}
@@ -4373,44 +3059,49 @@
if ( !Extension()->iMenuSct )
{
// 1) Draw the background
-
// Check if we got an offscreen bitmap allocated for skin background and
// there is bitmap background in the current skin.
- if( CAknEnv::Static()->TransparencyEnabled() )
- {
- TRegionFix<10> clipReg;
- clipReg.AddRect(rect);
- if ( iFirstVisibleRow == 0 && iSetRecentSct )
- {
- TPoint pos = iGridTopLeft;
- TInt endX = pos.iX + iGridItemWidth * iMaxColumns + 1;
- TInt endY = pos.iY + iGridItemHeight;
- // eliminate the overlap area between menu sct and the first menu item.
- if ( Extension()->iMenuSct )
- {
- endY--;
- }
- clipReg.SubRect( TRect( pos, TPoint( endX, endY ) ) );
- }
- // Take scroll bar out of clip region
- if (iSBFrame)
- {
- clipReg.SubRect(iSBFrame->GetScrollBarHandle(
- CEikScrollBar::EVertical)->Rect());
- }
- gc.SetClippingRegion(clipReg);
- }
- AknsDrawUtils::Background( skin, cc, this, gc, rect,KAknsDrawParamNoClearUnderImage);
- if( CAknEnv::Static()->TransparencyEnabled() )
- {
- gc.CancelClippingRegion();
- }
-
+ if( CAknEnv::Static()->TransparencyEnabled() )
+ {
+ TRegionFix<10> clipReg;
+ clipReg.AddRect(rect);
+
+ if ( iFirstVisibleRow == 0 && iSetRecentSct )
+ {
+ TPoint pos = iGridTopLeft;
+ TSize size(iGridItemWidth*iMaxColumns+1, iGridItemHeight);
+ if(iIsMirrored)
+ {
+ pos.iX += iGridItemWidth - size.iWidth;
+ }
+ // eliminate the overlap area between menu sct and the first menu item.
+ if ( Extension()->iMenuSct )
+ {
+ size.iHeight--;
+ }
+ clipReg.SubRect(TRect(pos,size));
+ }
+
+ // Take scroll bar out of clip region
+ if (iSBFrame)
+ {
+ clipReg.SubRect(iSBFrame->GetScrollBarHandle(CEikScrollBar::EVertical)->Rect());
+ }
+
+ gc.SetClippingRegion(clipReg);
+ }
+
+ AknsDrawUtils::Background( skin, cc, this, gc, rect,KAknsDrawParamNoClearUnderImage);
+
+ if( CAknEnv::Static()->TransparencyEnabled() )
+ {
+ gc.CancelClippingRegion();
+ }
+
+ // 2) Draw the grid
gc.SetPenStyle(CGraphicsContext::ESolidPen);
gc.SetBrushStyle(CGraphicsContext::ENullBrush);
gc.SetPenSize(TSize(1,1));
-
- // 2) Draw the grid
DrawGrid(gc);
}
@@ -4436,15 +3127,15 @@
// grid is focused and cursor pos is same with the current index.
if ( iExtension->iMenuSct )
- {
+ {
highlighted = iExtension->iMenuSctHighlighted &&
(iExtension->iFocusHandler->FocusedControl()==this) &&
(j==cursorPos);
- }
+ }
else
- {
- highlighted = ((iExtension->iFocusHandler->FocusedControl()==this) && (j==cursorPos));
- }
+ {
+ highlighted = ((iExtension->iFocusHandler->FocusedControl()==this) && (j==cursorPos));
+ }
DrawItem(gc, CursorRect(j, charIndex), charIndex, highlighted, EFalse);
charIndex++;
}
@@ -4555,7 +3246,7 @@
if( aHighlighted )
{
TRgb color = AKN_LAF_COLOR(210);
-
+
if( !( iExtension->iFlags & EAknCharMapPressedDown )
|| iExtension->iSingleClickEnabled )
{
@@ -4564,7 +3255,7 @@
KAknsIIDQsnHighlightColors,
EAknsCIQsnHighlightColorsCG1 );
}
-
+
else
{
AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnHighlightColors, EAknsCIQsnHighlightColorsCG2 );
@@ -4612,10 +3303,6 @@
{
specialCharItemLayout = AknLayoutScalable_Avkon::cell_graphic2_pane_t1(1);
}
- else if (IsJapaneseSctUi())
- {
- specialCharItemLayout = AknLayoutScalable_Avkon::cell_graphic2_pane_t1(2);
- }
else
{
specialCharItemLayout = AknLayoutScalable_Avkon::cell_graphic2_pane_t1(0);
@@ -4629,7 +3316,6 @@
TRect textRect = aSctPosition;
if( IsRecentChar(aCharIndex) )
{
- textRect.Move(0, -1); //because height of recent char frame decreased 1.
if( Extension()->iMenuSct )
{
textRect.Move(0, -1); //because menu sct will also shrink 1.
@@ -4749,7 +3435,7 @@
//
void CAknCharMap::DrawRecentCharFrame( CWindowGc& aGc) const
{
- MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+ MAknsSkinInstance* skin = AknsUtils::SkinInstance();
MAknsControlContext* cc = iExtension->iBgContext;
if ( !cc )
{
@@ -4757,27 +3443,22 @@
}
TPoint pos = iGridTopLeft;
- TInt endX = pos.iX + iGridItemWidth * iMaxColumns + 1;
- TInt endY = pos.iY + iGridItemHeight;
- TRect drawRect(TPoint(pos.iX, pos.iY), TPoint(endX, endY));
+ TSize size(iGridItemWidth*iMaxColumns+1, iGridItemHeight);
+ if(iIsMirrored)
+ {
+ pos.iX += iGridItemWidth - size.iWidth;
+ }
// eliminate the overlap area between menu sct and the first menu item.
if ( Extension()->iMenuSct )
{
- drawRect = Rect();
- endY--;
- }
-
- AknsDrawUtils::Background( skin, cc, this, aGc, drawRect );
+ size.iHeight--;
+ }
+
+ AknsDrawUtils::Background(skin, cc, this, aGc, TRect(pos,size));
SetRecentCharFrameStyle(aGc);
- if(iIsMirrored)
- {
- pos.iX = iGridTopLeft.iX - ((iMaxColumns - 1) * iGridItemWidth);
- endX = iGridTopLeft.iX + iGridItemWidth + 1;
- }
-
- aGc.DrawRect( TRect(TPoint(pos.iX-1, pos.iY-1), TPoint(endX, endY)));
-
+ aGc.DrawRect(TRect(pos,size));
+
MTouchFeedback* feedback = MTouchFeedback::Instance();
CFeedbackSpec* spec = CFeedbackSpec::New();
@@ -5100,11 +3781,7 @@
)
{
caseChange = ETrue;
- // Cursor was on the second line
- if (aDeltaY < 0)
- {
- globalYPos--;
- }
+
// Cursor was on the second line and first position
if (aDeltaX < 0 && iCursorPos.iX == 0)
{
@@ -5492,14 +4169,7 @@
TRect parent = gridWithScrollLayRect.Rect();
TAknWindowComponentLayout scrollbarLayout;
- if (iExtension->iHasCategoryButtonUi)
- {
- scrollbarLayout = AknLayoutScalable_Avkon::scroll_pane_cp5(1);
- }
- else
- {
- scrollbarLayout = AknLayoutScalable_Avkon::scroll_pane_cp5(0);
- }
+ scrollbarLayout = AknLayoutScalable_Avkon::scroll_pane_cp5(0);
vSbarModel.iScrollSpan = PageCount() * iExtension->iMaxVisibleRows;
vSbarModel.iThumbSpan = iExtension->iMaxVisibleRows;
@@ -5735,7 +4405,7 @@
void CAknCharMap::CreateOffscreenBackgroundL()
{
-
+
}
TInt CAknCharMap::NextPageL()
@@ -5883,15 +4553,15 @@
// Draw the background of the item if requested
else if ( aDrawBackground )
{
- aGc.SetBrushStyle(CGraphicsContext::ESolidBrush);
- aGc.SetBrushColor(AKN_LAF_COLOR(0));
-
- TRect innerRect = aSctPosition;
- if (IsRecentChar(aCharIndex))
- {
- innerRect.Shrink(1,1);
- }
- aGc.Clear( innerRect );
+ aGc.SetBrushStyle(CGraphicsContext::ESolidBrush);
+ aGc.SetBrushColor(AKN_LAF_COLOR(0));
+
+ TRect innerRect = aSctPosition;
+ if (IsRecentChar(aCharIndex))
+ {
+ innerRect.Shrink(1,1);
+ }
+ aGc.Clear( innerRect );
}
if (iPictoInterface->Interface()->IsPictograph((*iChars)[aCharIndex]))
{
@@ -5911,7 +4581,7 @@
void CAknCharMap::DrawOffscreenBackgroundIfRequired() const
{
-
+
}
EXPORT_C CCoeControl* CAknCharMap::ComponentControl(TInt aIndex) const
@@ -5925,15 +4595,6 @@
aIndex--;
}
- if (iExtension->iRadioButton)
- {
- if ( aIndex == 0 )
- {
- return iExtension->iRadioButton;
- }
- aIndex--;
- }
-
if (iExtension->iCategoryTitle)
{
if ( aIndex == 0 )
@@ -5950,15 +4611,6 @@
}
aIndex--;
}
-
- if (iExtension->iTableNavi)
- {
- if ( aIndex == 0 )
- {
- return iExtension->iTableNavi;
- }
- aIndex--;
- }
if (iExtension->iPageNavi)
{
if ( aIndex == 0 )
@@ -5978,10 +4630,6 @@
{
num++;
}
- if (iExtension->iRadioButton)
- {
- num++;
- }
if (iExtension->iCategoryTitle)
{
num++;
@@ -5990,10 +4638,6 @@
{
num++;
}
- if (iExtension->iTableNavi)
- {
- num++;
- }
if (iExtension->iPageNavi)
{
num++;
@@ -6033,11 +4677,6 @@
iSpecialCharPages.AppendL( PageCountFromChars(*currentcasechars) );
iSpecialCharCases.AppendL( iSpecialCharCase );
- if (iExtension->iRadioButton)
- {
- // Set the sct case mode to valid
- iExtension->iRadioButton->SetValidSctCase(iSpecialCharCase);
- }
if (aCase.Count() > 0)
{
@@ -6048,11 +4687,6 @@
{
iSpecialCharCases.AppendL( aCase[i] );
iSpecialCharPages.AppendL( PageCountFromChars(*chars) );
- if (iExtension->iRadioButton)
- {
- // Set the sct case mode to valid
- iExtension->iRadioButton->SetValidSctCase(aCase[i]);
- }
}
}
}
@@ -6068,29 +4702,7 @@
{
iPictographPages.AppendL( PageCountFromChars(*iPictographsBuffer2) );
iPictographCases.AppendL(EAknCharMapTablePicto2);
- if (iExtension->iRadioButton)
- {
- // Set the sct case mode to valid
- iExtension->iRadioButton->SetValidSctCase(EAknSCTPictograph1);
- iExtension->iRadioButton->SetValidSctCase(EAknSCTPictograph2);
- }
- }
- else
- {
- if (iExtension->iRadioButton)
- {
- // Set the sct case mode to valid
- iExtension->iRadioButton->SetValidSctCase(EAknSCTPictograph);
- }
- }
- }
-
- if (iExtension->iRadioButton)
- {
- // Remove invalid category buttons
- iExtension->iRadioButton->RemoveInvalidButton();
- __ASSERT_DEBUG( iExtension->iRadioButton->Count() > 0,
- Panic(EAknPanicInvalidValue));
+ }
}
}
@@ -6188,6 +4800,8 @@
void CAknCharMap::CountMaxColumnsAndCellSizes()
{
+ const TBool isLandscape = Layout_Meta_Data::IsLandscapeOrientation();
+
TRect mainPaneRect;
if (!AknLayoutUtils::PenEnabled() || Extension()->iMenuSct)
{
@@ -6204,7 +4818,7 @@
AknLayoutUtils::TAknCbaLocation location = AknLayoutUtils::CbaLocation();
TInt maxVarietyOffset = 0;
TInt varietyOffset = maxVariety + 1;
- if(Layout_Meta_Data::IsLandscapeOrientation())
+ if(isLandscape)
{
varietyOffset = (maxVariety + 1) / KAknSctCBaButtonDirections;
}
@@ -6228,16 +4842,8 @@
TAknLayoutRect gridLayRect;
- if (iExtension->iHasCategoryButtonUi)
- {
- gridLayRect.LayoutRect(gridWithScrollLayRect.Rect(),
- AknLayoutScalable_Avkon::grid_graphic_popup_pane(2));
- }
- else
- {
- gridLayRect.LayoutRect(gridWithScrollLayRect.Rect(),
- AknLayoutScalable_Avkon::grid_graphic_popup_pane(0));
- }
+ gridLayRect.LayoutRect(gridWithScrollLayRect.Rect(),
+ AknLayoutScalable_Avkon::grid_graphic_popup_pane(0));
TRect gridRect = Extension()->iMenuSct ? Rect(): gridLayRect.Rect();
@@ -6293,39 +4899,19 @@
else
{
TAknLayoutRect popupGridLayRect;
- popupGridLayRect.LayoutRect(iAvkonAppUi->ApplicationRect(),
- AknLayoutScalable_Avkon::popup_grid_graphic2_window(0));
-
+ popupGridLayRect.LayoutRect(iAvkonAppUi->ApplicationRect(), AknLayoutScalable_Avkon::popup_grid_graphic2_window(0));
TRect popupGridRect = popupGridLayRect.Rect();
- TInt gridVariety;
- if (!IsJapaneseSctUi())
- {
- if(!Layout_Meta_Data::IsLandscapeOrientation())
- {
- gridVariety = (TableCount() > 1) ? 0 : 1;
- }
- else
- {
- gridVariety = (TableCount() > 1) ? 2 : 3;
- }
- }
- else
- {
- gridVariety = !Layout_Meta_Data::IsLandscapeOrientation() ? 4 : 5;
- }
-
+ TInt gridVariety = isLandscape ? 7 : 6;
TAknLayoutRect gridLayRect;
- gridLayRect.LayoutRect(popupGridRect,
- AknLayoutScalable_Avkon::grid_graphic2_pane(gridVariety));
-
+ gridLayRect.LayoutRect(popupGridRect, AknLayoutScalable_Avkon::grid_graphic2_pane(gridVariety));
TRect gridRect = gridLayRect.Rect();
+ TInt cellVariety = isLandscape ? 1 : 0;
TAknLayoutRect firstCellLayRect;
- firstCellLayRect.LayoutRect(popupGridRect,
- AknLayoutScalable_Avkon::aid_size_cell_graphic2(gridVariety,0,0));
-
+ firstCellLayRect.LayoutRect(gridRect, AknLayoutScalable_Avkon::cell_graphic2_pane(cellVariety));
TRect firstCellRect = firstCellLayRect.Rect();
+
TInt firstVisibleIndex = iFirstVisibleRow * iMaxColumns;
// Max columns.
@@ -6335,10 +4921,8 @@
// Max visible rows.
iExtension->iMaxVisibleRows = gridRect.Height() / firstCellRect.Height();
- // Cell width.
+ // Cell.
iGridItemWidth = firstCellRect.Width();
-
- // Cell height.
iGridItemHeight = firstCellRect.Height();
}
}
@@ -7180,8 +5764,9 @@
{
return;
}
-
- SetSmileyAnimationActivityInCurrentPageL(aHighlight);
+ // The "PlayAnimationL" in "SetSmileyAnimationActivityInCurrentPageL"
+ // will leave. If we ignore it, just no animation is played.
+ TRAP_IGNORE( SetSmileyAnimationActivityInCurrentPageL(aHighlight) );
CWindowGc& gc = SystemGc();
if( !CAknEnv::Static()->TransparencyEnabled() )
@@ -7200,9 +5785,9 @@
}
// Menu SCT is being used.
if ( Extension()->iMenuSct )
- {
- Extension()->iMenuSctHighlighted = aHighlight;
- }
+ {
+ Extension()->iMenuSctHighlighted = aHighlight;
+ }
}
// -----------------------------------------------------------------------------
// CAknCharMap::SetMenuSctRect()
@@ -7374,7 +5959,9 @@
iExtension->LoadEmotionTumbnails(*iChars);
- SetSmileyAnimationActivityInCurrentPageL(ETrue);
+ // The "PlayAnimationL" in "SetSmileyAnimationActivityInCurrentPageL"
+ // will leave. If we ignore it, just no animation is played.
+ TRAP_IGNORE( SetSmileyAnimationActivityInCurrentPageL(ETrue) );
}
// -----------------------------------------------------------------------------
@@ -7491,9 +6078,7 @@
// Update also title if requested
if ( aUpdateTitle)
{
- const TDesC* title = (IsJapaneseSctUi())?
- TitleWithSelectingSpecialChar()
- :Title();
+ const TDesC* title = Title();
if ( title )
{
//
@@ -7624,12 +6209,12 @@
TBool CAknCharMap::IsSupportCategoryButtonUi() const
{
- return (iExtension)? iExtension->iHasCategoryButtonUi : EFalse;
+ return EFalse;
}
TBool CAknCharMap::IsJapaneseSctUi() const
{
- return (iExtension)? iExtension->iJapaneseSctUi : EFalse;
+ return EFalse;
}
// -----------------------------------------------------------------------------
@@ -8130,19 +6715,25 @@
{
TInt begin = iFirstVisibleRow * iMaxColumns;
TInt end = iExtension->iMaxVisibleRows * iMaxColumns + begin;
- if(end > iChars->Length()) end = iChars->Length();
-
- for(TInt i(begin); i<end; i++)
+ if( end > iChars->Length() )
+ {
+ end = iChars->Length();
+ }
+
+ for( TInt i(begin); i<end; i++ )
{
TChar code = (*iChars)[i];
CAknSmileyIcon* icon = iExtension->EmotionIcon(code);
- if(!icon) continue;
-
- if((aIsActive) &&
- (Extension()->IsShowingEmotion()||Extension()->iMenuSctHighlighted)
+ if( !icon )
+ {
+ continue;
+ }
+
+ if( ( aIsActive ) &&
+ ( Extension()->IsShowingEmotion() || Extension()->iMenuSctHighlighted)
)
{
- icon->PlayAnimationL(KAnimationRepeat, KAnimationDelay);
+ icon->PlayAnimationL( KAnimationRepeat, KAnimationDelay );
}
else
{
@@ -8234,10 +6825,10 @@
SetSmileyAnimationActivityInCurrentPageL(ETrue);
- CAknSctTableNavi* tableNavi = Extension()->iTableNavi;
- if(tableNavi)
- {
- tableNavi->UpdateNextTableButtonL();
+ CAknSctPageNavi* pageNavi = Extension()->iPageNavi;
+ if(pageNavi)
+ {
+ pageNavi->UpdateNextTableButtonL();
}
DrawNow();
--- a/uifw/AvKon/src/AknCheckBoxSettingPage.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/AknCheckBoxSettingPage.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -210,7 +210,7 @@
if (newResourceId)
{
bgc->SetCommandL(3,newResourceId);
- cba->DrawNow();
+ cba->DrawDeferred();
}
}
--- a/uifw/AvKon/src/AknIndicatorContainer.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/AknIndicatorContainer.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -307,9 +307,6 @@
iIndicators =
new (ELeave) CAknIndicatorQueue( KAknIndicatorQueueGranularity );
}
-
-
- iTicker = CPeriodic::NewL( CActive::EPriorityLow );
}
@@ -855,7 +852,14 @@
EXPORT_C CCoeControl* CAknIndicatorContainer::ComponentControl(TInt aIndex) const
{
- return iIndicators->At(aIndex);
+ if ( aIndex >= 0 && aIndex < iIndicators->Count() )
+ {
+ return iIndicators->At( aIndex );
+ }
+ else
+ {
+ return NULL;
+ }
}
@@ -4281,24 +4285,37 @@
if ( !iExtension->iIsForeground ||
R_AVKON_STATUS_PANE_LAYOUT_EMPTY == curId )
{
- if ( iTicker->IsActive() )
+ if ( iTicker )
{
iTicker->Cancel();
+ delete iTicker;
+ iTicker = NULL;
}
+
return;
}
- if ( !iTicker->IsActive() && iAnimatedIndicatorsShown > 0 )
+ if ( iAnimatedIndicatorsShown > 0 )
{
- iTicker->Start( KAknIndicatorAnimationShortDelay,
- KAknIndicatorAnimationInterval,
- TCallBack( TickerCallback, this ) );
+ if ( !iTicker )
+ {
+ TRAP_IGNORE( iTicker = CPeriodic::NewL( CActive::EPriorityLow ) );
+ }
+
+ if ( iTicker && !iTicker->IsActive() )
+ {
+ iTicker->Start( KAknIndicatorAnimationShortDelay,
+ KAknIndicatorAnimationInterval,
+ TCallBack( TickerCallback, this ) );
+ }
}
- else if ( iTicker->IsActive() && iAnimatedIndicatorsShown == 0 )
+ else if ( iTicker && iAnimatedIndicatorsShown == 0 )
{
// Cancel animation timer if animated indicators
// are not visible anymore.
iTicker->Cancel();
+ delete iTicker;
+ iTicker = NULL;
iSynchronizingValue = 0;
}
}
--- a/uifw/AvKon/src/AknNoteDialog.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/AknNoteDialog.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -49,19 +49,26 @@
#include "akntrace.h"
const TInt EEikDialogFlagSleeping =0x20000;
+
+
// -----------------------------------------------------------------------------
// Finds out if this control belongs to the window group that is in focus.
-// This information can be used to skip effects when the window group is
-// not visible.
+// This information can be used to skip effects when the window group is not visible.
//
-// @param aThis The control in question.
+// @param aControl The control in question.
//
// @return ETrue if the window group is in focus, otherwise EFalse
// -----------------------------------------------------------------------------
//
-TBool IsFocusedWindowGroup( CAknNoteDialog* aThis )
+TBool IsFocusedWindowGroup( const CCoeControl* aControl )
{
- RWindowTreeNode* node = aThis->DrawableWindow();
+ if( !aControl )
+ {
+ return EFalse;
+ }
+
+ RWindowTreeNode* node = aControl->DrawableWindow();
+
// this code finds out if this control belongs to window group
// that is in focus, there are some rare cases when the latest opened
// popup goes behind another one (e.g. system lock query -> power key menu)
@@ -72,12 +79,13 @@
{
return EFalse;
}
+
TInt nodeWindowGroupId = node->WindowGroupId();
TInt focusedWindowGroupId = wsSession.GetFocusWindowGroup();
if ( nodeWindowGroupId == focusedWindowGroupId )
{
- return aThis->IsFocused();
+ return aControl->IsFocused();
}
TInt count = wsSession.NumWindowGroups( 0 );
@@ -101,7 +109,8 @@
}
}
return EFalse;
- }
+ }
+
//////////////////////////////////////////////////////////////////////
// CAknNoteDialogExtension
@@ -440,7 +449,7 @@
#ifdef RD_UI_TRANSITION_EFFECTS_POPUPS
if ( self->IsVisible() && GfxTransEffect::IsRegistered( self ) &&
- IsFocusedWindowGroup( self ) )
+ IsFocusedWindowGroup( self ) )
{
TBool rsWasEnabled( EFalse );
if( !CAknEnv::Static()->TransparencyEnabled() && self->DrawableWindow() && self->Window().IsRedrawStoreEnabled() )
--- a/uifw/AvKon/src/AknPhedView.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/AknPhedView.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -499,7 +499,7 @@
{
TRgb color = KRgbBlack;
AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), color,
- KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG51 );
+ KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG8 );
aGc.SetPenColor( color );
// This function shifts the RHS of aRect left by the width of the text drawn.
// It temporarily limits the draw rectangle to the text width to prevent flicker.
@@ -523,7 +523,7 @@
TRgb color;
color = KRgbBlack;
AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), color,
- KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG51 );
+ KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG8 );
aGc.SetPenColor( color );
TPtr buf( TranslatedText( aText ) );
aGc.DrawText( buf, aRect, aBaseline, CGraphicsContext::ERight );
@@ -574,12 +574,10 @@
aGc.DrawRect( rect );
aGc.SetPenStyle( CGraphicsContext::ESolidPen );
aGc.SetPenColor( penColor );
- TInt selStart( iModel->LeftMark() );
TInt endPos( iModel->Length() - SelectionStart() );
TInt startPos( iModel->Length() - SelectionEnd() );
- TPtrC text( TranslatedText( iModel->Selection().Mid( startPos - selStart,
- endPos - startPos ) ) );
- aGc.DrawText( text, rect, baseline, CGraphicsContext::ERight );
+ TPtrC text( TranslatedText( iModel->Text( startPos, endPos - 1 ) ) );
+ aGc.DrawText( text, rect, baseline, CGraphicsContext::ELeft );
}
TPtr TAknPhedViewLine::TranslatedText( const TDesC& aText ) const
--- a/uifw/AvKon/src/AknPreviewPopUp.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/AknPreviewPopUp.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -78,6 +78,11 @@
//
CAknPreviewPopUp::~CAknPreviewPopUp()
{
+ if( iIsDeleted )
+ {
+ *iIsDeleted = ETrue ;
+ iIsDeleted = 0 ;
+ }
if ( IsVisible() )
{
@@ -519,7 +524,10 @@
// -----------------------------------------------------------------------------
//
void CAknPreviewPopUp::HandlePointerEventL( const TPointerEvent& aPointerEvent )
- {
+ {
+ TBool isDelete = EFalse;
+ iIsDeleted = &isDelete;
+
if ( AknLayoutUtils::PenEnabled() )
{
iCloseMenu = EFalse;
@@ -531,8 +539,14 @@
// redirect pointer event to content
if ( Rect().Contains( aPointerEvent.iPosition ) && IsVisible() )
{
- iAllowUpEvent = ETrue;
+ iAllowUpEvent = ETrue;
+ CleanupStack::PushL( TCleanupItem( CleanLocalRef, this ) );
CCoeControl::HandlePointerEventL( aPointerEvent );
+ CleanupStack::Pop();
+ if( isDelete )
+ {
+ return;
+ }
if ( !( iFlags & CAknPreviewPopUpController::EPermanentMode ) && aPointerEvent.iType == TPointerEvent::EButton1Up && IsVisible() )
{
// if pointer up is already redirected to the content, but the popup is still visible,
@@ -603,7 +617,13 @@
aPointerEvent.iType == TPointerEvent::EButtonRepeat ||
(aPointerEvent.iType == TPointerEvent::EButton1Up && iAllowUpEvent ) )
{
+ CleanupStack::PushL( TCleanupItem( CleanLocalRef, this ) );
CCoeControl::HandlePointerEventL( aPointerEvent );
+ CleanupStack::Pop();
+ if( isDelete )
+ {
+ return;
+ }
}
}
else
@@ -611,7 +631,13 @@
if ( aPointerEvent.iType == TPointerEvent::EDrag ||
aPointerEvent.iType == TPointerEvent::EButtonRepeat )
{
+ CleanupStack::PushL( TCleanupItem( CleanLocalRef, this ) );
CCoeControl::HandlePointerEventL( aPointerEvent );
+ CleanupStack::Pop();
+ if( isDelete )
+ {
+ return;
+ }
}
}
@@ -621,6 +647,8 @@
iAllowUpEvent = EFalse;
}
}
+
+ iIsDeleted = NULL;
}
// -----------------------------------------------------------------------------
@@ -807,5 +835,14 @@
}
}
+// -----------------------------------------------------------------------------
+// CAknPreviewPopUp::CleanLocalRef
+// -----------------------------------------------------------------------------
+//
+void CAknPreviewPopUp::CleanLocalRef( TAny* any )
+ {
+ static_cast<CAknPreviewPopUp*>( any )->iIsDeleted = NULL;
+ }
+
// End of File
--- a/uifw/AvKon/src/AknQueryControl.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/AknQueryControl.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -3385,32 +3385,33 @@
EXPORT_C void CAknQueryControl::HandlePointerEventL(const TPointerEvent& aPointerEvent)
{
- CEikMfne* edwin = NULL;
- if ( iTimeEdwin )
- {
- edwin = iTimeEdwin;
- }
- else if ( iDateEdwin )
- {
- edwin = iDateEdwin;
- }
- else if ( LocationEd() )
- {
- edwin = LocationEd();
- }
- else if ( iDurationEdwin )
- {
- edwin = iDurationEdwin;
- }
-
- if ( edwin && iEditorFrame.Rect().Contains(aPointerEvent.iPosition) )
- {
- edwin->HandlePointerEventL(aPointerEvent);
- }
+ if ( iEditorFrame.Rect().Contains( aPointerEvent.iPosition ) )
+ {
+ /*For the events happening inside editor frame's rect, query control will forward
+ the events to editors to handle.This is added to fix bug ESLM-85YFCH:Text editor is hard
+ to open in input dialog (usability). The valid area is enlarged to editor frame rect,
+ instead of text's rect, because text rect is too small for user to tap*/
+ CCoeControl* ctrl = ControlByLayoutOrNull( iQueryType );
+ if( ctrl )
+ {
+ TPointerEvent pointerEvent( aPointerEvent );
+ if( !ctrl->Rect().Contains( aPointerEvent.iPosition ) && ( NbrOfEditorLines() == 1 ) )
+ {
+ // for the pointerevents happening in editor frame rect,
+ // query control forward events to editors after justification
+ pointerEvent.iPosition.iY = ctrl->Rect().iTl.iY + ctrl->Rect().Height()/2;
+ }
+ ctrl->HandlePointerEventL( pointerEvent );
+ }
+ else
+ {
+ CAknControl::HandlePointerEventL( aPointerEvent );
+ }
+ }
else
- {
- CAknControl::HandlePointerEventL(aPointerEvent);
- }
+ {
+ CAknControl::HandlePointerEventL( aPointerEvent );
+ }
}
EXPORT_C void* CAknQueryControl::ExtensionInterface( TUid /*aInterface*/ )
@@ -3787,14 +3788,33 @@
EXPORT_C void CAknExtQueryControl::HandlePointerEventL(const TPointerEvent& aPointerEvent)
{
- if ( iIpEditor && iEditorFrame.Rect().Contains(aPointerEvent.iPosition) )
- {
- iIpEditor->HandlePointerEventL(aPointerEvent);
- }
- else
- {
- CAknQueryControl::HandlePointerEventL(aPointerEvent);
- }
+ if ( iEditorFrame.Rect().Contains( aPointerEvent.iPosition ) )
+ {
+ /*For the events happening inside editor frame's rect, query control will forward
+ the events to editors to handle.This is added to fix bug ESLM-85YFCH:Text editor is hard
+ to open in input dialog (usability). The valid area is enlarged to editor frame rect,
+ instead of text's rect, because text rect is too small for user to tap*/
+ CCoeControl* ctrl = ControlByLayoutOrNull( iQueryType );
+ if( ctrl )
+ {
+ TPointerEvent pointerEvent( aPointerEvent );
+ if( !ctrl->Rect().Contains( aPointerEvent.iPosition ) && ( NbrOfEditorLines() == 1 ) )
+ {
+ // for the pointerevents happening in editor frame rect,
+ // query control forward events to editors after justification
+ pointerEvent.iPosition.iY = ctrl->Rect().iTl.iY + ctrl->Rect().Height()/2;
+ }
+ ctrl->HandlePointerEventL( pointerEvent );
+ }
+ else
+ {
+ CAknControl::HandlePointerEventL( aPointerEvent );
+ }
+ }
+ else
+ {
+ CAknControl::HandlePointerEventL( aPointerEvent );
+ }
}
EXPORT_C void* CAknExtQueryControl::ExtensionInterface( TUid /*aInterface*/ )
--- a/uifw/AvKon/src/AknQueryDialog.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/AknQueryDialog.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -1025,35 +1025,47 @@
}
EXPORT_C void CAknQueryDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent)
- {
- if ( AknLayoutUtils::PenEnabled() )
+ {
+ CAknAppUi *appUi = iAvkonAppUi;
+ CCoeControl *redirectControl = NULL;
+ TRect rectToScreenOfControl;
+
+ if (!Rect().Contains(aPointerEvent.iPosition))
{
-
- CAknTouchPane* touchPane = iAvkonAppUi->TouchPane();
-
- if ( !Rect().Contains( aPointerEvent.iPosition ) && touchPane
- && touchPane->IsVisible() )
+ CAknTouchPane* touchPane = appUi->TouchPane();
+ CEikStatusPane *statusPane = appUi->StatusPane();
+
+ if ( touchPane && touchPane->IsVisible() )
{
// touchpane is a window-owning control -> Rect() cannot be used
- TRect touchPaneRect( touchPane->Position(), touchPane->Size() );
-
- if ( touchPaneRect.Contains( aPointerEvent.iParentPosition ) )
+ rectToScreenOfControl.SetRect( touchPane->Position(), touchPane->Size() );
+ redirectControl = touchPane;
+ }
+ else if ( statusPane && statusPane->IsVisible() &&
+ Layout_Meta_Data::IsLandscapeOrientation() &&
+ !IsFocused())
+ {
+ CCoeControl* cbControl = statusPane->ControlL(TUid::Uid(EEikStatusPaneUidCombined));
+ if ( cbControl && !statusPane->IsFaded() )
{
- TPointerEvent pointerEvent( aPointerEvent );
-
- // make event's coordinates touch pane relative
- pointerEvent.iPosition = aPointerEvent.iParentPosition -
- touchPaneRect.iTl;
-
- static_cast<CCoeControl*>( touchPane )->HandlePointerEventL(
- pointerEvent );
+ rectToScreenOfControl.SetRect( cbControl->PositionRelativeToScreen(), cbControl->Size() );
+ redirectControl = cbControl;
}
}
- else
- {
- // Forward also those pointerevents that the dialog rect does not contain
- CAknDialog::HandlePointerEventL( aPointerEvent );
- }
+ }
+
+ if ( redirectControl && rectToScreenOfControl.Contains(aPointerEvent.iParentPosition) )
+ {
+ // make event's coordinates relative to new control.
+ TPointerEvent pointerEvent( aPointerEvent );
+ pointerEvent.iPosition = aPointerEvent.iParentPosition - rectToScreenOfControl.iTl;
+
+ redirectControl->HandlePointerEventL( pointerEvent );
+ }
+ else
+ {
+ // Forward also those pointerevents that the dialog rect does not contain
+ CAknDialog::HandlePointerEventL( aPointerEvent );
}
}
--- a/uifw/AvKon/src/AknRadioButtonSettingPage.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/AknRadioButtonSettingPage.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -75,13 +75,26 @@
* Extension flags.
*/
TBitFlags iFlags;
+
+ /**
+ * Item that received pen down event
+ */
+ TInt iPenDownOnItem;
+
+ /**
+ * Is selection valid
+ */
+ TBool iIsValidSelection;
+
};
// end of CAknRadioButtonSettingPageExtension class definition
CAknRadioButtonSettingPageExtension::CAknRadioButtonSettingPageExtension(
CCoeControl& aOwner ) :
- iOldFocusedItemIndex(-1), iIsDragged( EFalse )
+ iOldFocusedItemIndex(-1), iIsDragged( EFalse ),
+ iIsValidSelection( ETrue ),
+ iPenDownOnItem ( KErrNotFound )
{
if ( static_cast<CAknAppUi*>(
aOwner.ControlEnv()->AppUi() )->IsSingleClickCompatible() )
@@ -229,6 +242,14 @@
switch ( aEventType )
{
+ case MEikListBoxObserver::EEventPenDownOnItem:
+ {
+ if ( iExtension )
+ {
+ iExtension->iPenDownOnItem = ListBoxControl()->CurrentItemIndex();
+ }
+ break;
+ }
case MEikListBoxObserver::EEventItemSingleClicked:
case MEikListBoxObserver::EEventItemDoubleClicked:
{
@@ -287,8 +308,17 @@
}
EXPORT_C void CAknRadioButtonSettingPage::SelectCurrentItemL()
- {
- iCurrentSelectionIndex = ListBoxControl()->CurrentItemIndex();
+ {
+ if ( ListBoxControl()->IsHighlightEnabled() ||
+ ( iExtension && iExtension->iIsValidSelection ) )
+ {
+ iCurrentSelectionIndex = ListBoxControl()->CurrentItemIndex();
+ }
+ else
+ {
+ ListBoxControl()->SetCurrentItemIndex ( iCurrentSelectionIndex );
+ }
+
SetRadioButtonSelectionL( iCurrentSelectionIndex );
UpdateSettingL();
if( iSettingPageObserver )
@@ -456,7 +486,22 @@
TPointerEvent& event = const_cast<TPointerEvent&>( aPointerEvent );
event.iModifiers &= ~EModifierShift;
event.iModifiers &= ~EModifierCtrl;
-
+
+ if ( iExtension )
+ {
+ TInt index ( KErrNotFound );
+ ListBoxControl()->View()->XYPosToItemIndex(
+ aPointerEvent.iPosition, index );
+ if ( index == iExtension->iPenDownOnItem
+ && iExtension->iPenDownOnItem != KErrNotFound )
+ {
+ iExtension->iIsValidSelection = ETrue;
+ }
+ else
+ {
+ iExtension->iIsValidSelection = EFalse;
+ }
+ }
CAknListBoxSettingPage::HandlePointerEventL( aPointerEvent );
}
--- a/uifw/AvKon/src/AknSettingPage.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/AknSettingPage.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -52,6 +52,14 @@
#include "aknitemactionmenuregister.h"
#include "aknqueryeditorindicator.h"
+
+
+//
+// the function's definition is in the AknNoteDialog.cpp
+//
+TBool IsFocusedWindowGroup( const CCoeControl* aControl );
+
+
// This determines the maximum number of digits in the optional number displayed on the
// top left of the setting page
const TInt KAknSettingPageMaxOrdinalDigits = 3;
@@ -1425,7 +1433,7 @@
iSettingPageObserver->HandleSettingPageEventL(this, MAknSettingPageObserver::EEventSettingCancelled);
}
- if ( GfxTransEffect::IsRegistered( this ) )
+ if ( GfxTransEffect::IsRegistered( this ) && IsFocusedWindowGroup( this ) && IsVisible() )
{
GfxTransEffect::Begin( this, KGfxControlDisappearAction );
MakeVisible( EFalse );
--- a/uifw/AvKon/src/AknTextSettingPage.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/AknTextSettingPage.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -38,17 +38,14 @@
#include <e32property.h>
#include <AknDef.h>
-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
- {
+NONSHARABLE_CLASS( CAknFepSettingDialogStatusWatcher ) : public CActive
+ {
public:
-
static CAknFepSettingDialogStatusWatcher* NewL( CAknTextSettingPage* aControl )
{
CAknFepSettingDialogStatusWatcher* watcher = new (ELeave) CAknFepSettingDialogStatusWatcher( aControl );
@@ -57,94 +54,80 @@
CleanupStack::Pop(watcher);
return watcher;
}
-
- CAknFepSettingDialogStatusWatcher( CAknTextSettingPage* aControl )
- : CActive( EPriorityNormal )
- , iControl( aControl )
- {
- CActiveScheduler::Add( this );
- }
-
- ~CAknFepSettingDialogStatusWatcher()
+
+ CAknFepSettingDialogStatusWatcher( CAknTextSettingPage* aControl )
+ : CActive( EPriorityNormal )
+ , iControl( aControl )
+ , iAttachSucceed( EFalse )
+ {
+ CActiveScheduler::Add( this );
+ }
+
+ ~CAknFepSettingDialogStatusWatcher()
{
StopWatching();
iFepSettingDialogStatusProperty.Close();
- }
-
- void StartWatchingL()
- {
- if ( !IsActive() )
+ }
+
+ void StartWatching()
+ {
+ if ( !IsActive() && iAttachSucceed )
{
iFepSettingDialogStatusProperty.Subscribe( iStatus );
SetActive();
}
- }
-
+ }
+
void StopWatching()
- {
- Cancel();
- }
-
-private:
-
+ {
+ 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 ) );
+ TInt ret = iFepSettingDialogStatusProperty.Attach( KPSUidAknFep
+ , KAknFepSettingDialogState
+ , EOwnerThread );
+ iAttachSucceed = ( ret == KErrNone );
}
-
- void HandleAknFepSettingDialogStatusChangeNotificationL()
- {
- TInt isOpen = 0;
- TInt ret = iFepSettingDialogStatusProperty.Get( isOpen );
- if ( ret!=KErrOverflow )
- {
- User::LeaveIfError( ret );
- }
-
+
+ void HandleAknFepSettingDialogStatusChangeNotification()
+ {
+ TInt isOpen = 0;
+ iFepSettingDialogStatusProperty.Get( isOpen );
if ( !iControl )
{
return;
}
- if ( isOpen )
- {
- iControl->MakeVisible( EFalse );
- }
- else
- {
- iControl->MakeVisible( ETrue );
- }
- }
-
+ if ( isOpen )
+ {
+ iControl->MakeVisible( EFalse );
+ }
+ else
+ {
+ iControl->MakeVisible( ETrue );
+ }
+ }
+
private: // from CActive
void RunL()
- {
- if ( iStatus.Int() == KErrNone )
+ {
+ if ( iStatus.Int() == KErrNone )
{
- HandleAknFepSettingDialogStatusChangeNotificationL();
- StartWatchingL();
+ HandleAknFepSettingDialogStatusChangeNotification();
+ StartWatching();
}
- }
+ }
void DoCancel()
- {
- iFepSettingDialogStatusProperty.Cancel();
- }
-
+ {
+ iFepSettingDialogStatusProperty.Cancel();
+ }
+
private:
//
// not owned
@@ -152,6 +135,11 @@
CAknTextSettingPage* iControl;
RProperty iFepSettingDialogStatusProperty;
+
+ //
+ // If RProperty attach succeed
+ //
+ TBool iAttachSucceed ;
};
@@ -216,7 +204,7 @@
void ConstructL()
{
iAknFepSettingDialogStatusWatcher = CAknFepSettingDialogStatusWatcher::NewL( iExtensionOwner );
- iAknFepSettingDialogStatusWatcher->StartWatchingL();
+ iAknFepSettingDialogStatusWatcher->StartWatching();
}
CAknTextSettingPageExtension(CAknTextSettingPage* aExtensionOwner )
@@ -411,7 +399,14 @@
// Construct an appropriate control context for the contained editor areas.
// Context produced is owned by CAknSettingPage.
SetEditedItemFrameIID( KAknsIIDQsnFrInput, KAknsIIDQsnFrInputCenter );
- TextControl()->ScrollBarFrame()->VerticalScrollBar()->SetMopParent(this);
+
+ // ScrollBarFrame always exists in this phase
+ CEikScrollBar* sb = editor->ScrollBarFrame()->VerticalScrollBar();
+ if ( sb )
+ {
+ sb->SetMopParent( this );
+ sb->MakeVisible( ETrue );
+ }
}
/**
@@ -565,8 +560,12 @@
for ( TInt i = textLimits.FirstRow(); i <= textLimits.LastRow(); ++i )
{
- array.Append(
- AknLayoutScalable_Avkon::set_text_pane_t1_copy1( 0, 0, i ) );
+ TInt err = array.Append( AknLayoutScalable_Avkon::set_text_pane_t1_copy1( 0, 0, i ) );
+ if ( err != KErrNone)
+ {
+ array.Close();
+ return;
+ }
}
AknLayoutUtils::LayoutEdwin( TextControl(),
--- a/uifw/AvKon/src/AknViewAppUi.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/AknViewAppUi.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2005 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"
@@ -47,8 +47,6 @@
// CONSTANTS
const TInt KAknAppUiViewsGranularity = 1;
const TInt KAknViewAsyncPriority = EActivePriorityRedrawEvents + 10;
-const TUid KCRUidThemes = { 0x102818E8 }; // defined in pslninternalcrkeys.h
-const TUint32 KThemesTransitionEffects = 0x00000009; //defined in pslninternalcrkeys.h
#ifdef RD_SPLIT_VIEW
@@ -236,26 +234,20 @@
iExtension->iNavigator = new ( ELeave ) CAknViewNavigator( this );
AddToStackL( iExtension->iNavigator, ECoeStackPriorityDefault - 1, ECoeStackFlagRefusesFocus );
#endif // RD_SPLIT_VIEW
-
-
- // disable CAknLocalScreenClearer when fullscreen effect is on
- CRepository *uiThemeCenRep = CRepository::NewL( KCRUidThemes );
- CleanupStack::PushL( uiThemeCenRep );
- TInt effectValue = 0;
- TBool themeEffectDisabled = ETrue;
- if ( KErrNone == uiThemeCenRep->Get( KThemesTransitionEffects, effectValue ) )
+
+ // Only clear the window for foreground apps.
+ if ( iEikonEnv->RootWin().OrdinalPosition() == 0 &&
+ iExtension->iUseDefaultScreenClearer )
{
- themeEffectDisabled = effectValue & AknTransEffect::EFullScreenTransitionsOff;
+ if ( !iEikonEnv->StartedAsServerApp() )
+ {
+ iClearer = CAknLocalScreenClearer::NewL( ETrue );
+ }
+ else
+ {
+ iClearer = CAknLocalScreenClearer::NewL( ETrue, ETrue );
+ }
}
-
- if ( iEikonEnv->RootWin().OrdinalPosition() == 0 && // only clear the window for foreground apps
- iExtension->iUseDefaultScreenClearer && themeEffectDisabled )
- {
- iClearer = CAknLocalScreenClearer::NewL( ETrue );
- }
-
- CleanupStack::PopAndDestroy( uiThemeCenRep ); // uiThemeCenRep
-
}
// -----------------------------------------------------------------------------
@@ -327,15 +319,23 @@
for ( TInt i = 0; i < count; ++i )
{
- CAknView* view( iViews->At( i ) );
-
- if ( view->Id() == aViewId )
- {
- iViews->Delete( i );
- CCoeAppUi::DeregisterView( *view );
- delete view;
- return;
- }
+ CAknView* view( iViews->At( i ) );
+ if ( view->Id() == aViewId )
+ {
+ // remove the deleted view from iExtensione's list. Or the pointer
+ // is invalid
+ TInt index = iExtension->iActiveViews.Find(view);
+ if ( index >= 0 && index < iExtension->iActiveViews.Count() )
+ {
+ iExtension->iActiveViews.Remove(index);
+ view->AknViewDeactivated();
+ }
+
+ iViews->Delete( i );
+ CCoeAppUi::DeregisterView( *view );
+ delete view;
+ return;
+ }
}
}
@@ -626,12 +626,15 @@
// (default granularity is 8) -> no memory allocation failures.
if ( splitView )
{
- iExtension->iActiveViews.Append( View( splitView->iViewIds[0] ) );
- iExtension->iActiveViews.Append( View( splitView->iViewIds[1] ) );
+ error = iExtension->iActiveViews.Append( View( splitView->iViewIds[0] ) );
+ if (KErrNone == error)
+ {
+ error = iExtension->iActiveViews.Append( View( splitView->iViewIds[1] ) );
+ }
}
else
{
- iExtension->iActiveViews.Append( item->iNewView );
+ error = iExtension->iActiveViews.Append( item->iNewView );
}
iView = item->iNewView;
--- a/uifw/AvKon/src/AknVolumePopup.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/AknVolumePopup.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -382,6 +382,7 @@
{
TInt feedbackStyle = (TAknFeedbackStyle)reader.ReadInt16();
iFlags = reader.ReadInt16();
+ reader.Rewind( 4 ); // Rewind to the beginning, then construct slider.
}
else
{
@@ -521,7 +522,7 @@
iExt->TryLoadDefaultSliderVolumeBitmap();
iExt->iSliderControl->ReportMarkerDragEvent( ETrue );
iExt->iSliderControl->SuppressDrawing( ETrue );
- }
+ }
else
{
iExt->iSliderControl = new( ELeave )CAknSlider;
--- a/uifw/AvKon/src/Aknslider.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/Aknslider.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -1497,7 +1497,12 @@
TResourceReader reader;
CEikonEnv::Static()->CreateResourceReaderLC( reader, aResourceId );
- reader.ReadInt16(); // ignore layout
+ TInt sliderType = reader.ReadInt16();
+ if ( sliderType == EAknSliderWithFeedbackStyle )
+ {
+ reader.ReadInt16(); // ignore type
+ reader.ReadInt16(); // ignore layout
+ }
TInt minValue = reader.ReadInt16();
TInt maxValue = reader.ReadInt16();
CleanupStack::PopAndDestroy(); // reader
@@ -1538,7 +1543,12 @@
TResourceReader reader;
CEikonEnv::Static()->CreateResourceReaderLC( reader, aResourceId );
- reader.ReadInt16(); // ignore layout
+ TInt sliderType = reader.ReadInt16();
+ if ( sliderType == EAknSliderWithFeedbackStyle )
+ {
+ reader.ReadInt16(); // ignore type
+ reader.ReadInt16(); // ignore layout
+ }
TInt minValue = reader.ReadInt16();
TInt maxValue = reader.ReadInt16();
CleanupStack::PopAndDestroy(); // reader
@@ -4248,12 +4258,16 @@
MTouchFeedback* feedback = MTouchFeedback::Instance();
if ( feedback )
{
+ TTouchContinuousFeedback type = ETouchContinuousSmooth;
TInt intensity = KStableFeedbackIntesity;
+
if ( SliderData()->iFeedbackStyle == EAknSliderFbDynamic )
{
+ type = ETouchDynamicSlider;
intensity = FeedbackIntensity();
}
- feedback->StartFeedback( this, ETouchDynamicSlider, aPointerEvent, intensity, aTimeout );
+
+ feedback->StartFeedback( this, type, aPointerEvent, intensity, aTimeout );
iExt->SetFlag( CAknSliderExtension::EFlagPlayingContinuousFb );
}
}
--- a/uifw/AvKon/src/aknchoicelist.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/aknchoicelist.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -119,7 +119,7 @@
if ( AknsUtils::AvkonSkinEnabled() )
{
AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
- color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG8 );
+ color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG19 );
}
ItemDrawer()->SetTextColor( color );
@@ -128,7 +128,7 @@
if ( AknsUtils::AvkonSkinEnabled() )
{
AknsUtils::GetCachedColor( AknsUtils::SkinInstance(),
- color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG8 );
+ color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG19 );
}
ItemDrawer()->SetHighlightedTextColor( color );
@@ -798,7 +798,7 @@
TRgb textColor;
if ( AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), textColor,
- KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG8) == KErrNone )
+ KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6) == KErrNone )
{
TRAP_IGNORE( AknLayoutUtils::OverrideControlColorL(
*iLabel, EColorLabelText, textColor) );
@@ -1080,7 +1080,7 @@
TRgb textColor;
if ( AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), textColor,
- KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG8) == KErrNone )
+ KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6) == KErrNone )
{
TRAP_IGNORE(
AknLayoutUtils::OverrideControlColorL(
@@ -1515,7 +1515,7 @@
TRgb textColor;
if ( AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), textColor,
- KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG8) == KErrNone )
+ KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6) == KErrNone )
{
TRAP_IGNORE( AknLayoutUtils::OverrideControlColorL(
*iLabel, EColorLabelText, textColor) );
--- a/uifw/AvKon/src/akncontext.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/akncontext.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -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"
@@ -11,7 +11,8 @@
*
* Contributors:
*
-* Description:
+* Description: Context pane control used to display the application icon
+* in status pane.
*
*/
@@ -58,7 +59,6 @@
public:
CEikImage* iContextImage;
CEikImage* iDefaultContextImage;
- TInt iCurrentColorScheme;
};
CAknContextPaneExtension::CAknContextPaneExtension()
@@ -91,7 +91,20 @@
EXPORT_C void CAknContextPane::ConstructL()
{
CommonConstructL();
- TRAP_IGNORE(SetPictureToDefaultL()); // Trapped because of Java midlet issues
+
+ // Perf optimization: We don't set the default picture if the context
+ // pane is not in current status pane layout. The picture will be created
+ // in SizeChanged() if a valid size is set for context pane, but at
+ // the moment context pane isn't used in any of the supported Avkon
+ // status pane layouts.
+ CEikStatusPaneBase* statusPane = CEikStatusPaneBase::Current();
+ if ( statusPane &&
+ statusPane->PaneCapabilities(
+ TUid::Uid( EEikStatusPaneUidContext ) ).IsInCurrentLayout() )
+ {
+ // Trapped because of Java midlet issues.
+ TRAP_IGNORE( SetPictureToDefaultL() );
+ }
}
@@ -306,8 +319,14 @@
EXPORT_C void CAknContextPane::SizeChanged()
{
- if (Rect() != TRect(0,0,0,0)) // Fix for Parent getting parent relative data.
+ if ( !Rect().IsEmpty() ) // Fix for Parent getting parent relative data.
{
+ if ( !iExtension->iContextImage )
+ {
+ // Create the default picture if it doesn't exist yet.
+ TRAP_IGNORE( SetPictureToDefaultL() );
+ }
+
if (iExtension->iContextImage && iExtension->iContextImage->Bitmap())
{
TAknLayoutRect layoutRect;
@@ -362,8 +381,9 @@
EXPORT_C void CAknContextPane::HandleResourceChange( TInt aType )
{
- if ( aType == KEikColorResourceChange || aType==KEikDynamicLayoutVariantSwitch )
+ if ( aType==KEikDynamicLayoutVariantSwitch )
{
+ SizeChanged();
DrawDeferred();
}
else if( aType == KAknsMessageSkinChange )
@@ -409,76 +429,63 @@
{
CWindowGc& gc=SystemGc();
- // screen
- TRect screenRect = iAvkonAppUi->ApplicationRect();
-
- //TAknWindowLineLayout screenLayout = AknLayout::screen();
- //TRect screenRect = screenLayout.Rect();
-
-
- // app window
- TAknWindowLineLayout applicationWindowLayout =
- AknLayout::application_window(screenRect);
-
- TAknLayoutRect applicationWindowLayoutRect;
- applicationWindowLayoutRect.LayoutRect(screenRect, applicationWindowLayout);
- TRect applicationWindowRect = applicationWindowLayoutRect.Rect();
-
- // statuspane
- TAknWindowLineLayout statusPaneLayout =
- AknLayout::status_pane(applicationWindowRect, 0);
-
- TAknLayoutRect statusPaneLayoutRect;
- statusPaneLayoutRect.LayoutRect(applicationWindowRect, statusPaneLayout);
- TRect statusPaneRect = statusPaneLayoutRect.Rect();
-
- // context pane
- TAknWindowLineLayout contextPaneLayout =
- AknLayout::context_pane(statusPaneRect, 0);
-
- TAknLayoutRect contextPaneLayoutRect;
- contextPaneLayoutRect.LayoutRect(statusPaneRect, contextPaneLayout);
- TRect contextPaneRect = contextPaneLayoutRect.Rect();
-
- TAknWindowLineLayout naviPaneGraphicsLayout =
- AknLayout::Status_pane_elements_Line_1();
-
- TAknWindowLineLayout naviWipeGraphicsLayout =
- AknLayout::Status_pane_elements_Line_2();
-
- TAknLayoutRect naviPaneGraphicsLayoutRect;
- naviPaneGraphicsLayoutRect.LayoutRect(statusPaneRect, naviPaneGraphicsLayout);
- TRect naviPaneGraphicsRect = naviPaneGraphicsLayoutRect.Rect();
-
- TAknLayoutRect naviWipeGraphicsLayoutRect;
- naviWipeGraphicsLayoutRect.LayoutRect(statusPaneRect, naviWipeGraphicsLayout);
- TRect naviWipeGraphicsRect = naviWipeGraphicsLayoutRect.Rect();
-
- TRect rect(Rect());
-
- TRect barRect = contextPaneRect;
- if (barRect.Intersects(naviPaneGraphicsRect))
- {
- barRect.Intersection(naviPaneGraphicsRect);
-
- // calculate new origo, relative to context pane.
- barRect.iTl.iX -= contextPaneRect.iTl.iX;
- barRect.iTl.iY -= contextPaneRect.iTl.iY;
- barRect.iBr.iX -= contextPaneRect.iTl.iX;
- barRect.iBr.iY -= contextPaneRect.iTl.iY;
- }
- else
- {
- barRect = TRect(0,0,0,0);
- }
-
-
+ TRect rect( Rect() );
MAknsSkinInstance* skin = AknsUtils::SkinInstance();
MAknsControlContext* cc = AknsDrawUtils::ControlContext(this);
- // Solid or wipe comes from background
- if( !AknsDrawUtils::Background( skin, cc, this, gc, rect ) )
+ // Solid or wipe comes from background
+ if ( !AknsDrawUtils::Background( skin, cc, this, gc, rect ) )
{
+ // screen
+ TRect screenRect = iAvkonAppUi->ApplicationRect();
+
+ // app window
+ TAknWindowLineLayout applicationWindowLayout =
+ AknLayout::application_window(screenRect);
+
+ TAknLayoutRect applicationWindowLayoutRect;
+ applicationWindowLayoutRect.LayoutRect(screenRect, applicationWindowLayout);
+ TRect applicationWindowRect = applicationWindowLayoutRect.Rect();
+
+ // statuspane
+ TAknWindowLineLayout statusPaneLayout =
+ AknLayout::status_pane(applicationWindowRect, 0);
+
+ TAknLayoutRect statusPaneLayoutRect;
+ statusPaneLayoutRect.LayoutRect(applicationWindowRect, statusPaneLayout);
+ TRect statusPaneRect = statusPaneLayoutRect.Rect();
+
+ // context pane
+ TAknWindowLineLayout contextPaneLayout =
+ AknLayout::context_pane(statusPaneRect, 0);
+
+ TAknLayoutRect contextPaneLayoutRect;
+ contextPaneLayoutRect.LayoutRect(statusPaneRect, contextPaneLayout);
+ TRect contextPaneRect = contextPaneLayoutRect.Rect();
+
+ TAknWindowLineLayout naviPaneGraphicsLayout =
+ AknLayout::Status_pane_elements_Line_1();
+
+ TAknLayoutRect naviPaneGraphicsLayoutRect;
+ naviPaneGraphicsLayoutRect.LayoutRect(statusPaneRect, naviPaneGraphicsLayout);
+ TRect naviPaneGraphicsRect = naviPaneGraphicsLayoutRect.Rect();
+
+ TRect barRect( contextPaneRect );
+ if ( barRect.Intersects( naviPaneGraphicsRect ) )
+ {
+ barRect.Intersection( naviPaneGraphicsRect );
+
+ // calculate new origo, relative to context pane.
+ barRect.iTl.iX -= contextPaneRect.iTl.iX;
+ barRect.iTl.iY -= contextPaneRect.iTl.iY;
+ barRect.iBr.iX -= contextPaneRect.iTl.iX;
+ barRect.iBr.iY -= contextPaneRect.iTl.iY;
+ }
+ else
+ {
+ barRect = TRect(0,0,0,0);
+ }
+
// Default drawing if skinning is not available
gc.Clear(rect);
gc.SetPenStyle(CGraphicsContext::ENullPen);
@@ -533,7 +540,19 @@
}
else
{
- TRAP_IGNORE(SetPictureToDefaultL()); // Trapped because of Java midlet issues
+ // Perf optimization: We don't set the default picture if the context
+ // pane is not in current status pane layout. The picture will be
+ // created in SizeChanged() if a valid size is set for context pane,
+ // but at the moment context pane isn't used in any of the supported
+ // Avkon status pane layouts.
+ CEikStatusPaneBase* statusPane = CEikStatusPaneBase::Current();
+ if ( statusPane &&
+ statusPane->PaneCapabilities(
+ TUid::Uid( EEikStatusPaneUidContext ) ).IsInCurrentLayout() )
+ {
+ // Trapped because of Java midlet issues.
+ TRAP_IGNORE( SetPictureToDefaultL() );
+ }
}
}
--- a/uifw/AvKon/src/aknglobalpopupprioritycontroller.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/aknglobalpopupprioritycontroller.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -285,7 +285,10 @@
if (priority >= shownPriority)
{
maxWindowPosition = MinChainWindowPosition(stacked);
- iShownStack.Insert(aPopup, ii); // will not fail because overflow is already checked
+ if (KErrNone != iShownStack.Insert(aPopup, ii))
+ {
+ return EFalse;
+ }
insertPos = ii;
break;
}
--- a/uifw/AvKon/src/aknindicator.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/aknindicator.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2008 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"
@@ -859,8 +859,6 @@
void CAknIndicator::SetSvgIconSize( CFbsBitmap*& aBitmap, TInt aLayoutMode )
{
- TRect rect( Rect() );
-
TInt indicatorUid = iUid;
if (indicatorUid >= EAknNaviPaneEditorIndicatorDynamicUidRangeFirst &&
indicatorUid <= EAknNaviPaneEditorIndicatorDynamicUidRangeLast)
@@ -871,51 +869,7 @@
TSize size(10,10); // default size (every SVG icon needs to be initialized)
TScaleMode aspectRatio = EAspectRatioPreservedAndUnusedSpaceRemoved;
- TRect navipaneRect(0,0,0,0);
- CEikStatusPaneBase* statusPane = CEikStatusPaneBase::Current();
- if (statusPane)
- {
- CCoeControl* control = NULL;
- TRAP_IGNORE(control = statusPane->ControlL(TUid::Uid( EEikStatusPaneUidNavi )));
- if (control)
- {
- navipaneRect.SetSize( control->Size() );
- }
- }
-
- // If navipane is not found, we get portrait normal navipanerect frop laf data which is usually right enough.
- if (navipaneRect.Size() == TSize(0,0))
- {
- TInt battery = 0;
- TRect statusPaneRect;
- AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EStatusPane, statusPaneRect );
-
- if ( AknStatuspaneUtils::IdleLayoutActive() )
- {
- if ( ( iIndicatorContext == CAknIndicatorContainer::EQueryEditorIndicators )
- && ( statusPaneRect.Size() == TSize(0,0) ) )
- {
- battery = 0;
- }
- else
- {
- battery = 1;
- }
- }
-
-
- // Navi pane
- TAknWindowComponentLayout naviPaneLayout( AknLayoutScalable_Avkon::navi_pane(battery) );
- TAknLayoutRect naviPaneLayoutRect;
- naviPaneLayoutRect.LayoutRect(statusPaneRect, naviPaneLayout);
- navipaneRect.SetSize( naviPaneLayoutRect.Rect().Size() );
- }
-
- // Screen
- TRect screenRect;
- AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, screenRect );
-
- switch (indicatorUid)
+ switch ( indicatorUid )
{
// Status pane's indicators
case EAknIndicatorIrActive:
@@ -984,85 +938,16 @@
case EAknIndicatorMecoServiceTab:
case EAknIndicatorIntegratedIM:
{
- // Main pane
- TRect mainPaneRect;
- AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane,
- mainPaneRect );
- // statuspane, usual
- TRect usualStatusPaneRect;
- AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EStatusPane,
- usualStatusPaneRect );
-
- // status indicator pane elements
- TRect statusIndicatorPaneElementsRect;
- AknLayoutUtils::LayoutMetricsRect(
- AknLayoutUtils::EIndicatorPane,
- statusIndicatorPaneElementsRect );
-
- // universal indicator pane (note statuspane as parent)
- TAknLayoutRect universalIndicatorPaneLayoutRect;
- universalIndicatorPaneLayoutRect.LayoutRect(
- usualStatusPaneRect,
- AknLayoutScalable_Avkon::uni_indicator_pane( 0 ) );
- TRect universalIndicatorPaneRect(
- universalIndicatorPaneLayoutRect.Rect() );
-
- // universal indicator pane elements
- TAknLayoutRect universalIndicatorPaneElementsLayoutRect;
- universalIndicatorPaneElementsLayoutRect.LayoutRect(
- universalIndicatorPaneRect,
- AknLayoutScalable_Avkon::uni_indicator_pane_g1() );
- TRect universalIndicatorPaneElementsRect(
- universalIndicatorPaneElementsLayoutRect.Rect() );
-
- if ( aLayoutMode == ELayoutModeUsual )
+ // Portrait extended cases
+ if ( AknStatuspaneUtils::ExtendedLayoutActive() &&
+ AknStatuspaneUtils::IdleLayoutActive() &&
+ !AknStatuspaneUtils::HDLayoutActive() )
{
- size = universalIndicatorPaneElementsRect.Size();
+ aspectRatio = EAspectRatioPreserved;
}
- if ( aLayoutMode == ELayoutModeWide )
- {
- size = statusIndicatorPaneElementsRect.Size();
- }
-
- // Stacon special cases
- if ( AknStatuspaneUtils::StaconPaneActive() &&
- !AknStatuspaneUtils::IdleLayoutActive() &&
- !AknStatuspaneUtils::ExtendedStaconPaneActive())
- {
- size = Size();
- }
- else if ( AknStatuspaneUtils::ExtendedStaconPaneActive() )
- {
- size = Size();
- }
-
- // Flat special cases
- if ( AknStatuspaneUtils::FlatLayoutActive() )
- {
- size = Size();
- }
-
- // Portrait extended cases
- if ( AknStatuspaneUtils::ExtendedLayoutActive() )
- {
- size = Size();
- if ( AknStatuspaneUtils::IdleLayoutActive() &&
- !AknStatuspaneUtils::HDLayoutActive() )
- {
- aspectRatio = EAspectRatioPreserved;
- }
- }
-
- // In landscape idle we use vertical indicators if parent
- // is in vertical mode, otherwise horizontal.
- if ( AknStatuspaneUtils::IdleLayoutActive() &&
- Layout_Meta_Data::IsLandscapeOrientation() &&
- iParent->Size().iWidth < iParent->Size().iHeight )
- {
- size = Size();
- }
+ size = Size();
break;
}
@@ -1162,9 +1047,41 @@
case EAknNaviPaneEditorIndicatorFnKeyLocked:
#endif
{
- TAknWindowComponentLayout l1 = AknLayoutScalable_Avkon::navi_icon_pane(0);
- TAknWindowComponentLayout l2 = AknLayoutScalable_Avkon::navi_icon_pane_g1();
- TAknWindowComponentLayout layout = TAknWindowComponentLayout::Compose( l1, l2 );
+ TRect navipaneRect( 0, 0, 0, 0 );
+ CEikStatusPaneBase* statusPane = CEikStatusPaneBase::Current();
+ if ( statusPane )
+ {
+ CCoeControl* control = NULL;
+ TRAP_IGNORE(
+ control = statusPane->ControlL(
+ TUid::Uid( EEikStatusPaneUidNavi ) ) );
+ if ( control )
+ {
+ navipaneRect.SetSize( control->Size() );
+ }
+ }
+
+ // If navi pane is not found, we get portrait normal navi pane
+ // rect from LAF data which is usually right enough.
+ if ( navipaneRect.IsEmpty() )
+ {
+ TRect statusPaneRect;
+ AknLayoutUtils::LayoutMetricsRect(
+ AknLayoutUtils::EStatusPane, statusPaneRect );
+
+ // Navi pane
+ TAknLayoutRect naviPaneLayoutRect;
+ naviPaneLayoutRect.LayoutRect(
+ statusPaneRect, AknLayoutScalable_Avkon::navi_pane( 6 ) );
+ navipaneRect.SetSize( naviPaneLayoutRect.Rect().Size() );
+ }
+
+ TAknWindowComponentLayout l1(
+ AknLayoutScalable_Avkon::navi_icon_pane( 0 ) );
+ TAknWindowComponentLayout l2(
+ AknLayoutScalable_Avkon::navi_icon_pane_g1() );
+ TAknWindowComponentLayout layout(
+ TAknWindowComponentLayout::Compose( l1, l2 ) );
TAknLayoutRect layoutRect;
layoutRect.LayoutRect( navipaneRect, layout );
@@ -1178,6 +1095,8 @@
case EAknNaviPaneEditorIndicatorWaitBar:
case EAknNaviPaneEditorIndicatorProgressBar:
{
+ TRect rect( Rect() );
+
TAknLayoutRect waitPaneComponentLayoutRect;
waitPaneComponentLayoutRect.LayoutRect(
rect,
@@ -1198,28 +1117,30 @@
case EAknNaviPaneEditorIndicatorWlanActive:
case EAknNaviPaneEditorIndicatorWlanActiveSecure:
{
- // app window
- TAknWindowComponentLayout applicationWindowLayout( AknLayoutScalable_Avkon::application_window(0) );
- TAknLayoutRect applicationWindowLayoutRect;
- applicationWindowLayoutRect.LayoutRect( screenRect, applicationWindowLayout );
- TRect applicationWindowRect( applicationWindowLayoutRect.Rect() );
+ // Screen
+ TRect screenRect;
+ AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen,
+ screenRect );
- // top area
- TAknWindowComponentLayout topAreaLayout( AknLayoutScalable_Avkon::area_top_pane(1) );
+ // top area, skip the application window as it's the same
+ // size as the screen.
TAknLayoutRect topAreaLayoutRect;
- topAreaLayoutRect.LayoutRect( applicationWindowRect, topAreaLayout );
+ topAreaLayoutRect.LayoutRect(
+ screenRect, AknLayoutScalable_Avkon::area_top_pane( 1 ) );
TRect topAreaRect( topAreaLayoutRect.Rect() );
// small statuspane
- TAknWindowComponentLayout smallStatusPaneLayout( AknLayoutScalable_Avkon::status_small_pane() );
TAknLayoutRect smallStatusPaneLayoutRect;
- smallStatusPaneLayoutRect.LayoutRect( topAreaRect, smallStatusPaneLayout );
+ smallStatusPaneLayoutRect.LayoutRect(
+ topAreaRect, AknLayoutScalable_Avkon::status_small_pane() );
TRect smallStatusPaneRect( smallStatusPaneLayoutRect.Rect() );
// icon pane
- TAknWindowComponentLayout iconPaneLayout( AknLayoutScalable_Avkon::status_small_icon_pane() );
TAknLayoutRect iconPaneLayoutRect;
- iconPaneLayoutRect.LayoutRect( smallStatusPaneRect, iconPaneLayout );
+ iconPaneLayoutRect.LayoutRect(
+ smallStatusPaneRect,
+ AknLayoutScalable_Avkon::status_small_icon_pane() );
+
TRect iconPaneRect( iconPaneLayoutRect.Rect() );
size = iconPaneRect.Size();
--- a/uifw/AvKon/src/aknindicatordataobserver.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/aknindicatordataobserver.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -65,7 +65,6 @@
{
iDataSubscriber->RemoveObserver( this );
}
-
}
@@ -77,7 +76,7 @@
void CAknIndicatorDataObserver::HandleUpdateL(
const TAknStatusPaneStateData& aData )
{
- if ( !iDataSubscriber )
+ if ( !iDataSubscriber || !iIndicatorPane->IsVisible() )
{
return;
}
--- a/uifw/AvKon/src/aknlistquerydialog.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/aknlistquerydialog.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -262,17 +262,9 @@
listbox->SetListBoxObserver(this);
CAknListQueryControl* listControl = ListControl();
- if ( listControl )
- {
- listControl->SetLayout( &iLayout );
- }
-
- if ( iAvkonAppUi->IsSingleClickCompatible() &&
- !IsLeftSoftkeyShown() )
- {
- MakeLeftSoftkeyVisible( EFalse );
- }
- }
+ if (listControl)
+ listControl->SetLayout(&iLayout);
+ }
if (FindBox())
{
@@ -469,16 +461,6 @@
iIdle->Start(TCallBack(ClosePopupAcceptingChanges, this));
}
}
-
- if( iAvkonAppUi->IsSingleClickCompatible() &&
- aListBox->IsMultiselection() )
- {
- CEikListBox* listbox = ListBox();
- if( listbox )
- {
- MakeLeftSoftkeyVisible( IsLeftSoftkeyShown() );
- }
- }
}
break;
default:
@@ -583,22 +565,16 @@
}
TInt currentSelection = listbox->CurrentItemIndex();
- TBool isSingleClick = iAvkonAppUi->IsSingleClickCompatible();
- if ( currentSelection == KErrNotFound )
+ if( currentSelection == KErrNotFound )
{
- MakeLeftSoftkeyVisible( EFalse );
+ MakeLeftSoftkeyVisible(EFalse);
}
- else if ( isSingleClick )
+ else
{
- MakeLeftSoftkeyVisible( IsLeftSoftkeyShown() );
+ MakeLeftSoftkeyVisible(ETrue);
}
TKeyResponse response = listbox->OfferKeyEventL( aKeyEvent, aType);
-
- if ( isSingleClick && IsLeftSoftkeyShown() )
- {
- MakeLeftSoftkeyVisible( ETrue );
- }
if (currentSelection != listbox->CurrentItemIndex() && iMediatorObs)
{
iMediatorObs->UpdateL(listbox->CurrentItemIndex());
@@ -766,8 +742,12 @@
}
-EXPORT_C void* CAknListQueryDialog::ExtensionInterface( TUid /*aInterface*/ )
- {
+EXPORT_C void* CAknListQueryDialog::ExtensionInterface( TUid aInterface )
+ {
+ if(aInterface == KExIfTactileFeedbackUid)
+ {
+ return MTouchFeedback::Instance();
+ }
return NULL;
}
@@ -794,18 +774,6 @@
return NULL;
}
-TBool CAknListQueryDialog::IsLeftSoftkeyShown()
- {
- CEikListBox* listbox = ListBox();
- __ASSERT_DEBUG( listbox, Panic(EAknPanicNullPointer));
- // This flag indicators that listbox is a viewer listbox.
- TBool isViewMode = listbox->View()->ItemDrawer()->Flags() &
- CListItemDrawer::EDisableHighlight;
-
- return listbox->IsHighlightEnabled() ||
- listbox->SelectionIndexes()->Count() > 0 || isViewMode;
- }
-
EXPORT_C void CAknListQueryDialog::SetTone(TInt aTone)
{
iTone = (TTone)aTone;
--- a/uifw/AvKon/src/aknlists.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/aknlists.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -3413,9 +3413,7 @@
formattedCellData->SetStretchableGraphicSubCellL(
5,
AknLayoutScalable_Avkon::list_double_graphic_pane_g4( 0 ) ,
- // darios: list_double_graphic_pane_vc_g4 is not defined
- //AknLayoutScalable_Avkon::list_double_graphic_pane_vc_g4( 0 ) );
- AknLayoutScalable_Avkon::list_double_graphic_pane_g4( 0 ) );
+ AknLayoutScalable_Avkon::list_double_graphic_pane_vc_g4( 0 ) );
// On default new cell is always drawn but this cell should NOT be drawn!
--- a/uifw/AvKon/src/aknlongtapanimation.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/aknlongtapanimation.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -367,6 +367,11 @@
{
iExtension->iTimer->Cancel();
iExtension->iFlags &= ~EAnimationStarted;
+ MTouchFeedback* feedback = MTouchFeedback::Instance();
+ if ( feedback )
+ {
+ feedback->StopFeedback( this );
+ }
}
}
--- a/uifw/AvKon/src/aknlongtapdetector.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/aknlongtapdetector.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -254,6 +254,7 @@
{
StopAnimation();
}
+ iState = EWaiting;
}
@@ -321,7 +322,6 @@
&& aEvent.Pointer()->iType == TPointerEvent::EButton1Up ) )
{
Cancel();
- iState = EWaiting;
}
}
--- a/uifw/AvKon/src/aknmessagequerydialog.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/aknmessagequerydialog.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -302,8 +302,11 @@
else
{
// SetLinkTextL creates new callback in the callback array for the new link
- iMsgQueryExtension->iFormatTextArray.Append( aLinkText.AllocL() );
- iMsgQueryExtension->iFormatTypeArray.Append( EMsgQueryLink );
+ HBufC* linkText = aLinkText.AllocL();
+ CleanupStack::PushL( linkText );
+ iMsgQueryExtension->iFormatTextArray.AppendL( linkText );
+ CleanupStack::Pop( linkText );
+ iMsgQueryExtension->iFormatTypeArray.AppendL( EMsgQueryLink );
// If the other method SetLink has been already called
// the new link is finished by adding the link count
@@ -346,7 +349,10 @@
if ( iMsgQueryExtension->iCallBackArray.Count() < iMsgQueryExtension->iLinkCount )
{
// SetLink creates new callback in the callback array for the new link
- iMsgQueryExtension->iCallBackArray.Append( aCallBack );
+ if ( KErrNone != iMsgQueryExtension->iCallBackArray.Append( aCallBack ) )
+ {
+ return;
+ }
}
}
else if ( iMsgQueryExtension->iLinkCount < KMaxLinks )
@@ -359,7 +365,10 @@
else
{
// SetLink creates new callback in the callback array for the new link
- iMsgQueryExtension->iCallBackArray.Append( aCallBack );
+ if ( KErrNone != iMsgQueryExtension->iCallBackArray.Append( aCallBack ) )
+ {
+ return;
+ }
// If the other method SetLinkText has been already called
// the new link is finished by adding the link count
@@ -688,7 +697,7 @@
}
delete messageBuf;
}
- iMsgQueryExtension->iFormatTextLocationArray.Append( linkTextLocation );
+ iMsgQueryExtension->iFormatTextLocationArray.AppendL( linkTextLocation );
return ETrue;
}
--- a/uifw/AvKon/src/aknnavi.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/aknnavi.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -69,7 +69,6 @@
~CAknNavigationControlContainerExtension(){};
public:
- TInt iCurrentColorScheme;
CAknNaviForegroundObserver* iForegroundObserver;
TBool iDestructionOngoing;
CFbsBitmap* iNaviColorBitmap;
@@ -144,7 +143,6 @@
{
iExtension =
new (ELeave) CAknNavigationControlContainerExtension();
- iExtension->iCurrentColorScheme = ColorScheme();
iExtension->iForegroundObserver =
CAknNaviForegroundObserver::NewL( this );
iExtension->iStatusPane = CEikStatusPaneBase::Current();
@@ -1456,17 +1454,12 @@
CCoeControl::HandleResourceChange( aType ) ;
}
- if ( aType == KEikColorResourceChange ||
- aType == KEikDynamicLayoutVariantSwitch ||
+ if ( aType == KEikDynamicLayoutVariantSwitch ||
aType == KAknsMessageSkinChange )
{
- TInt colorScheme = ColorScheme();
- if ( colorScheme != iExtension->iCurrentColorScheme ||
- aType == KEikDynamicLayoutVariantSwitch ||
+ if ( aType == KEikDynamicLayoutVariantSwitch ||
aType == KAknsMessageSkinChange )
{
- iExtension->iCurrentColorScheme = colorScheme;
-
// updating color bitmap
TRAP_IGNORE( LoadNaviColorBitmapL() );
}
@@ -2352,16 +2345,9 @@
TRect screenRect;
AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, screenRect );
- // app window
- TAknLayoutRect applicationWindowLayoutRect;
- applicationWindowLayoutRect.LayoutRect(
- screenRect,
- AknLayoutScalable_Avkon::application_window( 0 ) );
- TRect applicationWindowRect( applicationWindowLayoutRect.Rect() );
-
- // statuspane
+ // statuspane, skip application window because it's the same as screen.
TAknLayoutRect statusPaneLayoutRect;
- statusPaneLayoutRect.LayoutRect( applicationWindowRect,
+ statusPaneLayoutRect.LayoutRect( screenRect,
AknLayoutScalable_Avkon::status_pane( 0 ) );
TRect statusPaneRect( statusPaneLayoutRect.Rect() );
--- a/uifw/AvKon/src/aknnavide.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/aknnavide.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -800,20 +800,6 @@
{
CCoeControl::HandlePointerEventL( aPointerEvent );
}
-
- // feedback is also given on up event from arrows
- if ( rightArrowTapped || leftArrowTapped )
- {
- MTouchFeedback* feedback = MTouchFeedback::Instance();
- if ( feedback &&
- ( iDecoratedControl && !iDecoratedControl->IsDimmed() ) )
- {
- feedback->InstantFeedback( this,
- ETouchFeedbackBasicButton,
- ETouchFeedbackVibra,
- aPointerEvent );
- }
- }
}
else
{
--- a/uifw/AvKon/src/aknsfld.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/aknsfld.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -246,7 +246,7 @@
{
aFieldStyle = EPopupWindow;
}
- iColumnFlag = 0xFFFFFFFF;
+
switch ( aFieldStyle )
{
case EFixed:
@@ -304,7 +304,8 @@
case EAdaptiveSearch:
bitmapId = EMbmAvkonQgn_indi_find_glass;
bitmapMaskId = EMbmAvkonQgn_indi_find_glass_mask;
- SetContainerWindowL( aParent );
+ SetContainerWindowL( aParent );
+ iColumnFlag = 0xFFFFFFFF;
if( AknLayoutUtils::PenEnabled() )
{
iAdaptiveSearch = CAknAdaptiveSearch::NewL( aTextLimit, aFieldStyle );
@@ -322,6 +323,7 @@
bitmapId = EMbmAvkonQgn_indi_find_glass;
bitmapMaskId = EMbmAvkonQgn_indi_find_glass_mask;
CreateWindowL( &aParent );
+ iColumnFlag = 0xFFFFFFFF;
if( AknLayoutUtils::PenEnabled() )
{
iAdaptiveSearch = CAknAdaptiveSearch::NewL( aTextLimit, aFieldStyle );
@@ -340,6 +342,7 @@
bitmapMaskId = EMbmAvkonQgn_indi_find_glass_mask;
flags |= CAknInputFrame::EPopupLayout;
CreateWindowL();
+ iColumnFlag = 0xFFFFFFFF;
iIsPopup = ETrue;
if( AknLayoutUtils::PenEnabled() )
{
@@ -373,6 +376,7 @@
flags |= CAknInputFrame::EPopupWindowLayout;
flags |= CAknInputFrame::EFixedFindWithoutLine;
SetContainerWindowL( aParent );
+ iColumnFlag = 0xFFFFFFFF;
if( AknLayoutUtils::PenEnabled() )
{
iAdaptiveSearch = CAknAdaptiveSearch::NewL( aTextLimit, aFieldStyle );
--- a/uifw/AvKon/src/aknsignal.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/aknsignal.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2008 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"
@@ -303,8 +303,6 @@
iSignalIconControl->SetContainerWindowL( *this );
iSignalStrengthControl->SetContainerWindowL( *this );
- iTicker = CPeriodic::NewL( CActive::EPriorityLow );
-
// Set flags to default values
iPrivateFlags = 0;
@@ -381,10 +379,7 @@
//
void CAknSignalPane::DisableAnimation()
{
- if ( iTicker && iTicker->IsActive() )
- {
- iTicker->Cancel();
- }
+ StopTicker();
}
@@ -404,19 +399,14 @@
iSignalIconControl->SetDrawBlank( EFalse );
- if ( aGprsIconState != EAknSignalGprsIndicatorEstablishingContext &&
- iTicker )
+ if ( aGprsIconState != EAknSignalGprsIndicatorEstablishingContext )
{
- iTicker->Cancel();
+ StopTicker();
}
else if ( aGprsIconState == EAknSignalGprsIndicatorEstablishingContext )
{
- if ( iTicker && !iTicker->IsActive() )
- {
- iTicker->Start( KAknIndicatorAnimationDelay,
- KAknIndicatorAnimationInterval,
- TCallBack( TickerCallback, this ) );
- }
+ TRAP_IGNORE( StartTickerL( KAknIndicatorAnimationDelay,
+ KAknIndicatorAnimationInterval ) );
}
}
}
@@ -769,19 +759,14 @@
iSignalIconControl->SetDrawBlank( EFalse );
- if ( aCommonPacketDataIconState != EAknSignalCommonPacketDataIndicatorEstablishingContext &&
- iTicker )
+ if ( aCommonPacketDataIconState != EAknSignalCommonPacketDataIndicatorEstablishingContext )
{
- iTicker->Cancel();
+ StopTicker();
}
else if ( aCommonPacketDataIconState == EAknSignalCommonPacketDataIndicatorEstablishingContext )
{
- if ( iTicker && !iTicker->IsActive() )
- {
- iTicker->Start( KAknIndicatorAnimationDelay,
- KAknIndicatorAnimationInterval,
- TCallBack( TickerCallback, this ) );
- }
+ TRAP_IGNORE( StartTickerL( KAknIndicatorAnimationDelay,
+ KAknIndicatorAnimationInterval ) );
}
}
}
@@ -803,19 +788,14 @@
iSignalIconControl->SetDrawBlank( EFalse );
- if ( aEdgeIconState != EAknSignalEdgeIndicatorEstablishingContext &&
- iTicker )
+ if ( aEdgeIconState != EAknSignalEdgeIndicatorEstablishingContext )
{
- iTicker->Cancel();
+ StopTicker();
}
else if ( aEdgeIconState == EAknSignalEdgeIndicatorEstablishingContext )
{
- if ( iTicker && !iTicker->IsActive() )
- {
- iTicker->Start( KAknIndicatorAnimationDelay,
- KAknIndicatorAnimationInterval,
- TCallBack( TickerCallback, this ) );
- }
+ TRAP_IGNORE( StartTickerL( KAknIndicatorAnimationDelay,
+ KAknIndicatorAnimationInterval ) );
}
}
}
@@ -837,19 +817,14 @@
iSignalIconControl->SetDrawBlank( EFalse );
- if ( aWcdmaIconState != EAknSignalWcdmaIndicatorEstablishingContext &&
- iTicker )
+ if ( aWcdmaIconState != EAknSignalWcdmaIndicatorEstablishingContext )
{
- iTicker->Cancel();
+ StopTicker();
}
else if ( aWcdmaIconState == EAknSignalWcdmaIndicatorEstablishingContext )
{
- if ( iTicker && !iTicker->IsActive() )
- {
- iTicker->Start( KAknIndicatorAnimationDelay,
- KAknIndicatorAnimationInterval,
- TCallBack( TickerCallback, this ) );
- }
+ TRAP_IGNORE( StartTickerL( KAknIndicatorAnimationDelay,
+ KAknIndicatorAnimationInterval ) );
}
}
}
@@ -871,19 +846,14 @@
iSignalIconControl->SetDrawBlank( EFalse );
- if ( aHsdpaIconState != EAknSignalHsdpaIndicatorEstablishingContext &&
- iTicker )
+ if ( aHsdpaIconState != EAknSignalHsdpaIndicatorEstablishingContext )
{
- iTicker->Cancel();
+ StopTicker();
}
else if ( aHsdpaIconState == EAknSignalHsdpaIndicatorEstablishingContext )
{
- if ( iTicker && !iTicker->IsActive() )
- {
- iTicker->Start( KAknIndicatorAnimationDelay,
- KAknIndicatorAnimationInterval,
- TCallBack( TickerCallback, this ) );
- }
+ TRAP_IGNORE( StartTickerL( KAknIndicatorAnimationDelay,
+ KAknIndicatorAnimationInterval ) );
}
}
}
@@ -909,25 +879,26 @@
// Tick timer is only used when animating.
if ( aCdmaIconState != EAknSignalCdmaIndicatorSending &&
- aCdmaIconState != EAknSignalCdmaIndicatorReceiving &&
- iTicker )
+ aCdmaIconState != EAknSignalCdmaIndicatorReceiving )
{
- iTicker->Cancel();
+ StopTicker();
}
switch ( aCdmaIconState )
{
case EAknSignalCdmaIndicatorSending:
case EAknSignalCdmaIndicatorReceiving:
+ {
if ( iTicker && !iTicker->IsActive() )
{
// restart animation
iExtension->iCdmaAnimationIndex = 0;
- iTicker->Start( KAknIndicatorShortAnimationInterval,
- KAknIndicatorShortAnimationInterval,
- TCallBack( TickerCallback, this ) );
+ TRAP_IGNORE(
+ StartTickerL( KAknIndicatorShortAnimationInterval,
+ KAknIndicatorShortAnimationInterval ) );
}
break;
+ }
default:
break;
}
@@ -1084,4 +1055,42 @@
iSignalState = aIconState;
}
+
+// ---------------------------------------------------------------------------
+// CAknSignalPane::StartTickerL
+// Starts the animation timer.
+// ---------------------------------------------------------------------------
+//
+void CAknSignalPane::StartTickerL( TTimeIntervalMicroSeconds32 aDelay,
+ TTimeIntervalMicroSeconds32 aInterval )
+ {
+ if ( !iTicker )
+ {
+ iTicker = CPeriodic::NewL( CActive::EPriorityLow );
+ }
+
+ if ( iTicker && !iTicker->IsActive() )
+ {
+ iTicker->Start( aDelay,
+ aInterval,
+ TCallBack( TickerCallback, this ) );
+ }
+ }
+
+
+// ---------------------------------------------------------------------------
+// CAknSignalPane::StopTicker
+// Stops the animation timer.
+// ---------------------------------------------------------------------------
+//
+void CAknSignalPane::StopTicker()
+ {
+ if ( iTicker )
+ {
+ iTicker->Cancel();
+ delete iTicker;
+ iTicker = NULL;
+ }
+ }
+
// End of File
--- a/uifw/AvKon/src/aknstatuspanedatapublisher.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/aknstatuspanedatapublisher.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -302,7 +302,10 @@
{
if( iStatusPaneStateData->iProcessList.Find( aClientId ) == KErrNotFound )
{
- iStatusPaneStateData->iProcessList.Append( aClientId );
+ if ( KErrNone != iStatusPaneStateData->iProcessList.Append( aClientId ) )
+ {
+ return;
+ }
}
}
else
--- a/uifw/AvKon/src/aknutils.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/aknutils.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -530,11 +530,11 @@
_AKNDEBUG(
if ( aListBox )
{
- _AKNTRACE( "[%s][%s] ListBox Rect iTl: %d,%d; iBr: %d,%d",
- "AknFind", __FUNCTION__,
- aParentControl->Rect().iTl.iX, aParentControl->Rect().iTl.iY,
- aParentControl->Rect().iBr.iX, aParentControl->Rect().iBr.iY
- );
+ _AKNTRACE( "[%s][%s] ListBox Rect iTl: %d,%d; iBr: %d,%d",
+ "AknFind", __FUNCTION__,
+ aParentControl->Rect().iTl.iX, aParentControl->Rect().iTl.iY,
+ aParentControl->Rect().iBr.iX, aParentControl->Rect().iBr.iY
+ );
}
);
_AKNTRACE_FUNC_EXIT;
@@ -621,7 +621,7 @@
AknLayoutUtils::LayoutControl(aListBox, aParentControl->Rect(), tempListArea);
_AKNDEBUG(
- if ( aListBox )
+ if ( aListBox )
{
_AKNTRACE( "[%s][%s] ListBox Rect iTl: %d,%d; iBr: %d,%d",
"AknFind", __FUNCTION__,
@@ -629,7 +629,7 @@
aListBox->Rect().iBr.iX, aListBox->Rect().iBr.iY
);
}
- );
+ );
if ( aListBox )
{
aListBox->DrawNow();
@@ -762,7 +762,7 @@
*
* @since 5.0
* @return @c ETrue If it is accent from Vietnamese language, otherwise EFalse.
- */
+ */
inline TBool IsVietnameseSpecialCharacter( TChar aCh )
{
if ( ( aCh >= 0x0300 && aCh <= 0x0303 ) || aCh == 0x0306 ||
@@ -779,10 +779,10 @@
inline TBool IsThaiSpecialCharacter( TChar aCh )
{
if( ( aCh > 0xE46 && aCh < 0xE4F ) || aCh == 0xE3A )
- {
- return ETrue;
- }
- return EFalse;
+ {
+ return ETrue;
+ }
+ return EFalse;
}
// ---------------------------------------------------------------------------
@@ -790,25 +790,25 @@
// ---------------------------------------------------------------------------
//
EXPORT_C TBool AknFind::IsAdaptiveFindMatch( const TDesC& aItemText,
- const TDesC& aSearchText,
- HBufC*& aNextChars )
- {
- HBufC16* searchText( NULL );
- TRAPD( error, searchText = HBufC16::NewL( KMatchingBufferLength ) );
- if ( error == KErrNone )
- {
- TInt itemStringLength = aItemText.Length();
+ const TDesC& aSearchText,
+ HBufC*& aNextChars )
+ {
+ HBufC16* searchText( NULL );
+ TRAPD( error, searchText = HBufC16::NewL( KMatchingBufferLength ) );
+ if ( error == KErrNone )
+ {
+ TInt itemStringLength = aItemText.Length();
TInt searchTextLength = aSearchText.Length();
if ( searchTextLength < KMatchingBufferLength )
- {
- searchText->Des().Append( aSearchText );
- }
+ {
+ searchText->Des().Append( aSearchText );
+ }
else
- {
- searchText->Des().Append( aSearchText.Left(KMatchingBufferLength-1) );
- }
-
+ {
+ searchText->Des().Append( aSearchText.Left(KMatchingBufferLength-1) );
+ }
+
searchText->Des().Append( KLitStar );
TInt all_result = KErrNotFound;
@@ -821,34 +821,34 @@
if( result != KErrNotFound )
{
all_result = result;
- if( i < (itemStringLength-searchTextLength) )
+ if( i < (itemStringLength-searchTextLength) )
{
- if( !(IsThaiSpecialCharacter(aItemText[i+searchTextLength])) && !(IsVietnameseSpecialCharacter( aItemText[i+searchTextLength]) ))
+ if( !(IsThaiSpecialCharacter(aItemText[i+searchTextLength])) && !(IsVietnameseSpecialCharacter( aItemText[i+searchTextLength]) ))
{
TRAP_IGNORE( UpdateNextCharsL( aNextChars, aItemText[i+searchTextLength]) );
}
}
- }
+ }
} // if (i==0 ..)
- } // for
-
- if( all_result != KErrNotFound )
+ } // for
+
+ if( all_result != KErrNotFound )
{
delete searchText;
return ETrue;
- }
+ }
else
{
delete searchText;
return EFalse;
}
-
+
} // if (error == KErrNone)
delete searchText;
return EFalse;
- }
-
+ }
+
/**
* For Devanagari AS
@@ -978,41 +978,78 @@
return ( aCh == 0x094D );
}
+static void SortCharsForAdaptiveSearchL( TPtr &aChars )
+ {
+ const TInt KDefaultArraySize = 10;// the default length of for sort
+ CDesCArray* arrayFlat = new ( ELeave ) CDesCArrayFlat( KDefaultArraySize );
+ CleanupStack::PushL( arrayFlat );
+
+ TInt length = aChars.Length();
+ TInt arrayCount( 0 );
+
+ for( TInt i = 0; i < length; i++ )
+ {
+ // the "IndicHalant" Chars occupys two spaces.
+ if ( ( i < length-2 ) && IsIndicHalantChar( aChars[i+1] ) )
+ {
+ arrayFlat->AppendL( aChars.Mid( i, 3 ) );
+ // One "IndicHalant" character occupys two spaces
+ i+=2;
+ ++arrayCount;
+ }
+ else
+ {
+ arrayFlat->AppendL( aChars.Mid( i, 1 ) );
+ ++arrayCount;
+ }
+ }
+
+ // Alphabetical sort
+ arrayFlat->Sort( ECmpCollated );
+ aChars.Delete( 0, aChars.Length() );
+
+ for( TInt i = 0; i < arrayCount; i++ )
+ {
+ aChars.Append( arrayFlat->MdcaPoint( i ) );
+ }
+ CleanupStack::PopAndDestroy( arrayFlat );
+ }
+
// ---------------------------------------------------------------------------
// For Devanagari AS
// AknFind::UpdateNextCharsL
// ---------------------------------------------------------------------------
//
void AknFind::UpdateNextCharsL( HBufC*& aNextChars, const TDesC& aItemString )
- {
- _AKNTRACE_FUNC_ENTER;
- TChar searchChar = aItemString[0];
- //Check if this is an Indic special ligature
- if ( IsIndicConsonant(searchChar) && aItemString.Length() > 2
- && IsSpecialIndicLigature(aItemString)
- && KErrNotFound == (*aNextChars).Find(aItemString.Mid(0,3)) )
- {
- //Check if we have enough space for 3 more characters
- if( aNextChars->Des().Length() >= aNextChars->Des().MaxLength()-3 )
- {
- aNextChars = aNextChars->ReAllocL( aNextChars->Des().MaxLength()+10 );
- TInt length1 = aNextChars->Des().Length();
- TInt maxlength1 = aNextChars->Des().MaxLength();
- }
- aNextChars->Des().Append( aItemString.Mid(0,3) );
- }
- else
- {
- if ( !IsValidCharForASGrid(searchChar) )
- {
- return;
- }
- //check if this is an Indic combined Char
- if ( IsIndicCombinedChar(searchChar) )
- {
- searchChar = RemoveIndicNukta( searchChar );
- }
- //Now update the nextChars string
+ {
+ _AKNTRACE_FUNC_ENTER;
+ TChar searchChar = aItemString[0];
+ //Check if this is an Indic special ligature
+ if ( IsIndicConsonant(searchChar) && aItemString.Length() > 2
+ && IsSpecialIndicLigature(aItemString)
+ && KErrNotFound == (*aNextChars).Find(aItemString.Mid(0,3)) )
+ {
+ //Check if we have enough space for 3 more characters
+ if( aNextChars->Des().Length() >= aNextChars->Des().MaxLength()-3 )
+ {
+ aNextChars = aNextChars->ReAllocL( aNextChars->Des().MaxLength()+10 );
+ TInt length1 = aNextChars->Des().Length();
+ TInt maxlength1 = aNextChars->Des().MaxLength();
+ }
+ aNextChars->Des().Append( aItemString.Mid(0,3) );
+ }
+ else
+ {
+ if ( !IsValidCharForASGrid(searchChar) )
+ {
+ return;
+ }
+ //check if this is an Indic combined Char
+ if ( IsIndicCombinedChar(searchChar) )
+ {
+ searchChar = RemoveIndicNukta( searchChar );
+ }
+ //Now update the nextChars string
TInt strLength = aNextChars->Length();
for ( TInt i(0); i < strLength ; ++i )
{
@@ -1037,9 +1074,9 @@
aNextChars = aNextChars->ReAllocL( aNextChars->Des().MaxLength()+10 );
}
aNextChars->Des().Append( searchChar );
- }
- _AKNTRACE_FUNC_EXIT;
- }
+ }
+ _AKNTRACE_FUNC_EXIT;
+ }
// -----------------------------------------------------------------------------
// AknFind::UpdateNextCharsL
@@ -1068,25 +1105,25 @@
// ---------------------------------------------------------------------------
//
EXPORT_C void AknFind::UpdateNextCharsFromString( HBufC*& aNextChars, const TDesC& aItemString )
- {
- TInt itemStringLength = aItemString.Length();
-
- for( TInt i = 0; i < itemStringLength; i++ )
- {
- if ( i == 0 || IsFindWordSeparator( aItemString[i-1] ) )
- {
- // If Indic letter
- if ( aItemString[i] >= 0x0900 && aItemString[i] <= 0x0980 )
- {
- TRAP_IGNORE( UpdateNextCharsL( aNextChars, aItemString.Mid(i) ) );
- }
- else if (!(IsVietnameseSpecialCharacter( aItemString[i])))
- {
- TRAP_IGNORE( UpdateNextCharsL( aNextChars, aItemString[i] ) );
- }
- }
- }
- }
+ {
+ TInt itemStringLength = aItemString.Length();
+
+ for( TInt i = 0; i < itemStringLength; i++ )
+ {
+ if ( i == 0 || IsFindWordSeparator( aItemString[i-1] ) )
+ {
+ // If Indic letter
+ if ( aItemString[i] >= 0x0900 && aItemString[i] <= 0x0980 )
+ {
+ TRAP_IGNORE( UpdateNextCharsL( aNextChars, aItemString.Mid(i) ) );
+ }
+ else if (!(IsVietnameseSpecialCharacter( aItemString[i])))
+ {
+ TRAP_IGNORE( UpdateNextCharsL( aNextChars, aItemString[i] ) );
+ }
+ }
+ }
+ }
// ---------------------------------------------------------------------------
// UpdateItemTextAccordingToFlag
@@ -1468,6 +1505,10 @@
}
ptr_temptext.Zero();
}
+
+ TPtr nextChars = iExtension->iNextChars->Des();
+ SortCharsForAdaptiveSearchL( nextChars );
+
iSearchField->SetAdaptiveGridChars( *(iExtension->iNextChars) );
CleanupStack::PopAndDestroy ( temptext );
}
@@ -1773,7 +1814,6 @@
FetchSelectionIndexesFromListBoxL();
}
-
void CAknListBoxFilterItems::NoCriteriaL(TBool aUpdateAS)
{
if (iDisableChangesToShownIndexes) return;
@@ -1820,36 +1860,7 @@
if( aUpdateAS )
{
TPtr nextChars = iExtension->iNextChars->Des();
- CDesCArray* array = new (ELeave) CDesCArrayFlat(10);
- CleanupStack::PushL(array);
-
- TInt length = nextChars.Length();
- TInt count(0);
-
- for( TInt i = 0; i < length; i++ )
- {
- if ( (i < length-2) && IsIndicHalantChar( nextChars[i+1] ) )
- {
- array->AppendL( nextChars.Mid(i,3) );
- i+=2;
- ++count;
- }
- else
- {
- array->AppendL( nextChars.Mid(i,1) );
- ++count;
- }
- }
-
- // Alphabetical sort
- array->Sort( ECmpCollated );
- nextChars.Delete( 0, nextChars.Length() );
-
- for( TInt i = 0; i < count; i++ )
- {
- nextChars.Append(array->MdcaPoint(i));
- }
- CleanupStack::PopAndDestroy(array);
+ SortCharsForAdaptiveSearchL( nextChars );
iSearchField->SetAdaptiveGridChars( *(iExtension->iNextChars) );
}
@@ -1885,17 +1896,14 @@
// an index to end of array
TInt indexEnd = iShownIndexes->Count();
-
- TBitFlags32 columnFlag = iSearchField->ListColumnFilterFlags();
- HBufC16* temptext = HBufC16::NewL( KMatchingBufferLength );
- CleanupStack::PushL( temptext );
- TPtr ptr_temptext( temptext->Des() );
-
// If adaptive search manage with next characters
if( iSearchField && IsAdaptiveSearch() )
{
ClearNextChars();
-
+ TBitFlags32 columnFlag = iSearchField->ListColumnFilterFlags();
+ HBufC16* temptext = HBufC16::NewL( KMatchingBufferLength );
+ CleanupStack::PushL( temptext );
+ TPtr ptr_temptext( temptext->Des() );
for ( TInt i = iShownIndexes->Count()-1; i>=0; i-- )
{
TInt realindex = iShownIndexes->At( i );
@@ -1916,49 +1924,18 @@
}
TPtr nextChars = iExtension->iNextChars->Des();
- CDesCArray* array = new (ELeave) CDesCArrayFlat(10);
- CleanupStack::PushL(array);
-
- TInt length = nextChars.Length();
- TInt count(0);
-
- for( TInt i = 0; i < length; i++ )
- {
- if ( (i < length-2) && IsIndicHalantChar( nextChars[i+1] ) )
- {
- array->AppendL( nextChars.Mid(i,3) );
- i+=2;
- ++count;
- }
- else
- {
- array->AppendL( nextChars.Mid(i,1) );
- ++count;
- }
- }
-
- // Alphabetical sort
- array->Sort( ECmpCollated );
- nextChars.Delete( 0, nextChars.Length() );
-
- for( TInt i = 0; i < count; i++ )
- {
- nextChars.Append(array->MdcaPoint(i));
- }
- CleanupStack::PopAndDestroy(array);
+ SortCharsForAdaptiveSearchL( nextChars );
iSearchField->SetAdaptiveGridChars( *(iExtension->iNextChars) );
+ CleanupStack::PopAndDestroy( temptext );
}
else
{
for (TInt i = iShownIndexes->Count()-1; i>=0 ; i--)
{
-
- TInt realindex = iShownIndexes->At( i );
- TPtrC itemtext = arr->ItemTextArray()->MdcaPoint( realindex );
- AknFind::UpdateItemTextAccordingToFlag( itemtext, columnFlag, ptr_temptext );
- TBool isItemVisible = IsItemVisible( ptr_temptext, aCriteria );
-
+ TInt realindex = iShownIndexes->At(i);
+ TPtrC itemtext = array->MdcaPoint(realindex);
+ TBool isItemVisible = IsItemVisible(itemtext, aCriteria);
TBool isItemSelected = IsItemSelected(realindex);
// EAJA-7SK9UC set indexToSet as current index when found item
if ( isItemVisible )
@@ -1969,10 +1946,8 @@
{
iShownIndexes->Delete(i);
}
- ptr_temptext.Zero();
}
- }
- CleanupStack::PopAndDestroy( temptext );
+ }
InstallEmptyTextL();
// Set highlight to the first match item in markable list
@@ -1982,6 +1957,7 @@
}
}
+
void CAknListBoxFilterItems::ReleaseCriteriaL( const TDesC &aCriteria )
{
if ( iDisableChangesToShownIndexes )
@@ -1992,19 +1968,17 @@
// An index to set highlight after find pane updating
TInt indexToSet = KInvalidIndex;
iShownIndexes->Reset();
-
- const MDesCArray *array = iModel->MatchableTextArray();
- const CAknFilteredTextListBoxModel* arr = (CAknFilteredTextListBoxModel*)( iModel->MatchableTextArray() );
- TInt count = array->MdcaCount();
- TBitFlags32 columnFlag = iSearchField->ListColumnFilterFlags();
- HBufC16* temptext = HBufC16::NewL( KMatchingBufferLength );
- CleanupStack::PushL( temptext );
- TPtr ptr_temptext( temptext->Des() );
-
// If adaptive search field
if( iSearchField && IsAdaptiveSearch() )
{
ClearNextChars();
+ TBitFlags32 columnFlag = iSearchField->ListColumnFilterFlags();
+ HBufC16* temptext = HBufC16::NewL( KMatchingBufferLength );
+ CleanupStack::PushL( temptext );
+ TPtr ptr_temptext( temptext->Des() );
+ const MDesCArray *array = iModel->MatchableTextArray();
+ const CAknFilteredTextListBoxModel* arr = (CAknFilteredTextListBoxModel*)(iModel->MatchableTextArray());
+ TInt count = array->MdcaCount();
for (TInt i = 0; i < count; i++)
{
@@ -2021,13 +1995,19 @@
iShownIndexes->AppendL(i);
}
ptr_temptext.Zero();
- }
+ }
+
+ TPtr nextChars = iExtension->iNextChars->Des();
+ SortCharsForAdaptiveSearchL( nextChars );
+
iSearchField->SetAdaptiveGridChars( *(iExtension->iNextChars) );
InstallEmptyTextL();
+ CleanupStack::PopAndDestroy( temptext );
}
else
{
-
+ const MDesCArray *array = iModel->MatchableTextArray();
+ TInt count = array->MdcaCount();
TInt i;
if ( aCriteria.Length() == 0)
@@ -2047,10 +2027,8 @@
{
for( i = 0; i < count ; i++ )
{
-
- TPtrC itemtext = arr->ItemTextArray()->MdcaPoint( i );
- AknFind::UpdateItemTextAccordingToFlag( itemtext, columnFlag, ptr_temptext );
- TBool isItemVisible = IsItemVisible( temptext->Des(), aCriteria );
+ TPtrC itemtext = array->MdcaPoint(i);
+ TBool isItemVisible = IsItemVisible(itemtext, aCriteria);
// Find first match item to set highlight
if ((indexToSet == KInvalidIndex) && isItemVisible)
@@ -2061,12 +2039,10 @@
{
iShownIndexes->AppendL(i);
}
- ptr_temptext.Zero();
}
InstallEmptyTextL();
}
}
- CleanupStack::PopAndDestroy( temptext );
// Set highlight to the first match item in markable list
if ( iListBox && indexToSet != KInvalidIndex )
@@ -4849,7 +4825,7 @@
{
if ( aControl && aControl->FindBackground() )
{
- DrawEmptyListImpl_real( aRect, aGc, text, NULL, ETrue);
+ DrawEmptyListImpl_real( aRect, aGc, text, NULL, ETrue);
return;
}
--- a/uifw/AvKon/src/aknview.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/aknview.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -44,6 +44,7 @@
#endif // RD_SCALABLE_UI_V2
#include <AknUtils.h>
+#include <layoutmetadata.cdl.h>
#include "aknitemactionmenuregister.h"
// MODULE DATA STRUCTURES
@@ -54,6 +55,8 @@
// CLASS DECLARATION
+static const TUid KUidGlxApp = { 0x200009ee }; // App uid of photo
+static const TUid KUidVideoApp = { 0x200159b2 }; // App uid of video
/**
* Extension class.
@@ -601,8 +604,6 @@
DoDeactivate();
- AknItemActionMenuRegister::RemoveConstructingMenuBarOwner( this );
-
if ( iCba )
{
iCba->MakeVisible( EFalse );
@@ -858,11 +859,20 @@
}
}
- if ( iCba )
- {
- if ( aVisible )
- {
- iCba->DrawableWindow()->SetOrdinalPosition( 0 );
+ if (iCba)
+ {
+ if (aVisible)
+ {
+ //Added for fixing EAMI-856GRV and ESLM-85ZHQH:
+ //As video app and photo app spend a long time at deactiveview,during this time only cba shows up,and this is ugly in landscape mode
+ //so the solution is to don't call SetOrdinalPosition in video app and photo app while in landscape mode
+ TUid appid = iAppUi->Application()->AppDllUid();
+ if (!(( appid == KUidVideoApp || appid == KUidGlxApp )
+ && Layout_Meta_Data::IsLandscapeOrientation()))
+ {
+ iCba->DrawableWindow()->SetOrdinalPosition( 0 );
+ }
+
iCba->MakeVisible( ETrue );
iCba->DrawNow(); // This is needed because problems if TRANSPARENCY is set, see MTVN-6HXCN4
}
--- a/uifw/AvKon/src/eikfrlb.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/eikfrlb.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -827,11 +827,11 @@
TInt lastPotentialItemIndex =
Min( numberOfItems,
- iTopItemIndex + NumberOfItemsThatFitInRect( iViewRect ) );
+ iTopItemIndex + NumberOfItemsThatFitInRect( iViewRect ) - 1 ) ;
gc->SetClippingRect( iViewRect );
- while ( i < lastPotentialItemIndex )
+ while ( i <= lastPotentialItemIndex )
{
DrawItem( i++ );
}
--- a/uifw/AvKon/src/eikfrlbd.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/src/eikfrlbd.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -59,6 +59,10 @@
// colored tick marks support
const TInt KColorIconFlag = -1;
const TInt KColorIconIdx = 0;
+
+// Number of icons in marking mode icon array
+const TInt KMarkingModeIconArraySize = 2;
+
// smiley text place holder
_LIT( KPlaceHolder, "\xFFF0i" );
@@ -1329,7 +1333,8 @@
{
if ( !iMarkingIconArray )
{
- iMarkingIconArray = new ( ELeave ) CAknIconArray( 2 );
+ iMarkingIconArray = new ( ELeave ) CAknIconArray(
+ KMarkingModeIconArraySize );
}
else
{
@@ -2477,45 +2482,7 @@
__ASSERT_DEBUG( iExtension, Panic( EAknPanicNullPointer ));
TRect textRect(aItemRect);
-
- CEikListBox* listbox = static_cast<CEikListBox*>( Control() );
-
- if ( listbox->View()->ItemDrawer()->Flags()
- & CListItemDrawer::EMarkingModeEnabled
- && iExtension->iMarkingIconArray
- && iExtension->iMarkingIconArray->Count() == 2 )
- {
- textRect.iTl.iX +=
- AknLayoutScalable_Avkon::list_double_graphic_pane_t1( 0 ).LayoutLine().il;
-
- TAknLayoutRect layoutRect;
- layoutRect.LayoutRect( aItemRect,
- AknLayoutScalable_Avkon::list_double_graphic_pane_g1( 0 ) );
-
- CGulIcon* icon = (*iExtension->iMarkingIconArray)[1]; // unchecked
-
- if ( listbox->View()->ItemIsSelected(
- iExtension->iCurrentlyDrawnItemIndex ) )
- {
- icon = (*iExtension->iMarkingIconArray)[0];
- }
-
- CFbsBitmap* bitmap = icon->Bitmap();
-
- if ( bitmap )
- {
- TSize size( bitmap->SizeInPixels() ); // set size if not already
- TSize targetSize( layoutRect.Rect().Size() );
-
- if ( size.iWidth != targetSize.iWidth && size.iHeight != targetSize.iHeight )
- {
- AknIconUtils::SetSize( bitmap, targetSize,
- EAspectRatioPreservedAndUnusedSpaceRemoved );
- }
-
- aGc.BitBltMasked( layoutRect.Rect().iTl, bitmap, TRect( layoutRect.Rect().Size() ), icon->Mask(), EFalse );
- }
- }
+ DrawMarkingModeIcons( aProperties, aGc, textRect );
const TColors *subcellColors = &aColors;
@@ -2878,6 +2845,76 @@
_AKNTRACE_FUNC_EXIT;
}
+// -----------------------------------------------------------------------------
+// CFormattedCellListBoxData::DrawMarkingModeIcons
+// -----------------------------------------------------------------------------
+//
+void CFormattedCellListBoxData::DrawMarkingModeIcons(
+ TListItemProperties& aProperties,
+ CWindowGc& aGc,
+ TRect& aItemRect ) const
+ {
+ CEikListBox* listbox = static_cast<CEikListBox*>( Control() );
+ TRect textRect( aItemRect );
+
+ if ( listbox->View()->ItemDrawer()->Flags()
+ & CListItemDrawer::EMarkingModeEnabled
+ && !aProperties.IsSelectionHidden()
+ && iExtension->iMarkingIconArray
+#ifdef RD_TOUCH2_MARKING
+ && iExtension->iMarkingIconArray->Count()
+ == KMarkingModeIconArraySize )
+#else
+ && iExtension->iMarkingIconArray->Count() == 2 )
+#endif // RD_TOUCH2_MARKING
+ {
+ if ( AknLayoutUtils::LayoutMirrored() )
+ {
+ textRect.iBr.iX -=
+ AknLayoutScalable_Avkon::list_double_graphic_pane_t1(
+ 0 ).LayoutLine().ir;
+ }
+ else
+ {
+ textRect.iTl.iX +=
+ AknLayoutScalable_Avkon::list_double_graphic_pane_t1(
+ 0 ).LayoutLine().il;
+ }
+
+ TAknLayoutRect layoutRect;
+ layoutRect.LayoutRect( aItemRect,
+ AknLayoutScalable_Avkon::list_double_graphic_pane_g1( 0 ) );
+
+ // unchecked icon
+ CGulIcon* icon = ( *iExtension->iMarkingIconArray )[1];
+
+ if ( listbox->View()->ItemIsSelected(
+ iExtension->iCurrentlyDrawnItemIndex ) )
+ {
+ icon = ( *iExtension->iMarkingIconArray )[0];
+ }
+
+ CFbsBitmap* bitmap = icon->Bitmap();
+
+ if ( bitmap )
+ {
+ TSize size( bitmap->SizeInPixels() ); // set size if not already
+ TSize targetSize( layoutRect.Rect().Size() );
+
+ if ( size.iWidth != targetSize.iWidth &&
+ size.iHeight != targetSize.iHeight )
+ {
+ AknIconUtils::SetSize( bitmap, targetSize,
+ EAspectRatioPreservedAndUnusedSpaceRemoved );
+ }
+ aGc.BitBltMasked( layoutRect.Rect().iTl,
+ bitmap,
+ TRect( layoutRect.Rect().Size() ),
+ icon->Mask(), EFalse );
+ }
+ aItemRect = textRect;
+ }
+ }
EXPORT_C
CFormattedCellListBoxData::CFormattedCellListBoxData()
@@ -4198,49 +4235,8 @@
CEikListBox* listbox = static_cast<CEikListBox*>( Control() );
- if ( listbox->View()->ItemDrawer()->Flags()
- & CListItemDrawer::EMarkingModeEnabled &&
- iExtension->iMarkingIconArray &&
- iExtension->iMarkingIconArray->Count() == 2 )
- {
- itemRect.iTl.iX +=
- AknLayoutScalable_Avkon::list_double_graphic_pane_t1( 0 ).LayoutLine().il;
-
- TAknLayoutRect layoutRect;
- layoutRect.LayoutRect(
- aItemRect,
- AknLayoutScalable_Avkon::list_double_graphic_pane_g1( 0 ) );
- TRect iconRect( layoutRect.Rect() );
-
- CGulIcon* icon = (*iExtension->iMarkingIconArray)[1]; // unchecked
-
- if ( listbox->View()->ItemIsSelected(
- iExtension->iCurrentlyDrawnItemIndex ) )
- {
- icon = (*iExtension->iMarkingIconArray)[0];
- }
-
- CFbsBitmap* bitmap = icon->Bitmap();
-
- if ( bitmap )
- {
- TSize size( bitmap->SizeInPixels() ); // set size if not already
- TSize targetSize( layoutRect.Rect().Size() );
-
- if ( size.iWidth != targetSize.iWidth &&
- size.iHeight != targetSize.iHeight )
- {
- AknIconUtils::SetSize( bitmap, targetSize,
- EAspectRatioPreservedAndUnusedSpaceRemoved );
- }
-
- aGc.BitBltMasked( iconRect.iTl,
- bitmap,
- TRect( iconRect.Size() ),
- icon->Mask(),
- EFalse );
- }
- }
+ DrawMarkingModeIcons( aProperties, aGc, itemRect );
+ TInt iconOffset = aItemRect.Width() - itemRect.Width();
const TColors* subcellColors = &aColors;
@@ -4348,6 +4344,7 @@
}
TRect bRect = TRect(sc->iPosition,sc->iSize);
+ bRect.iBr.iX -= iconOffset;
TMargins m = sc->iMargin;
TRect cRect = TRect(bRect.iTl+TSize(m.iLeft,m.iTop),bRect.Size()-TSize(m.iRight+m.iLeft,m.iBottom+m.iTop));
const TBool istrans = sc->iTransparent;
@@ -4438,6 +4435,7 @@
if ( layoutMirrored )
{
TRect bRect( sc->iPosition, sc->iSize );
+ bRect.iBr.iX -= iconOffset;
TRect cRect2( bRect.iTl + TSize( m.iLeft, m.iTop ),
bRect.Size() - TSize( m.iRight + m.iLeft,
m.iBottom + m.iTop ) );
--- a/uifw/AvKon/srcdata/avkon.rss Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/srcdata/avkon.rss Tue Jul 13 11:29:56 2010 +0100
@@ -10034,6 +10034,11 @@
{
AVKON_SCT_NAVI_BUTTON
{
+ id = EAknSctTableNaviExit;
+ button = r_avkon_sct_navi_table_exit_button;
+ },
+ AVKON_SCT_NAVI_BUTTON
+ {
id = EAknSctPageNaviPrevPage;
button = r_avkon_sct_navi_prev_page_button;
},
@@ -10041,6 +10046,16 @@
{
id = EAknSctPageNaviNextPage;
button = r_avkon_sct_navi_next_page_button;
+ },
+ AVKON_SCT_NAVI_BUTTON
+ {
+ id = EAknSctTableNaviSpecialChar;
+ button = r_avkon_sct_navi_table_special_char_button;
+ },
+ AVKON_SCT_NAVI_BUTTON
+ {
+ id = EAknSctTableNaviEmotion;
+ button = r_avkon_sct_navi_table_emotion_button;
}
};
}
--- a/uifw/AvKon/srcdata/smiley.rss Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/srcdata/smiley.rss Tue Jul 13 11:29:56 2010 +0100
@@ -159,7 +159,7 @@
{
code = EAknSmileyIconIrritated;
smileyIconId = EMbmSmileyQgn_indi_smiley_irritated;
- strings = ":X :-X";
+ strings = ":X :x :-X :-x";
},
SMILEY_ICON_ITEM
{
@@ -201,7 +201,7 @@
{
code = EAknSmileyIconNerd;
smileyIconId = EMbmSmileyQgn_indi_smiley_nerd;
- strings = "8-)";
+ strings = "8) 8-)";
},
SMILEY_ICON_ITEM
{
@@ -217,7 +217,7 @@
code = EAknSmileyAnimCoffee;
smileyIconId = EMbmSmileyQgn_indi_smiley_anim_coffee;
smileyStaticIconId = EMbmSmileyQgn_indi_smiley_coffee;
- strings = "c[_]";
+ strings = "c[_] C[_]";
},
SMILEY_ICON_ITEM
{
@@ -305,7 +305,7 @@
code = EAknSmileyAnimSilly;
smileyIconId = EMbmSmileyQgn_indi_smiley_anim_silly;
smileyStaticIconId = EMbmSmileyQgn_indi_smiley_silly;
- strings = "8P 8p 8-P 8-p";
+ strings = "8-P 8-p";
},
SMILEY_ICON_ITEM
{
--- a/uifw/AvKon/tsrc/bc/S60_SDK3.0/bctestbuttons/src/bctestbuttonscase.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/S60_SDK3.0/bctestbuttons/src/bctestbuttonscase.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -286,6 +286,7 @@
buttonGroupContainer4->DimCommand( commandId, dimmed );
_LIT( KDimCommand, "DimCommand test" );
AssertTrueL( ETrue, KDimCommand );
+ buttonGroupContainer4->DimCommand( commandId, EFalse );
TBool isCommandDimmed = buttonGroupContainer4->IsCommandDimmed( commandId );
_LIT( KIsCommandDimmed, "IsCommandDimmed test" );
--- a/uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/group/bctestmixmcl.mmp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/group/bctestmixmcl.mmp Tue Jul 13 11:29:56 2010 +0100
@@ -82,6 +82,7 @@
LIBRARY AknSkinSrv.lib
LIBRARY aknphysics.lib
LIBRARY bitgdi.lib
+LIBRARY eikcoctl.lib
START RESOURCE ../group/bctestmixmcl_reg.rss
--- a/uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/inc/bctestmixmclgeneralcase.h Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/inc/bctestmixmclgeneralcase.h Tue Jul 13 11:29:56 2010 +0100
@@ -161,13 +161,17 @@
/*
* Tests ItemFinder.
*/
- void TestItemFinder();
+ void TestItemFinderL();
/**
* Tests FindItemDialog.
*/
- void TestFindItemDialog();
+ void TestFindItemDialogL();
+ /**
+ * Tests button component API.
+ */
+ void TestAknButtonEnableFeedbackL();
protected: // From base class MAknPhysicsObserver
--- a/uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/src/bctestmixmclgeneralcase.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/src/bctestmixmclgeneralcase.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -36,6 +36,7 @@
#include <ItemFinder.h>
#include <finditemdialog.h>
#include <aknphysics.h>
+#include <aknbutton.h>
#include "bctestmixmclgeneralcase.h"
#include "bctestmixmclcontainer.h"
@@ -131,14 +132,15 @@
TestAknListUtilsL();
TestRadioButtonSettingPageL();
TestPopupSettingPageL();
- TestItemFinder();
- TestFindItemDialog();
+ TestItemFinderL();
+ TestFindItemDialogL();
TestEditorKineticScrollingL();
TestEnableKineticScrollingPhysicsL();
TestAknPhysicsSuspendPhysicsL();
TestAknPhysicsResumePhysicsL();
TestCbaL();
TestCommonDialogsL();
+ TestAknButtonEnableFeedbackL();
}
// ---------------------------------------------------------------------------
@@ -664,10 +666,10 @@
}
// -----------------------------------------------------------------------------
-// CBCTestMixMCLGeneralCase::TestItemFinder
+// CBCTestMixMCLGeneralCase::TestItemFinderL
// -----------------------------------------------------------------------------
//
-void CBCTestMixMCLGeneralCase::TestItemFinder()
+void CBCTestMixMCLGeneralCase::TestItemFinderL()
{
_LIT( KSetItemFinderObserverL,
"CItemFinder::SetItemFinderObserverL() tested" );
@@ -684,10 +686,10 @@
// -----------------------------------------------------------------------------
-// CBCTestMixMCLGeneralCase::TestFindItemDialog
+// CBCTestMixMCLGeneralCase::TestFindItemDialogL
// -----------------------------------------------------------------------------
//
-void CBCTestMixMCLGeneralCase::TestFindItemDialog()
+void CBCTestMixMCLGeneralCase::TestFindItemDialogL()
{
_LIT( KEnableSingleClick,
"CFindItemDialog::EnableSingleClick() tested" );
@@ -716,5 +718,23 @@
// do nothing
}
+
+// ---------------------------------------------------------------------------
+// CBCTestMixMCLGeneralCase::TestAknButtonEnableFeedbackL
+// ---------------------------------------------------------------------------
+//
+void CBCTestMixMCLGeneralCase::TestAknButtonEnableFeedbackL()
+ {
+ CAknButton* button = CAknButton::NewLC();
+
+ button->EnableFeedback( EFalse );
+ button->EnableFeedback( ETrue );
+
+ CleanupStack::PopAndDestroy ( button );
+
+ _LIT( KEnableFeedback, "CAknButton::EnableFeedback tested" );
+ AssertTrueL( ETrue, KEnableFeedback );
+ }
+
//end of file
--- a/uifw/AvKon/tsrc/bc/bctestdom3.2/bctestdomavkonpsln/readme.txt Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/bctestdom3.2/bctestdomavkonpsln/readme.txt Tue Jul 13 11:29:56 2010 +0100
@@ -1,3 +1,19 @@
+#
+# 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 "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:
+#
+
case : bctestakncase
tested header files:
<aknskinnableclock.h>
--- a/uifw/AvKon/tsrc/bc/bctestdom5.0/bctestdomavkonpsln/readme.txt Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/bctestdom5.0/bctestdomavkonpsln/readme.txt Tue Jul 13 11:29:56 2010 +0100
@@ -1,3 +1,19 @@
+#
+# 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 "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:
+#
+
case : bctestakncase
tested header files:
<aknskinnableclock.h>
--- a/uifw/AvKon/tsrc/bc/bctestlauncher/group/uid_range.txt Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/bctestlauncher/group/uid_range.txt Tue Jul 13 11:29:56 2010 +0100
@@ -1,3 +1,19 @@
+#
+# 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 "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:
+#
+
(1)
0x20004742 - 0x2000474B
--- a/uifw/AvKon/tsrc/bc/bctestlauncher/inc/bctestapplication.h Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/bctestlauncher/inc/bctestapplication.h Tue Jul 13 11:29:56 2010 +0100
@@ -58,6 +58,11 @@
* select the application to run
*/
void Select(TBool aSelected = ETrue){ iSelected = aSelected; }
+
+ /**
+ * test whether the application is selected
+ */
+ TBool IsSelect(){ return iSelected; }
private:
void StartAutoTest();
--- a/uifw/AvKon/tsrc/bc/bctestlauncher/src/bctestrunner.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/bctestlauncher/src/bctestrunner.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -105,6 +105,10 @@
LOG << KTEST << EndLine << End;
for ( TInt i = 0; i < iTestApps.Count(); ++i )
{
+ if ( !( iTestApps[ i ]->IsSelect() || aCommand == EAutoTestAll ) )
+ {
+ continue;
+ }
TRAPD( errno, iTestApps[ i ]->RunL( aCommand ) );
switch( errno )
{
--- a/uifw/AvKon/tsrc/bc/bctesttemplate/inc/bctesttemplatecontainer.h Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/bctesttemplate/inc/bctesttemplatecontainer.h Tue Jul 13 11:29:56 2010 +0100
@@ -49,7 +49,7 @@
* Set component control, and container will own the control
* @param aControl pointer to a control.
*/
- void SetControl( CCoeControl* aControl );
+ void SetControlL( CCoeControl* aControl );
/**
* Delete control
--- a/uifw/AvKon/tsrc/bc/bctesttemplate/src/bctesttemplatecontainer.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/bctesttemplate/src/bctesttemplatecontainer.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -91,10 +91,10 @@
}
// ---------------------------------------------------------------------------
-// CBCTestTemplateContainer::SetControl
+// CBCTestTemplateContainer::SetControlL
// ---------------------------------------------------------------------------
//
-void CBCTestTemplateContainer::SetControl( CCoeControl* aControl )
+void CBCTestTemplateContainer::SetControlL( CCoeControl* aControl )
{
iControl = aControl;
if ( iControl )
--- a/uifw/AvKon/tsrc/bc/release_note.txt Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/release_note.txt Tue Jul 13 11:29:56 2010 +0100
@@ -1,3 +1,19 @@
+#
+# Copyright (c) 2006-2009 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:
+#
+
2009-12-03, BC test release v2.09
[what's new]
1. Added new test driver for single click API changes (bctestsingleclick).
--- a/uifw/AvKon/tsrc/bc/script/codetest_script/output/api_table.bak.xml Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/script/codetest_script/output/api_table.bak.xml Tue Jul 13 11:29:56 2010 +0100
@@ -41193,7 +41193,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[RAknAppServiceBase::ConnectChainedAppL]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -41205,7 +41205,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[RAknAppServiceBase::Close]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -41217,7 +41217,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[MAknServerAppExitObserver::HandleServerAppExit]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -41229,7 +41229,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[CAknAppServiceBase::CAknAppServiceBase]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -41241,7 +41241,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[CAknAppServiceBase::~CAknAppServiceBase]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -41253,7 +41253,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[CAknAppServiceBase::CreateL]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -41265,7 +41265,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[CAknAppServiceBase::ServiceL]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -41277,7 +41277,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[CAknAppServiceBase::ServiceError]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -41289,7 +41289,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[CAknAppServer::~CAknAppServer]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -41301,7 +41301,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[CAknAppServer::ConstructL]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -41313,7 +41313,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[CAknAppServer::CreateServiceL]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -41325,7 +41325,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[CAknAppServer::HandleAllClientsClosed]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
--- a/uifw/AvKon/tsrc/bc/script/codetest_script/output/api_table.xml Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/script/codetest_script/output/api_table.xml Tue Jul 13 11:29:56 2010 +0100
@@ -50865,7 +50865,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[CAknAppServer::ConstructL]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -50877,7 +50877,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[CAknAppServer::CreateServiceL]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -50889,7 +50889,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[CAknAppServer::HandleAllClientsClosed]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -50901,7 +50901,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[CAknAppServer::~CAknAppServer]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -50913,7 +50913,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[CAknAppServiceBase::CAknAppServiceBase]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -50925,7 +50925,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[CAknAppServiceBase::CreateL]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -50937,7 +50937,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[CAknAppServiceBase::ServiceError]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -50949,7 +50949,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[CAknAppServiceBase::ServiceL]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -50961,7 +50961,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[CAknAppServiceBase::~CAknAppServiceBase]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -50973,7 +50973,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[MAknServerAppExitObserver::HandleServerAppExit]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -50985,7 +50985,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[RAknAppServiceBase::Close]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -50997,7 +50997,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[RAknAppServiceBase::ConnectChainedAppL]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
@@ -51009,7 +51009,7 @@
<O_COVER_F_CUR><![CDATA[0]]></O_COVER_F_CUR>
<P_COVER_F_MAX><![CDATA[0]]></P_COVER_F_MAX>
<FUNCTION><![CDATA[--------------------------]]></FUNCTION>
-<FILENAME><![CDATA[aknserverapp.h]]></FILENAME>
+<FILENAME><![CDATA[AknServerApp.h]]></FILENAME>
<K_BLOCK><![CDATA[0]]></K_BLOCK>
</APIITEM>
<APIITEM>
--- a/uifw/AvKon/tsrc/bc/script/codetest_script/readme.txt Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/script/codetest_script/readme.txt Tue Jul 13 11:29:56 2010 +0100
@@ -1,3 +1,19 @@
+#
+# 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 "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:
+#
+
Quick start:
1. build the API table: (If you have built it before, skip this step.)
--- a/uifw/EikStd/EABI/EIKCOCTLU.DEF Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/EABI/EIKCOCTLU.DEF Tue Jul 13 11:29:56 2010 +0100
@@ -2014,4 +2014,7 @@
_ZN11CEikListBox18IsHighlightEnabledEv @ 2013 NONAME
_ZN11CEikListBox14SetMarkingModeEi @ 2014 NONAME
_ZN11CEikListBox22SetMarkingModeObserverEP23MAknMarkingModeObserver @ 2015 NONAME
+ _ZN10CAknButton14EnableFeedbackEi @ 2016 NONAME
+ _ZN22CAknLocalScreenClearer4NewLEii @ 2017 NONAME
+ _ZN22CAknLocalScreenClearer5NewLCEii @ 2018 NONAME
--- a/uifw/EikStd/bwins/EIKCOCTLU.DEF Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/bwins/EIKCOCTLU.DEF Tue Jul 13 11:29:56 2010 +0100
@@ -1625,4 +1625,6 @@
?IsHighlightEnabled@CEikListBox@@QAEHXZ @ 1624 NONAME ; int CEikListBox::IsHighlightEnabled(void)
?SetMarkingModeObserver@CEikListBox@@QAEXPAVMAknMarkingModeObserver@@@Z @ 1625 NONAME ; void CEikListBox::SetMarkingModeObserver(class MAknMarkingModeObserver *)
?SetMarkingMode@CEikListBox@@QAEXH@Z @ 1626 NONAME ; void CEikListBox::SetMarkingMode(int)
-
+ ?EnableFeedback@CAknButton@@QAEXH@Z @ 1627 NONAME ; void CAknButton::EnableFeedback(int)
+ ?NewLC@CAknLocalScreenClearer@@SAPAV1@HH@Z @ 1628 NONAME ; class CAknLocalScreenClearer * CAknLocalScreenClearer::NewLC(int, int)
+ ?NewL@CAknLocalScreenClearer@@SAPAV1@HH@Z @ 1629 NONAME ; class CAknLocalScreenClearer * CAknLocalScreenClearer::NewL(int, int)
--- a/uifw/EikStd/coctlinc/smileyiconrecord.h Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlinc/smileyiconrecord.h Tue Jul 13 11:29:56 2010 +0100
@@ -76,6 +76,7 @@
~CSmileyIconRecord();
void InsertIconL( CSmileyIcon* aIcon );
+ void DeleteIconAtPos( TInt aDocPos );
void HandleTextDelete( TInt aStart, TInt aLength );
void HandleTextInsert( TInt aStart, TInt aLength );
void CancelSelection();
--- a/uifw/EikStd/coctlinc/smileymodel.h Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlinc/smileymodel.h Tue Jul 13 11:29:56 2010 +0100
@@ -108,6 +108,7 @@
TInt SmileyStringLength( TInt aNodeIndex );
TText SmileyCode( TInt aNodeIndex );
void ReplaceTextWithCodes( TDes& aText, TInt aDocPos, TInt aNodeIndex );
+ TBool IsSmileyBySemanticAnalysis(const TDesC& aText, TInt aSmileyLength);
private:
TInt AddLinkAndImageInfoL( CSmileyInfo& aInfo, TInt aStrIndex );
--- a/uifw/EikStd/coctlsrc/AknButton.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/AknButton.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -287,6 +287,12 @@
//Previous touch down or drag position, valid only with pressed state.
TPoint iPrePointerPos;
+ CAknsFrameBackgroundControlContext* iHighlightContext;
+ // buffer for visually ordered text
+ TBuf<255 + KAknBidiExtraSpacePerLine> iVisualText;
+ TBool iFeedbackEnabled;
+ TAknsItemID iBackgroundSkinIID;
+ TRect iBgFrameRect;
};
// ============================ MEMBER FUNCTIONS ===============================
@@ -306,7 +312,8 @@
iVerticalIconAlignment( CAknButton::ECenter ),
iHorizontalIconAlignment( CAknButton::ECenter ),
iTextAndIconAlignment( CAknButton::EIconBeforeText ),
- iResourceProvider( 0 )
+ iResourceProvider( 0 ),
+ iFeedbackEnabled( ETrue )
{
// default margins, these are applied to both text and icon
iMargins.SetAllValuesTo(
@@ -333,6 +340,7 @@
iPictographInterface = NULL; // not owned
iFrameAndCenterIds.Close();
DeletePressedBmps();
+ delete iHighlightContext;
}
// -----------------------------------------------------------------------------
@@ -371,6 +379,13 @@
// Latched dimmed frame and center
iFrameAndCenterIds.AppendL( KAknsIIDQsnFrButtonInactive );
iFrameAndCenterIds.AppendL( KAknsIIDQsnFrButtonCenterInactive );
+ if ( !iHighlightContext )
+ {
+ iHighlightContext = CAknsFrameBackgroundControlContext::NewL(
+ KAknsIIDNone, TRect(), TRect(), EFalse );
+ iHighlightContext->SetFrame( KAknsIIDQsnFrButtonHighlight );
+ iHighlightContext->SetCenter( KAknsIIDQsnFrButtonHighlightCenter );
+ }
}
// -----------------------------------------------------------------------------
@@ -517,6 +532,10 @@
void CAknButtonExtension::HandleFeedbackAreaChange()
{
+ if ( !iFeedbackEnabled )
+ {
+ return;
+ }
// it is possible that feedback does not exist, eg. while booting.
// try getting one, and give up if that fails.
if ( !iFeedback )
@@ -582,6 +601,8 @@
TAknsItemID iPressedId;
TAknsItemID iHoverId;
TScaleMode iScaleMode;
+ TBool iFlagsChanged;
+ TBool iTextChanged;
};
// ============================ MEMBER FUNCTIONS ===============================
@@ -994,6 +1015,7 @@
iText = NULL;
iText = aText.AllocL();
+ iExtension->iTextChanged = ETrue;
}
// -----------------------------------------------------------------------------
@@ -1016,6 +1038,11 @@
//
EXPORT_C void CAknButtonState::SetFlags( const TInt aFlags )
{
+ if ( ( iFlags & KAknButtonStateHasLatchedFrame ) !=
+ ( aFlags & KAknButtonStateHasLatchedFrame ) )
+ {
+ iExtension->iFlagsChanged = ETrue;
+ }
iFlags = aFlags;
}
@@ -1338,6 +1365,44 @@
{
iExtension->iGeneratedDimmedIcon = aDimmedIconCreatedByButton;
}
+// -----------------------------------------------------------------------------
+// CAknButtonState::FlagsChanged
+// Returns ETrue if button state flags are changed so that
+// KAknStateHasLatchedDownFrame is setted or cleared
+// -----------------------------------------------------------------------------
+TBool CAknButtonState::FlagsChanged()
+ {
+ return iExtension->iFlagsChanged;
+ }
+
+// -----------------------------------------------------------------------------
+// CAknButtonState::ResetFlagsChanged
+// Frame has been updated so boolean iFlagsChanged can be set to EFalse
+// -----------------------------------------------------------------------------
+void CAknButtonState::ResetFlagsChanged()
+ {
+ iExtension->iFlagsChanged = EFalse;
+ }
+
+// -----------------------------------------------------------------------------
+// CAknButtonState::TextChanged
+// Returns ETrue if text is changed and button's visual text has
+// not been updated.
+// -----------------------------------------------------------------------------
+TBool CAknButtonState::TextChanged()
+ {
+ return iExtension->iTextChanged;
+ }
+
+// -----------------------------------------------------------------------------
+// CAknButtonState::ResetTextChanged
+// Visual text has been updated so boolean iTextChanged can be set to EFalse
+// -----------------------------------------------------------------------------
+void CAknButtonState::ResetTextChanged()
+ {
+ iExtension->iTextChanged = EFalse;
+ }
+
// -----------------------------------------------------------------------------
// CAknButtonState::Extension
@@ -1579,7 +1644,12 @@
{
OverrideColorL( EColorButtonText, textColor );
}
-
+
+ if ( AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), textColor,
+ iTextColorTableId, EAknsCIQsnTextColorsCG84 ) == KErrNone )
+ {
+ OverrideColorL( EColorButtonTextPressed, textColor );
+ }
if ( !iStates )
{
iStates = new ( ELeave ) CArrayPtrFlat<CAknButtonState>( 2 );
@@ -1611,6 +1681,8 @@
iHorizontalAlignment = CGraphicsContext::ELeft;
}
iExtension->HandleFeedbackAreaChange();
+ SetFrameIDs();
+ ConvertTextToVisualAndClip();
}
// -----------------------------------------------------------------------------
@@ -1813,6 +1885,11 @@
TRAP_IGNORE( OverrideColorL( EColorButtonText, textColor ) );
}
+ if ( AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), textColor,
+ iTextColorTableId, EAknsCIQsnTextColorsCG84 ) == KErrNone )
+ {
+ TRAP_IGNORE( OverrideColorL( EColorButtonTextPressed, textColor ) );
+ }
// generated pressed frame has to be regenerated
if ( iFlags & KAknButtonNoFrame && iFlags & KAknButtonPressedDownFrame )
{
@@ -1906,7 +1983,6 @@
HideHelp();
iButtonPressed = EFalse;
}
-
if ( aDimmed )
{
iExtension->iFlags.Set( CAknButtonExtension::EDimmed );
@@ -1915,7 +1991,7 @@
{
iExtension->iFlags.Clear( CAknButtonExtension::EDimmed );
}
- if ( iExtension->iFeedback )
+ if ( iExtension->iFeedbackEnabled && iExtension->iFeedback )
{
if ( aDimmed )
{
@@ -1950,6 +2026,7 @@
{
CCoeControl::SetDimmed( aDimmed );
}
+ SetFrameIDs();
}
// -----------------------------------------------------------------------------
@@ -1981,6 +2058,7 @@
iButtonPressed = ETrue;
iExtension->iPrePointerPos.SetXY( -1, -1 );
+ SetFrameIDs();
if ( NeedsRedrawWhenPressed() )
{
DrawNow();
@@ -2015,6 +2093,7 @@
if ( iButtonPressed )
{
iButtonPressed = EFalse;
+ SetFrameIDs();
if ( NeedsRedrawWhenPressed() )
{
@@ -2051,14 +2130,14 @@
iExtension->iFlags.Clear( CAknButtonExtension::ELongPressReported );
iExtension->iFlags.Clear( CAknButtonExtension::EKeyRepeatEventReported );
}
-
- if ( iKeyDownReported && RequestExit() && Observer() )
+
+ TInt reported = iKeyDownReported;
+ iKeyDownReported = EFalse;
+ if ( reported && RequestExit() && Observer() )
{
Observer()->HandleControlEventL( this,
MCoeControlObserver::EEventRequestExit );
- }
-
- iKeyDownReported = EFalse;
+ }
}
// we don't want aKeyEvent to go somewhere else :)
return EKeyWasConsumed;
@@ -2077,7 +2156,7 @@
if ( aVisible != IsVisible() )
{
CAknControl::MakeVisible( aVisible );
- if ( iExtension->iFeedback )
+ if ( iExtension->iFeedbackEnabled && iExtension->iFeedback )
{
if ( aVisible )
{
@@ -2177,6 +2256,8 @@
{
TRAP_IGNORE( CreatePressedDownFrameL() );
}
+ SetFrameRects();
+ ConvertTextToVisualAndClip();
iExtension->HandleFeedbackAreaChange();
}
@@ -2230,6 +2311,7 @@
if ( !iButtonPressed )
{
iButtonPressed = ETrue;
+ SetFrameIDs();
// feedback/basic on down event, if hit test is
// used. Area registry is used for rectangular
// buttons
@@ -2297,10 +2379,10 @@
// Redraw button, if needed
if ( NeedsRedrawWhenPressed() )
{
- iButtonPressed = EFalse;
redrawNeeded = ETrue;
}
iButtonPressed = EFalse;
+ SetFrameIDs();
StopKeyRepeatTimer();
StopLongPressTimer();
@@ -2322,6 +2404,7 @@
else if ( buttonEvent && !iButtonPressed && !IsDimmed() )
{
iButtonPressed = ETrue;
+ SetFrameIDs();
// Redraw button, if needed
if ( NeedsRedrawWhenPressed() )
@@ -2370,6 +2453,7 @@
}
}
iButtonPressed = EFalse;
+ SetFrameIDs();
}
TBool hasDrawn( EFalse );
@@ -2487,6 +2571,7 @@
{
ResetState();
}
+ SetFrameRects();
}
// -----------------------------------------------------------------------------
@@ -2499,6 +2584,7 @@
if ( !IsFocused() && iButtonPressed )
{
iButtonPressed = EFalse;
+ SetFrameIDs();
iKeyDownReported = EFalse;
}
if ( IsVisible() )
@@ -2543,49 +2629,14 @@
EXPORT_C void CAknButton::Draw( const TRect& /*aRect*/ ) const
{
TRect rect( Rect() );
- TAknLayoutRect centerLayout;
- centerLayout.LayoutRect( rect,
- AknLayoutScalable_Avkon::toolbar_button_pane_g1().LayoutLine() );
- TRect innerRect( centerLayout.Rect() );
TRect highlightRect( HighlightRect() );
CWindowGc& gc = SystemGc();
CAknButtonState* state = State();
- // Skin ids are determined here (a bit too early than necessary) so that
- // we can avoid doing the same thing in DrawMaskedL.
- if ( !( iFlags & KAknButtonNoFrame ) )
+ if ( !( iFlags & KAknButtonNoFrame ) && !iButtonPressed && state &&
+ state->FlagsChanged() )
{
- TInt frameIdIndex = KFrameId;
-
- if ( iButtonPressed )
- {
- frameIdIndex = KPressedFrameId;
- }
- else if ( state && state->Flags() & KAknButtonStateHasLatchedFrame )
- {
- if ( IsDimmed() )
- {
- // dimmed latched frame
- frameIdIndex = KLatchedDimmedFrameId;
- }
- else
- {
- // latched down
- frameIdIndex = KLatchedFrameId;
- }
- }
- else if ( IsDimmed())
- {
- // dimmed frame
- frameIdIndex = KDimmedFrameId;
- }
-
- if ( SkinIID( frameIdIndex ) != KAknsIIDNone )
- {
- iBgContext->SetFrame( SkinIID( frameIdIndex ) );
- iBgContext->SetCenter( SkinIID( ++frameIdIndex ) );
- iBgContext->SetFrameRects( rect, innerRect );
- }
+ SetFrameIDs();
}
if ( !iExtension->iFlags.IsSet( CAknButtonExtension::EUseAdditionalMask ) )
@@ -2607,13 +2658,10 @@
if ( IsFocused() && !highlightRect.IsEmpty() )
{
- iBgContext->SetFrame( KAknsIIDQsnFrButtonHighlight );
- iBgContext->SetCenter( KAknsIIDQsnFrButtonHighlightCenter );
- iBgContext->SetFrameRects( rect, innerRect );
-
// frame graphics
- if ( !AknsDrawUtils::Background( skin, iBgContext, NULL, gc,
- rect, KAknsDrawParamNoClearUnderImage ) )
+ if ( !AknsDrawUtils::Background( skin,
+ iExtension->iHighlightContext, NULL, gc, rect,
+ KAknsDrawParamNoClearUnderImage ) )
{
gc.SetBrushColor( KRgbRed );
gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
@@ -2781,9 +2829,19 @@
//
EXPORT_C void CAknButton::SetButtonFlags( const TInt aFlags )
{
- if ( !(iFlags & KAknButtonNoFrame ) && aFlags & KAknButtonNoFrame )
+ if ( !( iFlags & KAknButtonNoFrame ) )
{
- iExtension->iMargins.SetAllValuesTo( 0 );
+ if ( aFlags & KAknButtonNoFrame )
+ {
+ iExtension->iMargins.SetAllValuesTo( 0 );
+ ConvertTextToVisualAndClip();
+ }
+ // aFlags does not include KAknButtonNoFrame
+ else if ( iFlags & KAknButtonTextInsideFrame !=
+ aFlags & KAknButtonTextInsideFrame )
+ {
+ ConvertTextToVisualAndClip();
+ }
}
if ( aFlags & KAknButtonHitTest )
{
@@ -2794,6 +2852,14 @@
{
TRAP_IGNORE ( CreatePressedDownFrameL() );
}
+ if ( iFlags & KAknButtonNoFrame && !( aFlags & KAknButtonNoFrame ) )
+ {
+ SetFrameIDs();
+ if ( aFlags & KAknButtonTextInsideFrame )
+ {
+ ConvertTextToVisualAndClip();
+ }
+ }
iFlags = aFlags;
}
@@ -2858,6 +2924,7 @@
{
skinIds[KLatchedDimmedCenterId] = aLatchedDimmedCenterId;
}
+ SetFrameIDs();
}
// -----------------------------------------------------------------------------
@@ -2889,6 +2956,7 @@
EXPORT_C void CAknButton::SetTextFont( const CFont* aFont )
{
iFont = aFont;
+ ConvertTextToVisualAndClip();
}
// -----------------------------------------------------------------------------
@@ -3183,6 +3251,8 @@
}
TRAP_IGNORE( SetStateIndexL( newIndex ) );
+ // Updating background context might be needed if states flags differ
+ SetFrameIDs();
if ( aDrawNow )
{
@@ -3361,6 +3431,7 @@
StopKeyRepeatTimer();
StopLongPressTimer();
iButtonPressed = EFalse;
+ SetFrameIDs();
HideHelp();
if ( iExtension )
{
@@ -3454,7 +3525,10 @@
if ( !state || !state->HasText() )
return;
- MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+ if ( state->TextChanged() )
+ {
+ ConvertTextToVisualAndClip();
+ }
TRect textRect = iExtension->iMargins.InnerRect( Rect() );
@@ -3467,6 +3541,17 @@
textRect = center.Rect();
}
+ DrawText( aGc, textRect );
+ }
+
+// -----------------------------------------------------------------------------
+// CAknButton::DrawText
+// Continues drawing of the button which has text
+// -----------------------------------------------------------------------------
+//
+void CAknButton::DrawText( CWindowGc& aGc, TRect& aTextRect ) const
+ {
+ MAknsSkinInstance* skin = AknsUtils::SkinInstance();
aGc.SetBrushStyle( CGraphicsContext::ENullBrush );
@@ -3485,17 +3570,6 @@
aGc.SetUnderlineStyle( iExtension->iUnderlineStyle );
- // buffer for visually ordered text
- TBuf<255 + KAknBidiExtraSpacePerLine> visualText;
- TInt clipWidth = textRect.Width();
-
- // bidi processing - using AknBidiTextUtils.
- AknBidiTextUtils::ConvertToVisualAndClip(
- state->Text(),
- visualText,
- *font,
- clipWidth,
- clipWidth );
TInt baselineOffset = 0;
switch ( iVerticalAlignment )
@@ -3505,22 +3579,24 @@
break;
case EBottom:
- baselineOffset = textRect.Height();
+ baselineOffset = aTextRect.Height();
break;
default: // centered
baselineOffset = font->AscentInPixels() +
- ( textRect.Height() - font->AscentInPixels() ) / 2;
+ ( aTextRect.Height() - font->AscentInPixels() ) / 2;
}
CGraphicsContext::TTextAlign horAlignment = iHorizontalAlignment;
- aGc.DrawText( visualText, textRect, baselineOffset, horAlignment );
+ aGc.DrawText( iExtension->iVisualText, aTextRect, baselineOffset,
+ horAlignment );
if ( iExtension->iPictographInterface )
{
// For Japanese variant only
iExtension->iPictographInterface->Interface()->DrawPictographsInText(
- aGc, *font, visualText, textRect, baselineOffset, horAlignment );
+ aGc, *font, iExtension->iVisualText, aTextRect, baselineOffset,
+ horAlignment );
}
}
@@ -3620,6 +3696,10 @@
{
return;
}
+ if ( state->TextChanged() )
+ {
+ ConvertTextToVisualAndClip();
+ }
const CGulIcon* icon = GetCurrentIcon();
if ( !icon )
@@ -3775,57 +3855,7 @@
aGc.BitBlt( iconPoint, buttonBmp, iconRect.Size() );
}
- const CFont* font = iFont;
- if ( !font )
- {
- font = iCoeEnv->NormalFont();
- }
- aGc.UseFont( font );
-
- TRgb penColor;
- TRgb brushColor;
- GetTextColors( penColor, brushColor );
- aGc.SetPenColor( penColor );
- aGc.SetBrushColor( brushColor );
-
- aGc.SetUnderlineStyle( iExtension->iUnderlineStyle );
-
- TBuf<255 + KAknBidiExtraSpacePerLine> visualText; // buffer for visually ordered text
- TInt clipWidth = textRect.Width();
-
- // bidi processing - using AknBidiTextUtils.
- AknBidiTextUtils::ConvertToVisualAndClip(
- state->Text(),
- visualText,
- *font,
- clipWidth,
- clipWidth );
-
- TInt baselineOffset = 0;
- switch ( iVerticalAlignment )
- {
- case ETop:
- baselineOffset = font->AscentInPixels();
- break;
-
- case EBottom:
- baselineOffset = textRect.Height();
- break;
-
- default: // centered
- baselineOffset = font->AscentInPixels() +
- ( textRect.Height() - font->AscentInPixels() ) / 2;
- }
-
- CGraphicsContext::TTextAlign horAlignment = iHorizontalAlignment;
-
- aGc.DrawText( visualText, textRect, baselineOffset, horAlignment );
- if ( iExtension->iPictographInterface )
- {
- // For Japanese variant only
- iExtension->iPictographInterface->Interface()->DrawPictographsInText(
- aGc, *font, visualText, textRect, baselineOffset, horAlignment );
- }
+ DrawText( aGc, textRect );
}
// -----------------------------------------------------------------------------
@@ -4412,6 +4442,7 @@
iStates->Delete( iStateIndex );
iStateIndex <= 0 ? iStateIndex = 0 : iStateIndex--;
+ SetFrameIDs();
DrawNow();
}
}
@@ -4513,6 +4544,127 @@
}
// -----------------------------------------------------------------------------
+// CAknButton::SetFrameIDs
+// Sets frame ids for background context
+// -----------------------------------------------------------------------------
+//
+void CAknButton::SetFrameIDs() const
+ {
+ // Skin ids are determined here (a bit too early than necessary) so that
+ // we can avoid doing the same thing in DrawMaskedL.
+ CAknButtonState* state = State();
+ if ( !( iFlags & KAknButtonNoFrame ) )
+ {
+ TInt frameIdIndex = KFrameId;
+
+ if ( iButtonPressed )
+ {
+ frameIdIndex = KPressedFrameId;
+ }
+ else if ( state && state->Flags() & KAknButtonStateHasLatchedFrame )
+ {
+ if ( IsDimmed() )
+ {
+ // dimmed latched frame
+ frameIdIndex = KLatchedDimmedFrameId;
+ }
+ else
+ {
+ // latched down
+ frameIdIndex = KLatchedFrameId;
+ }
+ }
+ else if ( IsDimmed() )
+ {
+ // dimmed frame
+ frameIdIndex = KDimmedFrameId;
+ }
+
+ TAknsItemID skinIID( SkinIID( frameIdIndex ) );
+
+ // Only change the background frame graphics if necessary.
+ if ( skinIID != KAknsIIDNone &&
+ skinIID != iExtension->iBackgroundSkinIID )
+ {
+ iBgContext->SetFrame( skinIID );
+ iBgContext->SetCenter( SkinIID( ++frameIdIndex) );
+ iExtension->iBackgroundSkinIID = skinIID;
+ }
+ }
+ if ( state )
+ {
+ state->ResetFlagsChanged();
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// CAknButton::SetFrameRects
+// -----------------------------------------------------------------------------
+//
+void CAknButton::SetFrameRects()
+ {
+ TRect rect( Rect() );
+
+ // Only change the frame rects is the button rectangle is valid and the
+ // button size has changed.
+ if ( !rect.IsEmpty() && iExtension->iBgFrameRect != rect )
+ {
+ TAknLayoutRect centerLayout;
+ centerLayout.LayoutRect( rect,
+ AknLayoutScalable_Avkon::toolbar_button_pane_g1().LayoutLine() );
+ TRect innerRect( centerLayout.Rect() );
+
+ iBgContext->SetFrameRects( rect, innerRect );
+ iExtension->iHighlightContext->SetFrameRects( rect, innerRect );
+ iExtension->iBgFrameRect = rect;
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// CAknButton::ConvertTextToVisualAndClip
+// -----------------------------------------------------------------------------
+//
+void CAknButton::ConvertTextToVisualAndClip() const
+ {
+ CAknButtonState* state = State();
+ if ( !state || !state->HasText() )
+ {
+ if ( state )
+ {
+ state->ResetTextChanged();
+ }
+ return;
+ }
+
+ TRect textRect = iExtension->iMargins.InnerRect( Rect() );
+
+ if ( !( iFlags & KAknButtonNoFrame ) &&
+ ( iFlags & KAknButtonTextInsideFrame ) )
+ {
+ TAknLayoutRect center;
+ center.LayoutRect( Rect(),
+ AknLayoutScalable_Avkon::toolbar_button_pane_g1().LayoutLine() );
+
+ textRect = center.Rect();
+ }
+
+ TInt clipWidth = textRect.Width();
+
+ const CFont* font = iFont;
+ if ( !font )
+ {
+ font = iCoeEnv->NormalFont();
+ }
+
+ // bidi processing - using AknBidiTextUtils.
+ AknBidiTextUtils::ConvertToVisualAndClip(
+ state->Text(),
+ iExtension->iVisualText,
+ *font,
+ clipWidth,
+ clipWidth );
+ }
+// -----------------------------------------------------------------------------
// CAknButton::TouchArea
// Returns the button touchable area.
// -----------------------------------------------------------------------------
@@ -4530,4 +4682,49 @@
}
return touchRect;
}
+
+// -----------------------------------------------------------------------------
+// CAknButton::EnableFeedback
+// Enables or disables tactile feedback
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CAknButton::EnableFeedback( TBool aEnable )
+ {
+ if ( iExtension->iFeedbackEnabled == aEnable )
+ {
+ return;
+ }
+ iExtension->iFeedbackEnabled = aEnable;
+ if ( aEnable )
+ {
+ if ( !iExtension->iFeedback )
+ {
+ iExtension->iFeedback = MTouchFeedback::Instance();
+ }
+ if ( !iExtension->iFeedback )
+ {
+ return;
+ }
+ if ( IsVisible() )
+ {
+ iExtension->iFeedback->MoveFeedbackAreaToFirstPriority( this,
+ 0 );
+ iExtension->iFeedback->EnableFeedbackForControl(
+ this,
+ !IsDimmed() );
+ }
+ iExtension->HandleFeedbackAreaChange();
+ }
+ else
+ {
+ // MTouchFeedback instance lives in AknAppUi. If there is no
+ // MTouchFeedback instance there is no need to remove any areas
+ // either.
+ MTouchFeedback* fb = MTouchFeedback::Instance();
+ if ( fb )
+ {
+ fb->RemoveFeedbackForControl( this );
+ }
+ }
+ }
// end of file
--- a/uifw/EikStd/coctlsrc/AknClearer.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/AknClearer.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -20,7 +20,6 @@
#include <eikspane.h>
#include "aknclearer.h"
#include <aknconsts.h>
-#include <aknnavi.h>
#include <avkon.mbg>
#include <AknLayout.lag>
#include <AknSgcc.h>
@@ -36,6 +35,7 @@
#include <aknlayoutscalable_avkon.cdl.h>
#include <layoutmetadata.cdl.h>
#include <AknStatuspaneUtils.h>
+#include <alf/alfcompositionutility.h>
#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
#include <uikon/eikenvinterface.h>
@@ -50,153 +50,95 @@
enum TAknScreenClearerBaseFlags
{
- EAknScreenClearerDrawNavi,
- EAknScreenClearerBlankAppStatusPane,
- EAknScreenClearerDrawNaviSolid,
+ EAknScreenClearerBlankAppStatusPane
};
enum
{
- ELayerCbaBackground=0,
- ELayerBackground = 1,
- ELayerExtension = 2,
- ELayerStripe = 3,
- ELayerWallpaper = 4,
- ELayerN = 5
+ ELayerBackground = 0,
+ ELayerExtension = 1,
+ ELayerStripe = 2,
+ ELayerWallpaper = 3,
+ ELayerN = 4
};
- enum
- {
- ELayerStaconCbaBackground=0,
- ELayerStaconTop = 1,
- ELayerStaconBottom = 2,
- ELayerStaconMain = 3,
- ELayerStaconWallpaper = 4,
- ELayerStaconN = 5
- };
-
enum
{
- ELayerFlatCbaBackground=0,
- ELayerFlatBackground = 1,
- ELayerFlatTl = 2,
- ELayerFlatTr = 3,
- ELayerFlatBl = 4,
- ELayerFlatBr = 5,
- ELayerFlatT = 6,
- ELayerFlatB = 7,
- ELayerFlatR = 8,
- ELayerFlatL = 9,
- ELayerFlatCenter = 10,
- ELayerFlatMain = 11,
- ELayerFlatWallpaper = 12,
- ELayerSCtrl1 = 13,
- ELayerSCtrl2 = 14,
- ELayerSCtrl3 = 15,
- ELayerSCtrl4 = 16,
- ELayerSCtrl5 = 17,
- ELayerFlatN = 18
+ ELayerStaconTop = 0,
+ ELayerStaconBottom = 1,
+ ELayerStaconMain = 2,
+ ELayerStaconWallpaper = 3,
+ ELayerStaconN = 4
+ };
+
+enum
+ {
+ ELayerFlatBackground = 0,
+ ELayerFlatTl = 1,
+ ELayerFlatTr = 2,
+ ELayerFlatBl = 3,
+ ELayerFlatBr = 4,
+ ELayerFlatT = 5,
+ ELayerFlatB = 6,
+ ELayerFlatR = 7,
+ ELayerFlatL = 8,
+ ELayerFlatCenter = 9,
+ ELayerFlatMain = 10,
+ ELayerFlatWallpaper = 11,
+ ELayerFlatN = 12
};
class CAknScreenClearerBaseExtension : public CBase
{
- public:
- ~CAknScreenClearerBaseExtension()
- {
- delete iNaviWipe;
- delete iNaviMask;
- delete iBgContext;
- }
- public:
- CFbsBitmap* iNaviWipe;
- CFbsBitmap* iNaviMask;
- CAknsLayeredBackgroundControlContext* iBgContext;
- TInt iOrdinalPosition;
+public:
+ ~CAknScreenClearerBaseExtension()
+ {
+ delete iBgContext;
+ }
+public:
+ CAknsLayeredBackgroundControlContext* iBgContext;
+ TInt iOrdinalPosition;
+ TBool iTransparent;
};
-/* THIS FUNCTION IS NOT USED
-
-static void LoadAndFlipBitmapL(
- CFbsBitmap* aTrg, const TDesC& aFile, const TInt aIndex )
- {
- User::LeaveIfNull(aTrg);
-
- CFbsBitmap* sourceBitmap = new (ELeave) CFbsBitmap();
- CleanupStack::PushL(sourceBitmap);
- User::LeaveIfError(sourceBitmap->Load(aFile, aIndex, ETrue));
- TSize sourceBitmapSize = sourceBitmap->SizeInPixels();
-
- User::LeaveIfError(aTrg->Create(sourceBitmapSize, sourceBitmap->DisplayMode()));
-
- CFbsBitmapDevice* destinationDevice = CFbsBitmapDevice::NewL( aTrg );
- CleanupStack::PushL(destinationDevice);
-
- CFbsBitGc* destinationGc;
- User::LeaveIfError( destinationDevice->CreateContext( destinationGc ) );
-
- TRect sourceBitmapBlittingRect( 0,0,1,sourceBitmapSize.iHeight );
-
- for ( TInt xPos=sourceBitmapSize.iWidth-1; xPos >= 0; xPos-- )
- {
- destinationGc->BitBlt( TPoint(xPos,0), sourceBitmap, sourceBitmapBlittingRect );
- sourceBitmapBlittingRect.iTl.iX++;
- sourceBitmapBlittingRect.iBr.iX++;
- }
-
- delete destinationGc;
- CleanupStack::PopAndDestroy(2); // sourceBitmap, destinationDevice
- }
-*/
-
-/* THIS FUNCTION IS NOT USED
-
-static CFbsBitmap* FlipBitmapL( CFbsBitmap* aBitmap )
- {
- User::LeaveIfNull(aBitmap);
-
- TSize sourceBitmapSize = aBitmap->SizeInPixels();
-
- // get a copy of wanted rect of source bitmap to tmpBitmap
- CFbsBitmap* tmpBitmap = new (ELeave) CFbsBitmap();
- CleanupStack::PushL( tmpBitmap );
-
- User::LeaveIfError( tmpBitmap->Create( sourceBitmapSize, aBitmap->DisplayMode() ) );
-
- CFbsBitmapDevice* destinationDevice = CFbsBitmapDevice::NewL( tmpBitmap );
- CleanupStack::PushL( destinationDevice );
-
- CFbsBitGc* destinationGc;
- User::LeaveIfError( destinationDevice->CreateContext( destinationGc ) );
-
- TRect sourceBitmapBlittingRect( 0,0,1,sourceBitmapSize.iHeight );
-
- for ( TInt xPos=sourceBitmapSize.iWidth-1; xPos >= 0; xPos-- )
- {
- destinationGc->BitBlt( TPoint(xPos,0), aBitmap, sourceBitmapBlittingRect );
- sourceBitmapBlittingRect.iTl.iX++;
- sourceBitmapBlittingRect.iBr.iX++;
- }
-
- delete destinationGc;
- CleanupStack::PopAndDestroy(); // destinationDevice
- CleanupStack::Pop(); // tmpBitmap
-
- return tmpBitmap;
- }
-*/
EXPORT_C CAknScreenClearerBase::~CAknScreenClearerBase()
{
delete iExtension;
}
+
+void CAknScreenClearerBase::CreateExtensionL()
+ {
+ if ( !iExtension )
+ {
+ iExtension = new (ELeave) CAknScreenClearerBaseExtension;
+ }
+ }
+
+
+void CAknScreenClearerBase::SetTransparent( TBool aTransparent )
+ {
+ iExtension->iTransparent = aTransparent;
+ }
+
+
EXPORT_C void CAknScreenClearerBase::ConstructL(RWindowGroup& aParent, TInt aOrdinalPos, TBool aBlankAppStatusPane)
{
- iExtension = new (ELeave) CAknScreenClearerBaseExtension();
+ CreateExtensionL();
CreateWindowL(&aParent);
+ if ( iExtension->iTransparent )
+ {
+ EnableWindowTransparency();
+ }
+
+ CAlfEffectObserver* alfEffectObserver = CAlfEffectObserver::NewL();
+ alfEffectObserver->SetDistractionWindow(*DrawableWindow());
+ delete alfEffectObserver;
+
iFlags.Assign(EAknScreenClearerBlankAppStatusPane, aBlankAppStatusPane);
SetShapeL();
@@ -226,7 +168,17 @@
{
CWindowGc& gc = SystemGc();
MAknsSkinInstance* skin = AknsUtils::SkinInstance();
- AknsDrawUtils::Background( skin, iExtension->iBgContext, this, gc, Rect() );
+
+ if ( !iExtension->iTransparent )
+ {
+ AknsDrawUtils::Background( skin, iExtension->iBgContext, this, gc, Rect() );
+ }
+ else
+ {
+ gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
+ gc.Clear( Rect() );
+ gc.Reset();
+ }
iEikonEnv->WsSession().Flush();
return;
@@ -259,31 +211,51 @@
CEikStatusPaneBase* sp = CEikStatusPaneBase::Current();
- if (iFlags[EAknScreenClearerBlankAppStatusPane])
+ // Set the clearer window's size so that it covers the screen in both
+ // portrait and landscape orientations simultaneously.
+ // This is done in order to prevent NGA from drawing control groups
+ // underneath the fullscreen foreground application in cases the clearer
+ // orientation can't be readily updated during the layout switch, due
+ // to e.g. application startup taking a long time.
+ // Note that only the clearer window's size is set to be larger, the
+ // skin background is still the screen size so that the skin background
+ // won't get stretched.
+ TRect screenRect( KWholeScreen );
+ TRect squareScreenRect( screenRect );
+ if ( squareScreenRect.Width() > squareScreenRect.Height() )
{
- shape.AddRect(KWholeScreen);
+ squareScreenRect.SetHeight( squareScreenRect.Width() );
}
else
{
- shape.AddRect(KWholeScreen);
- sp->GetShapeL(appStatuspaneShape, !iFlags[EAknScreenClearerBlankAppStatusPane], ETrue);
- shape.SubRegion(appStatuspaneShape);
+ squareScreenRect.SetWidth( squareScreenRect.Height() );
+ }
+
+ if ( iFlags[EAknScreenClearerBlankAppStatusPane] )
+ {
+ shape.AddRect( squareScreenRect );
+ }
+ else
+ {
+ // Square shape is used only if the clearer is used to clear the
+ // whole screen.
+ shape.AddRect( screenRect );
+ sp->GetShapeL( appStatuspaneShape,
+ !iFlags[EAknScreenClearerBlankAppStatusPane],
+ ETrue );
+ shape.SubRegion( appStatuspaneShape );
}
- if (shape.CheckError())
- User::Leave(KErrNoMemory);
-
- SetRect(KWholeScreen);
- DrawableWindow()->SetShape(shape);
+ if ( shape.CheckError() )
+ {
+ User::Leave( KErrNoMemory );
+ }
- CleanupStack::PopAndDestroy(2); // close shapes
+ SetRect( iFlags[EAknScreenClearerBlankAppStatusPane] ? squareScreenRect :
+ screenRect );
+ DrawableWindow()->SetShape( shape );
- TBool drawNavi =
- iFlags[EAknScreenClearerBlankAppStatusPane] &&
- sp->IsVisible() &&
- sp->PaneCapabilities(TUid::Uid(EEikStatusPaneUidNavi)).IsInCurrentLayout();
-
- iFlags.Assign(EAknScreenClearerDrawNavi, drawNavi);
+ CleanupStack::PopAndDestroy( 2, &shape ); // close shapes
}
@@ -503,41 +475,7 @@
iExtension->iBgContext->SetLayerRect( 0, main_pane.Rect() );
iExtension->iBgContext->SetLayerRect( 1, staconTop );
iExtension->iBgContext->SetLayerRect( 2, staconBottom );
- }
-
- if (Layout_Meta_Data::IsPenEnabled())
- {
- TAknLayoutRect area_side_right_pane;
- TInt variety = 0;
- area_side_right_pane.LayoutRect(application_window, AknLayoutScalable_Avkon::area_side_right_pane(variety));
-
- TAknLayoutRect sctrl_sk_top_pane;
- sctrl_sk_top_pane.LayoutRect(area_side_right_pane.Rect(), AknLayoutScalable_Avkon::sctrl_sk_top_pane(0));
-
- TAknLayoutRect sctrl_sk_bottom_pane;
- sctrl_sk_bottom_pane.LayoutRect(area_side_right_pane.Rect(), AknLayoutScalable_Avkon::sctrl_sk_bottom_pane(0));
-
- TAknLayoutRect grid_sctrl_middle_pane;
- grid_sctrl_middle_pane.LayoutRect(area_side_right_pane.Rect(), AknLayoutScalable_Avkon::grid_sctrl_middle_pane(0));
-
- TAknLayoutRect cell_sctrl_middle_pane1;
- cell_sctrl_middle_pane1.LayoutRect(grid_sctrl_middle_pane.Rect(), AknLayoutScalable_Avkon::cell_sctrl_middle_pane(0,0,0));
- TAknLayoutRect cell_sctrl_middle_pane2;
- cell_sctrl_middle_pane2.LayoutRect(grid_sctrl_middle_pane.Rect(), AknLayoutScalable_Avkon::cell_sctrl_middle_pane(0,0,1));
- TAknLayoutRect cell_sctrl_middle_pane3;
- cell_sctrl_middle_pane3.LayoutRect(grid_sctrl_middle_pane.Rect(), AknLayoutScalable_Avkon::cell_sctrl_middle_pane(0,0,2));
-
-
-
- iExtension->iBgContext->SetLayerImage( ELayerFlatCbaBackground, KAknsIIDQsnBgScreen );
-
-
- iExtension->iBgContext->SetLayerRect( ELayerFlatCbaBackground, application_window );
- }
-
-
-
-
+ }
}
else
{
@@ -679,13 +617,35 @@
return(self);
}
+
+EXPORT_C CAknLocalScreenClearer* CAknLocalScreenClearer::NewLC(TBool aBlankAppStatusPane, TBool aTransparent)
+ {
+ CAknLocalScreenClearer* self=new(ELeave) CAknLocalScreenClearer;
+ CleanupStack::PushL(self);
+ self->CreateExtensionL();
+ self->SetTransparent(aTransparent);
+ CEikonEnv& eikEnv = *static_cast<CEikonEnv*>(self->ControlEnv());
+ self->ConstructL(eikEnv.RootWin(), 0, aBlankAppStatusPane);
+ return(self);
+ }
+
+
EXPORT_C CAknLocalScreenClearer* CAknLocalScreenClearer::NewL(TBool aBlankAppStatusPane)
{
CAknLocalScreenClearer* self = CAknLocalScreenClearer::NewLC(aBlankAppStatusPane);
CleanupStack::Pop(self);
return(self);
}
-
+
+
+EXPORT_C CAknLocalScreenClearer* CAknLocalScreenClearer::NewL(TBool aBlankAppStatusPane, TBool aTransparent)
+ {
+ CAknLocalScreenClearer* self = CAknLocalScreenClearer::NewLC(aBlankAppStatusPane, aTransparent);
+ CleanupStack::Pop(self);
+ return(self);
+ }
+
+
EXPORT_C void CAknLocalScreenClearer::HandleResourceChange(TInt aType)
{
if (aType == KEikDynamicLayoutVariantSwitch)
--- a/uifw/EikStd/coctlsrc/AknToolbar.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/AknToolbar.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -251,31 +251,26 @@
aReader.ReadInt8(); //lines, not used currently
iFlags = aReader.ReadInt32();
- TBool enableTransparency = CAknEnv::Static()->TransparencyEnabled() &&
+ TBool enableTransparency =
( ( !( iFlags & KAknToolbarFixed ) &&
!( iFlags & KAknToolbarFloatingUnTransparent ) ) ||
( iFlags & KAknToolbarTransparent && iFlags & KAknToolbarFixed ) );
-
- if( enableTransparency )
+ if ( enableTransparency )
{
Window().SetRequiredDisplayMode( EColor16MA ); // Without this, ACT does not work in all cases in HW
- TInt err = Window().SetTransparencyAlphaChannel();
-
- if ( err == KErrNone ) // it should all ways be true in NGA
- {
- // Set the window initially completely transparent. This needs to be called only once.
- Window().SetBackgroundColor(~0);
- }
+ EnableWindowTransparency();
}
-
-
- iFrameContext = CAknsFrameBackgroundControlContext::NewL( KAknsIIDQsnFrPopupSub,
- TRect(), TRect(), ( iFlags & KAknToolbarFixed )? ETrue : EFalse );
+ TRect dummyRect( 0, 0, 0, 0 );
+ iFrameContext = CAknsFrameBackgroundControlContext::NewL(
+ KAknsIIDQsnFrPopupSub,
+ dummyRect,
+ dummyRect,
+ ( iFlags & KAknToolbarFixed ) ? ETrue : EFalse );
iBgContext = CAknsBasicBackgroundControlContext::NewL(
- KAknsIIDQsnBgScreen, TRect(), ETrue );
+ KAknsIIDQsnBgScreen, dummyRect, ETrue );
SetWithSliding( ETrue );
@@ -314,15 +309,20 @@
// the rects correctly.
if ( iFlags & KAknToolbarFixed )
{
- if ( iFlags & KAknToolbarDefault )
+ SetFocusing( EFalse );
+
+ // Don't set the size and position for default toolbar (never shown).
+ if ( !( iFlags & KAknToolbarDefault ) )
{
- SetDimmed( ETrue );
+ SetRect( CalculateSizeAndPosition() );
}
- SetFocusing( EFalse );
- SetRect( CalculateSizeAndPosition() );
}
- AdjustAllButtons();
+ // Unnecessary for default toolbar (never shown).
+ if ( !( iFlags & KAknToolbarDefault ) )
+ {
+ AdjustAllButtons();
+ }
}
// -----------------------------------------------------------------------------
@@ -413,8 +413,9 @@
iInternalFlags.Clear( EFixedShown );
}
- if ( visible && ( !AknLayoutUtils::PenEnabled() ||
- ( !Layout_Meta_Data::IsLandscapeOrientation() && iFlags & KAknToolbarDefault ) ) )
+ if ( visible &&
+ !Layout_Meta_Data::IsLandscapeOrientation() &&
+ iFlags & KAknToolbarDefault )
{
return;
}
@@ -547,9 +548,7 @@
//
void CAknToolbar::ShowToolbarL()
{
- if ( iFlags & KAknToolbarFixed &&
- ( !AknLayoutUtils::PenEnabled() ||
- iFlags & KAknToolbarDefault ) )
+ if ( iFlags & KAknToolbarFixed && iFlags & KAknToolbarDefault )
{
if ( IsVisible() )
{
@@ -592,12 +591,6 @@
SetExtent( startPos, rect.Size() );
UpdateControlPositions();
- TBool redrawStoreEnabled(EFalse);
- if( !CAknEnv::Static()->TransparencyEnabled() )
- {
- redrawStoreEnabled = Window().IsRedrawStoreEnabled();
- }
-
CTouchToolbarData* data = CheckRegistration( this );
if ( data && !(iFlags & KAknToolbarFixed) && iAvkonAppUi->IsForeground() )
{
@@ -636,11 +629,6 @@
delete data;
GfxTransEffect::Deregister( this );
}
-
- if ( !CAknEnv::Static()->TransparencyEnabled() && redrawStoreEnabled )
- {
- Window().EnableRedrawStore( ETrue );
- }
}
// notify observer, for example touch pane, that toolbar was shown
@@ -745,11 +733,6 @@
{
if ( !iInternalFlags.IsSet( EShown ) ) // nothing to hide
{
- if ( iFlags & KAknToolbarDefault && !AknLayoutUtils::PenEnabled()
- && IsVisible() )
- {
- MakeVisible( EFalse );
- }
return;
}
@@ -1200,13 +1183,8 @@
return;
}
}
-
- if ( aType == KAknToolbarSetVisible && iFlags & KAknToolbarDefault
- && !AknLayoutUtils::PenEnabled() )
- {
- return;
- }
- else if ( aType == KAknToolbarSetVisible && !IsShown() )
+
+ if ( aType == KAknToolbarSetVisible && !IsShown() )
{
iInternalFlags.Set( ECalledFromFW );
iInternalFlags.Clear( EDrawBackground );
@@ -1235,14 +1213,10 @@
CAknButton* button = static_cast<CAknButton*>( item->Control() );
button->ResetState();
}
- if ( iFlags & KAknToolbarDefault && !AknLayoutUtils::PenEnabled() && IsVisible() )
+
+ if ( iFlags & KAknToolbarFixed )
{
- TRAP_IGNORE( HideToolbarL() );
- return;
- }
- else if ( iFlags & KAknToolbarFixed )
- {
- if ( Layout_Meta_Data::IsLandscapeOrientation() && AknLayoutUtils::PenEnabled() )
+ if ( Layout_Meta_Data::IsLandscapeOrientation() )
{
iOrientation = EAknOrientationVertical;
if ( ( iInternalFlags.IsSet( EFixedShown )
@@ -1262,7 +1236,7 @@
}
}
}
- else if ( !( iFlags & KAknToolbarDefault ) && AknLayoutUtils::PenEnabled() )
+ else if ( !( iFlags & KAknToolbarDefault ) )
{
iOrientation = EAknOrientationHorizontal;
if ( iInternalFlags.IsSet( EFixedShown ) && !iInternalFlags.IsSet( EShown ) )
@@ -1280,7 +1254,7 @@
}
}
}
- else if ( ( !AknLayoutUtils::PenEnabled() || iFlags & KAknToolbarDefault ) && iInternalFlags.IsSet( EShown ) )
+ else if ( iFlags & KAknToolbarDefault && iInternalFlags.IsSet( EShown ) )
{
TRAP_IGNORE( HideToolbarL() );
return;
@@ -2383,27 +2357,31 @@
}
}
- TRect rect = CalculateSizeAndPosition();
- // Set focused item again to avoid panic in a case when toolbar has more
- // items in previous orientation and some of the items that do not
- // fit to toolbar in this orientation was focused.
- if ( IsFocused() )
- {
- TRAP_IGNORE( MoveHighlightL( iFocusedItem, EFalse ) );
- }
-
- if ( iInternalFlags.IsSet( EShown ) )
+ // Don't set the size and position for default toolbar (never shown).
+ if ( !( iFlags & KAknToolbarDefault ) )
{
- if ( !( iFlags & KAknToolbarFlexiblePosition ) )
+ TRect rect = CalculateSizeAndPosition();
+ // Set focused item again to avoid panic in a case when toolbar has
+ // more items in previous orientation and some of the items that do
+ // not fit to toolbar in this orientation was focused.
+ if ( IsFocused() )
{
- SetPosition( rect.iTl );
+ TRAP_IGNORE( MoveHighlightL( iFocusedItem, EFalse ) );
}
- else
+
+ if ( iInternalFlags.IsSet( EShown ) )
{
- UpdateControlPositions();
+ if ( !( iFlags & KAknToolbarFlexiblePosition ) )
+ {
+ SetPosition( rect.iTl );
+ }
+ else
+ {
+ UpdateControlPositions();
+ }
+ SetSize( rect.Size() );
+ DrawDeferred();
}
- SetSize( rect.Size() );
- DrawDeferred();
}
}
@@ -2639,14 +2617,10 @@
{
TBool toolbarNotVisible( !IsShown() && !( iFlags & KAknToolbarDefault ) );
TBool fixedToolbar( iFlags & KAknToolbarFixed );
- TBool landscapeOrientation( Layout_Meta_Data::IsLandscapeOrientation() );
- TBool touchEnabled( AknLayoutUtils::PenEnabled() );
TBool defaultContent( iFlags & KAknToolbarDefault );
if ( toolbarNotVisible ||
!fixedToolbar ||
- ( defaultContent && !landscapeOrientation ) ||
- !touchEnabled ||
( fixedToolbar && defaultContent ) )
{
return;
--- a/uifw/EikStd/coctlsrc/EIKCOCTL.MMP Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/EIKCOCTL.MMP Tue Jul 13 11:29:56 2010 +0100
@@ -175,6 +175,7 @@
LIBRARY gfxtrans.lib
LIBRARY hal.lib
LIBRARY apgrfx.lib
+LIBRARY alfdecoderserverclient.lib
LIBRARY touchfeedback.lib
--- a/uifw/EikStd/coctlsrc/EIKEDWIN.CPP Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/EIKEDWIN.CPP Tue Jul 13 11:29:56 2010 +0100
@@ -102,6 +102,10 @@
#include "smileycustomwrap.h"
#include <touchfeedback.h>
+// declare function
+void ReadSpecialCharFromSCTL( TPtr& ptr, TInt sctResourceId );
+void ReadSCTHeadPane( TResourceReader& aReader );
+
GLDEF_C void Panic(TEikEdwinPanic aPanic)
{
_LIT(KPanicCat,"EIKON-EDWIN");
@@ -149,6 +153,11 @@
const TInt KContentThreshold = 8;
+const TInt KNmericSCTLimit( 256 );
+const TInt KTInt16Length( sizeof( TInt16 ) );
+const TInt KTInt32Length( sizeof( TInt32 ) );
+const TInt KTUint32Length( sizeof( TUint32 ) );
+
//
// class CEikEdwin::CUndoBuffer
//
@@ -641,7 +650,9 @@
TCursorSelection select( aCursorSelection.iCursorPos, aCursorSelection.iAnchorPos );
iEdwin.HandleSelectionForSmiley( select );
iEdwin.iTextView->SetSelectionL( select );
- iEdwin.ReportEdwinEventL(MEikEdwinObserver::EEventNavigation);
+ iEdwin.UpdateVertScrollBarThumbL();
+ iEdwin.UpdateHorizScrollBarThumb();
+ iEdwin.ReportEdwinEventL( MEikEdwinObserver::EEventNavigation );
}
void CEikEdwinFepSupport::GetCursorSelectionForFep(TCursorSelection& aCursorSelection) const
@@ -653,9 +664,9 @@
{
TInt length( Min( aLengthToRetrieve, iEdwin.TextLength() - aDocumentPosition ) );
iEdwin.iText->Extract( aEditorContent, aDocumentPosition, length );
- if ( iEdwin.IsSmileyEnabled() )
- {
- CSmileyManager* smiley( iEdwin.iEdwinExtension->iSmiley );
+ CSmileyManager* smiley( iEdwin.iEdwinExtension->iSmiley );
+ if ( smiley && smiley->HasSmileyIconsInText() )
+ {
CAknEdwinState* state( iEdwin.EditorState() );
if ( state )
{
@@ -663,28 +674,29 @@
if ( aDocumentPosition >= inlineText.LowerPos() &&
aDocumentPosition + length <= inlineText.HigherPos() )
{
- iEdwin.iEdwinExtension->iSmiley->ConvertTextForSmileyL(
- aDocumentPosition, aEditorContent, EFalse );
+ TRAP_IGNORE( smiley->ConvertTextForSmileyL( aDocumentPosition, aEditorContent,
+ EFalse ); )
}
}
- TBool prevIsCode( EFalse );
+ // Replace all 'i' following smiley code to invisbile placeholder for
+ // Touch Input can not recognize it as part of smiley code string.
+ TInt smileyEndPos( 0 );
for ( TInt i( 0 ); i < length; i++ )
{
if ( aEditorContent[i] == CSmileyManager::KCompensateChar )
{
- if ( i == 0 )
- {
- prevIsCode = ( CSmileyManager::IsSmileyCode(
- smiley->SmileyCodeByPos( aDocumentPosition ) ) );
- }
- if ( prevIsCode )
+ // when 'i' is the first character, it is unkonwn whether it is
+ // part of a smiley code string or not, so we have to use another
+ // function to decide.
+ if ( ( i > 0 && i < smileyEndPos ) ||
+ ( i == 0 && smiley->SmileyCodeByPos( aDocumentPosition ) > 0 ) )
{
aEditorContent[i] = CSmileyManager::KPlaceHolder;
}
}
- else
+ else if ( smiley->IsSmileyCode( aEditorContent[i] ) )
{
- prevIsCode = CSmileyManager::IsSmileyCode( aEditorContent[i] );
+ smileyEndPos = i + smiley->SmileyLength( aDocumentPosition + i );
}
}
}
@@ -714,7 +726,6 @@
{
__ASSERT_ALWAYS(iPositionOfInlineTextInDocument>=0,Panic(EEikPanicBadInlineEditingState9)); // assert that we're currently inline editing
__ASSERT_DEBUG((iOriginalSelection.iCursorPos>=0) && (iOriginalSelection.iAnchorPos>=0) && (iPositionOfInsertionPointInDocument>=0) && (iPositionOfInlineTextInDocument>=0) && (iLengthOfInlineText>=0) && (iPointerEventHandlerDuringInlineEdit!=NULL),Panic(EEikPanicBadInlineEditingState10));
- iEdwin.iEdwinExtension->iInlineEditing = EFalse;
iCharsInserted = 0;
iCharsDeleted = 0;
TBool paragraphContainingStartPositionOfInlineTextHasChangedFormat=EFalse;
@@ -728,6 +739,9 @@
{
iEdwin.iUndoStore->SetNewText( select );
}
+
+ iEdwin.iEdwinExtension->iInlineEditing = EFalse;
+
if ( iEdwin.IsSmileyEnabled() )
{
CAknEdwinState* state( iEdwin.EditorState() );
@@ -748,7 +762,14 @@
}
}
iEdwin.SetAmountToFormatL( EFalse, ETrue );
- iEdwin.DrawDeferred();
+
+ CAknEdwinState* edwinState =
+ static_cast<CAknEdwinState*>( iEdwin.iEdwinFepSupport->State( KNullUid ) );
+
+ if ( !( edwinState->Flags() & EAknEditorFlagHideTextView ) )
+ {
+ iEdwin.DrawDeferred();
+ }
}
}
iOriginalSelection.SetSelection(-1,-1);
@@ -2104,6 +2125,7 @@
const TCursorSelection sel(lower,lower);
iTextView->SetPendingSelection(sel);
iTextView->HandleInsertDeleteL(sel,toDelete.Length(),formatHasChanged);
+ cursorPos = lower;
reportChange=ETrue;
}
else if ( replaceSelection ) // All neutral protection cases
@@ -2968,6 +2990,12 @@
{
TRAP_IGNORE( edwinState->ReportAknEdStateEventL(
MAknEdStateObserver::EAknSyncEdwinState ) );
+ if ( edwinState->Flags() & EAknEditorFlagHideTextView )
+ {
+ iTextView->MakeVisible( ETrue );
+ edwinState->SetFlags( edwinState->Flags() &
+ ~EAknEditorFlagHideTextView );
+ }
}
else
{
@@ -6029,6 +6057,8 @@
// Actual scrolling is done by calling MoveScrollIndex
iEdwinExtension->iPhysicsHandler->MoveScrollIndex( -textMovePixels );
+ iEdwinExtension->iEndBorderExceeded = EFalse;
+ iEdwinExtension->iStartBorderExceeded = EFalse;
iEdwinExtension->iScrolledByScrollBar = EFalse;
}
@@ -6711,6 +6741,8 @@
if ( iEdwinExtension )
{
iEdwinExtension->iThumbPos = KErrNotFound;
+ iEdwinExtension->iEndBorderExceeded = EFalse;
+ iEdwinExtension->iStartBorderExceeded = EFalse;
}
SizeChanged();
if ( !IsReadOnly() && !IsNonFocusing()
@@ -6751,6 +6783,18 @@
case KEikInputLanguageChange:
{
UpdateCache(KEikInputLanguageChange);
+ TLanguage language = CAknEnv::Static()->SettingCache().InputLanguage();
+ if ( language == ELangArabic || language == ELangFarsi ||
+ language == ELangUrdu || language == ELangHebrew )
+ {
+ iEdwinUserFlags &= ~EAvkonEnableSmileySupport;
+ EnableSmileySupportL( EFalse );
+ }
+ else if ( iEdwinExtension->iEnableSmileySupported )
+ {
+ iEdwinUserFlags |= EAvkonEnableSmileySupport;
+ EnableSmileySupportL( ETrue );
+ }
DoAlignment();
}
break;
@@ -7423,7 +7467,29 @@
break;
}
- return iEikonEnv->AllocReadResourceLC(resId);
+ // get special character table resource ID
+ TInt sctResourceId = state->SpecialCharacterTableResourceId();
+ if ( sctResourceId && ( state->Flags() & EAknEditorFlagUseSCTNumericCharmap ) )
+ {
+ // numericSCTBuf containing number and special characters
+ HBufC* numericSCTBuf = HBufC::NewLC( KNmericSCTLimit );
+ TPtr numericSCTPtr( numericSCTBuf->Des() );
+
+ // read number characters and add them to numericSCTBuf
+ HBufC* numberResource = iEikonEnv->AllocReadResourceLC( resId );
+ TPtr numberResPtr( numberResource->Des() );
+ numericSCTPtr.Append( numberResPtr );
+ CleanupStack::PopAndDestroy( numberResource ); // numberResource
+
+ // read special characters from SCT by dialog ID
+ ReadSpecialCharFromSCTL( numericSCTPtr, sctResourceId );
+
+ return numericSCTBuf;
+ }
+ else
+ {
+ return iEikonEnv->AllocReadResourceLC( resId );
+ }
}
else
{
@@ -7628,6 +7694,7 @@
SetVKBStatus();
if ( aFlag & EAvkonEnableSmileySupport )
{
+ iEdwinExtension->iEnableSmileySupported = ETrue;
EnableSmileySupportL( ETrue );
}
}
@@ -7638,6 +7705,7 @@
SetVKBStatus();
if ( aFlag & EAvkonEnableSmileySupport )
{
+ iEdwinExtension->iEnableSmileySupported = EFalse;
EnableSmileySupportL( EFalse );
}
}
@@ -8279,7 +8347,22 @@
if ( chinesePopup != ( aNewFlags & EAknEditorFlagChinesePopup ) )
{
TRAP_IGNORE( ReportChinesePopupEventL( chinesePopup == 0 ) );
- }
+ }
+
+ if ( iTextView )
+ {
+ if ( ( aNewFlags & EAknEditorFlagHideTextView )
+ && !( aOldFlags & EAknEditorFlagHideTextView ) )
+ {
+ iTextView->MakeVisible( EFalse );
+ }
+ else if ( ( aOldFlags & EAknEditorFlagTouchInputModeOpened )
+ && !( aNewFlags & EAknEditorFlagTouchInputModeOpened ) )
+ {
+ iTextView->MakeVisible( ETrue );
+ DrawNow();
+ }
+ }
}
void CEikEdwin::ReportChinesePopupEventL( TBool aChinesePopupOpen )
@@ -8299,20 +8382,25 @@
{
if ( aEnableSmiley && !AknLayoutUtils::LayoutMirrored() && iEdwinExtension )
{
- if ( !iEdwinExtension->iSmiley )
- {
- iEdwinExtension->iSmiley = CSmileyManager::NewL( *this );
- iEdwinExtension->iSmiley->SetAnimationPlayTimes( KNormalAnimPlayTimes );
- if ( IsReadOnly() || iEdwinUserFlags & EDisplayOnly )
- {
- iEdwinExtension->iSmiley->SetAnimationPlayTimes(
- KInfiniteAnimPlayTimes );
- }
- }
- if ( TextLayout() )
- {
- TextLayout()->SetCustomWrap( iEdwinExtension->iSmileyWrap );
- }
+ TLanguage language = CAknEnv::Static()->SettingCache().InputLanguage();
+ if ( language != ELangArabic && language != ELangFarsi &&
+ language != ELangUrdu && language != ELangHebrew )
+ {
+ if ( !iEdwinExtension->iSmiley )
+ {
+ iEdwinExtension->iSmiley = CSmileyManager::NewL( *this );
+ iEdwinExtension->iSmiley->SetAnimationPlayTimes( KNormalAnimPlayTimes );
+ if ( IsReadOnly() || iEdwinUserFlags & EDisplayOnly )
+ {
+ iEdwinExtension->iSmiley->SetAnimationPlayTimes(
+ KInfiniteAnimPlayTimes );
+ }
+ }
+ if ( TextLayout() )
+ {
+ TextLayout()->SetCustomWrap( iEdwinExtension->iSmileyWrap );
+ }
+ }
}
else if ( iEdwinExtension )
{
@@ -8410,7 +8498,13 @@
CleanupStack::PopAndDestroy( buf );
if ( aRedraw )
{
- DrawDeferred();
+ CAknEdwinState* edwinState =
+ static_cast<CAknEdwinState*>( iEdwinFepSupport->State( KNullUid ) );
+
+ if ( !( edwinState->Flags() & EAknEditorFlagHideTextView ) )
+ {
+ DrawDeferred();
+ }
}
}
}
@@ -8502,9 +8596,7 @@
checkPos--;
checkPos = checkPos >= 0 ? checkPos : 0;
}
- if ( CSmileyManager::IsSmileyCode( iEdwinExtension->iSmiley->
- SmileyCodeByPos( checkPos ) ) &&
- !iEdwinExtension->iSmiley->IsDisabledSmileyIcon( checkPos ) )
+ if ( iEdwinExtension->iSmiley->SmileyCodeByPos( checkPos ) > 0 )
{
TInt codeLength( iEdwinExtension->iSmiley->SmileyLength( checkPos ) );
iEdwinExtension->iSmiley->DisableSmileyIcon( checkPos );
@@ -8932,7 +9024,6 @@
}
}
-
// ---------------------------------------------------------------------------
// CEikEdwin::SkipBackgroundDrawer
// ---------------------------------------------------------------------------
@@ -8962,5 +9053,75 @@
}
+// ---------------------------------------------------------------------------
+// ReadSpecialCharFromSCTL
+// ---------------------------------------------------------------------------
+//
+void ReadSpecialCharFromSCTL( TPtr& ptr, TInt sctResourceId )
+ {
+ TResourceReader aReader;
+ CCoeEnv::Static()->CreateResourceReaderLC( aReader, sctResourceId );
+ aReader.Advance( KTInt32Length ); // Diaog Flag
+ HBufC* titleBar = aReader.ReadHBufCL(); // title bar
+ // for titleBar useless, release it.
+ delete titleBar;
+ titleBar = NULL;
+ // Page Selector Resource Id, Button Group Container Resource Id
+ aReader.Advance( KTInt32Length + KTInt32Length );
+ TInt lineCount = aReader.ReadInt16(); // line Count
+ for ( TInt ii = 0; ii < lineCount; ii++ )
+ {
+ TInt controlType = aReader.ReadInt16(); // control Type
+ if ( controlType == EAknCtPopupHeadingPane )
+ {
+ // read HeadPane
+ ReadSCTHeadPane( aReader );
+ }
+ else if ( controlType == EAknCtSpecialCharacterMap )
+ {
+ aReader.ReadTPtrC(); // caption text
+ aReader.Advance( KTInt16Length + KTInt32Length ); // captioned control ID, item flags
+
+ TInt component_count = aReader.ReadInt16();
+ for ( TInt jj = 0; jj < component_count; jj++ )
+ {
+ TInt component_id = aReader.ReadInt16();
+ if ( component_id == EAknSCTLowerCase || component_id == EAknSCTUpperCase ||
+ component_id == EAknSCTNumeric )
+ {
+ HBufC* specialChar = aReader.ReadHBufCL();
+ ptr.Append( specialChar->Des() );
+ delete specialChar;
+ }
+ }
+ }
+ else
+ {
+ break;
+ }
+ }
+ CleanupStack::PopAndDestroy(); // aReader
+ }
+
+// ---------------------------------------------------------------------------
+// ReadSCTHeadPane
+// ---------------------------------------------------------------------------
+//
+void ReadSCTHeadPane( TResourceReader& aReader )
+ {
+ aReader.ReadTPtrC(); // caption text
+ // captioned control ID, item flags
+ aReader.Advance( KTInt16Length + KTInt32Length );
+ aReader.ReadTPtrC(); // text of head pane
+ aReader.ReadTPtrC(); // bitmap File Name of head pane
+ // bitmap Id, bitmap Mask Id,animation Id, layout of head pane
+ aReader.Advance( KTInt16Length + KTInt16Length + KTUint32Length + KTUint32Length );
+ aReader.ReadTPtrC(); // trailer
+ aReader.ReadTPtrC(); // bitmap File Name of captioned control
+ // bitmap Id, bitmap Mask Id of captioned control
+ aReader.Advance( KTInt16Length + KTInt16Length );
+ aReader.ReadTPtrC(); // Process ToolTip
+ }
+
// End of File
--- a/uifw/EikStd/coctlsrc/EIKLABEL.CPP Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/EIKLABEL.CPP Tue Jul 13 11:29:56 2010 +0100
@@ -270,7 +270,7 @@
TInt CEikLabel::HeightInPixels() const
{
- return(iMargin.iTop+iMargin.iBottom + iGapBetweenLines*(iNumberOfLines-1) + iNumberOfLines*iFont->HeightInPixels());
+ return(iMargin.iTop+iMargin.iBottom + iGapBetweenLines*(iNumberOfLines-1) + iNumberOfLines*iFont->FontMaxHeight());
}
TInt CEikLabel::WidthInPixels(TPtrC& aText) const
@@ -403,7 +403,7 @@
const TRect rect = Rect();
- const TInt deltaHeight=rect.Height()-HeightInPixels();
+ const TInt deltaHeight=rect.Height() - HeightInPixels();
TInt preHeight=iMargin.iTop; // used on first line
TInt postHeight=iMargin.iBottom; // used on last line
if (deltaHeight>0)
@@ -437,14 +437,14 @@
}
else
{
- textPaneTopToBaseline = iFont->AscentInPixels();
- textPaneHeight = iFont->HeightInPixels();
+ textPaneTopToBaseline = iFont->FontMaxAscent();
+ textPaneHeight = iFont->FontMaxHeight();
}
// iGapBetweenLines is defined as baseline separation - CFont::HeightInPixels
// Since we are using the better metrics above, we have to actually use something which is
// derived from iGapBetweenLines, but is e.g. reduced if textpaneheight > heightInPixels
- TInt gapBetweenTextPanes( iGapBetweenLines - (textPaneHeight - iFont->HeightInPixels()) );
+ TInt gapBetweenTextPanes( iGapBetweenLines - (textPaneHeight - iFont->FontMaxHeight() ) );
FOREVER
{
--- a/uifw/EikStd/coctlsrc/EIKLBV.CPP Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/EIKLBV.CPP Tue Jul 13 11:29:56 2010 +0100
@@ -657,15 +657,33 @@
EXPORT_C TInt CListBoxView::NumberOfItemsThatFitInRect(const TRect& aRect) const
{
+ TInt itemNumber = 0;
if (iItemHeight == 0)
{
_AKNTRACE( "Number of items is 0" );
- return 0;
+ return itemNumber;
}
- TInt items = aRect.Height() / iItemHeight;
- if ( ( iVerticalOffset != 0 ) || ( (aRect.Height() - iVerticalOffset) % iItemHeight > 0 ) ) items++;
- _AKNTRACE( "Number of items is %d", items );
- return items;
+ TInt items = aRect.Height() / iItemHeight;
+ TInt extraHeight = aRect.Height() % iItemHeight;
+ // if there is offset or extra height, then there is at least one partical
+ // displayed item
+ if ( iVerticalOffset != 0 || extraHeight > 0 )
+ {
+ items++;
+ }
+ // if extra height is not totally taken by top partically displayed item,
+ // then there is still place to display a partcial item in bottom. consider
+ // a example which view height is 35 and item height is 10, then it's possible
+ // to display 5 items with the height like 3,10,10,10,2
+ if ( iVerticalOffset != 0 &&
+ extraHeight != 0 &&
+ ( iItemHeight + iVerticalOffset ) < extraHeight )
+ {
+ items++;
+ }
+ itemNumber = items;
+ _AKNTRACE( "Number of items is %d", itemNumber );
+ return itemNumber;
}
EXPORT_C void CListBoxView::DeselectRangeL(TInt aItemIndex1, TInt aItemIndex2)
@@ -1193,16 +1211,17 @@
RDebug::Print( _L( "CListBoxView::CalcNewTopItemIndexSoItemIsVisible" ) );
#endif // _DEBUG
TInt newTopItemIndex=iTopItemIndex;
- const TInt numItemsThatFitInRect=NumberOfItemsThatFitInRect(iViewRect);
- if (aItemIndex < iTopItemIndex || numItemsThatFitInRect == 0)
+ const TInt numItemsThatFitInRect=NumberOfItemsThatFitInRect( iViewRect );
+ if ( aItemIndex < iTopItemIndex || numItemsThatFitInRect == 0 )
+ {
newTopItemIndex = aItemIndex;
- else if (aItemIndex > iBottomItemIndex)
- newTopItemIndex = aItemIndex - numItemsThatFitInRect + 1;
- else if ( ( iVerticalOffset < 0 )
- && ( aItemIndex == iBottomItemIndex )
- && ( 0 == iViewRect.Height() % iItemHeight ) )
+ }
+ else
{
- newTopItemIndex += 1;
+ if (aItemIndex > iBottomItemIndex)
+ {
+ newTopItemIndex = aItemIndex - numItemsThatFitInRect + 1;
+ }
}
if (!ITEM_EXISTS_ONCE(newTopItemIndex) && newTopItemIndex != 0 )
@@ -1229,6 +1248,13 @@
{
me->SetItemOffsetInPixels( 0 );
}
+ //after reset vertical offset,
+ //the number of items which fit in the view maybe change
+ TInt newNumItemsThatFitInRect = NumberOfItemsThatFitInRect( iViewRect );
+ if ( newNumItemsThatFitInRect != numItemsThatFitInRect )
+ {
+ newTopItemIndex = aItemIndex - newNumItemsThatFitInRect + 1;
+ }
}
_AKNTRACE_FUNC_EXIT;
--- a/uifw/EikStd/coctlsrc/EIKLBX.CPP Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/EIKLBX.CPP Tue Jul 13 11:29:56 2010 +0100
@@ -526,6 +526,11 @@
void DisableSingleClick();
/**
+ * Enables single click
+ */
+ void EnableSingleClickL();
+
+ /**
* Disables item specific menu.
*/
void DisableItemSpecificMenu();
@@ -757,6 +762,12 @@
* Ordinal position of listbox window, before stylus menu is opened.
*/
TInt iOldWinPos;
+
+ /**
+ * If double click modifier is set on PointerEvent, the event may be ignored
+ * in some situation(To prevent extra dialog launched by AO).
+ */
+ TBool iDoubleClickEventIgnored;
private:
CMatchBuffer* iBuffer;
@@ -790,7 +801,7 @@
/**
* Height of the list in pixels.
*/
- TInt iListBottomLimit;
+ TInt iListBottomLimit;
};
// CEikListBoxExt
@@ -1000,6 +1011,10 @@
{
state |= MAknCollection::EStateMultipleSelection;
}
+ if ( MarkedItems() )
+ {
+ state |= MAknCollection::EStateMarkedItems;
+ }
_AKNTRACE_FUNC_EXIT;
return state;
}
@@ -1266,6 +1281,28 @@
_AKNTRACE_FUNC_EXIT;
}
+// -----------------------------------------------------------------------------
+// CListBoxExt::EnableSingleClickL
+// -----------------------------------------------------------------------------
+//
+void CListBoxExt::EnableSingleClickL()
+ {
+ _AKNTRACE_FUNC_ENTER;
+ if ( !iLongTapDetector )
+ {
+ iLongTapDetector = CAknLongTapDetector::NewL( this );
+ }
+ if ( !iItemActionMenu )
+ {
+ iItemActionMenu = CAknItemActionMenu::RegisterCollectionL(
+ *this, &iListBox );
+ iListBox.iListBoxFlags &= ( ~CEikListBox::EDisableItemSpecificMenu );
+ }
+ iSingleClickEnabled = ETrue;
+ EnableHighlight( EFalse );
+ // iListBox.UpdateHighlightL( iListBox.iView->CurrentItemIndex() );
+ _AKNTRACE_FUNC_EXIT;
+ }
// -----------------------------------------------------------------------------
// CListBoxExt::DisableItemSpecificMenu
@@ -1295,8 +1332,9 @@
// Send event on down only if item specific items were found.
// Long tap is also disabled if current item is not marked while
// there are some marked items or marking mode is active.
- if ( !( ( iListBox.MarkingMode() || MarkedItems() )
+ if ( ( !( ( iListBox.MarkingMode() || MarkedItems() )
&& !iListBox.View()->ItemIsSelected( iListBox.CurrentItemIndex() ) )
+ || ( iListBox.iListBoxFlags & CEikListBox::EItemSpecificMenuAlwaysShown ) )
&& ( aPointerEvent.iType != TPointerEvent::EButton1Down
|| iItemActionMenu->InitMenuL() ) )
{
@@ -1399,7 +1437,7 @@
{
return ( iListBox.iListBoxFlags & CEikListBox::ES60StyleMarkable
|| iListBox.iListBoxFlags & CEikListBox::EMultipleSelection )
- && iListBox.SelectionIndexes()->Count() > 0;
+ && iListBox.iView && iListBox.SelectionIndexes()->Count() > 0;
}
@@ -1423,11 +1461,9 @@
if ( windowOwningControl )
{
windowOwningControl->IgnoreEventsUntilNextPointerUp();
- _AKNTRACE_FUNC_EXIT;
- return ETrue;
}
_AKNTRACE_FUNC_EXIT;
- return EFalse;
+ return ( windowOwningControl != NULL );
}
@@ -1803,6 +1839,13 @@
_AKNTRACE_FUNC_ENTER;
if ( iScrolling )
{
+ // currently, this is the only way to fix ou1cimx1#375869
+ // iViewPosision is changed but we can't provent that
+ if ( iListBox.iView->TopItemIndex() == 0
+ && iListBox.iView->ItemOffsetInPixels() > 0 )
+ {
+ iListBox.ScrollView( -iListBox.iView->ItemOffsetInPixels(), ETrue );
+ }
#ifdef RD_UI_TRANSITION_EFFECTS_LIST
iListBox.SuspendEffects( EFalse );
#endif // RD_UI_TRANSITION_EFFECTS_LIST
@@ -2342,7 +2385,8 @@
iView->CalcBottomItemIndex();
iView->CalcDataWidth();
TInt currentItemIndex = iView->CurrentItemIndex();
-
+ TInt totalItems = iModel->NumberOfItems();
+
if ( ItemExists(currentItemIndex) )
{
TInt topItemIndex( iView->TopItemIndex() );
@@ -2358,7 +2402,6 @@
{
TInt offset = (iListBoxExt->iWorldSize.iHeight / 2)
- iListBoxExt->iViewPosition.iY;
- TInt totalItems = iModel->NumberOfItems();
TInt itemsInRect =
iView->NumberOfItemsThatFitInRect( iView->ViewRect() );
@@ -2382,15 +2425,15 @@
}
else
{
- // recalculates top index of list when mode be changed
- TInt totalItems = iModel->NumberOfItems();
+ // recalculates top index of list when mode be changed
if ( (totalItems - topItemIndex) < numberOfItems )
{
newTopItemIndex = Max( 0, totalItems - numberOfItems );
}
}
- if ( newTopItemIndex != KEikListBoxInvalidIndex )
+ if ( newTopItemIndex > KEikListBoxInvalidIndex
+ && newTopItemIndex < totalItems )
{
iView->SetTopItemIndex( newTopItemIndex );
}
@@ -4183,6 +4226,11 @@
case MEikListBoxObserver::EEventFlickStarted:
case MEikListBoxObserver::EEventPanningStarted:
{
+ if ( iListBoxExt && ( iListBoxExt->iWorldSize.iHeight
+ <= iListBoxExt->iViewSize.iHeight ) )
+ {
+ return;
+ }
iItemDrawer->SetFlags( CListItemDrawer::EDisableMarquee );
if ( iListBoxExt )
{
@@ -4201,6 +4249,11 @@
case MEikListBoxObserver::EEventFlickStopped:
case MEikListBoxObserver::EEventPanningStopped:
{
+ if ( iListBoxExt && ( iListBoxExt->iWorldSize.iHeight
+ <= iListBoxExt->iViewSize.iHeight ) )
+ {
+ return;
+ }
iItemDrawer->ClearFlags( CListItemDrawer::EDisableMarquee );
if ( iListBoxExt )
{
@@ -4222,7 +4275,8 @@
TBool allowed = ETrue;
if ( iListBoxExt && iListBoxExt->iPhysics
- && aEvent != MEikListBoxObserver::EEventFlickStopped )
+ && aEvent != MEikListBoxObserver::EEventFlickStopped
+ && aEvent != MEikListBoxObserver::EEventFlickStarted )
{
allowed = iListBoxExt->iClickEventsAllowed;
}
@@ -4990,6 +5044,7 @@
}
iListBoxExt->iFeedbackType = ETouchFeedbackList;
+ iListBoxExt->iDoubleClickEventIgnored = EFalse;
if ( !iListBoxExt->iSingleClickEnabled &&
itemIndex != iView->CurrentItemIndex() )
@@ -5059,6 +5114,7 @@
if(Buffer()->iPressedIndex == itemIndex)
{
Buffer()->iPressedIndex = KEikListBoxInvalidIndex;
+ iListBoxExt->iDoubleClickEventIgnored = ETrue;
_AKNTRACE_FUNC_EXIT;
return;
}
@@ -5094,6 +5150,7 @@
// update index of the last down tapped item
iListBoxExt->iLastDownTappedItem = itemIndex;
+ iListBoxExt->iMarkableListShiftKeyPressed = EFalse;
if ((! (Rect().Contains(aPointerEvent.iPosition))) && (iListBoxFlags & EPopout))
{
@@ -5156,6 +5213,18 @@
}
else
{
+ if( itemIndex == oldCurrentItemIndex )
+ {
+ if( !( ( iListBoxFlags & EViewerFlag ) &&
+ ( iListBoxFlags & EDisableItemSpecificMenu ) ) )
+ {
+ iListBoxExt->ImmediateFeedback(
+ iListBoxExt->iFeedbackType,
+ TTouchFeedbackType( ETouchFeedbackVibra |
+ ETouchFeedbackAudio ),
+ aPointerEvent );
+ }
+ }
ReportListBoxEventL(
MEikListBoxObserver::EEventPenDownOnItem );
}
@@ -5245,7 +5314,7 @@
}
}
- if ( itemIndex == oldCurrentItemIndex )
+ if ( itemIndex == oldCurrentItemIndex && !iListBoxExt->iSingleClickEnabled )
{
if ( shiftKeyPressed )
{
@@ -5324,9 +5393,13 @@
case TPointerEvent::EButton1Up:
_AKNTRACE("TPointerEvent::EButton1Up");
- if ( iListBoxExt->FeedbackEnabledOnUpEvent() && iListBoxExt->iClickEventsAllowed
- && ( !( ( iListBoxFlags & EViewerFlag ) &&
- ( iListBoxFlags & EDisableItemSpecificMenu ) ) ) )
+ if ( iListBoxExt->FeedbackEnabledOnUpEvent() &&
+ iListBoxExt->iClickEventsAllowed &&
+ ( !( ( iListBoxFlags & EViewerFlag ) &&
+ ( iListBoxFlags & EDisableItemSpecificMenu ) ) )&&
+ ( iListBoxExt->iLastDownTappedItem == itemIndex ) &&
+ ( !iListBoxExt->iDoubleClickEventIgnored ) &&
+ itemIndex == iView->CurrentItemIndex() )
{
TTouchLogicalFeedback fbType = ETouchFeedbackList;
if ( iListBoxFlags & ES60StyleMultiselection
@@ -5386,7 +5459,8 @@
}
if ( !s60StyleMultiselection )
{
- if ( !iListBoxExt->iSingleClickEnabled )
+ if ( !iListBoxExt->iSingleClickEnabled &&
+ itemIndex == iListBoxExt->iLastDownTappedItem )
{
ReportListBoxEventL(MEikListBoxObserver::EEventItemClicked);
}
@@ -5403,14 +5477,13 @@
}
// Due to the feature of capactior panel, the pointer position
// may change between pointer down and up during user click
- // action. When the click position is between two items, the
- // item index may change unwanted, so we make a threshold
- // for this situation.
- else if ( s60StyleMultiselection
+ // action. When the click position is between two items
+ // and flick or drag event is not performed, the item index may
+ // change unwanted, so we make a threshold for this situation.
+ else if ( s60StyleMultiselection && !Buffer()->iDragToAnotherItem
&& ( iListBoxExt->iLastDownTappedItem == itemIndex
- || Abs( iListBoxExt->iLastPointerPos.iY
- - aPointerEvent.iPosition.iY ) < KPointerDownAndUpThreshold )
- && !Buffer()->iDragToAnotherItem )
+ || ( iListBoxExt->iLastDownTappedItem != KErrNotFound
+ && Abs( iListBoxExt->iLastPointerPos.iY - aPointerEvent.iPosition.iY ) < KPointerDownAndUpThreshold ) ) )
{
iListBoxFlags |= EStateChanged;
Buffer()->iPressedIndex = itemIndex;
@@ -6138,10 +6211,12 @@
// Some client does not let list get button1up, so we do it there...
iItemDrawer->ClearFlags( CListItemDrawer::EPressedDownState );
TInt index = View()->CurrentItemIndex();
- if ( index != KErrNotFound )
+ TBool enabled( !( iItemDrawer->Flags()
+ & CListItemDrawer::ESingleClickDisabledHighlight ) );
+ if ( index != KErrNotFound && enabled )
{
Window().Invalidate( TRect( View()->ItemPos(index),
- View()->ItemSize() ) );
+ iItemDrawer->ItemCellSize() ) );
}
break;
}
@@ -6153,13 +6228,12 @@
case KAknMessageFocusLost:
{
- TInt oldWinPos = iListBoxExt->iOldWinPos;
- TInt winPos = DrawableWindow()->OrdinalPosition();
-
- // Do not remove higlight if window ordinal position has changed
+ // Do not remove highlight if window ordinal position has changed
// during the time when stylus menu is open
- if ( iListBoxExt && iListBoxExt->iSingleClickEnabled
- && ( oldWinPos == KErrNotFound || oldWinPos == winPos ) )
+ if ( iListBoxExt && iListBoxExt->iSingleClickEnabled &&
+ ( iListBoxExt->iOldWinPos == KErrNotFound ||
+ iListBoxExt->iOldWinPos ==
+ DrawableWindow()->OrdinalPosition() ) )
{
TBool enabled( iItemDrawer && !( iItemDrawer->Flags()
& CListItemDrawer::ESingleClickDisabledHighlight ) );
@@ -6563,9 +6637,21 @@
EXPORT_C void CEikListBox::DisableSingleClick( TBool aDisabled )
{
_AKNTRACE_FUNC_ENTER;
- if ( aDisabled && iListBoxExt && iListBoxExt->iSingleClickEnabled )
+ if ( aDisabled &&
+ iListBoxExt &&
+ iListBoxExt->iSingleClickEnabled &&
+ iItemDrawer )
{
iListBoxExt->DisableSingleClick();
+ iItemDrawer->ClearFlags( CListItemDrawer::ESingleClickEnabled);
+ }
+ else if ( !aDisabled &&
+ iListBoxExt &&
+ !iListBoxExt->iSingleClickEnabled &&
+ iItemDrawer )
+ {
+ TRAP_IGNORE( iListBoxExt->EnableSingleClickL() );
+ iItemDrawer->SetFlags( CListItemDrawer::ESingleClickEnabled );
}
_AKNTRACE_FUNC_EXIT;
}
@@ -7066,7 +7152,15 @@
if ( iListBoxExt && iListBoxExt->iMarkableListMarking )
{
- if ( iListBoxExt->iMarkableListShiftKeyPressed )
+ if ( iListBoxExt->iSingleClickEnabled )
+ {
+ if ( iListBoxExt->iMarkableListShiftKeyPressed )
+ {
+ iView->ToggleItemL( iView->CurrentItemIndex() );
+ iListBoxExt->iClickEventsAllowed = EFalse;
+ }
+ }
+ else if ( iListBoxExt->iMarkableListShiftKeyPressed )
{
#ifdef RD_UI_TRANSITION_EFFECTS_LIST
iListBoxExt->iAnchor = oldCurrentItemIndex;
--- a/uifw/EikStd/coctlsrc/EIKMENUB.CPP Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/EIKMENUB.CPP Tue Jul 13 11:29:56 2010 +0100
@@ -177,20 +177,40 @@
{
TBool dimCommands( EFalse );
TBool changeState( EFalse );
+ TBool dimMarkAndUnmark( EFalse );
if ( iItemActionMenu->MarkingMode().MultipleMarkingActive() )
{
changeState = ETrue;
dimCommands = EFalse;
+ iBar->iMenuPane->SetItemActionsStateL( ETrue );
}
else if ( !iItemActionMenu->CollectionHighlightVisible() )
{
- changeState = ETrue;
- dimCommands = ETrue;
+ if ( iItemActionMenu->CollectionHasMarkedItems() )
+ {
+ TInt pos;
+ if ( iBar->iMenuPane->MenuItemExists( EAknCmdMark, pos ) )
+ {
+ iBar->iMenuPane->SetItemDimmed( EAknCmdMark, ETrue );
+ }
+ if ( iBar->iMenuPane->MenuItemExists( EAknCmdUnmark, pos ) )
+ {
+ iBar->iMenuPane->SetItemDimmed( EAknCmdUnmark, ETrue );
+ }
+ iBar->iMenuPane->SetItemActionsStateL( ETrue );
+ dimMarkAndUnmark = ETrue;
+ }
+ else
+ {
+ changeState = ETrue;
+ dimCommands = ETrue;
+ }
}
if ( changeState )
{
iBar->iMenuPane->SetItemCommandsStateL( dimCommands );
}
+ iBar->iMenuPane->HideMarkAndUnmark( dimMarkAndUnmark );
}
else if ( iSingleClickEnabled )
{
@@ -767,7 +787,12 @@
EXPORT_C TKeyResponse CEikMenuBar::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
{
const TInt code=aKeyEvent.iCode;
-
+ //Filter msk event from dialog page.
+ if ( aKeyEvent.iCode == EKeyOK && aKeyEvent.iModifiers & EModifierSpecial )
+ {
+ return EKeyWasConsumed;
+ }
+
if (MenuHasPane())
{
iMenuPane->OfferKeyEventL(aKeyEvent, aType);
@@ -973,9 +998,11 @@
( *iTitleArray )[ titles ]->iData.iMenuPaneResourceId,
iMenuPane );
if ( iActiveEditMenuObserver )
+ {
iActiveEditMenuObserver->DynInitMenuPaneL(
( *iTitleArray )[ titles ]->iData.iMenuPaneResourceId,
iMenuPane );
+ }
titles = iTitleArray->Count() - 2;
iMenuPane->FilterDimmedItems();
@@ -987,28 +1014,50 @@
TInt resource =
( *iTitleArray )[ titles ]->iData.iMenuPaneResourceId;
iMenuPane->AddMenuItemsL( resource, 0, ETrue );
+ // Multiple marking mode active
+ if ( markedItems && resource == R_AVKON_MENUPANE_MARK_MULTIPLE )
+ {
+ if ( !marking->CollectionEmpty() )
+ {
+ iMenuPane->SetItemDimmed( EAknCmdMarkingModeMarkAll, EFalse );
+ // Setting the item item specific so it will be shown in menu
+ iMenuPane->SetItemSpecific( EAknCmdMarkingModeMarkAll, ETrue );
+ }
+
+ if ( markedItems )
+ {
+ iMenuPane->SetItemDimmed( EAknCmdMarkingModeUnmarkAll, EFalse );
+ // Setting the item item specific so it will be shown in menu
+ iMenuPane->SetItemSpecific( EAknCmdMarkingModeUnmarkAll, ETrue );
+ }
+
+ iMenuPane->SetItemDimmed( EAknCmdMarkingModeMarkOne, ETrue );
+ iMenuPane->SetItemDimmed( EAknCmdMarkingModeEnter, ETrue );
+ }
+ else if ( resource == R_AVKON_MENUPANE_MARK_MULTIPLE )
+ {
+ iMenuPane->SetItemDimmed( EAknCmdMarkingModeMarkOne, ETrue );
+ }
iMenuObserver->DynInitMenuPaneL( resource, iMenuPane );
if ( fepMenuObserver )
fepMenuObserver->DynInitMenuPaneL( resource, iMenuPane );
if ( iActiveEditMenuObserver )
+ {
iActiveEditMenuObserver->DynInitMenuPaneL(
resource,iMenuPane );
-
- if ( resource == R_AVKON_MENUPANE_MARK_MULTIPLE )
- {
- iMenuPane->SetItemDimmed( EAknCmdMarkingModeMarkOne, ETrue );
}
-
+ iMenuPane->FilterDimmedItems();
titles--;
}
iExt->SetItemCommandsStateL();
iMenuPane->FilterDimmedItems();
}
-
- // Multiple marking mode active
- if ( marking )
+ // If no marked items but marking mode is active we need to add "Mark all"
+ // and "Unmark all" to menu.
+ else if ( marking )
{
- iMenuPane->AddMenuItemsL( R_AVKON_MENUPANE_MARK_MULTIPLE, 0, ETrue );
+ TInt resource( R_AVKON_MENUPANE_MARK_MULTIPLE );
+ iMenuPane->AddMenuItemsL( resource, 0, ETrue );
if ( !marking->CollectionEmpty() )
{
@@ -1022,6 +1071,7 @@
iMenuPane->SetItemDimmed( EAknCmdMarkingModeMarkOne, ETrue );
iMenuPane->SetItemDimmed( EAknCmdMarkingModeEnter, ETrue );
+ iMenuObserver->DynInitMenuPaneL( resource, iMenuPane );
iMenuPane->FilterDimmedItems();
}
@@ -1100,9 +1150,13 @@
iMenuPane->SetFocus(ETrue);
if (fepMenuObserver)
+ {
fepMenuObserver->SetEmphasis(this, ETrue);
+ }
if (iActiveEditMenuObserver)
+ {
iActiveEditMenuObserver->SetEmphasis(this, ETrue);
+ }
// Set the position of the menu pane to the top of the CBA area,
// and set the width to the width of the screen
@@ -1113,6 +1167,26 @@
// menu pane captures all pointer events, and forwards them to CBA if neccessary
iMenuPane->SetGloballyCapturing(ETrue);
iMenuPane->SetPointerCapture(ETrue);
+ if ( feedback )
+ {
+ TTouchLogicalFeedback fbLogicalType = ETouchFeedbackPopUp;
+ if ( CAknTransitionUtils::TransitionsEnabled( AknTransEffect::EComponentTransitionsOff ) )
+ {
+ if( iExt->iMenuType == EMenuContext || iExt->iMenuType == EMenuEdit )
+ {
+ fbLogicalType = ETouchFeedbackIncreasingPopUp;
+ }
+ else
+ {
+ fbLogicalType = ETouchFeedbackOptionsMenuOpened;
+ }
+ }
+ feedback->InstantFeedback(
+ this,
+ fbLogicalType,
+ ETouchFeedbackVibra,
+ TPointerEvent() );
+ }
}
iMenuPane->MakeVisible( EFalse );
@@ -1123,16 +1197,6 @@
if( optMenuFg )
{
GfxTransEffect::Begin( iMenuPane, KGfxControlAppearAction );
- if( feedback && CAknTransitionUtils::TransitionsEnabled( AknTransEffect::EComponentTransitionsOff ))
- {
- TTouchLogicalFeedback fbLogicalType = ETouchFeedbackOptionsMenuOpened;
- if( iExt->iMenuType == EMenuContext || iExt->iMenuType == EMenuEdit )
- {
- fbLogicalType = ETouchFeedbackIncreasingPopUp;
- }
- feedback->InstantFeedback( this, fbLogicalType,
- ETouchFeedbackVibra, TPointerEvent() );
- }
}
iMenuPane->StartDisplayingMenuPane(NULL, menuPosition, NULL, screenSize.iWidth, EPopupTargetBottomLeft);
@@ -1150,11 +1214,6 @@
GfxTransEffect::SetDemarcation( iMenuPane, demarcation );
GfxTransEffect::End( iMenuPane );
}
- if( feedback )
- {
- feedback->InstantFeedback( this, ETouchFeedbackPopUp,
- ETouchFeedbackVibra, TPointerEvent() );
- }
_AKNTRACE_FUNC_EXIT;
}
--- a/uifw/EikStd/coctlsrc/EIKMENUP.CPP Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/EIKMENUP.CPP Tue Jul 13 11:29:56 2010 +0100
@@ -238,7 +238,9 @@
EContextSensitive,
ESkipScrollbarUpdate,
EHighlightEnabled,
- EHideViewSpecificCommands
+ EHideViewSpecificCommands,
+ EHideMarkAndUnmark,
+ EHideItemActionCommands
};
/**
@@ -488,6 +490,12 @@
_AKNTRACE( "delta = %d", delta );
_AKNTRACE( "iViewPosition(%d,%d)", iViewPosition.iX, iViewPosition.iY );
+ //here checking the delta whether it is changed.
+ //if it is changed,the view must be drawn using the below code.
+ if ( delta != 0 )
+ {
+ aDrawNow = ETrue;
+ }
if ( aDrawNow )
{
if ( iFlags.IsClear( ESkipScrollbarUpdate ) )
@@ -840,11 +848,6 @@
{
cascadeMenuPane->SetParent( iControl );
GfxTransEffect::Begin( cascadeMenuPane, KGfxControlAppearAction );
- if ( CAknTransitionUtils::TransitionsEnabled( AknTransEffect::EComponentTransitionsOff ) )
- {
- ImmediateFeedback( ETouchFeedbackSubMenuOpened,
- ETouchFeedbackVibra );
- }
cascadeMenuPane->StartDisplayingMenuPane( iControl->iHotKeyTable,
iControl->Position(),
NULL,
@@ -1252,9 +1255,11 @@
}
iFlags.Clear( EHideItemSpecificCommands );
+ iFlags.Clear( EHideItemActionCommands );
iFlags.Clear( EContextSensitive );
iFlags.Clear( EHighlightEnabled );
iFlags.Clear( EHideViewSpecificCommands );
+ iFlags.Clear( EHideMarkAndUnmark );
_AKNTRACE_FUNC_EXIT;
}
@@ -1359,9 +1364,16 @@
{
iFlags.Set( EContextSensitive );
}
- else if ( ownerFlags.IsSet( EHideItemSpecificCommands ) )
+ else
{
- iControl->SetItemCommandsStateL( ETrue );
+ if ( ownerFlags.IsSet( EHideItemSpecificCommands ) )
+ {
+ iControl->SetItemCommandsStateL( ETrue );
+ }
+ if ( ownerFlags.IsSet( EHideItemActionCommands ) )
+ {
+ iControl->SetItemActionsStateL( ETrue );
+ }
}
}
}
@@ -2260,6 +2272,19 @@
iEditMenuObserver->DynInitMenuPaneL( aCascadeMenuId, iCascadeMenuPane );
}
+ if ( iExtension->iFlags.IsSet( CEikMenuPaneExtension::EHideMarkAndUnmark ) )
+ {
+ TInt pos;
+ if ( iCascadeMenuPane->MenuItemExists( EAknCmdMark, pos ) )
+ {
+ iCascadeMenuPane->SetItemDimmed( EAknCmdMark, ETrue );
+ }
+ if ( iCascadeMenuPane->MenuItemExists( EAknCmdUnmark, pos ) )
+ {
+ iCascadeMenuPane->SetItemDimmed( EAknCmdUnmark, ETrue );
+ }
+ }
+
iCascadeMenuPane->iExtension->PrepareCascadeForItemCommandsL();
iCascadeMenuPane->iExtension->EnableHighlight( EFalse );
iCascadeMenuPane->FilterDimmedItems();
@@ -2273,7 +2298,13 @@
{
iExtension->StartCascadeMenuAppearTransition();
}
- iExtension->ImmediateFeedback( ETouchFeedbackPopUp,
+
+ TTouchLogicalFeedback fbLogicalType = ETouchFeedbackPopUp;
+ if ( CAknTransitionUtils::TransitionsEnabled( AknTransEffect::EComponentTransitionsOff ) )
+ {
+ fbLogicalType = ETouchFeedbackSubMenuOpened;
+ }
+ iExtension->ImmediateFeedback( fbLogicalType,
ETouchFeedbackVibra );
_AKNTRACE_FUNC_EXIT;
}
@@ -2810,13 +2841,18 @@
skin->GetCachedItemData( KAknsIIDQgnIndiSubmenu, EAknsITMaskedBitmap ) );
if( itemData )
{
+ AknIconUtils::SetSize( itemData->Bitmap(),cascadeRect.Rect().Size() );
aGc.BitBltMasked( cascadeRect.Rect().iTl, itemData->Bitmap(),
cascadeRect.Rect().Size(), itemData->Mask(), ETrue );
}
else
{
- aGc.BitBltMasked( cascadeRect.Rect().iTl, iExtension->iCascadeBitmap,
- cascadeRect.Rect().Size(), iExtension->iCascadeBitmapMask, ETrue );
+ if ( iExtension->iCascadeBitmap && iExtension->iCascadeBitmapMask )
+ {
+ AknIconUtils::SetSize( iExtension->iCascadeBitmap,cascadeRect.Rect().Size() );
+ aGc.BitBltMasked( cascadeRect.Rect().iTl, iExtension->iCascadeBitmap,
+ cascadeRect.Rect().Size(), iExtension->iCascadeBitmapMask, ETrue );
+ }
}
}
else
@@ -3123,7 +3159,10 @@
_AKNTRACE( "commandId = %d", commandId );
TBool isDeleted = EFalse;
iIsDeleted = &isDeleted;
+
+ CleanupStack::PushL( TCleanupItem( CleanLocalRef, this ) );
iMenuObserver->ProcessCommandL( commandId );
+ CleanupStack::Pop();
if ( !isDeleted )
{
@@ -6597,6 +6636,34 @@
}
}
+// -----------------------------------------------------------------------------
+// CEikMenuPane::SetItemActionsStateL
+// -----------------------------------------------------------------------------
+//
+void CEikMenuPane::SetItemActionsStateL( TBool aDimmed )
+ {
+ if ( iExtension && iExtension->iFlags.IsSet(
+ CEikMenuPaneExtension::ESingleClickEnabled ) )
+ {
+ if ( aDimmed )
+ {
+ iExtension->iFlags.Set(
+ CEikMenuPaneExtension::EHideItemActionCommands );
+ }
+
+ for ( TInt i = 0; i < iItemArray->Count(); ++i )
+ {
+ CEikMenuPaneItem* item = iItemArray->At( i );
+ TBool itemActionItem(
+ item->iData.iFlags & EEikMenuItemAction );
+ // Dim item specific items
+ if ( aDimmed && itemActionItem )
+ {
+ item->iData.iFlags |= EEikMenuItemDimmed;
+ }
+ }
+ }
+ }
// -----------------------------------------------------------------------------
// CEikMenuPane::AddMenuItemsToItemActionMenuL
@@ -6702,5 +6769,31 @@
}
}
+// -----------------------------------------------------------------------------
+// CEikMenuPane::HideMarkAndUnmark
+// -----------------------------------------------------------------------------
+//
+void CEikMenuPane::HideMarkAndUnmark( TBool aHide )
+ {
+ if ( aHide )
+ {
+ iExtension->iFlags.Set( CEikMenuPaneExtension::EHideMarkAndUnmark );
+ }
+ else
+ {
+ iExtension->iFlags.Clear( CEikMenuPaneExtension::EHideMarkAndUnmark );
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// CEikMenuPane::CleanLocalRef
+// -----------------------------------------------------------------------------
+//
+void CEikMenuPane::CleanLocalRef( TAny* any )
+ {
+ static_cast<CEikMenuPane*>( any )->iIsDeleted = NULL;
+ }
+
+
// end of file
--- a/uifw/EikStd/coctlsrc/EIKSCRLB.CPP Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/EIKSCRLB.CPP Tue Jul 13 11:29:56 2010 +0100
@@ -41,8 +41,6 @@
#include "eikscrlb.h"
#include "EIKSBEXT.H"
-const TInt KIntensity = 100; // 100%
-
const TInt KScrollBarWidth=9;
// const TInt KScrollButtonHeight=10;
// const TInt KArrowHeadScrollBarLength=20;
@@ -671,13 +669,13 @@
if ( iAvkonAppUiBase )
{
CAknPointerEventModifier* modifier = iAvkonAppUiBase->PointerEventModifier();
-
+
if ( modifier )
{
modifier->Pop( *this );
}
}
-
+
AknsUtils::DeregisterControlPosition( this );
}
@@ -826,7 +824,7 @@
EXPORT_C void CAknDoubleSpanScrollBar::MakeVisible(TBool aVisible)
{
CAknPointerEventModifier* modifier = iAvkonAppUiBase ? iAvkonAppUiBase->PointerEventModifier() : NULL;
-
+
if ( modifier )
{
CAknDoubleSpanScrollBarExtension* extension = static_cast<CAknDoubleSpanScrollBarExtension*> (iExtension);
@@ -896,22 +894,22 @@
EXPORT_C void CAknDoubleSpanScrollBar::SizeChanged()
{
CAknPointerEventModifier* modifier = iAvkonAppUiBase ? iAvkonAppUiBase->PointerEventModifier() : NULL;
-
+
if (iExtension)
{
- CAknDoubleSpanScrollBarExtension* extension = static_cast<CAknDoubleSpanScrollBarExtension*> (iExtension);
- if ( modifier && IsVisible() && !( extension->iExtensionType & ENoExpandedTouchArea ) )
- {
- modifier->Update( *this, ExtensionArea() );
- }
+ CAknDoubleSpanScrollBarExtension* extension = static_cast<CAknDoubleSpanScrollBarExtension*> (iExtension);
+ if ( modifier && IsVisible() && !( extension->iExtensionType & ENoExpandedTouchArea ) )
+ {
+ modifier->Update( *this, ExtensionArea() );
+ }
}
else
- {
- if ( modifier && IsVisible() )
- {
- modifier->Update( *this, ExtensionArea() );
- }
- }
+ {
+ if ( modifier && IsVisible() )
+ {
+ modifier->Update( *this, ExtensionArea() );
+ }
+ }
AknsUtils::RegisterControlPosition( this );
if (iExtension)
@@ -1045,33 +1043,48 @@
// The real span area available (as pixels)
scrollSpanPix -= thumbSpanPix;
-
- // touch release on thumb
- TBool thumbPressed =
- ( position < (thumbPositionPix + thumbSpanPix)
- && position > thumbPositionPix );
- if ( thumbPressed &&
- aPointerEvent.iType == TPointerEvent::EButton1Up &&
- thumbSpan < scrollSpan )
- {
- MTouchFeedback* feedback = MTouchFeedback::Instance();
+
+ // touch release on thumb
+ TBool thumbPressed =
+ ( position < (thumbPositionPix + thumbSpanPix)
+ && position > thumbPositionPix );
+ if ( thumbPressed &&
+ aPointerEvent.iType == TPointerEvent::EButton1Up &&
+ thumbSpan < scrollSpan )
+ {
+ MTouchFeedback* feedback = MTouchFeedback::Instance();
- CCoeControl* parent = Parent();
- TBool feedbackEnabled = !IsDimmed() && IsVisible();
- if (parent && feedbackEnabled)
- {
- // check the same for the parent
- feedbackEnabled = !parent->IsDimmed() && parent->IsVisible();
- }
- if ( feedback && feedbackEnabled )
- {
- feedback->InstantFeedback( this,
- ETouchFeedbackSlider,
- ETouchFeedbackVibra,
- aPointerEvent );
- }
+ CCoeControl* parent = Parent();
+ TBool feedbackEnabled = !IsDimmed() && IsVisible();
+ if (parent && feedbackEnabled)
+ {
+ // check the same for the parent
+ feedbackEnabled = !parent->IsDimmed() && parent->IsVisible();
+ }
+ if ( feedback && feedbackEnabled )
+ {
+ feedback->InstantFeedback( this,
+ ETouchFeedbackSlider,
+ ETouchFeedbackVibra,
+ aPointerEvent );
}
-
+ }
+
+ if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
+ {
+ extension->iPointerDownOn = CEikScrollBar::ENone;
+
+ // Highlight off always when the pointer is lifted
+ indicator->SetHandleHighlight( EFalse );
+ indicator->DrawDeferred();
+ indicator->SetBackgroudHighlight( EFalse );
+
+ if ( extension->iPopupController )
+ {
+ extension->iPopupController->HideInfoPopupNote();
+ extension->iShowPopup = EFalse;
+ }
+ }
// check that scroll bar is useful
if (thumbSpan < scrollSpan)
{
@@ -1111,22 +1124,6 @@
}
}
- if (aPointerEvent.iType == TPointerEvent::EButton1Up)
- {
- extension->iPointerDownOn = CEikScrollBar::ENone;
-
- // Highlight off always when the pointer is lifted
- indicator->SetHandleHighlight( EFalse );
- indicator->DrawDeferred();
- indicator->SetBackgroudHighlight( EFalse );
-
- if ( extension->iPopupController )
- {
- extension->iPopupController->HideInfoPopupNote();
- extension->iShowPopup = EFalse;
- }
- }
-
// respond to the pointer event
switch(extension->iPointerDownOn)
{
@@ -1145,7 +1142,7 @@
TInt prevPosValue = extension->ThumbPosition();
-
+
// This will update the thumb's pixel extent, used
// below
extension->SetModelThumbPosition(thumbPosition);
@@ -1188,7 +1185,7 @@
// repeat until thumb reaches the stylus down position
pointerWindow->RequestPointerRepeatEvent(KScrollRepeatTimeout, ignoreRect);
}
-
+
}
else
@@ -1239,7 +1236,7 @@
pointerWindow->RequestPointerRepeatEvent(KScrollRepeatTimeout, ignoreRect);
}
-
+
}
if(indicator->DrawBackgroundState())
@@ -1263,30 +1260,30 @@
if ( feedback )
{
- TTouchFeedbackType fbType = TTouchFeedbackType(
+ TTouchFeedbackType fbType = TTouchFeedbackType(
ETouchFeedbackAudio |
ETouchFeedbackVibra );
-
+
feedback->InstantFeedback( this, ETouchFeedbackSlider, fbType, aPointerEvent );
}
}
- if( aPointerEvent.iType == TPointerEvent::EDrag
+ if( aPointerEvent.iType == TPointerEvent::EDrag
|| aPointerEvent.iType == TPointerEvent::EButtonRepeat )
{
- // performace improving. Too many drag event received, handling every single event
+ // performace improving. Too many drag event received, handling every single event
// will use too much CPU time.
TTime now;
- now.HomeTime();
+ now.HomeTime();
if ( extension->iDragged &&
- now.MicroSecondsFrom( extension->iLastDrag )
+ now.MicroSecondsFrom( extension->iLastDrag )
< KScrollDragTimeout )
- {
+ {
break; // ignore drag for this time
}
extension->iDragged = ETrue; // after this time, iLastDragged has value.
extension->iLastDrag = now;
-
+
thumbPositionPix = position - extension->iPointerOffsetFromThumb;
TInt oldPosition = thumbPosition;
TReal newPosition = thumbPositionPix * ( scrollSpan - thumbSpan ) / (TReal)scrollSpanPix;
@@ -1304,20 +1301,6 @@
if(thumbPosition != oldPosition)
{
- // Smooth continuous tactile feedback is produced
- // during thumb dragging. The tactile feedback API
- // filters out possible re-startings of the effect.
- MTouchFeedback* feedback = MTouchFeedback::Instance();
-
- if ( feedback )
- {
- TTimeIntervalMicroSeconds32 timeout( 300000 );
- feedback->StartFeedback( this,
- ETouchContinuousSlider,
- &aPointerEvent,
- KIntensity, // intensity 100%
- timeout );
- }
extension->SetModelThumbPosition(thumbPosition);
indicator->SetIndicatorValues(scrollSpan, thumbPosition, thumbSpan, 0, 0);
@@ -1337,25 +1320,31 @@
if ( extension->iShowPopup && extension->iPopupController )
{
TPoint infoPoint = PositionRelativeToScreen();
-
+
if ( iOrientation == EVertical )
{
if ( AknLayoutUtils::LayoutMirrored() )
+ {
+ TRect mainPaneRect( 0, 0, 0, 0 );
+ AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane,
+ mainPaneRect );
+ TInt mainPaneWidth = mainPaneRect.Width();
+ infoPoint.iX += ( mainPaneWidth - infoPoint.iX + Rect().Width() ) / 2 ;
+ infoPoint.iY += aPointerEvent.iPosition.iY;
+ extension->iPopupController->SetPositionAndAlignment (
+ infoPoint, EHRightVCenter );
+ }
+ else
{
- infoPoint.iX += Rect().Width();
+ infoPoint.iX = infoPoint.iX / 2;
infoPoint.iY += aPointerEvent.iPosition.iY;
extension->iPopupController->SetPositionAndAlignment (
infoPoint, EHLeftVCenter );
}
- else
- {
- infoPoint.iY += aPointerEvent.iPosition.iY;
- extension->iPopupController->SetPositionAndAlignment (
- infoPoint, EHRightVCenter );
- }
}
else if ( iOrientation == EHorizontal )
{
+ //infoPoint.iY = infoPoint.iY / 2;
infoPoint.iX += aPointerEvent.iPosition.iX;
extension->iPopupController->SetPositionAndAlignment(
infoPoint, EHCenterVBottom );
@@ -1367,17 +1356,6 @@
break;
case CEikScrollBar::ENone:
- {
- // Stop the continuous tactile feedback that may be playing
- // at the time due to possible previous thumb dragging.
- MTouchFeedback* feedback = MTouchFeedback::Instance();
-
- if ( feedback )
- {
- feedback->StopFeedback( this );
- }
- }
-
if(lastPointerDownOn == CEikScrollBar::EThumb)
{
if(extension->ScrollBarObserver())
@@ -1590,9 +1568,9 @@
{
CAknDoubleSpanScrollBarExtension* extension =
static_cast<CAknDoubleSpanScrollBarExtension*>( iExtension );
-
+
CAknDoubleSpanScrollIndicator* indicator = extension->iScrollIndicator;
-
+
indicator->SetHandleHighlight( EFalse );
}
@@ -1773,7 +1751,7 @@
}
else
{
- iParent->DrawDeferred();
+ iParent->DrawDeferred();
}
}
@@ -2345,13 +2323,13 @@
// interested in only about the ratio between scrollbar and extension.
TAknLayoutRect layoutRect;
layoutRect.LayoutRect( TRect( 0, 0, 200, 200 ), AknLayoutScalable_Avkon::listscroll_gen_pane( 0 ).LayoutLine() );
-
+
TRect parent( layoutRect.Rect() ); // parent of both extension and scrollbar
-
+
layoutRect.LayoutRect( parent, AknLayoutScalable_Avkon::scroll_pane( 0 ).LayoutLine() );
-
+
TRect scrollbar( layoutRect.Rect() );
-
+
CAknDoubleSpanScrollBarExtension* extension1 = static_cast<CAknDoubleSpanScrollBarExtension*> (iExtension);
if( extension1->iExtensionType & ENormalExpandedTouchArea )
layoutRect.LayoutRect( parent, AknLayoutScalable_Avkon::aid_size_touch_scroll_bar( 0 ).LayoutLine() );
@@ -2362,58 +2340,58 @@
TRect extension( layoutRect.Rect() );
TRect area;
-
+
if ( iParentControl )
{
CCoeControl* windowOwningParent = iParentControl;
while ( windowOwningParent && !windowOwningParent->OwnsWindow() )
{
windowOwningParent = windowOwningParent->Parent();
- }
-
+ }
+
if ( windowOwningParent )
{
TInt xGap = 0;
- TRect scrollBarRect = Rect();
+ TRect scrollBarRect = Rect();
TRect parentRect = windowOwningParent->Rect();
-
- if ( OwnsWindow() )
+
+ if ( OwnsWindow() )
{
- scrollBarRect.Move( Position().iX -
+ scrollBarRect.Move( Position().iX -
windowOwningParent->Position().iX, 0 );
- }
+ }
if ( iOrientation == CEikScrollBar::EVertical )
- {
- // left to right layout in use
- if ( !AknLayoutUtils::LayoutMirrored() )
- {
- xGap = parentRect.iBr.iX - scrollBarRect.iBr.iX;
- if ( Abs( xGap ) < scrollBarRect.Width() )
- {
- extension.iBr.iX += xGap;
- }
- }
- // right to left layout in use
- else
- {
- xGap = parentRect.iTl.iX - scrollBarRect.iTl.iX;
- if ( Abs( xGap ) < scrollBarRect.Width() )
- {
- extension.iTl.iX += xGap;
- }
- }
- }
+ {
+ // left to right layout in use
+ if ( !AknLayoutUtils::LayoutMirrored() )
+ {
+ xGap = parentRect.iBr.iX - scrollBarRect.iBr.iX;
+ if ( Abs( xGap ) < scrollBarRect.Width() )
+ {
+ extension.iBr.iX += xGap;
+ }
+ }
+ // right to left layout in use
+ else
+ {
+ xGap = parentRect.iTl.iX - scrollBarRect.iTl.iX;
+ if ( Abs( xGap ) < scrollBarRect.Width() )
+ {
+ extension.iTl.iX += xGap;
+ }
+ }
+ }
else
- {
- xGap = parentRect.iBr.iY - scrollBarRect.iBr.iY;
- if ( Abs( xGap ) < scrollBarRect.Height() )
- {
- extension.iBr.iY += xGap;
- }
- }
+ {
+ xGap = parentRect.iBr.iY - scrollBarRect.iBr.iY;
+ if ( Abs( xGap ) < scrollBarRect.Height() )
+ {
+ extension.iBr.iY += xGap;
+ }
+ }
}
- }
-
+ }
+
if ( iOrientation == CEikScrollBar::EVertical )
{
area.iTl.iX = extension.iTl.iX - scrollbar.iTl.iX;
@@ -2426,9 +2404,9 @@
area.iTl.iX = scrollbar.iTl.iY - extension.iTl.iY;
area.iTl.iY = scrollbar.Width() - extension.Width();
area.iBr.iX = iSize.iWidth + ( extension.Height() - scrollbar.Height() );
- area.iBr.iY = area.iTl.iY + extension.Height();
+ area.iBr.iY = area.iTl.iY + extension.Width();
}
-
+
return area;
}
--- a/uifw/EikStd/coctlsrc/aknedwinphysicshandler.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/aknedwinphysicshandler.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -218,7 +218,11 @@
{
return;
}
-
+ if ( !IsBouncing() )
+ {
+ iFlags.Clear( EFlagBouncingDown );
+ iFlags.Clear( EFlagBouncingUp );
+ }
iWorldIndex += aPixelsToMove;
ScrollView( EFalse );
}
--- a/uifw/EikStd/coctlsrc/aknitemactionmenu.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/aknitemactionmenu.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -392,6 +392,28 @@
// ---------------------------------------------------------------------------
+// CAknItemActionMenu::CollectionHasMarkedItems
+// ---------------------------------------------------------------------------
+//
+TBool CAknItemActionMenu::CollectionHasMarkedItems()
+ {
+ _AKNTRACE_FUNC_ENTER;
+ TBool markedItems( EFalse );
+ for ( TInt i = 0; i < iStates.Count(); i++ )
+ {
+ TInt state( iStates[ i ]->CollectionState() );
+ if ( state & MAknCollection::EStateCollectionVisible )
+ {
+ if ( state & MAknCollection::EStateMarkedItems )
+ {
+ markedItems = ETrue;
+ }
+ }
+ }
+ _AKNTRACE_FUNC_EXIT;
+ return markedItems;
+ }
+// ---------------------------------------------------------------------------
// CAknItemActionMenu::CAknItemActionMenu
// ---------------------------------------------------------------------------
//
--- a/uifw/EikStd/coctlsrc/aknitemactionmenuregister.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/aknitemactionmenuregister.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -920,11 +920,10 @@
{
TAknUnregisteredMenuData& data( iUnregisteredMenus[i] );
- if ( data.iOwner == iMenuBarOwner )
+ if ( data.iOwner == aMenuBarOwner )
{
- data.iOwner = iMenuBarOwner = NULL;
+ data.iOwner = NULL;
}
-
++i;
}
--- a/uifw/EikStd/coctlsrc/aknmarkingmode.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/aknmarkingmode.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -21,7 +21,9 @@
#include <aknnavide.h>
#include <barsread.h>
#include <AknUtils.h>
+#include <AknTasHook.h>
+#include "akntrace.h"
#include "aknmarkingmode.h"
// ---------------------------------------------------------------------------
@@ -32,8 +34,10 @@
CAknItemActionMenu& aItemActionMenu,
CollectionArray& aArray )
{
+ _AKNTRACE_FUNC_ENTER;
CAknMarkingMode* self =
new ( ELeave ) CAknMarkingMode( aItemActionMenu, aArray );
+ _AKNTRACE_FUNC_EXIT;
return self;
}
@@ -44,7 +48,10 @@
//
CAknMarkingMode::~CAknMarkingMode()
{
+ _AKNTRACE_FUNC_ENTER;
+ AKNTASHOOK_REMOVE();
delete iMarkingDecorator;
+ _AKNTRACE_FUNC_EXIT;
}
@@ -54,9 +61,10 @@
//
void CAknMarkingMode::SetCollectionMultipleMarkingState( TBool aActive )
{
+ _AKNTRACE_FUNC_ENTER;
for ( TInt i = 0; i < iCollections.Count(); i++ )
{
- MAknCollection* collection( iCollections[ i ] );
+ MAknCollection* collection( iCollections[i] );
// Assume the command applies to first list with multiple selection
if ( collection->CollectionState() &
MAknCollection::EStateMultipleSelection )
@@ -72,6 +80,7 @@
break;
}
}
+ _AKNTRACE_FUNC_EXIT;
}
@@ -81,9 +90,10 @@
//
void CAknMarkingMode::TryExitMarkingMode()
{
+ _AKNTRACE_FUNC_ENTER;
for ( TInt i = 0; i < iCollections.Count(); i++ )
{
- MAknCollection* collection( iCollections[ i ] );
+ MAknCollection* collection( iCollections[i] );
MAknMarkingCollection* markingCollection
= MarkingCollection( *collection );
if ( markingCollection && markingCollection->MarkingState(
@@ -96,6 +106,7 @@
}
break;
}
+ _AKNTRACE_FUNC_EXIT;
}
@@ -105,10 +116,11 @@
//
TBool CAknMarkingMode::MultipleMarkingActive() const
{
+ _AKNTRACE_FUNC_ENTER;
TBool markingActive( EFalse );
for ( TInt i = 0; i < iCollections.Count(); i++ )
{
- MAknCollection* collection( iCollections[ i ] );
+ MAknCollection* collection( iCollections[i] );
if ( collection->CollectionState() &
MAknCollection::EStateCollectionVisible )
{
@@ -122,6 +134,7 @@
break;
}
}
+ _AKNTRACE_FUNC_EXIT;
return markingActive;
}
@@ -132,10 +145,11 @@
//
TBool CAknMarkingMode::MarkedItems() const
{
+ _AKNTRACE_FUNC_ENTER;
TBool markedItems( EFalse );
for ( TInt i = 0; i < iCollections.Count(); i++ )
{
- MAknCollection* collection( iCollections[ i ] );
+ MAknCollection* collection( iCollections[i] );
if ( collection->CollectionState() &
MAknCollection::EStateCollectionVisible )
{
@@ -154,6 +168,7 @@
break;
}
}
+ _AKNTRACE_FUNC_EXIT;
return markedItems;
}
@@ -163,10 +178,11 @@
//
TBool CAknMarkingMode::CollectionEmpty() const
{
+ _AKNTRACE_FUNC_ENTER;
TBool empty( EFalse );
for ( TInt i = 0; i < iCollections.Count(); i++ )
{
- MAknCollection* collection( iCollections[ i ] );
+ MAknCollection* collection( iCollections[i] );
if ( collection->CollectionState() &
MAknCollection::EStateCollectionVisible )
{
@@ -185,6 +201,7 @@
break;
}
}
+ _AKNTRACE_FUNC_EXIT;
return empty;
}
@@ -195,12 +212,14 @@
//
void CAknMarkingMode::MarkAllL()
{
+ _AKNTRACE_FUNC_ENTER;
MAknMarkingCollection* collection = ActiveMarkingCollection();
if ( collection )
{
collection->MarkAllL();
}
+ _AKNTRACE_FUNC_EXIT;
}
@@ -210,12 +229,14 @@
//
void CAknMarkingMode::UnmarkAll()
{
+ _AKNTRACE_FUNC_ENTER;
MAknMarkingCollection* collection = ActiveMarkingCollection();
if ( collection )
{
collection->UnmarkAll();
}
+ _AKNTRACE_FUNC_EXIT;
}
@@ -225,6 +246,7 @@
//
void CAknMarkingMode::MarkCurrentItemL()
{
+ _AKNTRACE_FUNC_ENTER;
MAknMarkingCollection* collection = ActiveMarkingCollection();
// first activate marking mode if needed
@@ -239,6 +261,7 @@
{
collection->MarkCurrentItemL();
}
+ _AKNTRACE_FUNC_EXIT;
}
// ---------------------------------------------------------------------------
@@ -247,6 +270,8 @@
//
TBool CAknMarkingMode::CurrentItemMarkable()
{
+ _AKNTRACE_FUNC_ENTER;
+ _AKNTRACE_FUNC_EXIT;
return MarkingCollection()->CurrentItemMarkable();
}
@@ -261,6 +286,9 @@
iItemActionMenu( aItemActionMenu ),
iMarkingDecorator( NULL )
{
+ _AKNTRACE_FUNC_ENTER;
+ AKNTASHOOK_ADD( this, "CAknMarkingMode" );
+ _AKNTRACE_FUNC_EXIT;
}
@@ -271,9 +299,11 @@
MAknMarkingCollection* CAknMarkingMode::MarkingCollection(
MAknCollection& aCollection )
{
+ _AKNTRACE_FUNC_ENTER;
TAny* extension( NULL );
aCollection.CollectionExtension(
MAknMarkingCollection::TYPE, extension, NULL );
+ _AKNTRACE_FUNC_EXIT;
return static_cast<MAknMarkingCollection*>( extension );
}
@@ -284,16 +314,18 @@
//
MAknMarkingCollection* CAknMarkingMode::MarkingCollection()
{
+ _AKNTRACE_FUNC_ENTER;
for ( TInt i = 0; i < iCollections.Count(); i++ )
{
- MAknCollection* collection( iCollections[ i ] );
+ MAknCollection* collection( iCollections[i] );
if ( collection->CollectionState() &
MAknCollection::EStateCollectionVisible )
{
+ _AKNTRACE_FUNC_EXIT;
return MarkingCollection( *collection );
}
}
-
+ _AKNTRACE_FUNC_EXIT;
return NULL;
}
@@ -304,9 +336,10 @@
//
MAknMarkingCollection* CAknMarkingMode::ActiveMarkingCollection()
{
+ _AKNTRACE_FUNC_ENTER;
for ( TInt i = 0; i < iCollections.Count(); i++ )
{
- MAknCollection* collection( iCollections[ i ] );
+ MAknCollection* collection( iCollections[i] );
MAknMarkingCollection* markingCollection =
MarkingCollection( *collection );
@@ -314,10 +347,11 @@
if ( markingCollection && markingCollection->MarkingState() &
MAknMarkingCollection::EStateMarkingMode )
{
+ _AKNTRACE_FUNC_EXIT;
return markingCollection;
}
}
-
+ _AKNTRACE_FUNC_EXIT;
return NULL;
}
@@ -327,6 +361,7 @@
//
void CAknMarkingMode::UpdateMarkingModeNaviPaneL( TBool aEnable )
{
+ _AKNTRACE_FUNC_ENTER;
CEikonEnv* eikonEnv = CEikonEnv::Static();
if ( eikonEnv && eikonEnv->AppUiFactory() )
@@ -364,6 +399,7 @@
}
}
}
+ _AKNTRACE_FUNC_EXIT;
}
// End of File
--- a/uifw/EikStd/coctlsrc/aknstyluspopupmenu.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/aknstyluspopupmenu.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -24,6 +24,7 @@
#include <eikapp.h>
#include <aknappui.h>
#include <AknDef.h>
+#include <touchfeedback.h>
#include "aknstyluspopupmenu.h"
#include "aknstyluspopupmenucontent.h"
@@ -195,7 +196,18 @@
TSize size(iController->Size());
iController->ShowPopUp();
-
+ if ( AknLayoutUtils::PenEnabled() )
+ {
+ MTouchFeedback* feedback = MTouchFeedback::Instance();
+ if ( feedback )
+ {
+ feedback->InstantFeedback(
+ iContent,
+ ETouchFeedbackPopUp,
+ ETouchFeedbackVibra,
+ TPointerEvent() );
+ }
+ }
if ( size.iWidth == 0 && size.iHeight == 0 )
{
if ( iPositionType != KErrNotFound )
@@ -391,8 +403,10 @@
TBool isDeleted = EFalse;
iIsDeleted = &isDeleted;
+ CleanupStack::PushL( TCleanupItem( CleanLocalRef, this ) );
iMenuObserver->ProcessCommandL( iContent->CurrentCommandId() );
-
+ CleanupStack::Pop();
+
if ( isDeleted )
{
return;
@@ -510,3 +524,12 @@
iController = NULL;
}
}
+
+// -----------------------------------------------------------------------------
+// CAknStylusPopUpMenu::CleanLocalRef
+// -----------------------------------------------------------------------------
+//
+void CAknStylusPopUpMenu::CleanLocalRef( TAny* any )
+ {
+ static_cast<CAknStylusPopUpMenu*>( any )->iIsDeleted = NULL;
+ }
--- a/uifw/EikStd/coctlsrc/akntoolbarextension.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/akntoolbarextension.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -22,6 +22,10 @@
#include <aknconsts.h>
#include <akntoolbar.h>
+#include <touchfeedback.h>
+#include <akntranseffect.h>
+#include <akntransitionutils.h>
+
#include "akntoolbarextensionview.h"
@@ -309,6 +313,28 @@
iView->SetFocusing( !nonFocusing );
if ( IsVisible() )
{
+
+ //
+ // the pop up feedback for droping out toolbar extention view
+ //
+ if ( AknLayoutUtils::PenEnabled() )
+ {
+ MTouchFeedback* feedback = MTouchFeedback::Instance();
+ if ( feedback )
+ {
+ TTouchLogicalFeedback fbLogicalType = ETouchFeedbackPopUp;
+ if ( CAknTransitionUtils::TransitionsEnabled(
+ AknTransEffect::EComponentTransitionsOff ) )
+ {
+ fbLogicalType = ETouchFeedbackIncreasingPopUp;
+ }
+
+ feedback->InstantFeedback( this,
+ fbLogicalType,
+ ETouchFeedbackVibra, TPointerEvent() );
+ }
+ }
+
iToolbar->DynInitExtensionL( this );
iView->MakeVisible( ETrue ); // show view
}
--- a/uifw/EikStd/coctlsrc/akntoolbarextensionview.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/akntoolbarextensionview.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -539,6 +539,14 @@
{
// tapped outside view,
MakeVisible( EFalse );
+
+ MTouchFeedback* feedback = MTouchFeedback::Instance();
+ if ( feedback )
+ {
+ feedback->InstantFeedback( this, ETouchFeedbackPopUp,
+ ETouchFeedbackVibra, aPointerEvent );
+ }
+
// Close extension view and let also extension know about it
// so it can change state
iExtension->ViewClosed();
@@ -865,17 +873,19 @@
MAknsSkinInstance* skin = AknsUtils::SkinInstance();
if ( iExtension->ExtensionFlags() & KAknTbExtensionDsaMode )
{
+ TSize cornerSize(20,20);
gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha );
gc.SetBrushColor( TRgb( KToolbarExtensionBgColor, KToolBarExtensionBgAlpha ) );
gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
- gc.DrawRect( rect );
+ gc.DrawRoundRect( rect, cornerSize );
+
gc.SetDrawMode( CGraphicsContext::EDrawModePEN );
TSize penSize( 1, 1 );
gc.SetPenSize( penSize );
- gc.SetPenStyle( CGraphicsContext::EDottedPen );
- gc.SetPenColor( KRgbWhite );
+ gc.SetPenStyle( CGraphicsContext::ESolidPen );
+ gc.SetPenColor( KRgbDarkGray );
gc.SetBrushStyle( CGraphicsContext::ENullBrush );
- gc.DrawRect( rect );
+ gc.DrawRoundRect( rect, cornerSize );
}
else
{
--- a/uifw/EikStd/coctlsrc/eikcba.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/eikcba.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -214,8 +214,9 @@
ECbaSingleClickEnabled, // single click enabled in appUi
ECbaItemSoftkeyDisabled, // item specific softkey disabled
ECbaItemSpecificSoftkeyInUse, // item specific softkey is in use
- ECbaItemSoftkeyDisabledByClient, // client disabled item specific softkey
- ECbaMultipleMarkingActive // multiple marking has changed RSK
+ ECbaItemSoftkeyDisabledByClient, // client has disabled item specific softkey
+ ECbaMultipleMarkingActive, // multiple marking has changed RSK
+ ECbaCombinePaneUncovered // The combine pane in status pane is invisible.
};
enum TCbaLayers
@@ -1336,9 +1337,6 @@
// Skin background is not drawn by embedded CBA.
if ( !iFlags.IsSet( ECbaEmbedded ) )
{
- TRect screen;
- AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, screen );
-
// Construct background control context, SizeChanged will update
// the layout rectangle.
iBgIID = AknStatuspaneUtils::IdleLayoutActive() ?
@@ -1352,50 +1350,10 @@
2 );
// Other context for staconpane
-
- // There is a need for two layers in each context: one for wallpaper,
- // the other for skin graphics.
- iStaconBgContextTop = CAknsMaskedLayerBackgroundControlContext::NewL(
- KAknsIIDWallpaper, TRect( 0, 0, 1, 1 ), ETrue, ECbaLayerN );
- iStaconBgContextBottom = CAknsMaskedLayerBackgroundControlContext::NewL(
- KAknsIIDWallpaper, TRect( 0, 0, 1, 1 ), ETrue, ECbaLayerN );
-
- for ( TInt i = 0; i < ECbaLayerN; i++ )
- {
- iStaconBgContextBottom->SetLayerImage( i, KAknsIIDNone );
- }
-
- TAknWindowLineLayout layout( AknLayoutScalable_Avkon::area_top_pane(2).LayoutLine() );
- TAknLayoutRect layoutRect;
- layoutRect.LayoutRect( screen, layout );
- TRect staconTop( layoutRect.Rect() );
-
- layout = AknLayoutScalable_Avkon::area_bottom_pane(2).LayoutLine();
- layoutRect.LayoutRect( screen, layout );
- TRect staconBottom( layoutRect.Rect() );
-
- // Set layers to stacon contexts.
- // Set bottom as parent to top, so that top is re-drawn, if bottom is drawn.
- iStaconBgContextTop->SetLayerImage( ECbaLayerWallpaper, KAknsIIDWallpaper );
- iStaconBgContextTop->SetLayerRect( ECbaLayerWallpaper, screen );
- iStaconBgContextTop->SetLayerImage( ECbaLayerBackground, KAknsIIDQsnBgAreaStaconRt );
- iStaconBgContextTop->SetLayerRect( ECbaLayerBackground, staconTop );
-
- iStaconBgContextBottom->SetLayerImage( ECbaLayerWallpaper, KAknsIIDWallpaper );
- iStaconBgContextBottom->SetLayerRect( ECbaLayerWallpaper, screen );
- iStaconBgContextBottom->SetLayerImage( ECbaLayerBackground, KAknsIIDQsnBgAreaStaconRb );
- iStaconBgContextBottom->SetLayerRect( ECbaLayerBackground, staconBottom );
- iStaconBgContextBottom->SetParentPos( TPoint( 0, 0 ) );
-
- iStaconBgContextTop->SetParentContext( iStaconBgContextBottom );
-
- TBool idle = AknLayoutFlags() & EAknLayoutCbaInStaconPaneIdle;
- if ( idle )
- {
- iStaconBgContextTop->SetLayerMaskAndSizeL( KAknsIIDQgnGrafBgLscTopMaskIcon, staconTop );
- iStaconBgContextBottom->SetLayerMaskAndSizeL( KAknsIIDQgnGrafBgLscBottomMaskIcon, staconBottom );
- }
-
+ if ( AknStatuspaneUtils::StaconPaneActive() )
+ {
+ CheckAndCreateStaconContextsL();
+ }
}
iExtension->UpdateSoftkeyFrameL( EFalse );
@@ -1780,9 +1738,14 @@
TAknLayoutRect qgn_graf_sk_msk;
TRect rect;
+ TInt graphicMSKVariety = 1;
+ if ( iCbaFlags & EEikCbaFlagAppMskIcon )
+ {
+ graphicMSKVariety = 0 ;
+ }
qgn_graf_sk_msk.LayoutRect(
rect,
- AknLayoutScalable_Avkon::control_pane_g4( 1 ).LayoutLine() );
+ AknLayoutScalable_Avkon::control_pane_g4( graphicMSKVariety ).LayoutLine() );
TSize iconSize( qgn_graf_sk_msk.Rect().Width(),
qgn_graf_sk_msk.Rect().Height() );
@@ -2952,12 +2915,27 @@
}
// We must check for landscape mode bottom sks
+ TBool isLandscapeOrient = Layout_Meta_Data::IsLandscapeOrientation();
TInt bottomPaneVariety = 1;
- if ( Layout_Meta_Data::IsLandscapeOrientation() )
+ if ( isLandscapeOrient )
{
bottomPaneVariety = 6;
}
+ // SetBoundingRect is always called by status pane when it is changing visibility.
+ // If the status pane is invisible in landscape, softkey need to draw frame to cover
+ // the area of combine pane.
+ CEikStatusPaneBase* statusPane = CEikStatusPaneBase::Current();
+ if (statusPane && !statusPane->IsVisible() && isLandscapeOrient &&
+ statusPane->PaneCapabilities(TUid::Uid(EEikStatusPaneUidCombined)).IsInCurrentLayout())
+ {
+ iFlags.Set( ECbaCombinePaneUncovered );
+ }
+ else
+ {
+ iFlags.Clear( ECbaCombinePaneUncovered );
+ }
+
TAknWindowLineLayout controlPane( DoCompose(
AknLayoutScalable_Avkon::application_window( 0 ),
DoCompose( AknLayoutScalable_Avkon::area_bottom_pane( bottomPaneVariety ),
@@ -2971,8 +2949,6 @@
// Set correct window region incase we have been in stacon mode.
RRegion region;
region.AddRect( Rect() );
-
- CEikStatusPaneBase* statusPane = CEikStatusPaneBase::Current();
// If status indicators and clock are shown in control pane area,
// then remove those areas from cba window region.
@@ -4285,6 +4261,11 @@
{
DoLayoutChange();
SetBoundingRect( TRect() );
+ if( iExtension->iIfMskIconSet
+ && ( iCbaFlags & EEikCbaFlagAppMskIcon ) )
+ {
+ TRAP_IGNORE( UpdateIconL() );
+ }
if ( iFlags.IsSet( ECbaInsideDialog )
|| iFlags.IsSet( ECbaEmbedded ) )
{
@@ -4515,6 +4496,9 @@
// Always provide top object to mop-chain.
// Bottom is parent of Top, so bottom is re-drawn
// automatically when top is drawn.
+ // Ensure that the context exists.
+ TRAP_IGNORE( CheckAndCreateStaconContextsL() );
+
_AKNTRACE_FUNC_EXIT;
return MAknsControlContext::SupplyMopObject( aId, iStaconBgContextTop );
}
@@ -4622,7 +4606,7 @@
CEikCbaButton* button2 = static_cast<CEikCbaButton*>(
(*iControlArray)[KControlArrayCBAButton2Posn].iControl );
- if ( IsMskEnabledLayoutActive() )
+ if ( IsMskEnabledLayoutActive() || iFlags.IsSet( ECbaCombinePaneUncovered ) )
{
CEikCbaButton* buttonMSK = static_cast<CEikCbaButton*>(
(*iControlArray)[KControlArrayCBAButtonMSKPosn].iControl );
@@ -5288,7 +5272,7 @@
.LayoutLine() );
iExtension->iRightFrameInnerRect = layoutRect.Rect();
- if ( mskEnabledInPlatform )
+ if ( mskEnabledInPlatform || ( isLandscape && iFlags.IsSet( ECbaCombinePaneUncovered ) ) )
{
layoutRect.LayoutRect(
rect,
@@ -5488,6 +5472,10 @@
TInt textMSKVariety = 3;
TInt graphicMSKVariety = 1;
+ if ( iCbaFlags & EEikCbaFlagAppMskIcon )
+ {
+ graphicMSKVariety = 0 ;
+ }
if ( mskEnabledInApplication && mskEnabledInPlatform )
{
MSKSoftkey = (*iControlArray)[KControlArrayCBAButtonMSKPosn].iControl;
@@ -5718,6 +5706,8 @@
TRect screen( iAvkonAppUi->ApplicationRect() );
TBool softKeysUpAndDownMirrored = EFalse;
+ TRAP_IGNORE( CheckAndCreateStaconContextsL() );
+
TInt variety = 0;
if (AknLayoutFlags() & EAknLayoutCbaInStaconPaneLeft)
{
@@ -6455,7 +6445,7 @@
// Right pane:
TInt rightPaneTextVariety = 0;
- if ( iExtension->iEnablePostingTransparency ||
+ if ( ( iExtension && iExtension->iEnablePostingTransparency ) ||
( iCbaFlags & EEikCbaFlagTransparent ) )
{
rightPaneTextVariety = 1; // Outline font used
@@ -7657,11 +7647,16 @@
CFbsBitmap *bitmap = NULL;
CFbsBitmap *mask = NULL;
+ TInt graphicMSKVariety = 1;
+ if ( iCbaFlags & EEikCbaFlagAppMskIcon )
+ {
+ graphicMSKVariety = 0 ;
+ }
TAknLayoutRect qgn_graf_sk_msk;
TRect rect;
qgn_graf_sk_msk.LayoutRect(
rect,
- AknLayoutScalable_Avkon::control_pane_g4( 1 ).LayoutLine() );
+ AknLayoutScalable_Avkon::control_pane_g4( graphicMSKVariety ).LayoutLine() );
TSize iconSize( qgn_graf_sk_msk.Rect().Width(),
qgn_graf_sk_msk.Rect().Height() );
@@ -7881,18 +7876,87 @@
// ---------------------------------------------------------------------------
// CEikCba::CommandChangeAllowed
-//
// ---------------------------------------------------------------------------
//
-TBool CEikCba::CommandChangeAllowed()
- {
- if ( iFlags.IsSet( ECbaSingleClickEnabled )
- && iFlags.IsSet( ECbaMultipleMarkingActive ) )
- {
- return EFalse;
- }
- return ETrue;
- }
+TBool CEikCba::CommandChangeAllowed() const
+ {
+ return ( !( iFlags.IsSet( ECbaSingleClickEnabled )
+ && iFlags.IsSet( ECbaMultipleMarkingActive ) ) );
+ }
+
+
+// ---------------------------------------------------------------------------
+// CEikCba::CheckAndCreateStaconContextsL
+// Creates the skin background contexts used in StaCon layout.
+// ---------------------------------------------------------------------------
+//
+void CEikCba::CheckAndCreateStaconContextsL()
+ {
+ if ( !iStaconBgContextTop && !iStaconBgContextBottom )
+ {
+ TRect screen;
+ AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, screen );
+
+ // There is a need for two layers in each context: one for wallpaper,
+ // the other for skin graphics.
+ if ( !iStaconBgContextTop )
+ {
+ iStaconBgContextTop =
+ CAknsMaskedLayerBackgroundControlContext::NewL(
+ KAknsIIDWallpaper, TRect( 0, 0, 1, 1 ), ETrue, ECbaLayerN );
+ }
+
+ if ( !iStaconBgContextBottom )
+ {
+ iStaconBgContextBottom =
+ CAknsMaskedLayerBackgroundControlContext::NewL(
+ KAknsIIDWallpaper, TRect( 0, 0, 1, 1 ), ETrue, ECbaLayerN );
+ }
+
+ for ( TInt i = 0; i < ECbaLayerN; i++ )
+ {
+ iStaconBgContextBottom->SetLayerImage( i, KAknsIIDNone );
+ }
+
+ TAknLayoutRect layoutRect;
+ layoutRect.LayoutRect( screen,
+ AknLayoutScalable_Avkon::area_top_pane( 2 ) );
+ TRect staconTop( layoutRect.Rect() );
+
+ layoutRect.LayoutRect( screen,
+ AknLayoutScalable_Avkon::area_bottom_pane( 2 ) );
+ TRect staconBottom( layoutRect.Rect() );
+
+ // Set layers to stacon contexts.
+ // Set bottom as parent to top, so that top is re-drawn, if bottom is drawn.
+ iStaconBgContextTop->SetLayerImage( ECbaLayerWallpaper,
+ KAknsIIDWallpaper );
+ iStaconBgContextTop->SetLayerRect( ECbaLayerWallpaper, screen );
+ iStaconBgContextTop->SetLayerImage( ECbaLayerBackground,
+ KAknsIIDQsnBgAreaStaconRt );
+ iStaconBgContextTop->SetLayerRect( ECbaLayerBackground, staconTop );
+
+ iStaconBgContextBottom->SetLayerImage( ECbaLayerWallpaper,
+ KAknsIIDWallpaper );
+ iStaconBgContextBottom->SetLayerRect( ECbaLayerWallpaper, screen );
+ iStaconBgContextBottom->SetLayerImage( ECbaLayerBackground,
+ KAknsIIDQsnBgAreaStaconRb );
+ iStaconBgContextBottom->SetLayerRect( ECbaLayerBackground, staconBottom );
+ iStaconBgContextBottom->SetParentPos( TPoint( 0, 0 ) );
+
+ iStaconBgContextTop->SetParentContext( iStaconBgContextBottom );
+
+ TBool idle = AknLayoutFlags() & EAknLayoutCbaInStaconPaneIdle;
+ if ( idle )
+ {
+ iStaconBgContextTop->SetLayerMaskAndSizeL(
+ KAknsIIDQgnGrafBgLscTopMaskIcon, staconTop );
+ iStaconBgContextBottom->SetLayerMaskAndSizeL(
+ KAknsIIDQgnGrafBgLscBottomMaskIcon, staconBottom );
+ }
+ }
+ }
+
//
@@ -8730,12 +8794,14 @@
{
TInt priorities( reader.ReadInt16() ); // Amount of priorities for current button.
RArray<TInt> arr;
+ CleanupClosePushL( arr );
for ( TInt ii = 0; ii < priorities; ii++ )
{
TInt8 commandType( reader.ReadInt8() );
- arr.Append( commandType );
- }
- iPriorities.Append( arr );
+ arr.AppendL( commandType );
+ }
+ iPriorities.AppendL( arr );
+ CleanupStack::Pop(); //arr
}
CleanupStack::PopAndDestroy(); // reader
--- a/uifw/EikStd/coctlsrc/eikspane.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/eikspane.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -2612,8 +2612,7 @@
{
if ( aParentWindowGroup )
{
- MakeVisible( EFalse );
-
+
SetMopParent( iEikonEnv->EikAppUi() );
SetParent( NULL );
@@ -2626,8 +2625,8 @@
}
CreateWindowL( aParentWindowGroup );
-
- RWindow& window = Window();
+
+ RWindow& window = Window();
if ( aRedrawStoreHandler )
{
aRedrawStoreHandler->SetStore( &window, KEnableRedrawStoring );
@@ -2652,6 +2651,10 @@
SetContainersL( *iControl, *this );
+ //these 2 lines is to fix the error ou1cimx1#390645
+ MakeVisible( ETrue );
+ MakeVisible( EFalse );
+
window.SetFaded( aIsFaded, RWindowTreeNode::EFadeIncludeChildren );
window.SetOrdinalPosition( ordinalPos );
@@ -2660,6 +2663,7 @@
else if ( aParentControl )
{
SetContainersL( *this, *aParentControl );
+ MakeVisible( aParentControl->IsVisible() );
}
}
@@ -3247,7 +3251,65 @@
}
CCoeControl* oldControl = cont->Control();
+
+ // Make the old control invisible and effectively remove it from data
+ // subscriber's observer array. This ensures that:
+ //
+ // 1. Old control won't receive messages about layout switch etc.
+ // 2. Old control doesn't try to draw. It must be prevented because its
+ // window might be invalid due to layout change.
+ if ( oldControl )
+ {
+ oldControl->MakeVisible( EFalse );
+
+ TInt count = oldControl->CountComponentControls();
+
+ for ( TInt i = 0; i < count; ++i )
+ {
+ CCoeControl* child = oldControl->ComponentControl( i );
+
+ if ( child )
+ {
+ child->MakeVisible( EFalse );
+ }
+ }
+ }
+
+ // Make the new control visible and so that it gets added to data
+ // subscriber's observer array. This is only done if the new control is
+ // properly constructed before swapping, i.e. it already
+ // has a container window set.
+ if ( aNewControl && aNewControl->DrawableWindow() )
+ {
+ SetContainersL( *aNewControl, *cont );
+
+ if ( cont->IsVisible() )
+ {
+ aNewControl->MakeVisible( ETrue );
+
+ TInt count = aNewControl->CountComponentControls();
+
+ for ( TInt i = 0; i < count; ++i )
+ {
+ CCoeControl* child = aNewControl->ComponentControl( i );
+
+ if ( child )
+ {
+ child->MakeVisible( ETrue );
+ }
+ }
+ }
+ }
+
cont->SetControl( aNewControl );
+
+ // ensure that indicator's priorities etc are up-to-date
+ CAknStatusPaneDataSubscriber* subscriber = DataSubscriber();
+
+ if ( subscriber )
+ {
+ subscriber->RefreshDataL();
+ }
return oldControl;
}
--- a/uifw/EikStd/coctlsrc/eikspmod.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/eikspmod.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -1495,8 +1495,17 @@
}
case EEikStatusPaneUidSignal:
{
- layout =
- aknLayoutScalable_Avkon.signal_pane( 13 ).LayoutLine();
+ if (aLayoutId
+ == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT_NO_SOFTKEYS)
+ {
+ layout
+ = aknLayoutScalable_Avkon.signal_pane(2).LayoutLine();
+ }
+ else
+ {
+ layout
+ = aknLayoutScalable_Avkon.signal_pane(13).LayoutLine();
+ }
break;
}
case EEikStatusPaneUidTitle:
@@ -1530,8 +1539,17 @@
}
case EEikStatusPaneUidBattery:
{
- layout =
- aknLayoutScalable_Avkon.battery_pane( 13 ).LayoutLine();
+ if (aLayoutId
+ == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT_NO_SOFTKEYS)
+ {
+ layout
+ = aknLayoutScalable_Avkon.battery_pane(2).LayoutLine();
+ }
+ else
+ {
+ layout
+ = aknLayoutScalable_Avkon.battery_pane(13).LayoutLine();
+ }
break;
}
case EEikStatusPaneUidDigitalClock:
--- a/uifw/EikStd/coctlsrc/smileyiconrecord.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/smileyiconrecord.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -84,7 +84,8 @@
return;
}
TInt index( 0 );
- for ( ; index < iIconArray.Count(); index++ )
+ TInt count( iIconArray.Count() );
+ for ( ; index < count; index++ )
{
if ( iIconArray[index]->DocPos() >= aIcon->DocPos() )
{
@@ -102,7 +103,8 @@
{
DeleteIconsIn( aStart, aLength );
TInt index( FirstIndexAfter( aStart ) );
- for ( ; index != KErrNotFound && index < iIconArray.Count(); index++ )
+ TInt count( iIconArray.Count() );
+ for ( ; index != KErrNotFound && index < count; index++ )
{
TInt newPos( iIconArray[index]->DocPos() - aLength );
iIconArray[index]->SetDocPos( newPos );
@@ -116,7 +118,8 @@
void CSmileyIconRecord::HandleTextInsert( TInt aStart, TInt aLength )
{
TInt index( FirstIndexAfter( aStart ) );
- for ( ; index != KErrNotFound && index < iIconArray.Count(); index++ )
+ TInt count( iIconArray.Count() );
+ for ( ; index != KErrNotFound && index < count; index++ )
{
TInt newPos( iIconArray[index]->DocPos() + aLength );
iIconArray[index]->SetDocPos( newPos );
@@ -130,11 +133,11 @@
CSmileyIcon* CSmileyIconRecord::SmileyIconAtPos( TInt aDocPos )
{
TInt count( iIconArray.Count() );
- for ( TInt i( 0 ); i < iIconArray.Count(); i++ )
+ for ( TInt i( 0 ); i < count; i++ )
{
CSmileyIcon* icon( iIconArray[i] );
- if ( iIconArray[i]->DocPos() <= aDocPos &&
- iIconArray[i]->DocPos() + iIconArray[i]->SmileyLength() > aDocPos )
+ if ( icon->DocPos() <= aDocPos &&
+ icon->DocPos() + icon->SmileyLength() > aDocPos )
{
return iIconArray[i];
}
@@ -143,12 +146,33 @@
}
// ---------------------------------------------------------------------------
+// CSmileyIconRecord::DeleteIconAtPos
+// ---------------------------------------------------------------------------
+//
+void CSmileyIconRecord::DeleteIconAtPos( TInt aDocPos )
+ {
+ TInt count( iIconArray.Count() );
+ for ( TInt i( 0 ); i < count; i++ )
+ {
+ CSmileyIcon* icon( iIconArray[i] );
+ if ( icon->DocPos() <= aDocPos &&
+ icon->DocPos() + icon->SmileyLength() > aDocPos )
+ {
+ iIconArray.Remove( i );
+ delete icon;
+ break;
+ }
+ }
+ }
+
+// ---------------------------------------------------------------------------
// CSmileyIconRecord::SmileyRange
// ---------------------------------------------------------------------------
//
void CSmileyIconRecord::CancelSelection()
{
- for ( TInt i( 0 ); i < iIconArray.Count(); i++ )
+ TInt count( iIconArray.Count() );
+ for ( TInt i( 0 ); i < count; i++ )
{
iIconArray[i]->EnableHighlight( EFalse );
}
@@ -220,7 +244,8 @@
{
TInt i = ( aSearchStart < 0 || aSearchStart >= iIconArray.Count() ? 0 :
aSearchStart );
- for ( ; i < iIconArray.Count(); i++ )
+ TInt count( iIconArray.Count() );
+ for ( ; i < count; i++ )
{
if ( iIconArray[i]->DocPos() >= aDocPos )
{
@@ -236,7 +261,8 @@
//
TInt CSmileyIconRecord::FirstIndexIn( TInt aStart, TInt aLength )
{
- for ( TInt i( 0 ); i < iIconArray.Count(); i++ )
+ TInt count( iIconArray.Count() );
+ for ( TInt i( 0 ); i < count; i++ )
{
if ( iIconArray[i]->DocPos() < aStart + aLength &&
iIconArray[i]->EndPos() > aStart )
--- a/uifw/EikStd/coctlsrc/smileymanager.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/smileymanager.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -115,18 +115,33 @@
{
TInt smileyLength( iModel->SmileyStringLength( index ) );
TInt docPos( aStart + i );
- CSmileyIcon* icon( iIconRecord->SmileyIconAtPos( docPos ) );
- if ( !icon || ( icon && !icon->IsDisabled() ) )
+
+ if( iModel->IsSmileyBySemanticAnalysis( aText.Left( docPos + smileyLength ),
+ smileyLength ) )
{
- if ( !icon )
+ TText smileyCode( iModel->SmileyCode( index ) );
+ CSmileyIcon* icon( iIconRecord->SmileyIconAtPos( docPos ) );
+ // If icon is existed but smiley codes are different, it means smiely
+ // string has been changed and editor doesn't know it, so delete old icon
+ // and create a new one. Otherwise, nothing needs to do since the icon is
+ // already existed.
+ if ( icon && icon->Code() != smileyCode )
{
- TText smileyCode( iModel->SmileyCode( index ) );
- AddSmileyToRecordL( aText.Mid( i, smileyLength ), docPos,
- smileyCode );
+ iIconRecord->DeleteIconAtPos( docPos );
+ icon = NULL;
}
- iModel->ReplaceTextWithCodes( aText, i, index );
- ret = ETrue;
+ if ( !icon || ( icon && !icon->IsDisabled() ) )
+ {
+ if ( !icon )
+ {
+ AddSmileyToRecordL( aText.Mid( i, smileyLength ), docPos,
+ smileyCode );
+ }
+ iModel->ReplaceTextWithCodes( aText, i, index );
+ ret = ETrue;
+ }
}
+
i += smileyLength;
}
else
@@ -265,7 +280,7 @@
TText CSmileyManager::SmileyCodeByPos( TInt aDocPos )
{
CSmileyIcon* icon( iIconRecord->SmileyIconAtPos( aDocPos ) );
- if ( icon )
+ if ( icon && !icon->IsDisabled() )
{
return icon->Code();
}
@@ -279,7 +294,7 @@
TInt CSmileyManager::SmileyLength( TInt aDocPos )
{
CSmileyIcon* icon( iIconRecord->SmileyIconAtPos( aDocPos ) );
- if ( icon )
+ if ( icon && !icon->IsDisabled() )
{
return icon->SmileyLength();
}
--- a/uifw/EikStd/coctlsrc/smileymodel.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/coctlsrc/smileymodel.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -390,3 +390,89 @@
aText[i + aDocPos] = CSmileyManager::KPlaceHolder;
}
}
+
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+const char KStartSymbol[] = {'(', '<', '[', '{'};
+const char KEndSymbol[] = {')', '>', ']', '}'};
+
+TInt IndexFrom(const char* const aPtr, TInt aLength, TInt aChar)
+ {
+ for(TInt i=0; i<aLength; i++)
+ {
+ if(aPtr[i] == aChar) return i;
+ }
+
+ return KErrNotFound;
+ }
+
+TBool HavePairedSymbol(const TDesC& aText, TInt aSmileyLength)
+ {
+ char stack[5];
+ TInt pos = 0;
+
+ TInt i = aText.Length() - 1;
+ const TInt smileyPos = aText.Length() - aSmileyLength;
+
+ for(TInt i=aText.Length()-1; i>=0; i--)
+ {
+ TInt index = IndexFrom(KEndSymbol, sizeof(KEndSymbol), aText[i]); // detect end symbol
+ if(KErrNotFound != index) // push
+ {
+ stack[pos++] = KStartSymbol[index];
+ }
+ else if(pos) // detect start symbol
+ {
+ if(stack[pos-1] == aText[i]) // meet a start symbol
+ {
+ pos--;
+ if(!pos) return (smileyPos > i);
+ }
+ }
+
+ if(smileyPos == i) // smiley combination finished
+ {
+ if(!pos) return EFalse;
+ }
+ }
+
+ return EFalse;
+ }
+
+TBool IsPartOfUrl(const TDesC& aText)
+ {
+ const TInt end = aText.Length() - 1;
+ TInt pos = end;
+ while(pos > 0)
+ {
+ const TUint16 word = aText[--pos];
+ if(word == ' ' || word == 0x2029)
+ {
+ break;
+ }
+ }
+
+ TInt length = end - pos;
+ if(length > 5)
+ {
+ TPtrC field(aText.Mid(pos,length));
+ pos = field.Find(_L(":\\\\"));
+ if(KErrNotFound == pos) pos = field.Find(_L("://"));
+ if(KErrNotFound != pos)
+ {
+ return ETrue;
+ }
+ }
+
+ return EFalse;
+ }
+
+TBool CSmileyModel::IsSmileyBySemanticAnalysis(const TDesC& aText, TInt aSmileyLength)
+ {
+ if(HavePairedSymbol(aText, aSmileyLength)) return EFalse;
+
+ if(IsPartOfUrl(aText)) return EFalse;
+
+ return ETrue;
+ }
--- a/uifw/EikStd/dlgsrc/EIKCAPC.CPP Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/dlgsrc/EIKCAPC.CPP Tue Jul 13 11:29:56 2010 +0100
@@ -3645,7 +3645,7 @@
{ // popup field will be same size as text element
TAknLayoutText r;
r.LayoutText(layoutRect, labelLayout);
- TRect resultRect = r.TextRect();
+ TRect resultRect( r.TextRect() );
aPopfield->SetRect(resultRect);
}
else
--- a/uifw/EikStd/dlgsrc/EIKCAPCA.CPP Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/dlgsrc/EIKCAPCA.CPP Tue Jul 13 11:29:56 2010 +0100
@@ -653,8 +653,12 @@
TRect formRect = formtLayoutRect.Rect();
CEikCapCArrayExtension *extension_or_null = ExtensionOrNull();
+
+ TBool rectChanged = ETrue;
+
if (extension_or_null)
{
+ rectChanged = ( extension_or_null->iRect != formRect );
extension_or_null->iRect = formRect;
}
@@ -665,7 +669,11 @@
if ( control->DialogPage()->IsForm() )
{
- SetRealRect( aRect, aTop, aBottom );
+ if ( rectChanged )
+ {
+ SetRealRect( aRect, aTop, aBottom );
+ }
+
_AKNTRACE_FUNC_EXIT;
return;
}
@@ -1137,7 +1145,12 @@
topLeft.SetXY( Rect().iTl.iX, LineIndexToYPosition( aLine, aTopY ) );
}
- line->SetRect( TRect( topLeft, line->Size() ) );
+ TRect newRect( topLeft, line->Size() );
+
+ if ( newRect != line->Rect() )
+ {
+ line->SetRect( TRect( topLeft, line->Size() ) );
+ }
}
_AKNTRACE_FUNC_EXIT;
}
--- a/uifw/EikStd/dlgsrc/EIKDIALG.CPP Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/dlgsrc/EIKDIALG.CPP Tue Jul 13 11:29:56 2010 +0100
@@ -41,6 +41,7 @@
#include <eikdpage.h>
#include <eikmop.h>
#include <aknenv.h>
+#include <touchfeedback.h>
//<SKIN>
#include "eikdialogext.h"
#include <AknsListBoxBackgroundControlContext.h>
@@ -70,6 +71,7 @@
#include <AknQueryDialog.h>
#include <aknQueryControl.h>
#include <aknitemactionmenuregister.h>
+#include <layoutmetadata.cdl.h>
#include "akncbacontentobserver.h"
#include "akntrace.h"
@@ -298,9 +300,9 @@
// assume that dialog didn't properly call CEikDialog::SizeChanged thus
// embedded softkeys won't work.
// In that case softkeys are deleted and re-created as a window-owning
- // component in "legacy" way.
- if ( checkCba && extension->iDeleteEmbeddedCba
- && extension->iButtonGroupResourceId != 0 )
+ // component in "legacy" way.
+ if (checkCba && extension->iButtonGroupResourceId != 0 &&
+ (extension->iDeleteEmbeddedCba || Size().iWidth <= 0))
{
delete iButtonGroupContainer;
iButtonGroupContainer = NULL;
@@ -849,32 +851,33 @@
_AKNTRACE_FUNC_ENTER;
if (iDialogFlags&EEikDialogFlagFillAppClientRect)
{
+ TRect destRect = iEikonEnv->EikAppUi()->ClientRect();
// if this is a view app then ask client rect from the currently active view
TVwsViewId uid;
if ( iAvkonAppUi->GetActiveViewId( uid ) == KErrNone )
{
if ( uid.iAppUid != uid.iViewUid )
{
- CAknView* view = iAvkonViewAppUi->View(uid.iViewUid);
- if (view)
+ CAknView* view = iAvkonViewAppUi->View( uid.iViewUid );
+ if ( view )
{
- SetRect(view->ClientRect());
- }
- else
- {
- SetRect(iEikonEnv->EikAppUi()->ClientRect());
+ destRect = view->ClientRect();
}
}
- else
+ }
+
+ if ( !Layout_Meta_Data::IsLandscapeOrientation() && iButtonGroupContainer != NULL )
+ {
+ TRect controlPane;
+ AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EControlPane, controlPane );
+
+ if ( destRect.iBr.iY > controlPane.iTl.iY )
{
- SetRect(iEikonEnv->EikAppUi()->ClientRect());
+ destRect.iBr.iY = controlPane.iTl.iY;
}
- }
- else
- {
- SetRect( iEikonEnv->EikAppUi()->ClientRect() );
- }
- }
+ }
+ SetRect( destRect );
+ }
else
{
SetRect( TRect( AknPopupUtils::Position( aSize, this ), aSize ) );
@@ -1652,6 +1655,24 @@
GfxTransEffect::NotifyExternalState(EInternalHandleSequence, (const TDesC8*)this);
#endif
GfxTransEffect::Begin(this, KGfxControlAppearAction);
+ MTouchFeedback* feedback = NULL;
+ if( AknLayoutUtils::PenEnabled() )
+ {
+ feedback = static_cast<MTouchFeedback*>( ExtensionInterface( KExIfTactileFeedbackUid ) );
+ }
+ if( feedback )
+ {
+ if( CAknTransitionUtils::TransitionsEnabled( AknTransEffect::EComponentTransitionsOff ) )
+ {
+ feedback->InstantFeedback( this, ETouchFeedbackIncreasingPopUp,
+ ETouchFeedbackVibra, TPointerEvent() );
+ }
+ else
+ {
+ feedback->InstantFeedback( this, ETouchFeedbackPopUp,
+ ETouchFeedbackVibra, TPointerEvent() );
+ }
+ }
GfxTransEffect::NotifyExternalState(ECaptureComponentsBegin, (const TDesC8*)this);
TRect demarcation;
@@ -1999,7 +2020,13 @@
TBool effectTriggered = EFalse;
CAknAppUi* aknAppUi = static_cast<CAknAppUi*>(iEikonEnv->EikAppUi());
-
+
+ MTouchFeedback* feedback = NULL;
+ if(AknLayoutUtils::PenEnabled())
+ {
+ feedback = static_cast<MTouchFeedback*>(ExtensionInterface(KExIfTactileFeedbackUid));
+ }
+
if (!(iDialogFlags & EEikDialogFlagDelayEffects)
&& IsFocusedWindowGroup( this )
&& GfxTransEffect::IsRegistered(this) && IsVisible() && effectButton
@@ -2012,6 +2039,21 @@
{
CAknTransitionUtils::SetAllParents(this);
GfxTransEffect::Begin(this, KGfxControlDisappearAction);
+
+ if(feedback)
+ {
+ if(CAknTransitionUtils::TransitionsEnabled(AknTransEffect::EComponentTransitionsOff))
+ {
+ feedback->InstantFeedback(this, ETouchFeedbackDecreasingPopUp,
+ ETouchFeedbackVibra, TPointerEvent());
+ }
+ else
+ {
+ feedback->InstantFeedback(this, ETouchFeedbackPopUp,
+ ETouchFeedbackVibra, TPointerEvent());
+ }
+ }
+
GfxTransEffect::NotifyExternalState(ECaptureComponentsBegin, (const TDesC8*)this);
TRect demarcation;
CAknTransitionUtils::GetDemarcation(CAknTransitionUtils::EPopup, demarcation);
@@ -2080,6 +2122,21 @@
TRect demarcation;
CAknTransitionUtils::SetAllParents(this);
GfxTransEffect::Begin(this, KGfxControlDisappearAction);
+
+ if(feedback)
+ {
+ if(CAknTransitionUtils::TransitionsEnabled(AknTransEffect::EComponentTransitionsOff))
+ {
+ feedback->InstantFeedback(this, ETouchFeedbackDecreasingPopUp,
+ ETouchFeedbackVibra, TPointerEvent());
+ }
+ else
+ {
+ feedback->InstantFeedback(this, ETouchFeedbackPopUp,
+ ETouchFeedbackVibra , TPointerEvent());
+ }
+ }
+
GfxTransEffect::NotifyExternalState(ECaptureComponentsBegin, (const TDesC8*)this);
CAknTransitionUtils::GetDemarcation(CAknTransitionUtils::EPopup, demarcation);
GfxTransEffect::SetDemarcation(this, demarcation);
@@ -2378,7 +2435,13 @@
else if (iExtension)
iExtension->iFlags.Set(CEikDialogExtension::ELayoutChangeWhileInvisible);
- CCoeControl::HandleResourceChange(aType);
+ TBool isForm = ( iPageSelector && iPageSelector->IsForm() );
+
+ if ( !isForm )
+ {
+ CCoeControl::HandleResourceChange( aType );
+ }
+
_AKNTRACE_FUNC_EXIT;
return;
}
@@ -2400,16 +2463,22 @@
// Must work through all pages
_AKNTRACE_FUNC_ENTER;
Layout();
- SizeChanged();
+
+ TBool isForm = ( iPageSelector && iPageSelector->IsForm() );
+
+ if ( !isForm )
+ {
+ SizeChanged();
- TInt lastPage = ( iPageSelector->PageContainer()->NumPages() - 1 );
- TInt pageIndex = 0;
- CEikDialogPage* page;
-
- while ( pageIndex++ <= lastPage )
- {
- page = iPageSelector->PageContainer()->Page( pageIndex );
- page->HandleResourceChange( KEikDynamicLayoutVariantSwitch );
+ TInt lastPage = ( iPageSelector->PageContainer()->NumPages() - 1 );
+ TInt pageIndex = 0;
+ CEikDialogPage* page;
+
+ while ( pageIndex++ <= lastPage )
+ {
+ page = iPageSelector->PageContainer()->Page( pageIndex );
+ page->HandleResourceChange( KEikDynamicLayoutVariantSwitch );
+ }
}
if (iExtension)
@@ -2604,9 +2673,14 @@
{
control = dlgPage->LineOnPageOrNull(i++);
if (control)
- aControls.Append(control);
+ {
+ if ( KErrNone != aControls.Append(control) )
+ {
+ return;
+ }
+ }
}
- while (control != NULL);
+ while (control != NULL);
}
EXPORT_C TInt CEikDialog::DialogFlags()
@@ -3241,7 +3315,8 @@
// softkeys
if ( iExtension && CbaEmbeddedInDialog( iDialogFlags ) )
{
- TSize dialogSize( Rect().Size() );
+ TRect oldDialogRect( Rect() );
+ TSize dialogSize( oldDialogRect.Size() );
CEikCba* cba = static_cast<CEikCba*>(
iButtonGroupContainer->ButtonGroup() );
TBool cbaVisible( cba->IsVisible() && !cba->IsEmpty() );
@@ -3266,8 +3341,14 @@
dialogSize.iHeight -= cbaRect.Rect().Height();
}
- SetRect( TRect(
- AknPopupUtils::Position( dialogSize, this ), dialogSize ) );
+ TRect newDialogRect( AknPopupUtils::Position( dialogSize, cbaVisible ),
+ dialogSize );
+ SetRect( newDialogRect );
+
+ if ( oldDialogRect != newDialogRect )
+ {
+ DrawDeferred();
+ }
}
}
--- a/uifw/EikStd/dlgsrc/EIKDPAGE.CPP Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/dlgsrc/EIKDPAGE.CPP Tue Jul 13 11:29:56 2010 +0100
@@ -218,44 +218,46 @@
TInt aCurrentLine )
{
CEikCaptionedControl* firstLine( aDPage.LineOnPageOrNull( 0 ) );
- TBool viewMode( !aDPage.IsEditable() );
- // note, that iFormControl is checked in Feedback()
- if ( aPointerEvent.iType == TPointerEvent::EButton1Down &&
- aCurrentLine != aTouchedLineIndex &&
- firstLine )
+ if( aDPage.IsEditable() )
{
- // feedback for edit/view mode form, when non-focused line is clicked
- // feedback for focused item is responsibility of the item
- // no feedback with focus change when single click is enabled
- if ( !iUsesSingleClick )
- {
- Feedback( aDPage, ETouchFeedbackSensitiveList );
- }
- iFocusItemChanged = ETrue;
- }
- else if ( viewMode && firstLine )
- {
+ // note, that iFormControl is checked in Feedback()
if ( aPointerEvent.iType == TPointerEvent::EButton1Down &&
- aTouchedLineIndex == aCurrentLine )
+ aCurrentLine != aTouchedLineIndex &&
+ firstLine )
+ {
+ // feedback for edit mode form, when non-focused line is clicked
+ // feedback for focused item is responsibility of the item
+ // no feedback with focus change when single click is enabled
+ if ( !iUsesSingleClick )
+ {
+ Feedback( aDPage, ETouchFeedbackSensitiveList );
+ }
+ iFocusItemChanged = ETrue;
+ }
+ else if ( firstLine )
{
- // Feedback for view mode form, when focused item is
- // clicked. Basically same case as for msk simulation later on
- // the function, but on pointer
- // down. iExtension->iFocusedClicked is not valid here, since
- // it can't be known in this phase whether user drags pointer
- // away.
- Feedback( aDPage, ETouchFeedbackList );
- iFocusItemChanged = EFalse;
- }
- else if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
- {
- // When focus changed, it should not send feedback on up event.
- // When up event comes, aTouchedLineIndex always equal to
- // aCurrentLine.
- if ( !iFocusItemChanged )
+ if ( aPointerEvent.iType == TPointerEvent::EButton1Down &&
+ aTouchedLineIndex == aCurrentLine )
{
- SilentFeedback( aDPage, ETouchFeedbackList, aPointerEvent );
+ // Feedback for edit mode form, when focused item is
+ // clicked. Basically same case as for msk simulation later on
+ // the function, but on pointer
+ // down. iExtension->iFocusedClicked is not valid here, since
+ // it can't be known in this phase whether user drags pointer
+ // away.
+ Feedback( aDPage, ETouchFeedbackList );
+ iFocusItemChanged = EFalse;
+ }
+ else if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
+ {
+ // When focus changed, it should not send feedback on up event.
+ // When up event comes, aTouchedLineIndex always equal to
+ // aCurrentLine.
+ if ( !iFocusItemChanged )
+ {
+ SilentFeedback( aDPage, ETouchFeedbackList, aPointerEvent );
+ }
}
}
}
@@ -268,8 +270,7 @@
if ( iFeedback &&
aDPage.IsForm() &&
!aDPage.IsDimmed() &&
- aDPage.IsVisible() &&
- aDPage.IsEditable() )
+ aDPage.IsVisible() )
{
iFeedback->InstantFeedback( aFeedback );
}
@@ -284,8 +285,7 @@
if ( iFeedback &&
aDPage.IsForm() &&
!aDPage.IsDimmed() &&
- aDPage.IsVisible() &&
- aDPage.IsEditable() )
+ aDPage.IsVisible() )
{
iFeedback->InstantFeedback( &aDPage,
aFeedback,
@@ -685,18 +685,16 @@
AknsUtils::RegisterControlPosition(capCtrl->iTrailer);
AknsUtils::RegisterControlPosition(capCtrl->iBitmap);
- if ( capCtrl->iIsFormControl && iCurrentLine != i)
- {
-
- if (capCtrl->ControlIsAnEdwin(capCtrl->iControlType))
+ if ( capCtrl->iIsFormControl && iCurrentLine != i)
{
- CEikEdwin *edwin = (CEikEdwin*)capCtrl->iControl;
- TRAP_IGNORE(edwin->TextView()->SetDocPosL(0)
- );
+ if (capCtrl->ControlIsAnEdwin(capCtrl->iControlType))
+ {
+ CEikEdwin *edwin = (CEikEdwin*)capCtrl->iControl;
+ TRAP_IGNORE( edwin->TextView()->SetDocPosL( 0 ) );
+ }
}
- }
-
}
+
_AKNTRACE_FUNC_EXIT;
}
@@ -778,12 +776,6 @@
continue;
ChangeFocusTo(ii);
focusSet=ETrue;
-
- if ( IsForm() )
- {
- // move line with initial focus to the screen
- iLines->MoveLineToScreen( ii, iPhysics->ViewTopY(), ETrue );
- }
break;
}
iExtension->iSetInitialFocusDone = ETrue;
@@ -1516,6 +1508,37 @@
void CEikDialogPage::SizeChanged()
{
_AKNTRACE_FUNC_ENTER;
+ if ( IsForm() )
+ {
+ iExtension->iInitialLayoutDone = EFalse;
+
+ iScroll->SetOutsideRect( Rect() );
+
+ // force each line to resize
+ TInt count = iLines->Count();
+
+ for ( TInt i = 0; i < count; ++i )
+ {
+ (*iLines)[i]->HandleResourceChange( KEikDynamicLayoutVariantSwitch );
+ }
+
+ iLines->SetRect( Rect(), iScroll->Top(), iScroll->Middle(), iScroll->Bottom() );
+
+ iExtension->iInitialLayoutDone = ETrue;
+ UpdatePhysics();
+
+ if ( ( count > 0 ) && ( iCurrentLine >= 0 ) )
+ {
+ ExposeLine( iCurrentLine, ETrue );
+ }
+
+ TRAP_IGNORE( UpdateScrollBarL() ); // ignore any errors.
+ AknsUtils::RegisterControlPosition( this );
+
+ _AKNTRACE_FUNC_EXIT;
+ return;
+ }
+
// update form area's size to scroll control
iScroll->SetOutsideRect( Rect() );
iLines->SetRect( Rect(), iScroll->Top(), iScroll->Middle(), iScroll->Bottom() );
@@ -1528,7 +1551,6 @@
TRAP_IGNORE( UpdateScrollBarL() ); // ignore any errors.
AknsUtils::RegisterControlPosition( this );
- UpdatePhysics();
iExtension->iInitialLayoutDone = ETrue;
_AKNTRACE_FUNC_EXIT;
}
@@ -1677,8 +1699,8 @@
{
iExtension->iPopFieldEvents = 1;
}
-
- ReconsiderPageSize();
+
+ (*iLines)[iCurrentLine]->SetRect( (*iLines)[iCurrentLine]->Rect() );
ExposeLine( index, ETrue );
DrawNow();
@@ -1814,9 +1836,19 @@
size.iHeight = height;
// Must force a size change on current captioned contrl even if control doesn't change size (so that edwin is resized by aknutils)
- aEdwin->SetSize(size);
- ReconsiderPageSize();
- ExposeLine(iCurrentLine, ETrue);
+ aEdwin->SetSize(size);
+
+ if ( IsForm() )
+ {
+ (*iLines)[iCurrentLine]->SetRect( (*iLines)[iCurrentLine]->Rect() );
+ ExposeLine( iCurrentLine, ETrue );
+ }
+ else
+ {
+ ReconsiderPageSize();
+ ExposeLine(iCurrentLine, ETrue);
+ }
+
PrepareToDrawVerticalLine(); // do flushes here.
/* improved redraw code
@@ -2146,11 +2178,18 @@
if ( ( oldLine != iCurrentLine && IsForm() ) &&
iExtension->iInitialLayoutDone )
{
+ // Set temporarily for EFalse to prevent one extra physics update
+ // because of two calls to iLines->MoveLineToScreen
+ iExtension->iInitialLayoutDone = EFalse;
+
if ( oldLine != -1 )
{
iLines->MoveLineToScreen( oldLine, 0, EFalse );
TRAP_IGNORE( RecordLineL( oldLine ) );
}
+
+ // set back to correct value
+ iExtension->iInitialLayoutDone = ETrue;
TRAP_IGNORE( RecordLineL( iCurrentLine ) );
iLines->MoveLineToScreen( iCurrentLine, iPhysics->ViewTopY(), ETrue );
@@ -2182,7 +2221,7 @@
void CEikDialogPage::HandleResourceChange(TInt aType)
{
_AKNTRACE_FUNC_ENTER;
- if ( aType==KEikDynamicLayoutVariantSwitch )
+ if ( aType==KEikDynamicLayoutVariantSwitch && !IsForm() )
{
const TInt numLines=iLines->Count();
for ( TInt i=0; i < numLines; i++ )
@@ -2329,12 +2368,37 @@
Added Enter key as a special case...
*/
+
if ( (iCurrentLine!=-1) && (iCurrentLine < iLines->Count()) )
+ {
if ( (*iLines)[iCurrentLine]->OfferHotKeys() ||
(*iLines)[iCurrentLine]->TakesEnterKey() && (aKeyEvent.iCode==EKeyEnter)
- )
+ )
+ {
+ CEikCaptionedControl* currentLine = ( *iLines )[iCurrentLine];
+ const TInt controlType( currentLine->iControlType );
+
+ if ( currentLine->ControlIsAnEdwin( controlType ) )
+ {
+ CEikEdwin* edwin = ( CEikEdwin* )currentLine->iControl;
+ TBool readOnly = edwin->IsReadOnly();
+
+ // The control is an editor which is read-only,
+ // such as an on/off control
+ if ( readOnly )
+ {
+ iPageObserver->HandleDialogPageEventL(
+ MEikDialogPageObserver::EDialogPageTapped );
+ return EKeyWasConsumed;
+ }
+ }
+
if (!IsForm()|| iIsEditable)
+ {
return (*iLines)[iCurrentLine]->iControl->OfferKeyEventL(aKeyEvent,aType);
+ }
+ }
+ }
return EKeyWasNotConsumed;
}
@@ -2352,6 +2416,9 @@
_AKNTRACE( "CEikDialogPage::SetEditableL() aEditable: [%d]", aEditable );
iIsEditable = aEditable;
+ TBool initialLayoutDone = iExtension->iInitialLayoutDone;
+ iExtension->iInitialLayoutDone = EFalse;
+
HighlightVisible( aEditable );
if ( iExtension->iUsesSingleClick && iExtension->iSetInitialFocusDone )
@@ -2428,6 +2495,14 @@
{
ExposeLine(iCurrentLine,ETrue);
}
+
+ iExtension->iInitialLayoutDone = initialLayoutDone;
+
+ if ( IsForm() )
+ {
+ UpdatePhysics();
+ }
+
_AKNTRACE_FUNC_EXIT;
}
@@ -2872,8 +2947,12 @@
iCurrentLine );
iExtension->iWasScrolling = ( iPhysics->OngoingPhysicsAction() !=
- CAknPhysics::EAknPhysicsActionNone );
- iPhysics->Stop();
+ CAknPhysics::EAknPhysicsActionNone );
+ if(iExtension->iWasScrolling)
+ {
+ iPhysics->Stop();
+ iExtension->Feedback( *this, ETouchFeedbackList );
+ }
iExtension->iLastTouchedLine = touchedLine;
iExtension->iDragStartPosition = aPointerEvent.iPosition;
iExtension->iLastPointerPos = aPointerEvent.iPosition;
@@ -2999,7 +3078,9 @@
{
iExtension->iScrolling = EFalse;
- if ( iPageObserver && GrabbingComponent() && !iExtension->iWasScrolling )
+ if ( iPageObserver && GrabbingComponent()
+ && !iExtension->iWasScrolling
+ && touchedLine == iCurrentLine )
{
iPageObserver->HandleDialogPageEventL( MEikDialogPageObserver::EDialogPageTapped );
}
@@ -3052,7 +3133,7 @@
( iExtension->iFocusedClicked || iExtension->iUsesSingleClick ) &&
!iExtension->iScrolling )
{
- mskPress = ETrue;
+ mskPress = ETrue;
callDefaultImplementation = EFalse;
}
if ( callDefaultImplementation && ( iExtension->iFocusedClicked ||
@@ -3081,7 +3162,7 @@
{
TKeyEvent key;
key.iCode=EKeyOK;
- key.iModifiers=0;
+ key.iModifiers=EModifierSpecial;
key.iRepeats = 0;
iEikonEnv->SimulateKeyEventL( key, EEventKey );
}
@@ -3270,6 +3351,13 @@
void CEikDialogPage::UpdateLineInCache( CEikCaptionedControl* aLine )
{
_AKNTRACE_FUNC_ENTER;
+
+ if ( !IsActivated() )
+ {
+ _AKNTRACE_FUNC_EXIT;
+ return;
+ }
+
TInt lineIndex = iLines->FindLineIndex( aLine );
if ( lineIndex != KErrNotFound )
@@ -4379,7 +4467,9 @@
CCoeControl::HandleResourceChange(aType);
- if(aType==KEikDynamicLayoutVariantSwitch)
+ // if this is a form then its size has been set already by
+ // CEikDialog::HandleResourceChange
+ if ( aType == KEikDynamicLayoutVariantSwitch && !iForm )
{
SizeChanged();
}
--- a/uifw/EikStd/srvuisrc/eikkeysoundserver.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/EikStd/srvuisrc/eikkeysoundserver.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -36,7 +36,7 @@
_LIT(KKeySoundServerSemaphoreName,"KeySoundServerSemaphore");
_LIT(KKeySoundServerDll,"AtSoundServerClient.dll");
-const TInt KKeySoundServerStackSize = 1024*4; // 4K
+const TInt KKeySoundServerStackSize = 1024*8; // 8K
const TInt KAknSoundInfoMapGranularity = 16;
const TInt KKeyClickPreference = 0x00140001;
const TInt KKeySoundServerBufExpandSize = 1024*1; // 1K
@@ -1147,7 +1147,7 @@
Stop();
// Create audio player. DoPlay() will be called in all circumstances.
- iAudioPlayer = CMdaAudioPlayerUtility::NewFilePlayerL(iFileName, *this);
+ iAudioPlayer = CMdaAudioPlayerUtility::NewFilePlayerL(iFileName, *this, iPriority,(TMdaPriorityPreference)iPreference );
LOGTEXT(_L(" CAknFileSoundInfo::PlayL() - Exit"));
}
--- a/uifw/eikctl/src/EIKCLBD.CPP Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/eikctl/src/EIKCLBD.CPP Tue Jul 13 11:29:56 2010 +0100
@@ -53,6 +53,8 @@
const TInt KColorIconFlag = -1;
const TInt KColorIconIdx = 0;
+// Number of icons in marking mode icon array
+const TInt KMarkingModeIconArraySize = 2;
/**
* About animation usage:
@@ -1148,7 +1150,8 @@
{
if ( !iMarkingIconArray )
{
- iMarkingIconArray = new ( ELeave ) CAknIconArray( 2 );
+ iMarkingIconArray = new ( ELeave ) CAknIconArray(
+ KMarkingModeIconArraySize );
}
else
{
@@ -2030,22 +2033,6 @@
TRgb aTextColor = aHighlight ? aColors.iHighlightedText : aColors.iText;
- TBool markingMode = EFalse;
- TRect itemRect( aRect );
-
- if ( listbox->View() && listbox->View()->ItemDrawer() )
- {
- if ( listbox->View()->ItemDrawer()->Flags()
- & CListItemDrawer::EMarkingModeEnabled
- && iExtension->iMarkingIconArray
- && iExtension->iMarkingIconArray->Count() == 2 )
- {
- markingMode = ETrue;
- itemRect.iTl.iX +=
- AknLayoutScalable_Avkon::list_single_graphic_pane_t1( 0 ).LayoutLine().il;
- }
- }
-
MAknsSkinInstance *skin = AknsUtils::SkinInstance();
MAknsControlContext *cc = AknsDrawUtils::ControlContext( Control() );
if ( !cc )
@@ -2057,11 +2044,6 @@
TBool rectClipped[KMaxColumn];
Mem::FillZ( &rectClipped[0], KMaxColumn * sizeof( TBool ) );
-
- if ( iExtension->iSubCellsMightIntersect )
- {
- CheckIfSubCellsIntersect( &textLines[0], &rectClipped[0], *aText, itemRect );
- }
#ifdef RD_UI_TRANSITION_EFFECTS_LIST
MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( &aGc );
#endif // RD_UI_TRANSITION_EFFECTS_LIST
@@ -2094,47 +2076,18 @@
}
#endif // RD_UI_TRANSITION_EFFECTS_LIST
}
-
if ( iExtension->iCurrentRow < listbox->BottomItemIndex() )
{
AknListUtils::DrawSeparator( aGc, aRect, aColors.iText, skin );
}
- DrawHighLight( aGc, aRect, aHighlight, skin );
- if ( markingMode && !aItemProperties.IsSelectionHidden() )
+ DrawHighLight( aGc, aRect, aHighlight, skin );
+ TRect itemRect( aRect );
+ DrawMarkingModeIcons( aItemProperties, aGc, itemRect );
+ if ( iExtension->iSubCellsMightIntersect )
{
- TAknLayoutRect layoutRect;
- layoutRect.LayoutRect( aRect,
- AknLayoutScalable_Avkon::list_single_graphic_pane_g1( 0 ) );
-
- aGc.SetPenColor( aColors.iText );
- aGc.SetPenStyle( CGraphicsContext::ESolidPen );
-
- CGulIcon* icon = (*iExtension->iMarkingIconArray)[1]; // unchecked
-
- if ( listbox->View()->ItemIsSelected( iExtension->iCurrentRow ) )
- {
- icon = (*iExtension->iMarkingIconArray)[0];
- }
-
- CFbsBitmap* bitmap = icon->Bitmap();
-
- if ( bitmap )
- {
- TSize size( bitmap->SizeInPixels() ); // set size if not already
- TSize targetSize( layoutRect.Rect().Size() );
-
- if ( size.iWidth != targetSize.iWidth && size.iHeight != targetSize.iHeight )
- {
- AknIconUtils::SetSize( bitmap, targetSize,
- EAspectRatioPreservedAndUnusedSpaceRemoved );
- }
-
- aGc.BitBltMasked( layoutRect.Rect().iTl, bitmap, TRect( layoutRect.Rect().Size() ), icon->Mask(), EFalse );
- }
-
+ CheckIfSubCellsIntersect( &textLines[0], &rectClipped[0], *aText, itemRect );
}
-
// The column draw loop
column = 0;
TInt subCellIndex = 0;
@@ -2153,7 +2106,10 @@
TextUtils::ColumnText( text, column, aText );
if ( text == KNullDesC ) { continue; }
- if ( iExtension->FindSLSubCellIndex( subCellIndex, column )!=0 ) { continue; }
+ if ( iExtension->FindSLSubCellIndex( subCellIndex, column )!=0 )
+ {
+ continue;
+ }
CGraphicsContext::TTextAlign align=ColumnAlignment(column);
TBool isLayoutAlignment = iExtension->ColumnLayoutAlignment(column);
@@ -2460,27 +2416,61 @@
}
CEikListBox* listbox = static_cast<CEikListBox*>( iExtension->iControl );
- TBool markingMode = EFalse;
TRect itemRect( aRect );
- if ( listbox->View() && listbox->View()->ItemDrawer() )
- {
- if ( listbox->View()->ItemDrawer()->Flags()
- & CListItemDrawer::EMarkingModeEnabled &&
- iExtension->iMarkingIconArray &&
- iExtension->iMarkingIconArray->Count() == 2 )
- {
- markingMode = ETrue;
- itemRect.iTl.iX +=
- AknLayoutScalable_Avkon::list_single_graphic_pane_t1( 0 ).LayoutLine().il;
- }
- }
-
TInt extraVerticalSpace=(aRect.Height()-font->HeightInPixels());
TInt baseLineOffset=extraVerticalSpace/2+font->AscentInPixels();
+ // SERIES60 Background drawing.
+ MAknsSkinInstance *skin = AknsUtils::SkinInstance();
+ MAknsControlContext *cc = AknsDrawUtils::ControlContext( Control() );
+ if (!cc)
+ {
+ cc = SkinBackgroundContext();
+ }
+
+#ifdef RD_UI_TRANSITION_EFFECTS_LIST
+
+ MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( &aGc );
+
+#endif // RD_UI_TRANSITION_EFFECTS_LIST
+
+ if ( !listbox || !listbox->BackgroundDrawingSuppressed() )
+ {
+#ifdef RD_UI_TRANSITION_EFFECTS_LIST
+ if ( transApi )
+ {
+ transApi->StartDrawing( MAknListBoxTfxInternal::EListView );
+ }
+#endif // RD_UI_TRANSITION_EFFECTS_LIST
+
+ aGc.SetBrushStyle(CGraphicsContext::ESolidBrush);
+ aGc.SetPenStyle(CGraphicsContext::ESolidPen);
+
+ if ( listbox )
+ {
+ AknsDrawUtils::Background( skin, cc, listbox, aGc, aRect );
+ }
+ else
+ {
+ aGc.Clear(aRect);
+ }
+
+#ifdef RD_UI_TRANSITION_EFFECTS_LIST
+ if ( transApi )
+ {
+ transApi->StopDrawing();
+ }
+#endif // RD_UI_TRANSITION_EFFECTS_LIST
+ }
+ if ( iExtension->iCurrentRow < listbox->BottomItemIndex() )
+ {
+ AknListUtils::DrawSeparator( aGc, aRect, aColors.iText, skin );
+ }
+ DrawHighLight( aGc, aRect, aHighlight, skin );
+ DrawMarkingModeIcons( aItemProperties, aGc, itemRect );
TRect textRect( itemRect );
+ textRect.iBr.iX = itemRect.iTl.iX;
TRect textMRect; // textrect with margins.
- textRect.iBr.iX = itemRect.iTl.iX;
TInt column=0;
TPtrC text;
@@ -2559,56 +2549,7 @@
// pass 3 drawing
- // SERIES60 Background drawing.
- MAknsSkinInstance *skin = AknsUtils::SkinInstance();
- MAknsControlContext *cc = AknsDrawUtils::ControlContext( Control() );
- if (!cc)
- {
- cc = SkinBackgroundContext();
- }
-
-#ifdef RD_UI_TRANSITION_EFFECTS_LIST
-
- MAknListBoxTfxInternal *transApi = CAknListLoader::TfxApiInternal( &aGc );
-
-#endif // RD_UI_TRANSITION_EFFECTS_LIST
-
- if ( !listbox || !listbox->BackgroundDrawingSuppressed() )
- {
-#ifdef RD_UI_TRANSITION_EFFECTS_LIST
- if ( transApi )
- {
- transApi->StartDrawing( MAknListBoxTfxInternal::EListView );
- }
-#endif // RD_UI_TRANSITION_EFFECTS_LIST
-
- aGc.SetBrushStyle(CGraphicsContext::ESolidBrush);
- aGc.SetPenStyle(CGraphicsContext::ESolidPen);
-
- if ( listbox )
- {
- AknsDrawUtils::Background( skin, cc, listbox, aGc, aRect );
- }
- else
- {
- aGc.Clear(aRect);
- }
-
-#ifdef RD_UI_TRANSITION_EFFECTS_LIST
- if ( transApi )
- {
- transApi->StopDrawing();
- }
-#endif // RD_UI_TRANSITION_EFFECTS_LIST
- }
-
- if ( iExtension->iCurrentRow < listbox->BottomItemIndex() )
- {
- AknListUtils::DrawSeparator( aGc, aRect, aColors.iText, skin );
- }
-
- // LISTBOX LINES NEED TO BE DRAWN HERE.
- DrawHighLight( aGc, aRect, aHighlight, skin );
+
#ifdef RD_UI_TRANSITION_EFFECTS_LIST
if ( transApi )
@@ -2618,48 +2559,6 @@
aGc.SetClippingRect( view->ViewRect() );
}
#endif // RD_UI_TRANSITION_EFFECTS_LIST
-
- if ( markingMode && !aItemProperties.IsSelectionHidden() )
- {
- TAknLayoutRect layoutRect;
- layoutRect.LayoutRect(
- aRect,
- AknLayoutScalable_Avkon::list_single_graphic_pane_g1( 0 ) );
-
- aGc.SetPenColor( aColors.iText );
- aGc.SetPenStyle( CGraphicsContext::ESolidPen );
-
- CGulIcon* icon = (*iExtension->iMarkingIconArray)[1]; // unchecked
-
- if ( listbox->View()->ItemIsSelected( iExtension->iCurrentRow ) )
- {
- icon = (*iExtension->iMarkingIconArray)[0];
- }
-
- CFbsBitmap* bitmap = icon->Bitmap();
-
- if ( bitmap )
- {
- TSize size( bitmap->SizeInPixels() ); // set size if not already
- TSize targetSize( layoutRect.Rect().Size() );
-
- if ( size.iWidth != targetSize.iWidth &&
- size.iHeight != targetSize.iHeight )
- {
- AknIconUtils::SetSize(
- bitmap,
- targetSize,
- EAspectRatioPreservedAndUnusedSpaceRemoved );
- }
-
- aGc.BitBltMasked( layoutRect.Rect().iTl,
- bitmap,
- TRect( layoutRect.Rect().Size() ),
- icon->Mask(),
- EFalse );
- }
- }
-
// The column draw loop
column = 0;
FOREVER
@@ -2919,6 +2818,80 @@
#endif //RD_UI_TRANSITION_EFFECTS_LIST
}
+// -----------------------------------------------------------------------------
+// CColumnListBoxData::DrawMarkingModeIcons
+// -----------------------------------------------------------------------------
+//
+void CColumnListBoxData::DrawMarkingModeIcons(
+ const TListItemProperties& aProperties,
+ CWindowGc& aGc,
+ TRect& aItemRect ) const
+ {
+ CEikListBox* listbox = static_cast<CEikListBox*>( iExtension->iControl );
+ TRect textRect( aItemRect );
+
+ if ( listbox->View() && listbox->View()->ItemDrawer() )
+ {
+ if ( listbox->View()->ItemDrawer()->Flags()
+ & CListItemDrawer::EMarkingModeEnabled &&
+ !aProperties.IsSelectionHidden() &&
+ iExtension->iMarkingIconArray &&
+#ifdef RD_TOUCH2_MARKING
+ iExtension->iMarkingIconArray->Count() ==
+ KMarkingModeIconArraySize )
+#else
+ iExtension->iMarkingIconArray->Count() == 2 )
+#endif // RD_TOUCH2_MARKING
+ {
+ if ( AknLayoutUtils::LayoutMirrored() )
+ {
+ textRect.iBr.iX -=
+ AknLayoutScalable_Avkon::list_single_graphic_pane_t1(
+ 0 ).LayoutLine().ir;
+ }
+ else
+ {
+ textRect.iTl.iX +=
+ AknLayoutScalable_Avkon::list_single_graphic_pane_t1(
+ 0 ).LayoutLine().il;
+ }
+ TAknLayoutRect layoutRect;
+ layoutRect.LayoutRect( aItemRect,
+ AknLayoutScalable_Avkon::list_single_graphic_pane_g1( 0 ) );
+
+ // unchecked icon
+ CGulIcon* icon = (*iExtension->iMarkingIconArray)[1];
+
+ if ( listbox->View()->ItemIsSelected( iExtension->iCurrentRow ) )
+ {
+ icon = (*iExtension->iMarkingIconArray)[0];
+ }
+ CFbsBitmap* bitmap = icon->Bitmap();
+
+ if ( bitmap )
+ {
+ TSize size( bitmap->SizeInPixels() ); // set size if not already
+ TSize targetSize( layoutRect.Rect().Size() );
+
+ if ( size.iWidth != targetSize.iWidth &&
+ size.iHeight != targetSize.iHeight )
+ {
+ AknIconUtils::SetSize(
+ bitmap,
+ targetSize,
+ EAspectRatioPreservedAndUnusedSpaceRemoved );
+ }
+
+ aGc.BitBltMasked( layoutRect.Rect().iTl,
+ bitmap,
+ TRect( layoutRect.Rect().Size() ),
+ icon->Mask(),
+ EFalse );
+ }
+ aItemRect = textRect;
+ }
+ }
+ }
void CColumnListBoxData::AddColumnL(TInt aColumn)
//
--- a/uifw/eikctl/src/EIKMFNE.CPP Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/eikctl/src/EIKMFNE.CPP Tue Jul 13 11:29:56 2010 +0100
@@ -2448,11 +2448,6 @@
}
else
{
- if (IsDimmed())
- SetGcToDimmedVideo(aGc);
- else
- SetGcToNormalVideo(aGc);
-
// Note!! This is taking responsibility away from the CEikMfne Field for drawing
// Skin background is drawn for the fields here
if( SkinningBackground() && !iFlags[EUseOverrideColors] )
@@ -2486,6 +2481,15 @@
// Set up null brush GC here for the upcoming draw
aGc.SetBrushStyle(CGraphicsContext::ENullBrush);
}
+ // set aGc for drawing field text
+ if ( IsDimmed() )
+ {
+ SetGcToDimmedVideo( aGc );
+ }
+ else
+ {
+ SetGcToNormalVideo( aGc );
+ }
}
// This draw must only draw the text with a null brush or draw block highlight
iFields[i]->Draw(aGc, font, topLeftOfField);
@@ -4584,6 +4588,15 @@
{
HideCursor();
}
+
+ if ( iExtension && !aVisible )
+ {
+ TRAP_IGNORE (
+ iExtension->iExtendedInputCapabilities->ReportEventL(
+ CAknExtendedInputCapabilities::MAknEventObserver::EClosePenInputRequest,
+ 0 );
+ )
+ }
}
void CEikMfne::SetValidateCallBack( TCallBack aCallBack )
--- a/uifw/ganes/inc/HgConstants.h Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/ganes/inc/HgConstants.h Tue Jul 13 11:29:56 2010 +0100
@@ -51,8 +51,7 @@
const TInt KAknMaxMarqueeLength = 512;
_LIT( KGanesMif, "\\resource\\apps\\ganes.mif" );
-_LIT( KGanesDateString, "%D%M%Y%/0%1%/1%2%/2%3%/3" );
-_LIT( KGanesYearString, "%Y%3" );
-_LIT( KGanesMonthString, "%N%M%2" );
+_LIT( KGanesYearString, "%F%Y" );
+_LIT( KGanesMonthString, "%F%N" );
#endif /* HGCONSTANTS_H_ */
--- a/uifw/ganes/inc/HgVgMediaWallRenderer.h Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/ganes/inc/HgVgMediaWallRenderer.h Tue Jul 13 11:29:56 2010 +0100
@@ -218,7 +218,7 @@
/**
* Sorts quads by z from iQuads to sorted quads.
*/
- void SortQuads(TInt aNumVisibleNumQuads);
+ void SortQuadsL(TInt aNumVisibleNumQuads);
/**
* Draws quads using VG
--- a/uifw/ganes/src/HgGrid.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/ganes/src/HgGrid.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -316,10 +316,7 @@
iItemsOnScreen *= iRows;
- if( oldCount != iRows )
- {
- FitTopItemToView( iCurrentRow*oldCount );
- }
+ FitTopItemToView( iCurrentRow*oldCount );
}
else
{
@@ -337,10 +334,7 @@
iItemsOnScreen *= iCols;
- if( oldCount != iCols )
- {
- FitTopItemToView( iCurrentRow*oldCount );
- }
+ FitTopItemToView( iCurrentRow*oldCount );
}
}
--- a/uifw/ganes/src/HgItem.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/ganes/src/HgItem.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -67,9 +67,9 @@
//
CHgItem::CHgItem( TInt aFlags, CGulIcon* aIcon ) :
iIcon( aIcon ),
- iFlags( aFlags )
+ iFlags( aFlags ),
+ iTime(0)
{
- iTime.HomeTime();
}
// -----------------------------------------------------------------------------
--- a/uifw/ganes/src/HgScroller.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/ganes/src/HgScroller.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -50,8 +50,6 @@
#include <featdiscovery.h>
-const TInt KIntensity = 100; // 100%
-
// ============================ MEMBER FUNCTIONS ===============================
// -----------------------------------------------------------------------------
@@ -374,7 +372,8 @@
iCurrentRow(-1),
iSelectedIndex(KErrNotFound),
iScrollBarType( EHgScrollerScrollBar ),
- iFirstTime(ETrue)
+ iResetViewPosition(ETrue),
+ iOldWinPos(KErrNotFound)
{
// No implementation required
}
@@ -424,19 +423,25 @@
// The world is set to be at least the size of the view.
TSize worldSize = TotalSize();
- if( !iLandscapeScrolling && (worldSize.iHeight < iHeight) )
+ if( !iLandscapeScrolling && (worldSize.iHeight <= iHeight) )
+ {
worldSize.iHeight = iHeight;
+ iResetViewPosition = ETrue;
+ }
- if( iLandscapeScrolling && (worldSize.iWidth < iWidth) )
+ if( iLandscapeScrolling && (worldSize.iWidth <= iWidth) )
+ {
worldSize.iWidth = iWidth;
+ iResetViewPosition = ETrue;
+ }
iPhysics->InitPhysicsL( worldSize,
- TSize(iWidth, iHeight),
- iLandscapeScrolling);
+ TSize(iWidth, iHeight),
+ iLandscapeScrolling);
}
// -----------------------------------------------------------------------------
-// CHgGrid::Draw()
+// CHgScroller::Draw()
// Draws the display.
// -----------------------------------------------------------------------------
//
@@ -517,10 +522,10 @@
iPopupDrawer->Init( Rect(), iPopupFont );
}
- if(iFirstTime)
+ if(iResetViewPosition)
{
iViewPosition = TPoint(iWidth/2, iHeight/2);
- iFirstTime = EFalse;
+ iResetViewPosition = EFalse;
}
HandleViewPositionChanged();
@@ -589,7 +594,9 @@
&& iSelectedIndex != KErrNotFound
&& !HasHighlight()
&& iActionMenu->InitMenuL() )
+ {
iDetector->PointerEventL( aEvent );
+ }
}
// Drag
else if( aEvent.iType == TPointerEvent::EDrag && iPointerDown )
@@ -606,7 +613,6 @@
iDetector->PointerEventL( aEvent );
HandleUpEventL( aEvent );
- iPointerDown = EFalse;
}
}
}
@@ -647,24 +653,6 @@
feedback->InstantFeedback( this, ETouchFeedbackSlider, aEvent );
}
}
- // Drag
- else if( aEvent.iType == TPointerEvent::EDrag
- && iScrollbar->IsDragging() )
- {
- // Smooth continuous tactile feedback is produced
- // during thumb dragging. The tactile feedback API
- // filters out possible re-startings of the effect.
- if ( feedback )
- {
- TTimeIntervalMicroSeconds32 timeout( 300000 );
- feedback->StartFeedback( this,
- ETouchContinuousSlider,
- &aEvent,
- KIntensity, // intensity
- timeout );
- }
- }
- // End drag
else if( aEvent.iType == TPointerEvent::EButton1Up )
{
// Stop the continuous tactile feedback that may be playing
@@ -723,6 +711,8 @@
}
else if( !iPanning )
{
+ // to get Handle Selected to be called for sure in single touch
+ iSelectedIndex = KErrNotFound;
SetHighlightL();
}
MTouchFeedback* feedback = MTouchFeedback::Instance();
@@ -755,8 +745,18 @@
iPanning = delta >= iPhysics->DragThreshold();
}
+ //if user has dragged onto another item
+ if( !iPanning && GetSelected(iStart) != GetSelected(aEvent.iPosition) )
+ {
+ // after setting iPanning true, longtap is cancelled
+ iPanning = ETrue;
+ }
+
if( prevPanning != iPanning )
+ {
+ iPrev = aEvent.iPosition;
DrawDeferred(); // to clear highlight
+ }
if(iPanning)
{
@@ -782,15 +782,17 @@
if(iLandscapeScrolling && AknLayoutUtils::LayoutMirrored())
drag = -drag;
iPhysics->StartPhysics(drag, iStartTime);
+ iPointerDown = EFalse;
}
else
{
- HandleSelectionL();
MTouchFeedback* feedback = MTouchFeedback::Instance();
if ( feedback && iSelectedIndex != KErrNotFound )
{
feedback->InstantFeedback( this, ETouchFeedbackList, ETouchFeedbackVibra, aEvent );
}
+
+ HandleSelectionL();
}
}
@@ -809,6 +811,8 @@
// this is not usually the case since interval is 50ms but just to be sure.
SetHighlightL();
}
+
+ iPointerDown = EFalse;
// selection needs to be valid.
if( iSelectedIndex >= 0 && iSelectedIndex < iItems.Count() )
@@ -836,6 +840,10 @@
}
}
}
+ else
+ {
+ iPointerDown = EFalse;
+ }
}
// -----------------------------------------------------------------------------
@@ -1051,7 +1059,8 @@
{
// Show first item's time.
TInt selectedItem = CurrentIndex();
- if( selectedItem >= 0 && selectedItem < iItems.Count() )
+ if( selectedItem >= 0 && selectedItem < iItems.Count()
+ && iItems[selectedItem]->Time().Int64() )
{
TRAP_IGNORE(
iItems[selectedItem]->Time().FormatL( iPopupText1, KGanesMonthString );
@@ -1185,21 +1194,21 @@
{
if( iSelectedIndex != KErrNotFound && HasHighlight() )
{
+ iShowHighlight = EFalse;
+ iDrawUtils->EnableMarquee(HasHighlight());
if( iSelectionObserver )
TRAP_IGNORE( iSelectionObserver->HandleOpenL( iSelectedIndex ); )
- iShowHighlight = EFalse;
- iDrawUtils->EnableMarquee(HasHighlight());
return EKeyWasConsumed;
}
else if( iItemCount )
{
iSelectedIndex = iCurrentRow;
- if( iSelectionObserver )
- TRAP_IGNORE( iSelectionObserver->HandleSelectL( iSelectedIndex ); )
FitSelectionToView();
iShowHighlight = ETrue;
iDrawUtils->EnableMarquee(HasHighlight());
DrawDeferred();
+ if( iSelectionObserver )
+ TRAP_IGNORE( iSelectionObserver->HandleSelectL( iSelectedIndex ); )
return EKeyWasConsumed;
}
return EKeyWasNotConsumed;
@@ -1271,7 +1280,7 @@
{
iItems.ResetAndDestroy();
iItemCount = 0;
- iSelectedIndex = -1;
+ iSelectedIndex = KErrNotFound;
if( iManager )
{
@@ -1494,8 +1503,6 @@
void CHgScroller::HandleGainingForeground()
{
iSelectionMode = ENoSelection;
- TRect rect( PositionRelativeToScreen(), Size() );
- TRAP_IGNORE( InitScreenL( rect ); )
iScrollbar->Reset();
}
@@ -1505,7 +1512,12 @@
//
void CHgScroller::HandleLosingForeground()
{
- iPointerDown = EFalse;
+ if( iOldWinPos == KErrNotFound
+ || iOldWinPos == DrawableWindow()->OrdinalPosition() )
+ {
+ iPointerDown = EFalse;
+ }
+
iPopupText1.Zero();
iPopupText2.Zero();
}
@@ -1570,7 +1582,7 @@
if((index != KErrNotFound || !HasHighlight())
&& iPointerDown )
{
- iSelectionToFocusedItem = index == iSelectedIndex;
+ iSelectionToFocusedItem = (index == iSelectedIndex);
iSelectedIndex = index;
iFocusedIndex = index;
// Selection has changed to valid item
@@ -1723,6 +1735,9 @@
{
delete iIndicatorManager; iIndicatorManager = NULL;
iIndicatorManager = CHgIndicatorManager::NewL();
+ delete iScrollbar; iScrollbar = NULL;
+ iScrollbar = CHgScrollbar::NewL(*this);
+ InitScrollbarL();
InitGraphicsL();
}
)
@@ -1737,8 +1752,9 @@
{
if( iActionMenu )
{
+ iOldWinPos = DrawableWindow()->OrdinalPosition();
+ iActionMenu->ShowMenuL(aPenEventScreenLocation);
iPointerDown = EFalse;
- iActionMenu->ShowMenuL(aPenEventScreenLocation);
}
}
@@ -1750,12 +1766,26 @@
{
TUint ret = 0;
- if(IsFocused()) ret |= MAknCollection::EStateCollectionVisible;
-
- if(HasHighlight()) ret |= MAknCollection::EStateHighlightVisible;
-
- if( iFlags & EHgScrollerSelectionMode ) ret |= MAknCollection::EStateMultipleSelection;
-
+ if( IsFocused() )
+ {
+ ret |= MAknCollection::EStateCollectionVisible;
+ }
+ if( HasHighlight() )
+ {
+ ret |= MAknCollection::EStateHighlightVisible;
+ }
+ if( iFlags & EHgScrollerSelectionMode )
+ {
+ ret |= MAknCollection::EStateMultipleSelection;
+ for( TInt i = 0; i < iItems.Count(); ++i )
+ {
+ if( iItems[i]->Flags() & CHgItem::EHgItemFlagMarked )
+ {
+ ret |= MAknCollection::EStateMarkedItems;
+ break;
+ }
+ }
+ }
return ret;
}
@@ -1765,6 +1795,7 @@
//
void CHgScroller::ItemActionMenuClosed()
{
+ iOldWinPos = KErrNotFound;
DrawDeferred();
}
--- a/uifw/ganes/src/HgVgEGL.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/ganes/src/HgVgEGL.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -292,7 +292,13 @@
{
// create temporary buffer for data
RBuf8 buf;
- buf.Create(aRect.Width() * aRect.Height() * 4);
+ TInt bufCreateErr = buf.Create(aRect.Width() * aRect.Height() * 4);
+ if(bufCreateErr != KErrNone) {
+ buf.Close(); //just in case
+ delete bitmap;
+ bitmap = NULL;
+ return NULL;
+ }
buf.Fill(0xFF);
// read data back from vg (this is sloooww)
@@ -301,18 +307,25 @@
{
dataStride = 4 * aRect.Height();
vgReadPixels((void*)buf.Ptr(),
- dataStride, VG_sARGB_8888, 0, 0, aRect.Height(), aRect.Width());
+ dataStride, VG_sARGB_8888, 0, 0, aRect.Height(), aRect.Width());
}
else
{
dataStride = 4 * aRect.Width();
vgReadPixels((void*)buf.Ptr(),
- dataStride, VG_sARGB_8888, 0, 0, aRect.Width(), aRect.Height());
+ dataStride, VG_sARGB_8888, 0, 0, aRect.Width(), aRect.Height());
}
// because of bug in vg driver we need to swap memory using for loop, because
// negative datastrides cause crash
- bitmap->Create(TSize(aRect.Width(), aRect.Height()), EColor16MA);
+ TInt bitmapCreateErr = bitmap->Create(TSize(aRect.Width(), aRect.Height()), EColor16MA);
+ if(bitmapCreateErr != KErrNone) {
+ buf.Close();
+ delete bitmap;
+ bitmap = NULL;
+ return NULL;
+ }
+
bitmap->BeginDataAccess();
if (!aLandscape)
{
--- a/uifw/ganes/src/HgVgMediaWall.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/ganes/src/HgVgMediaWall.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -145,7 +145,7 @@
SetMopParent( aParent );
- SetFlags( EHgVgMediaWallDrawToWindowGC | EHgVgMediaWallUninitialized );
+ SetFlags( EHgVgMediaWallUninitialized );
}
@@ -161,7 +161,8 @@
#ifdef MEDIAWALL_ORIENTATION_FIX
TSize screenSize = iCoeEnv->ScreenDevice()->SizeInPixels();
- if (aRect == TRect(TPoint(0,0), screenSize) && iMediaWallStyle == EHgVgMediaWallStyleCoverflowFullScreen)
+ if (aRect == TRect(TPoint(0,0), screenSize)
+ && iMediaWallStyle == EHgVgMediaWallStyleCoverflowFullScreen)
{
Window().FixNativeOrientation();
}
@@ -175,7 +176,7 @@
//
EXPORT_C void CHgVgMediaWall::RefreshScreen( TInt aIndex )
{
-
+ ClearFlags(EHgVgMediaWallDrawToWindowGC);
if( !iIsForeground )
{
return;
@@ -184,19 +185,11 @@
if( !iAnimationTimer->IsActive() )
{
if( /*iMediaWallStyle == EHgVgMediaWallStyleGrid ||*/
- (aIndex >= FirstIndexOnScreen() && aIndex <= FirstIndexOnScreen() + ItemsOnScreen()) )
+ (aIndex >= FirstIndexOnScreen()
+ && aIndex <= FirstIndexOnScreen() + ItemsOnScreen()) )
{
-
UpdateLabelsAndPopup();
- if(iFlags & EHgVgMediaWallDrawToWindowGC)
- {
- DrawNow();
- }
- else
- {
- DrawOpenVG();
- }
-
+ DrawNow();
}
}
}
@@ -374,31 +367,19 @@
return;
}
- CHgVgMediaWall* self = const_cast<CHgVgMediaWall*>(this);
-
- if( iFlags & EHgVgMediaWallDrawToWindowGC )
+ if(iFlags & EHgVgMediaWallDrawToWindowGC)
{
- CFbsBitmap* screenshot = NULL;
- screenshot = self->DrawToBitmap();
- if (screenshot)
- {
- SystemGc().BitBlt( Rect().iTl,screenshot );
- delete screenshot;
- }
- else
- {
- FillSystemGcWithSkin( );
- }
+ CHgVgMediaWall* self = const_cast<CHgVgMediaWall*>(this);
+ self->ClearFlags(EHgVgMediaWallDrawToWindowGC);
+ FillSystemGcWithSkin( );
+ return;
}
- else
- {
- // draw with alpha to make a hole to composition layer
- SystemGc().SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
- SystemGc().SetBrushColor(TRgb(0,0,0,0));
- SystemGc().Clear();
-
- DrawOpenVG();
- }
+
+ // draw with alpha to make a hole to composition layer
+ SystemGc().SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
+ SystemGc().SetBrushColor(TRgb(0,0,0,0));
+ SystemGc().Clear();
+ DrawOpenVG();
}
// -----------------------------------------------------------------------------
@@ -442,7 +423,8 @@
// CHgVgMediaWall::ChangeStyleL()
// -----------------------------------------------------------------------------
//
-EXPORT_C void CHgVgMediaWall::ChangeStyleL( THgVgMediaWallStyle aStyle, const TRect& aRect, TBool /*aReuseSurface*/ )
+EXPORT_C void CHgVgMediaWall::ChangeStyleL( THgVgMediaWallStyle aStyle,
+ const TRect& aRect, TBool /*aReuseSurface*/ )
{
// If animation is on, stop it before changing style.
@@ -484,7 +466,6 @@
{
// Not faded and initialized and the drawing is set to be done to WinGc
if( aEvent.iType == TPointerEvent::EButton1Down
- && !( iFlags & EHgVgMediaWallFaded )
&& !( iFlags & EHgVgMediaWallUninitialized )
&& iFlags & EHgVgMediaWallDrawToWindowGC )
{
@@ -708,8 +689,9 @@
}
// inform observer if needed
- if (iMediaWallStyle != EHgVgMediaWallStyleGrid &&
- (iItems.Count() > 0 && iSelectionObserver && !aDontUpdateObserver && !iPointerDown))
+ if (iMediaWallStyle != EHgVgMediaWallStyleGrid
+ && (iItems.Count() > 0 && iSelectionObserver
+ && !aDontUpdateObserver && !iPointerDown))
{
TRAP_IGNORE(iSelectionObserver->HandleSelectL(iSelectedIndex, this);)
}
@@ -735,6 +717,15 @@
iKeyRepeats = 0;
iKeyScrollingState = ENoKeyScrolling;
iPointerDown = EFalse;
+
+ // Not faded and initialized and the drawing is set to be done to WinGc
+ if( !( iFlags & EHgVgMediaWallUninitialized )
+ && iFlags & EHgVgMediaWallDrawToWindowGC )
+ {
+ // Draw with OpenVg to our surface.
+ ClearFlags( EHgVgMediaWallDrawToWindowGC );
+ DrawNow();
+ }
}
// -----------------------------------------------------------------------------
@@ -854,12 +845,14 @@
{
if( iSelectedIndex != KErrNotFound && iSelectionObserver )
{
- TRAP_IGNORE( StartOpeningAnimationL(ETrue ); )
+ TRAP_IGNORE( DoStartOpeningAnimationL( ); )
return EKeyWasConsumed;
}
return EKeyWasNotConsumed;
}
- default:
+ default:
+ TChar key(aKeyEvent.iCode);
+ SearchItem(key);
break;
}
@@ -1072,7 +1065,9 @@
}
else
{
- iAnimationState = aOpening ? EHgVgMediaWallAnimationStateOpening : EHgVgMediaWallAnimationStateClosing;
+ iAnimationState = aOpening
+ ? EHgVgMediaWallAnimationStateOpening
+ : EHgVgMediaWallAnimationStateClosing;
StartAnimationTimer();
}
@@ -1089,7 +1084,8 @@
return NULL;
#ifdef MEDIAWALL_ORIENTATION_FIX
- return iEGL->GetSurfaceToBitmap(iRect, iMediaWallStyle == EHgVgMediaWallStyleCoverflowFullScreen);
+ return iEGL->GetSurfaceToBitmap(iRect,
+ iMediaWallStyle == EHgVgMediaWallStyleCoverflowFullScreen);
#else
return iEGL->GetSurfaceToBitmap(iRect, EFalse);
#endif
@@ -1168,25 +1164,15 @@
iAnimationTimer->Cancel();
}
-
- SetFlags( EHgVgMediaWallDrawToWindowGC | EHgVgMediaWallFaded );
- DrawNow();
}
if( aType == KEikMessageUnfadeWindows )
{
- ClearFlags( EHgVgMediaWallDrawToWindowGC | EHgVgMediaWallFaded );
- DrawNow();
- }
-
- if( aType == KEikDynamicLayoutVariantSwitch && !(iFlags & EHgVgMediaWallDrawToWindowGC) )
- {
- SetFlags( EHgVgMediaWallDrawToWindowGC );
+ ClearFlags( EHgVgMediaWallDrawToWindowGC );
DrawNow();
}
}
-
// ---------------------------------------------------------------------------
// CHgVgMediaWall::InitItemsL()
// ---------------------------------------------------------------------------
@@ -1240,16 +1226,13 @@
iIsForeground = EFalse;
- // draw screenshot using window gc, this is needed
- // for nga effects to work
- DrawNow();
-
// free textures
FreeItemsImages();
// free other resources
DestroyRendering();
- SetFlags( EHgVgMediaWallUninitialized | EHgVgMediaWallDrawToWindowGC );
+ SetFlags( EHgVgMediaWallUninitialized );
+ DrawNow();
iCoeEnv->WsSession().Flush();
}
@@ -1400,8 +1383,9 @@
void CHgVgMediaWall::HandleTransitionAnimationStop()
{
- if (iAnimationTimer->IsActive() && (iAnimationState == EHgVgMediaWallAnimationStateTransition ||
- iAnimationState == EHgVgMediaWallAnimationStateFastTransition))
+ if (iAnimationTimer->IsActive()
+ && (iAnimationState == EHgVgMediaWallAnimationStateTransition ||
+ iAnimationState == EHgVgMediaWallAnimationStateFastTransition))
{
// stop to this location
iSpring->Reset();
@@ -1569,7 +1553,8 @@
iScrollBar->SetViewPosition( TPoint(iSelectedIndex, 0) );
#ifdef MEDIAWALL_ORIENTATION_FIX
- iScrollBar->EnableLandscapeRendering( iMediaWallStyle == CHgVgMediaWall::EHgVgMediaWallStyleCoverflowFullScreen );
+ iScrollBar->EnableLandscapeRendering(
+ iMediaWallStyle == CHgVgMediaWall::EHgVgMediaWallStyleCoverflowFullScreen );
#endif
}
@@ -1873,7 +1858,8 @@
// CHgVgMediaWall::HandleDragging()
// ---------------------------------------------------------------------------
//
-void CHgVgMediaWall::HandleDragging(const AknTouchGestureFw::MAknTouchGestureFwDragEvent& aEvent)
+void CHgVgMediaWall::HandleDragging(
+ const AknTouchGestureFw::MAknTouchGestureFwDragEvent& aEvent)
{
switch (aEvent.State())
@@ -1978,7 +1964,8 @@
// CHgVgMediaWall::HandleDragStart()
// ---------------------------------------------------------------------------
//
-void CHgVgMediaWall::HandleDragStart(const AknTouchGestureFw::MAknTouchGestureFwDragEvent& /*aEvent*/)
+void CHgVgMediaWall::HandleDragStart(
+ const AknTouchGestureFw::MAknTouchGestureFwDragEvent& /*aEvent*/)
{
// cancel ongoing animation.
@@ -2006,7 +1993,8 @@
// CHgVgMediaWall::HandleDragOn()
// ---------------------------------------------------------------------------
//
-void CHgVgMediaWall::HandleDragOn(const AknTouchGestureFw::MAknTouchGestureFwDragEvent& aEvent)
+void CHgVgMediaWall::HandleDragOn(
+ const AknTouchGestureFw::MAknTouchGestureFwDragEvent& aEvent)
{
// calculate delta of dragging
@@ -2050,7 +2038,8 @@
// CHgVgMediaWall::HandleDragStop()
// ---------------------------------------------------------------------------
//
-void CHgVgMediaWall::HandleDragStop(const AknTouchGestureFw::MAknTouchGestureFwDragEvent& /*aEvent*/)
+void CHgVgMediaWall::HandleDragStop(
+ const AknTouchGestureFw::MAknTouchGestureFwDragEvent& /*aEvent*/)
{
iPointerDown = EFalse;
if (iMediaWallStyle == EHgVgMediaWallStyleGrid)
@@ -2105,7 +2094,10 @@
iMediaWallStyle == EHgVgMediaWallStyleGrid)
{
// when scrollbar is being dragged we draw letter popup
- if (iLetterPopup && (iScrollBarHit || (iKeyScrollingState != ENoKeyScrolling && dist > KDrawLetterPopupDistance)))
+ if (iLetterPopup &&
+ (iScrollBarHit
+ || (iKeyScrollingState != ENoKeyScrolling
+ && dist > KDrawLetterPopupDistance)))
{
iLetterPopup->Draw(iRect, KMaxLetterPopupOpacity);
}
@@ -2126,7 +2118,8 @@
if (iScrollBar || iHideSKButton)
{
TReal alpha = 1.0f;
- if (iAnimationState == EHgVgMediaWallAnimationStateOpening || iAnimationState == EHgVgMediaWallAnimationStateClosing)
+ if (iAnimationState == EHgVgMediaWallAnimationStateOpening
+ || iAnimationState == EHgVgMediaWallAnimationStateClosing)
alpha = 1.0f - iAnimationAlpha;
else if (iAnimationState == EHgVgMediaWallAnimationStateItemOpened)
alpha = 0.0f;
@@ -2161,11 +2154,13 @@
DrawOpenVG();
if (iMediaWallObserver)
- iMediaWallObserver->HandleMediaWallEvent((TInt)EHgVgMediaWallEventRequestShowSoftkeys, this);
+ iMediaWallObserver->HandleMediaWallEvent(
+ EHgVgMediaWallEventRequestShowSoftkeys, this);
}
// if screen is hit when button is not visible, show button and scrollbar
- else if (!iHideSKButton->IsEnabled() && aEvent.iType == TPointerEvent::EButton1Down)
+ else if (!iHideSKButton->IsEnabled()
+ && aEvent.iType == TPointerEvent::EButton1Down)
{
if (iScrollBar)
@@ -2176,7 +2171,8 @@
DrawOpenVG();
if (iMediaWallObserver)
- iMediaWallObserver->HandleMediaWallEvent((TInt)EHgVgMediaWallEventRequestHideSoftkeys, this);
+ iMediaWallObserver->HandleMediaWallEvent(
+ EHgVgMediaWallEventRequestHideSoftkeys, this);
}
}
@@ -2212,6 +2208,10 @@
TInt y = aIndex % iRowCount;
StartAnimationToPosition(x, y, ETrue);
}
+ else if (aIndex >= 0 && aIndex < iItems.Count())
+ {
+ StartAnimationToPosition(aIndex, 0, ETrue);
+ }
return ETrue;
}
@@ -2587,4 +2587,48 @@
}
+TBool CHgVgMediaWall::SearchItem( TChar& aFirstLetter )
+ {
+
+ TInt searchStartIndex = iSelectedIndex+1;
+
+ // From selected to end
+ for(TInt i = searchStartIndex; i < iItems.Count(); ++i)
+ {
+ if(iItems[i]->Title().Length() > 0 )
+ {
+ TChar compare( iItems[i]->Title()[0] );
+ compare.UpperCase();
+ aFirstLetter.UpperCase();
+
+ if(compare - aFirstLetter == 0)
+ {
+ iSelectedIndex = i;
+ StartAnimationToPosition(iSelectedIndex, ETrue);
+ return ETrue;
+ }
+ }
+ }
+
+ // From beginning to selected - 1
+ for(TInt i = 0; i < iSelectedIndex; ++i)
+ {
+ if(iItems[i]->Title().Length() > 0 )
+ {
+ TChar compare( iItems[i]->Title()[0] );
+ compare.UpperCase();
+ aFirstLetter.UpperCase();
+
+ if(compare - aFirstLetter == 0)
+ {
+ iSelectedIndex = i;
+ StartAnimationToPosition(iSelectedIndex, ETrue);
+ return ETrue;
+ }
+ }
+ }
+
+ return EFalse;
+ }
+
// End of File
--- a/uifw/ganes/src/HgVgMediaWallRenderer.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/ganes/src/HgVgMediaWallRenderer.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -115,7 +115,9 @@
{
TQuad* q = new (ELeave)TQuad;
q->iItemIndex = -1;
- iQuads.Append(q);
+ CleanupStack::PushL(q);
+ iQuads.AppendL(q);
+ CleanupStack::Pop(q);
}
CreateGround();
}
@@ -200,14 +202,14 @@
// Sorts quads from iQuads to iSortedQuads.
// -----------------------------------------------------------------------------
//
-void CHgVgMediaWallRenderer::SortQuads(TInt aNumQuads)
+void CHgVgMediaWallRenderer::SortQuadsL(TInt aNumQuads)
{
iSortedQuads.Reset();
for(TInt i = 0; i < aNumQuads; ++i)
{
- iSortedQuads.Append(iQuads[i]);
+ iSortedQuads.AppendL(iQuads[i]);
}
for (TInt i = 1; i < aNumQuads; i++)
@@ -223,10 +225,8 @@
}
}
}
-
}
-
// -----------------------------------------------------------------------------
// CHgVgScrollBar::GetItemIndex
// gets index of the item under pointer position.
@@ -1062,7 +1062,7 @@
TransformQuads(itemsOnScreen,
iReflectionsEnabled, iFov, aOpeningAnimationType);
- SortQuads(itemsOnScreen);
+ TRAP_IGNORE( SortQuadsL(itemsOnScreen); )
if (iReflectionsEnabled)
DrawQuads(ETrue);
--- a/uifw/tsrc/public/basic/AknSoundServerStifTest/group/AknSoundServerStifTest_DoxyFile.txt Tue Jun 29 16:35:47 2010 +0100
+++ b/uifw/tsrc/public/basic/AknSoundServerStifTest/group/AknSoundServerStifTest_DoxyFile.txt Tue Jul 13 11:29:56 2010 +0100
@@ -1,3 +1,19 @@
+#
+# 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 "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:
+#
+
# Doxyfile 1.4.1
#---------------------------------------------------------------------------
--- a/uiutils/Findutil/src/FindUtilChinese.cpp Tue Jun 29 16:35:47 2010 +0100
+++ b/uiutils/Findutil/src/FindUtilChinese.cpp Tue Jul 13 11:29:56 2010 +0100
@@ -325,14 +325,17 @@
{
if (wordInterpretationBuf[i] == KSeperator)
{
- aSpellList.Append((wordInterpretationBuf.MidTPtr(start, i-start)).Alloc());
+ HBufC16* tmpStr = (wordInterpretationBuf.MidTPtr(start, i-start)).AllocLC();
+ aSpellList.AppendL(tmpStr);
+ CleanupStack::Pop(tmpStr);
start = i + 1;
}
}
-
- aSpellList.Append((wordInterpretationBuf.MidTPtr(start, len-start)).Alloc());
-
+ HBufC16* tmpStr = (wordInterpretationBuf.MidTPtr(start, len-start)).AllocLC();
+ aSpellList.AppendL(tmpStr);
+ CleanupStack::Pop(tmpStr);
+
return ETrue;
}
@@ -465,12 +468,16 @@
{
if (wordInterpretationBuf[i] == KSeperator)
{
- aSpellList.Append((wordInterpretationBuf.MidTPtr(start, i-start)).Alloc());
+ HBufC16* tmpStr = (wordInterpretationBuf.MidTPtr(start, i-start)).AllocLC();
+ aSpellList.AppendL(tmpStr);
+ CleanupStack::Pop(tmpStr);
start = i + 1;
}
}
-
- aSpellList.Append((wordInterpretationBuf.MidTPtr(start, len-start)).Alloc());
+
+ HBufC16* tmpStr = (wordInterpretationBuf.MidTPtr(start, len-start)).AllocLC();
+ aSpellList.AppendL(tmpStr);
+ CleanupStack::Pop(tmpStr);
}
//Could look advanced cangjie as normal and easy cangjie
else
@@ -482,14 +489,17 @@
{
if (wordInterpretationBuf[i] == KSeperator)
{
- aSpellList.Append((wordInterpretationBuf.MidTPtr(start, i-start)).Alloc());
+ HBufC16* tmpStr = (wordInterpretationBuf.MidTPtr(start, i-start)).AllocLC();
+ aSpellList.AppendL(tmpStr);
+ CleanupStack::Pop(tmpStr);
start = i + 1;
}
}
-
- aSpellList.Append((wordInterpretationBuf.MidTPtr(start, len-start)).Alloc());
-
-
+
+ HBufC16* tmpStr = (wordInterpretationBuf.MidTPtr(start, len-start)).AllocLC();
+ aSpellList.AppendL(tmpStr);
+ CleanupStack::Pop(tmpStr);
+
iPtiEngine->GetSpelling(aHZUnicode, wordInterpretationBuf, EPtiCangJie);
len = wordInterpretationBuf.Length();
start = 0;
@@ -497,12 +507,16 @@
{
if (wordInterpretationBuf[i] == KSeperator)
{
- aSpellList.Append((wordInterpretationBuf.MidTPtr(start, i-start)).Alloc());
+ tmpStr = (wordInterpretationBuf.MidTPtr(start, i-start)).AllocLC();
+ aSpellList.AppendL(tmpStr);
+ CleanupStack::Pop(tmpStr);
start = i + 1;
}
}
-
- aSpellList.Append((wordInterpretationBuf.MidTPtr(start, len-start)).Alloc());
+
+ tmpStr = (wordInterpretationBuf.MidTPtr(start, len-start)).AllocLC();
+ aSpellList.AppendL(tmpStr);
+ CleanupStack::Pop(tmpStr);
}
return ETrue;