Merge workaround for bug 2846 to conditionally compile out the use of CAlfEffectObserver.
--- a/classicui_plat/extended_sounds_api/group/bld.inf Tue Jun 01 15:52:55 2010 +0100
+++ b/classicui_plat/extended_sounds_api/group/bld.inf Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/classicui_plat/find_item_ui_api/tsrc/inc/testdomfinditem.h Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/classicui_plat/find_item_ui_api/tsrc/src/testdomfinditemblocks.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/classicui_plat/find_item_ui_api/tsrc/src/testdomfinditemblocksdialog.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/classicui_plat/ganes_api/inc/ganes/HgScroller.h Tue Jul 13 11:36:42 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.
--- a/classicui_plat/signal_pane_api/inc/aknsignal.h Tue Jun 01 15:52:55 2010 +0100
+++ b/classicui_plat/signal_pane_api/inc/aknsignal.h Tue Jul 13 11:36:42 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/buttons_api/inc/eikcba.h Tue Jun 01 15:52:55 2010 +0100
+++ b/classicui_pub/buttons_api/inc/eikcba.h Tue Jul 13 11:36:42 2010 +0100
@@ -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/lists_api/inc/EIKLBX.H Tue Jun 01 15:52:55 2010 +0100
+++ b/classicui_pub/lists_api/inc/EIKLBX.H Tue Jul 13 11:36:42 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/options_menu_api/inc/EIKMENUP.H Tue Jun 01 15:52:55 2010 +0100
+++ b/classicui_pub/options_menu_api/inc/EIKMENUP.H Tue Jul 13 11:36:42 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
--- a/classicui_pub/screen_clearer_api/inc/AknClearer.h Tue Jun 01 15:52:55 2010 +0100
+++ b/classicui_pub/screen_clearer_api/inc/AknClearer.h Tue Jul 13 11:36:42 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/tsrc/bc/apps/bctestlauncher/group/uid_range.txt Tue Jun 01 15:52:55 2010 +0100
+++ b/classicui_pub/tsrc/bc/apps/bctestlauncher/group/uid_range.txt Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/classicui_pub/tsrc/bc/apps/bctestutil/group/release_note.txt Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/classicui_pub/ui_framework_definitions_api/inc/EIKON.HRH Tue Jul 13 11:36:42 2010 +0100
@@ -219,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 01 15:52:55 2010 +0100
+++ b/classicui_pub/ui_framework_definitions_api/inc/avkon.hrh Tue Jul 13 11:36:42 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)
//
--- a/commonuis/CommonDialogs/group/CommonDialogs.rss Tue Jun 01 15:52:55 2010 +0100
+++ b/commonuis/CommonDialogs/group/CommonDialogs.rss Tue Jul 13 11:36:42 2010 +0100
@@ -27,6 +27,8 @@
#include <commondialogs.loc>
#include <CommonDialogs.rh>
+#include "commondialogsdata.hrh"
+#include "commondialogsdata.rh"
// RESOURCE DEFINITIONS
// ---------------------------------------------------------
@@ -514,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:36:42 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:36:42 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/src/CAknFileSelectionDialog.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/commonuis/CommonDialogs/src/CAknFileSelectionDialog.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/commonuis/CommonDialogs/src/CAknFileSelectionModel.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/commonuis/CommonDialogs/src/CAknFileSelectionModel.h Tue Jul 13 11:36:42 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/CommonUi/src/FindItemDialog.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/commonuis/CommonUi/src/FindItemDialog.cpp Tue Jul 13 11:36:42 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/group/BLD.INF Tue Jun 01 15:52:55 2010 +0100
+++ b/commonuisupport/uikon/group/BLD.INF Tue Jul 13 11:36:42 2010 +0100
@@ -92,12 +92,12 @@
../EABI/EIKINITU.DEF /epoc32/include/def/eabi/eikinitu.def
// from ..\docs
-../docs/extended_notifier_design_spec.doc /epoc32/engdoc/application_framework/uikon/proposed/extended_notifier_design_spec.doc
-../docs/status_pane_design.doc /epoc32/engdoc/application_framework/uikon/status_pane_design.doc
-../docs/uikon_1.2_menu_extensions.doc /epoc32/engdoc/application_framework/uikon/uikon_1.2_menu_extensions.doc
-../docs/uikon_1.2_border_extensions.doc /epoc32/engdoc/application_framework/uikon/uikon_1.2_border_extensions.doc
-../docs/uikon_1.2_border_colours_utilities_extensions.doc /epoc32/engdoc/application_framework/uikon/uikon_1.2_border_colours_utilities_extensions.doc
-../docs/Uikon_1.2_Caps_Lock_Extension.doc /epoc32/engdoc/application_framework/uikon/uikon_1.2_caps_lock_extension.doc
+//../docs/extended_notifier_design_spec.doc /epoc32/engdoc/application_framework/uikon/proposed/extended_notifier_design_spec.doc
+//../docs/status_pane_design.doc /epoc32/engdoc/application_framework/uikon/status_pane_design.doc
+//../docs/uikon_1.2_menu_extensions.doc /epoc32/engdoc/application_framework/uikon/uikon_1.2_menu_extensions.doc
+//../docs/uikon_1.2_border_extensions.doc /epoc32/engdoc/application_framework/uikon/uikon_1.2_border_extensions.doc
+//../docs/uikon_1.2_border_colours_utilities_extensions.doc /epoc32/engdoc/application_framework/uikon/uikon_1.2_border_colours_utilities_extensions.doc
+//../docs/Uikon_1.2_Caps_Lock_Extension.doc /epoc32/engdoc/application_framework/uikon/uikon_1.2_caps_lock_extension.doc
PRJ_MMPFILES
--- a/commonuisupport/uikon/test/scripts/uiktest_T_Backup.script Tue Jun 01 15:52:55 2010 +0100
+++ b/commonuisupport/uikon/test/scripts/uiktest_T_Backup.script Tue Jul 13 11:36:42 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/bmpanimation/group/BLD.INF Tue Jun 01 15:52:55 2010 +0100
+++ b/lafagnosticuifoundation/bmpanimation/group/BLD.INF Tue Jul 13 11:36:42 2010 +0100
@@ -30,7 +30,7 @@
../inc/bmpansrv.h SYMBIAN_MW_LAYER_PUBLIC_EXPORT_PATH(bmpansrv.h)
../inc/bmpanconsts.h SYMBIAN_MW_LAYER_PUBLIC_EXPORT_PATH(bmpanconsts.h)
-../docs/animation_design_spec.doc /epoc32/engdoc/application_framework/bmpanim/animation_design_spec.doc
+//../docs/animation_design_spec.doc /epoc32/engdoc/application_framework/bmpanim/animation_design_spec.doc
../group/BmpAnim.iby /epoc32/rom/include/bmpanim.iby
PRJ_MMPFILES
--- a/lafagnosticuifoundation/bmpanimation/inc/bmpansrv.h Tue Jun 01 15:52:55 2010 +0100
+++ b/lafagnosticuifoundation/bmpanimation/inc/bmpansrv.h Tue Jul 13 11:36:42 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/Src/PslnGeneralThemeView.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/psln/Src/PslnGeneralThemeView.cpp Tue Jul 13 11:36:42 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/PslnSoundActivator.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/psln/Src/PslnSoundActivator.cpp Tue Jul 13 11:36:42 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/pslnengine/src/PslnSkinStore.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/psln/pslnengine/src/PslnSkinStore.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/psln/pslnslidesetdialog/data/pslnslidesetdialogrsc.rss Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/psln/pslnslidesetdialog/loc/pslnslidesetdialog.loc Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/psln/pslnslidesetdialog/src/pslnslidesetmodel.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AknGlobalUI/AknCapServer/src/AknCapServerEntry.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AknGlobalUI/AknNfySrv/inc/AknNfySrv.h Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AknGlobalUI/AknNfySrv/src/AknNfySrv.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AknGlobalUI/OldStyleNotif/Inc/AknSoftNotificationPlugin.h Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AknGlobalUI/OldStyleNotif/Src/AknNotifyPlugin.cpp Tue Jul 13 11:36:42 2010 +0100
@@ -52,7 +52,7 @@
if (!err)
{
- iArray.Append(aId);
+ err = iArray.Append(aId);
}
}
--- a/uifw/AknGlobalUI/OldStyleNotif/Src/AknSoftNotificationPlugin.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/AknGlobalUI/OldStyleNotif/Src/AknSoftNotificationPlugin.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AknGlobalUI/OldStyleNotif/Src/OldStylePlugin.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AknGlobalUI/OldStyleNotif/Src/aknkeylocknotifier.cpp Tue Jul 13 11:36:42 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 =
@@ -1120,6 +1195,8 @@
iStatusProperty.Attach( KPSUidAvkonDomain, KAknKeyguardStatus );
iStatusProperty.Set( EKeyguardNotActive );
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1129,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() )
{
@@ -1255,6 +1334,8 @@
// leave, but we trap it in just in case.
TRAP_IGNORE( static_cast<CAknCapAppServerAppUi*>( iEikonEnv->EikAppUi() )->HandleResourceChangeL(
KAknInternalFSWClose ); );
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1264,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 );
@@ -1325,13 +1407,14 @@
}
}
} // PenEnabled()
+ }
- if (aNotifySysApp)
- {
- SendMessageToSysAp( EEikKeyLockDisabled );
- }
- }
- if ( iNotif )
+ if (aNotifySysApp)
+ {
+ SendMessageToSysAp( EEikKeyLockDisabled );
+ }
+
+ if ( iNotif )
{
iNotif->NotifyStatusChange( EKeyLockDisabled );
}
@@ -1341,6 +1424,8 @@
iEikonEnv->EikAppUi() )->SuppressAppSwitching( EFalse );
iAutolockEnabled = EFalse;
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1350,6 +1435,8 @@
//
void CAknKeyLockControl::SendMessageToSysAp( TInt aMessage )
{
+ _AKNTRACE_FUNC_ENTER;
+
RWsSession& ws = iEikonEnv->WsSession();
TInt wgId = 0;
CApaWindowGroupName::FindByAppUid( KSysApUid, ws, wgId );
@@ -1360,6 +1447,8 @@
event.SetTimeNow();
ws.SendEventToWindowGroup( wgId, event );
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1369,9 +1458,13 @@
//
void CAknKeyLockControl::OfferKeylock()
{
+ _AKNTRACE_FUNC_ENTER;
+
iOfferLockNote->ShowNote( (CAknNoteDialog::TTimeout)KAknOfferKeyLockTimeout,
CAknNoteDialog::ENoTone );
iOfferLockEnabled = ETrue;
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1405,8 +1498,12 @@
//
void CAknKeyLockControl::DoUnlock()
{
+ _AKNTRACE_FUNC_ENTER;
+
DisableKeylock();
DisplayKeyActiveNote();
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1417,6 +1514,9 @@
//
void CAknKeyLockControl::HandleResourceChange( TInt aType )
{
+ _AKNTRACE_FUNC_ENTER;
+ _AKNTRACE("aType:%d",aType);
+
if ( aType == KEikDynamicLayoutVariantSwitch )
{
TRect screenRect;
@@ -1439,6 +1539,8 @@
}
}
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1449,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 )
{
@@ -1510,6 +1613,8 @@
break;
}
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1555,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
@@ -1579,6 +1684,8 @@
SendMessageToSysAp( EEikKeyLockLightsOnRequest );
iUnlockConfirmation = ETrue;
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1590,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 )
{
@@ -1614,7 +1723,7 @@
autolocktask.SendKey( keyEvent );
}
}
- TRACES( RDebug::Print(_L("(KeyGuard)CAknKeyLockControl::OfferKeyEventL: return EKeyWasConsumed"));)
+ _AKNTRACE_FUNC_EXIT;
return EKeyWasConsumed;
}
}
@@ -1819,7 +1928,7 @@
ShowLockedNote();
}
}
-
+ _AKNTRACE_FUNC_EXIT;
return EKeyWasConsumed;
}
@@ -1830,10 +1939,14 @@
//
void CAknKeyLockControl::ShowLockedNote()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( !iLockedNoteDisplayed )
{
DoShowLockedNote();
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1855,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;
}
@@ -1869,6 +1986,8 @@
//
void CAknKeyLockControl::CaptureSystemKeys()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( !iKeysCaptured )
{
RWindowGroup& groupWin = iCoeEnv->RootWin();
@@ -1896,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;
}
@@ -1914,6 +2035,8 @@
//
void CAknKeyLockControl::UnCaptureSystemKeys()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( iKeysCaptured )
{
RWindowGroup& groupWin = iCoeEnv->RootWin();
@@ -1934,6 +2057,8 @@
iKeysCaptured = EFalse;
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1945,6 +2070,8 @@
void CAknKeyLockControl::HandleEcsEvent( CAknEcsDetector* aEcsDetector,
CAknEcsDetector::TState aState )
{
+ _AKNTRACE_FUNC_ENTER;
+
switch ( aState )
{
case CAknEcsDetector::ECompleteMatchThenSendKey:
@@ -1989,6 +2116,8 @@
break;
}
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -1998,7 +2127,11 @@
//
void CAknKeyLockControl::DoExitOfferKeylock()
{
+ _AKNTRACE_FUNC_ENTER;
+
iOfferLockNote->CancelNote();
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2008,7 +2141,11 @@
//
void CAknKeyLockControl::OfferTimerExpired()
{
+ _AKNTRACE_FUNC_ENTER;
+
DoExitOfferKeylock();
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2018,7 +2155,11 @@
//
void CAknKeyLockControl::AutolockEnabled( TBool aAutoLockOn )
{
+ _AKNTRACE_FUNC_ENTER;
+
iAutolockEnabled = aAutoLockOn;
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2046,11 +2187,15 @@
//
void CAknKeyLockControl::CapturePointerEvents()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( AknLayoutUtils::PenEnabled() )
{
Window().SetPointerCapture( RWindowBase::TCaptureDragDrop );
Window().ClaimPointerGrab( ETrue );
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2060,20 +2205,30 @@
//
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;
}
@@ -2188,6 +2343,8 @@
//
TPtrC8 CAknKeyLockNotifierSubject::StartL( const TDesC8& aBuffer )
{
+ _AKNTRACE_FUNC_ENTER;
+
SAknNotifierPackage<SAknKeyLockNotifierParams>* params =
( SAknNotifierPackage<SAknKeyLockNotifierParams>*)aBuffer.Ptr();
@@ -2198,6 +2355,8 @@
User::Leave( KErrArgument );
}
+ _AKNTRACE( "params->iParamData.iReason:%d",params->iParamData.iReason);
+
switch ( params->iParamData.iReason )
{
case ELockEnabled:
@@ -2223,6 +2382,8 @@
}
}
+ _AKNTRACE_FUNC_EXIT;
+
return iRetPckg;
}
@@ -2236,6 +2397,8 @@
TInt /*aReplySlot*/,
const RMessagePtr2& aMessage )
{
+ _AKNTRACE_FUNC_ENTER;
+
SAknNotifierPackage<SAknKeyLockNotifierParams>* params =
( SAknNotifierPackage<SAknKeyLockNotifierParams>*)aBuffer.Ptr();
@@ -2246,6 +2409,8 @@
User::Leave( KErrArgument );
}
+ _AKNTRACE( "params->iParamData.iReason:%d",params->iParamData.iReason);
+
switch ( params->iParamData.iReason )
{
case ELockEnabled:
@@ -2329,6 +2494,8 @@
}
};
+ _AKNTRACE_FUNC_EXIT;
+
aMessage.Complete( KErrNone );
}
@@ -2383,11 +2550,14 @@
//
void CAknKeyLockNotifierSubject::UnlockKeys()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( IsKeyLockEnabled() )
{
- iKeyLockControl->AutolockEnabled( EFalse );
iKeyLockControl->DisableKeylock();
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2398,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 )
{
@@ -2409,6 +2582,8 @@
iKeyLockControl->AutolockEnabled( aAutoLockOn );
iKeyLockControl->EnableKeylock(ETrue, EFalse);
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2419,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++ )
@@ -2433,6 +2610,8 @@
// Make sure that the observer isn't obscuring the keylock CBA
ShowKeylockCba();
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2443,6 +2622,8 @@
//
void CAknKeyLockNotifierSubject::RemoveObserver( MAknKeyLockObserver* aObserver )
{
+ _AKNTRACE_FUNC_ENTER;
+
TInt count = iObserverList->Count();
for ( TInt index = 0; index < count; index++ )
{
@@ -2455,6 +2636,8 @@
#if defined(_DEBUG)
Panic( EAknPanicKeyLockObserverNotFound );
#endif
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2464,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;
}
@@ -2478,10 +2666,14 @@
//
void CAknKeyLockNotifierSubject::ShowKeylockCba()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( IsKeyLockEnabled() )
{
iKeyLockControl->ShowKeylockCba();
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2491,10 +2683,14 @@
//
void CAknKeyLockNotifierSubject::DoEnableKeyLock()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( !IsKeyLockEnabled() )
{
iKeyLockControl->EnableKeylock();
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2504,6 +2700,8 @@
//
void CAknKeyLockNotifierSubject::DoDisableKeyLock()
{
+ _AKNTRACE_FUNC_ENTER;
+
if ( IsKeyLockEnabled() )
{
iKeyLockControl->DisableKeylock();
@@ -2515,6 +2713,8 @@
// Remove the offer key lock CBA.
iKeyLockControl->OfferTimerExpired();
}
+
+ _AKNTRACE_FUNC_EXIT;
}
@@ -2524,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 01 15:52:55 2010 +0100
+++ b/uifw/AknGlobalUI/OldStyleNotif/group/AknOldStyleNotif.mmp Tue Jul 13 11:36:42 2010 +0100
@@ -36,6 +36,7 @@
USERINCLUDE ../../CommonInc
USERINCLUDE ../../notpiinc
USERINCLUDE ../../../../inc
+USERINCLUDE ../../../inc
SOURCEPATH ../Src
--- a/uifw/AvKon/AknExtendedFader/group/perf.txt Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/AknExtendedFader/group/perf.txt Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/akncompamode/srv/src/akncompaserver.cpp Tue Jul 13 11:36:42 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/src/akntreelistphysicshandler.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/aknhlist/src/akntreelistphysicshandler.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/aknhlist/src/akntreelistview.cpp Tue Jul 13 11:36:42 2010 +0100
@@ -876,6 +876,22 @@
{
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
{
@@ -899,9 +915,8 @@
if ( height < itemCountLimit &&
height < visibleItemCount )
{
- TInt move = itemCountLimit - height;
- UpdateVisibleItems(
- focusedItemIndex + move, focusedItem );
+ TInt move = itemCountLimit - height;
+ UpdateVisibleItems( focusedItemIndex + move, focusedItem );
}
}
}
@@ -2036,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;
+ }
}
}
@@ -2050,11 +2068,19 @@
iterator.Previous();
}
if ( iFlags.IsSet( EFlagMarkingMode ) )
-
{
- itemRect.iBr.iX -=
- AknLayoutScalable_Avkon::list_double_graphic_pane_t1(
- 0 ).LayoutLine().il;
+ 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.
@@ -2844,9 +2870,22 @@
CWindowGc& gc = SystemGc();
#endif
- TInt checkBoxOffset =
- AknLayoutScalable_Avkon::list_double_graphic_pane_t1(
- 0 ).LayoutLine().il;
+ 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 )
@@ -2982,46 +3021,13 @@
}
#endif
- 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 ( iItems[ii].Item() != iBottomItem )
{
TRect offsetRect( drawRect );
offsetRect.Move( 0, -offset );
AknListUtils::DrawSeparator( gc, offsetRect, textColor, skin );
}
-
- if ( iFlags.IsSet( EFlagMarkingMode ) )
- {
- gc.SetOrigin( TPoint( checkBoxOffset, 0 ) );
- drawRect.iBr.iX -= checkBoxOffset;
- }
-
+
TBool focused = ( FocusedItem() &&
iItems[ii].Item() == FocusedItem() );
@@ -3035,6 +3041,12 @@
// 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 );
@@ -3073,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())
{
--- a/uifw/AvKon/animdllsrc/AknKeyEventMap.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/animdllsrc/AknKeyEventMap.cpp Tue Jul 13 11:36:42 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/src/AknCharMap.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/AknCharMap.cpp Tue Jul 13 11:36:42 2010 +0100
@@ -648,75 +648,75 @@
}
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 )
- {
+ {
+ 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;
+ {
+ xOffset = -1;
+ }
+ break;
case EKeyRightArrow:
case '6':
- {
- xOffset = 1;
- }
- break;
+ {
+ xOffset = 1;
+ }
+ break;
case EKeyDownArrow:
case '8':
- {
- yOffset = 1;
- }
- break;
+ {
+ yOffset = 1;
+ }
+ break;
case EKeyUpArrow:
case '2':
- {
- yOffset = -1;
- }
- break;
+ {
+ yOffset = -1;
+ }
+ break;
default:
- break;
- }
-
- TInt runtimeIndex = iButtonIndex;
- if ( !emotionEnabled )
- {
- // SC/Emotion unabled, button regrouped!
+ 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;
+ {
+ 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 ) ) )
{
@@ -733,47 +733,47 @@
}
}
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;
+ }
+ }
+ 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 );
@@ -785,37 +785,37 @@
xOffset = EAknSctTableNaviExit;
}
else if ( mirrored && xOffset == 1 )
- {
+ {
xOffset = EAknSctPageNaviPrevPage;
- }
+ }
else
- {
+ {
xOffset = EAknSctPageNaviNextPage;
- }
- }
- break;
- default:
- break;
- }
+ }
+ }
+ 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
{
@@ -838,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;
@@ -982,22 +984,22 @@
TRect rect;
if ( iExtension )
- {
+ {
emotionEnabled = iExtension->IsEmotionEnabled();
- }
+ }
// Prev button
buttonObj = iButtonArray[1];
buttonObj->iButtonControl->SetButtonFlags(0);
TInt col = 0;
if ( !landScape )
- {
+ {
col = mirrored ? ( !emotionEnabled?4:3 ) : 1;
- }
+ }
else
- {
+ {
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();
@@ -1014,13 +1016,13 @@
buttonObj = iButtonArray[2];
buttonObj->iButtonControl->SetButtonFlags(0);
if ( !landScape )
- {
+ {
col = mirrored ? 1 : ( !emotionEnabled?4:3 );
- }
+ }
else
- {
+ {
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();
@@ -1120,7 +1122,7 @@
TBool CAknSctPageNavi::EnterControl(TInt aX, TInt /*aY*/)
{
- // Note, the button index is fixed on spite of mirrored case
+ // Note, the button index is fixed on spite of mirrored case
if (IsVisible())
{
if ((aX >= 0) && (aX < iButtonArray.Count()))
@@ -1151,16 +1153,16 @@
void CAknSctPageNavi::MoveFocus(TBool aInternalMove, TInt aX, TInt aY )
{
if ( aInternalMove )
- {
+ {
EnterControl( aX, 0 );
- }
+ }
else
- {
+ {
if (iExtension->EnterControl( aX, aY ) )
{
LeaveControl();
}
- }
+ }
}
TBool CAknSctPageNavi::LeaveControl()
@@ -1174,7 +1176,14 @@
TBool CAknSctPageNavi::ExitWithKey(TInt /*aKeycode*/)
{
- return EFalse;
+ if (iButtonArray[iButtonIndex]->iButtonId != EAknSctTableNaviExit)
+ {
+ return EFalse;
+ }
+ else
+ {
+ return ETrue;
+ }
}
@@ -1243,14 +1252,14 @@
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())
@@ -1291,20 +1300,20 @@
{
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;
- }
+ }
}
// ----------------------------------------------------------------------------
@@ -1489,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)
@@ -1825,7 +1836,7 @@
iExtension->iFlags = 0x00;
iExtension->iFocusHandler = iExtension;
iExtension->SetCharMapControl(this);
-
+
if ( iExtension->iSingleClickEnabled )
{
iExtension->iHighlightVisible = EFalse;
@@ -2343,7 +2354,7 @@
}
TUint code=aKeyEvent.iCode;
-
+
// First key event enables the highlight
if ( iExtension->iSingleClickEnabled && !iExtension->iHighlightVisible )
{
@@ -2375,10 +2386,10 @@
{
TInt maxButt = iExtension->iPageNavi->LastButton();
if ( iExtension->iPageNavi->EnterControl( maxButt,0 ) )
- {
+ {
LeaveControl();
break;
- }
+ }
}
}
}
@@ -2459,13 +2470,13 @@
{
// 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 )
{
@@ -2477,9 +2488,9 @@
aX = 0;
}
else
- {
+ {
aX = -1;
- }
+ }
if ( iExtension->iPageNavi->EnterControl( aX,0 ) )
{
LeaveControl();
@@ -2501,7 +2512,7 @@
if (iCursorPos.iY == ColMax(iCursorPos.iX))
{
if ( iExtension->iPageNavi )
- {
+ {
TInt aX = 0;
if ( iCursorPos.iX == MaxCols() - 1 )
@@ -2530,15 +2541,15 @@
aX = 0;
}
else
- {
+ {
aX = -1;
- }
+ }
if ( iExtension->iPageNavi->EnterControl( aX,0 ) )
{
LeaveControl();
break;
}
- }
+ }
// cell is at bottom row
if (iCursorPos.iX > RowMax(ColMax(0)))
{
@@ -2752,9 +2763,9 @@
// Sets the character case because the buffer content may have changed.
SetCharacterCaseL(iSpecialCharCase);
-
+
SetSmileyAnimationActivityInCurrentPageL(ETrue);
-
+
TInt cursorIndexAfterSwitch;
if ( !iExtension->iKeyBrdEvent )
{
@@ -2858,13 +2869,13 @@
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()
@@ -3050,45 +3061,45 @@
// 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;
- TSize size(iGridItemWidth*iMaxColumns+1, iGridItemHeight);
- if(iIsMirrored)
- {
+ 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 )
- {
+ }
+ // 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();
- }
+ }
+ 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.SetPenStyle(CGraphicsContext::ESolidPen);
gc.SetBrushStyle(CGraphicsContext::ENullBrush);
gc.SetPenSize(TSize(1,1));
DrawGrid(gc);
@@ -3116,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++;
}
@@ -3235,7 +3246,7 @@
if( aHighlighted )
{
TRgb color = AKN_LAF_COLOR(210);
-
+
if( !( iExtension->iFlags & EAknCharMapPressedDown )
|| iExtension->iSingleClickEnabled )
{
@@ -3244,7 +3255,7 @@
KAknsIIDQsnHighlightColors,
EAknsCIQsnHighlightColorsCG1 );
}
-
+
else
{
AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnHighlightColors, EAknsCIQsnHighlightColorsCG2 );
@@ -4394,7 +4405,7 @@
void CAknCharMap::CreateOffscreenBackgroundL()
{
-
+
}
TInt CAknCharMap::NextPageL()
@@ -4542,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]))
{
@@ -4570,7 +4581,7 @@
void CAknCharMap::DrawOffscreenBackgroundIfRequired() const
{
-
+
}
EXPORT_C CCoeControl* CAknCharMap::ComponentControl(TInt aIndex) const
@@ -5753,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() )
@@ -5773,9 +5785,9 @@
}
// Menu SCT is being used.
if ( Extension()->iMenuSct )
- {
- Extension()->iMenuSctHighlighted = aHighlight;
- }
+ {
+ Extension()->iMenuSctHighlighted = aHighlight;
+ }
}
// -----------------------------------------------------------------------------
// CAknCharMap::SetMenuSctRect()
@@ -5947,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) );
}
// -----------------------------------------------------------------------------
@@ -6701,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
{
--- a/uifw/AvKon/src/AknIndicatorContainer.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/AknIndicatorContainer.cpp Tue Jul 13 11:36:42 2010 +0100
@@ -307,9 +307,6 @@
iIndicators =
new (ELeave) CAknIndicatorQueue( KAknIndicatorQueueGranularity );
}
-
-
- iTicker = CPeriodic::NewL( CActive::EPriorityLow );
}
@@ -4288,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/AknQueryControl.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/AknQueryControl.cpp Tue Jul 13 11:36:42 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/AknRadioButtonSettingPage.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/AknRadioButtonSettingPage.cpp Tue Jul 13 11:36:42 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/AknTextSettingPage.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/AknTextSettingPage.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/AknViewAppUi.cpp Tue Jul 13 11:36:42 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"
@@ -235,11 +235,19 @@
AddToStackL( iExtension->iNavigator, ECoeStackPriorityDefault - 1, ECoeStackFlagRefusesFocus );
#endif // RD_SPLIT_VIEW
- if ( iEikonEnv->RootWin().OrdinalPosition() == 0 && // only clear the window for foreground apps
+ // Only clear the window for foreground apps.
+ if ( iEikonEnv->RootWin().OrdinalPosition() == 0 &&
iExtension->iUseDefaultScreenClearer )
- {
- iClearer = CAknLocalScreenClearer::NewL( ETrue );
- }
+ {
+ if ( !iEikonEnv->StartedAsServerApp() )
+ {
+ iClearer = CAknLocalScreenClearer::NewL( ETrue );
+ }
+ else
+ {
+ iClearer = CAknLocalScreenClearer::NewL( ETrue, ETrue );
+ }
+ }
}
// -----------------------------------------------------------------------------
@@ -311,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;
+ }
}
}
@@ -610,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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/AknVolumePopup.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/Aknslider.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/aknchoicelist.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/akncontext.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/aknglobalpopupprioritycontroller.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/aknindicator.cpp Tue Jul 13 11:36:42 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/aknlongtapanimation.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/aknlongtapanimation.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/aknlongtapdetector.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/aknmessagequerydialog.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/aknnavi.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/aknnavide.cpp Tue Jul 13 11:36:42 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/aknsignal.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/aknsignal.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/aknstatuspanedatapublisher.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/aknutils.cpp Tue Jul 13 11:36:42 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) );
}
@@ -1913,36 +1924,7 @@
}
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 );
@@ -1975,6 +1957,7 @@
}
}
+
void CAknListBoxFilterItems::ReleaseCriteriaL( const TDesC &aCriteria )
{
if ( iDisableChangesToShownIndexes )
@@ -2012,7 +1995,11 @@
iShownIndexes->AppendL(i);
}
ptr_temptext.Zero();
- }
+ }
+
+ TPtr nextChars = iExtension->iNextChars->Des();
+ SortCharsForAdaptiveSearchL( nextChars );
+
iSearchField->SetAdaptiveGridChars( *(iExtension->iNextChars) );
InstallEmptyTextL();
CleanupStack::PopAndDestroy( temptext );
@@ -4838,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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/aknview.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/eikfrlb.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/src/eikfrlbd.cpp Tue Jul 13 11:36:42 2010 +0100
@@ -2868,9 +2868,18 @@
&& iExtension->iMarkingIconArray->Count() == 2 )
#endif // RD_TOUCH2_MARKING
{
- textRect.iTl.iX +=
+ if ( AknLayoutUtils::LayoutMirrored() )
+ {
+ textRect.iBr.iX -=
AknLayoutScalable_Avkon::list_double_graphic_pane_t1(
- 0 ).LayoutLine().il;
+ 0 ).LayoutLine().ir;
+ }
+ else
+ {
+ textRect.iTl.iX +=
+ AknLayoutScalable_Avkon::list_double_graphic_pane_t1(
+ 0 ).LayoutLine().il;
+ }
TAknLayoutRect layoutRect;
layoutRect.LayoutRect( aItemRect,
@@ -4227,6 +4236,7 @@
CEikListBox* listbox = static_cast<CEikListBox*>( Control() );
DrawMarkingModeIcons( aProperties, aGc, itemRect );
+ TInt iconOffset = aItemRect.Width() - itemRect.Width();
const TColors* subcellColors = &aColors;
@@ -4334,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;
@@ -4424,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/smiley.rss Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/srcdata/smiley.rss Tue Jul 13 11:36:42 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_SDKMCL/bctestmixmcl/inc/bctestmixmclgeneralcase.h Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/inc/bctestmixmclgeneralcase.h Tue Jul 13 11:36:42 2010 +0100
@@ -161,12 +161,12 @@
/*
* Tests ItemFinder.
*/
- void TestItemFinder();
+ void TestItemFinderL();
/**
* Tests FindItemDialog.
*/
- void TestFindItemDialog();
+ void TestFindItemDialogL();
/**
* Tests button component API.
--- a/uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/src/bctestmixmclgeneralcase.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/S60_SDKMCL/bctestmixmcl/src/bctestmixmclgeneralcase.cpp Tue Jul 13 11:36:42 2010 +0100
@@ -132,8 +132,8 @@
TestAknListUtilsL();
TestRadioButtonSettingPageL();
TestPopupSettingPageL();
- TestItemFinder();
- TestFindItemDialog();
+ TestItemFinderL();
+ TestFindItemDialogL();
TestEditorKineticScrollingL();
TestEnableKineticScrollingPhysicsL();
TestAknPhysicsSuspendPhysicsL();
@@ -666,10 +666,10 @@
}
// -----------------------------------------------------------------------------
-// CBCTestMixMCLGeneralCase::TestItemFinder
+// CBCTestMixMCLGeneralCase::TestItemFinderL
// -----------------------------------------------------------------------------
//
-void CBCTestMixMCLGeneralCase::TestItemFinder()
+void CBCTestMixMCLGeneralCase::TestItemFinderL()
{
_LIT( KSetItemFinderObserverL,
"CItemFinder::SetItemFinderObserverL() tested" );
@@ -686,10 +686,10 @@
// -----------------------------------------------------------------------------
-// CBCTestMixMCLGeneralCase::TestFindItemDialog
+// CBCTestMixMCLGeneralCase::TestFindItemDialogL
// -----------------------------------------------------------------------------
//
-void CBCTestMixMCLGeneralCase::TestFindItemDialog()
+void CBCTestMixMCLGeneralCase::TestFindItemDialogL()
{
_LIT( KEnableSingleClick,
"CFindItemDialog::EnableSingleClick() tested" );
--- a/uifw/AvKon/tsrc/bc/bctestdom3.2/bctestdomavkonpsln/readme.txt Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/bctestdom3.2/bctestdomavkonpsln/readme.txt Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/bctestdom5.0/bctestdomavkonpsln/readme.txt Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/bctestlauncher/group/uid_range.txt Tue Jul 13 11:36:42 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/bctesttemplate/inc/bctesttemplatecontainer.h Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/bctesttemplate/inc/bctesttemplatecontainer.h Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/bctesttemplate/src/bctesttemplatecontainer.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/release_note.txt Tue Jul 13 11:36:42 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/readme.txt Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/AvKon/tsrc/bc/script/codetest_script/readme.txt Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/EABI/EIKCOCTLU.DEF Tue Jul 13 11:36:42 2010 +0100
@@ -2015,4 +2015,6 @@
_ZN11CEikListBox14SetMarkingModeEi @ 2014 NONAME
_ZN11CEikListBox22SetMarkingModeObserverEP23MAknMarkingModeObserver @ 2015 NONAME
_ZN10CAknButton14EnableFeedbackEi @ 2016 NONAME
+ _ZN22CAknLocalScreenClearer4NewLEii @ 2017 NONAME
+ _ZN22CAknLocalScreenClearer5NewLCEii @ 2018 NONAME
--- a/uifw/EikStd/bwins/EIKCOCTLU.DEF Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/bwins/EIKCOCTLU.DEF Tue Jul 13 11:36:42 2010 +0100
@@ -1626,4 +1626,5 @@
?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 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/coctlinc/smileyiconrecord.h Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/coctlinc/smileymodel.h Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/coctlsrc/AknButton.cpp Tue Jul 13 11:36:42 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"
@@ -290,7 +290,9 @@
CAknsFrameBackgroundControlContext* iHighlightContext;
// buffer for visually ordered text
TBuf<255 + KAknBidiExtraSpacePerLine> iVisualText;
- TBool iFeedbackEnabled;
+ TBool iFeedbackEnabled;
+ TAknsItemID iBackgroundSkinIID;
+ TRect iBgFrameRect;
};
// ============================ MEMBER FUNCTIONS ===============================
@@ -1036,8 +1038,8 @@
//
EXPORT_C void CAknButtonState::SetFlags( const TInt aFlags )
{
- if ( iFlags & KAknButtonStateHasLatchedFrame !=
- aFlags & KAknButtonStateHasLatchedFrame )
+ if ( ( iFlags & KAknButtonStateHasLatchedFrame ) !=
+ ( aFlags & KAknButtonStateHasLatchedFrame ) )
{
iExtension->iFlagsChanged = ETrue;
}
@@ -4578,10 +4580,15 @@
frameIdIndex = KDimmedFrameId;
}
- if ( SkinIID( frameIdIndex ) != KAknsIIDNone )
+ TAknsItemID skinIID( SkinIID( frameIdIndex ) );
+
+ // Only change the background frame graphics if necessary.
+ if ( skinIID != KAknsIIDNone &&
+ skinIID != iExtension->iBackgroundSkinIID )
{
- iBgContext->SetFrame( SkinIID( frameIdIndex ) );
+ iBgContext->SetFrame( skinIID );
iBgContext->SetCenter( SkinIID( ++frameIdIndex) );
+ iExtension->iBackgroundSkinIID = skinIID;
}
}
if ( state )
@@ -4597,13 +4604,20 @@
void CAknButton::SetFrameRects()
{
TRect rect( Rect() );
- TAknLayoutRect centerLayout;
- centerLayout.LayoutRect( rect,
- AknLayoutScalable_Avkon::toolbar_button_pane_g1().LayoutLine() );
- TRect innerRect( centerLayout.Rect() );
-
- iBgContext->SetFrameRects( rect, innerRect );
- iExtension->iHighlightContext->SetFrameRects( rect, innerRect );
+
+ // 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;
+ }
}
// -----------------------------------------------------------------------------
--- a/uifw/EikStd/coctlsrc/AknClearer.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/coctlsrc/AknClearer.cpp Tue Jul 13 11:36:42 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>
@@ -51,153 +50,91 @@
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();
+ }
+
#ifndef NO_ALF_OBSERVER
CAlfEffectObserver* alfEffectObserver = CAlfEffectObserver::NewL();
alfEffectObserver->SetDistractionWindow(*DrawableWindow());
@@ -233,7 +170,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;
@@ -266,31 +213,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
}
@@ -510,41 +477,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
{
@@ -686,13 +619,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 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/coctlsrc/AknToolbar.cpp Tue Jul 13 11:36:42 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/EIKEDWIN.CPP Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/coctlsrc/EIKEDWIN.CPP Tue Jul 13 11:36:42 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,16 +674,29 @@
if ( aDocumentPosition >= inlineText.LowerPos() &&
aDocumentPosition + length <= inlineText.HigherPos() )
{
- smiley->ConvertTextForSmileyL( aDocumentPosition, aEditorContent,
- EFalse );
+ TRAP_IGNORE( smiley->ConvertTextForSmileyL( aDocumentPosition, aEditorContent,
+ 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 ( smiley->SmileyCodeByPos( aDocumentPosition + i ) > 0 &&
- !CSmileyManager::IsSmileyCode( aEditorContent[i] ) )
+ if ( aEditorContent[i] == CSmileyManager::KCompensateChar )
{
- aEditorContent[i] = CSmileyManager::KPlaceHolder;
+ // 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 if ( smiley->IsSmileyCode( aEditorContent[i] ) )
+ {
+ smileyEndPos = i + smiley->SmileyLength( aDocumentPosition + i );
}
}
}
@@ -702,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;
@@ -716,6 +739,9 @@
{
iEdwin.iUndoStore->SetNewText( select );
}
+
+ iEdwin.iEdwinExtension->iInlineEditing = EFalse;
+
if ( iEdwin.IsSmileyEnabled() )
{
CAknEdwinState* state( iEdwin.EditorState() );
@@ -736,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);
@@ -2957,6 +2990,12 @@
{
TRAP_IGNORE( edwinState->ReportAknEdStateEventL(
MAknEdStateObserver::EAknSyncEdwinState ) );
+ if ( edwinState->Flags() & EAknEditorFlagHideTextView )
+ {
+ iTextView->MakeVisible( ETrue );
+ edwinState->SetFlags( edwinState->Flags() &
+ ~EAknEditorFlagHideTextView );
+ }
}
else
{
@@ -6018,6 +6057,8 @@
// Actual scrolling is done by calling MoveScrollIndex
iEdwinExtension->iPhysicsHandler->MoveScrollIndex( -textMovePixels );
+ iEdwinExtension->iEndBorderExceeded = EFalse;
+ iEdwinExtension->iStartBorderExceeded = EFalse;
iEdwinExtension->iScrolledByScrollBar = EFalse;
}
@@ -6700,6 +6741,8 @@
if ( iEdwinExtension )
{
iEdwinExtension->iThumbPos = KErrNotFound;
+ iEdwinExtension->iEndBorderExceeded = EFalse;
+ iEdwinExtension->iStartBorderExceeded = EFalse;
}
SizeChanged();
if ( !IsReadOnly() && !IsNonFocusing()
@@ -7424,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
{
@@ -8282,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 )
@@ -8418,7 +8498,13 @@
CleanupStack::PopAndDestroy( buf );
if ( aRedraw )
{
- DrawDeferred();
+ CAknEdwinState* edwinState =
+ static_cast<CAknEdwinState*>( iEdwinFepSupport->State( KNullUid ) );
+
+ if ( !( edwinState->Flags() & EAknEditorFlagHideTextView ) )
+ {
+ DrawDeferred();
+ }
}
}
}
@@ -8510,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 );
@@ -8940,7 +9024,6 @@
}
}
-
// ---------------------------------------------------------------------------
// CEikEdwin::SkipBackgroundDrawer
// ---------------------------------------------------------------------------
@@ -8970,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 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/coctlsrc/EIKLABEL.CPP Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/coctlsrc/EIKLBV.CPP Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/coctlsrc/EIKLBX.CPP Tue Jul 13 11:36:42 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
@@ -1270,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
@@ -1299,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() ) )
{
@@ -4192,6 +4226,11 @@
case MEikListBoxObserver::EEventFlickStarted:
case MEikListBoxObserver::EEventPanningStarted:
{
+ if ( iListBoxExt && ( iListBoxExt->iWorldSize.iHeight
+ <= iListBoxExt->iViewSize.iHeight ) )
+ {
+ return;
+ }
iItemDrawer->SetFlags( CListItemDrawer::EDisableMarquee );
if ( iListBoxExt )
{
@@ -4210,6 +4249,11 @@
case MEikListBoxObserver::EEventFlickStopped:
case MEikListBoxObserver::EEventPanningStopped:
{
+ if ( iListBoxExt && ( iListBoxExt->iWorldSize.iHeight
+ <= iListBoxExt->iViewSize.iHeight ) )
+ {
+ return;
+ }
iItemDrawer->ClearFlags( CListItemDrawer::EDisableMarquee );
if ( iListBoxExt )
{
@@ -4231,7 +4275,8 @@
TBool allowed = ETrue;
if ( iListBoxExt && iListBoxExt->iPhysics
- && aEvent != MEikListBoxObserver::EEventFlickStopped )
+ && aEvent != MEikListBoxObserver::EEventFlickStopped
+ && aEvent != MEikListBoxObserver::EEventFlickStarted )
{
allowed = iListBoxExt->iClickEventsAllowed;
}
@@ -4999,6 +5044,7 @@
}
iListBoxExt->iFeedbackType = ETouchFeedbackList;
+ iListBoxExt->iDoubleClickEventIgnored = EFalse;
if ( !iListBoxExt->iSingleClickEnabled &&
itemIndex != iView->CurrentItemIndex() )
@@ -5068,6 +5114,7 @@
if(Buffer()->iPressedIndex == itemIndex)
{
Buffer()->iPressedIndex = KEikListBoxInvalidIndex;
+ iListBoxExt->iDoubleClickEventIgnored = ETrue;
_AKNTRACE_FUNC_EXIT;
return;
}
@@ -5103,6 +5150,7 @@
// update index of the last down tapped item
iListBoxExt->iLastDownTappedItem = itemIndex;
+ iListBoxExt->iMarkableListShiftKeyPressed = EFalse;
if ((! (Rect().Contains(aPointerEvent.iPosition))) && (iListBoxFlags & EPopout))
{
@@ -5266,7 +5314,7 @@
}
}
- if ( itemIndex == oldCurrentItemIndex )
+ if ( itemIndex == oldCurrentItemIndex && !iListBoxExt->iSingleClickEnabled )
{
if ( shiftKeyPressed )
{
@@ -5350,7 +5398,7 @@
( !( ( iListBoxFlags & EViewerFlag ) &&
( iListBoxFlags & EDisableItemSpecificMenu ) ) )&&
( iListBoxExt->iLastDownTappedItem == itemIndex ) &&
- (Buffer()->iPressedIndex != KEikListBoxInvalidIndex) &&
+ ( !iListBoxExt->iDoubleClickEventIgnored ) &&
itemIndex == iView->CurrentItemIndex() )
{
TTouchLogicalFeedback fbType = ETouchFeedbackList;
@@ -5411,7 +5459,8 @@
}
if ( !s60StyleMultiselection )
{
- if ( !iListBoxExt->iSingleClickEnabled )
+ if ( !iListBoxExt->iSingleClickEnabled &&
+ itemIndex == iListBoxExt->iLastDownTappedItem )
{
ReportListBoxEventL(MEikListBoxObserver::EEventItemClicked);
}
@@ -6596,6 +6645,14 @@
iListBoxExt->DisableSingleClick();
iItemDrawer->ClearFlags( CListItemDrawer::ESingleClickEnabled);
}
+ else if ( !aDisabled &&
+ iListBoxExt &&
+ !iListBoxExt->iSingleClickEnabled &&
+ iItemDrawer )
+ {
+ TRAP_IGNORE( iListBoxExt->EnableSingleClickL() );
+ iItemDrawer->SetFlags( CListItemDrawer::ESingleClickEnabled );
+ }
_AKNTRACE_FUNC_EXIT;
}
@@ -7095,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 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/coctlsrc/EIKMENUB.CPP Tue Jul 13 11:36:42 2010 +0100
@@ -182,6 +182,7 @@
{
changeState = ETrue;
dimCommands = EFalse;
+ iBar->iMenuPane->SetItemActionsStateL( ETrue );
}
else if ( !iItemActionMenu->CollectionHighlightVisible() )
{
@@ -196,6 +197,7 @@
{
iBar->iMenuPane->SetItemDimmed( EAknCmdUnmark, ETrue );
}
+ iBar->iMenuPane->SetItemActionsStateL( ETrue );
dimMarkAndUnmark = ETrue;
}
else
@@ -785,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);
@@ -1007,6 +1014,30 @@
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 );
@@ -1015,22 +1046,18 @@
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() )
{
@@ -1044,6 +1071,7 @@
iMenuPane->SetItemDimmed( EAknCmdMarkingModeMarkOne, ETrue );
iMenuPane->SetItemDimmed( EAknCmdMarkingModeEnter, ETrue );
+ iMenuObserver->DynInitMenuPaneL( resource, iMenuPane );
iMenuPane->FilterDimmedItems();
}
@@ -1139,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 );
@@ -1149,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);
@@ -1176,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 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/coctlsrc/EIKMENUP.CPP Tue Jul 13 11:36:42 2010 +0100
@@ -239,7 +239,8 @@
ESkipScrollbarUpdate,
EHighlightEnabled,
EHideViewSpecificCommands,
- EHideMarkAndUnmark
+ EHideMarkAndUnmark,
+ EHideItemActionCommands
};
/**
@@ -489,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 ) )
@@ -841,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,
@@ -1253,9 +1255,11 @@
}
iFlags.Clear( EHideItemSpecificCommands );
+ iFlags.Clear( EHideItemActionCommands );
iFlags.Clear( EContextSensitive );
iFlags.Clear( EHighlightEnabled );
iFlags.Clear( EHideViewSpecificCommands );
+ iFlags.Clear( EHideMarkAndUnmark );
_AKNTRACE_FUNC_EXIT;
}
@@ -1360,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 );
+ }
}
}
}
@@ -2287,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;
}
@@ -2824,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
@@ -6614,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
--- a/uifw/EikStd/coctlsrc/EIKSCRLB.CPP Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/coctlsrc/EIKSCRLB.CPP Tue Jul 13 11:36:42 2010 +0100
@@ -1320,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 );
--- a/uifw/EikStd/coctlsrc/aknedwinphysicshandler.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/coctlsrc/aknedwinphysicshandler.cpp Tue Jul 13 11:36:42 2010 +0100
@@ -218,7 +218,11 @@
{
return;
}
-
+ if ( !IsBouncing() )
+ {
+ iFlags.Clear( EFlagBouncingDown );
+ iFlags.Clear( EFlagBouncingUp );
+ }
iWorldIndex += aPixelsToMove;
ScrollView( EFalse );
}
--- a/uifw/EikStd/coctlsrc/aknitemactionmenuregister.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/coctlsrc/aknitemactionmenuregister.cpp Tue Jul 13 11:36:42 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/akntoolbarextension.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/coctlsrc/akntoolbarextension.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/coctlsrc/akntoolbarextensionview.cpp Tue Jul 13 11:36:42 2010 +0100
@@ -873,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 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/coctlsrc/eikcba.cpp Tue Jul 13 11:36:42 2010 +0100
@@ -1337,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() ?
@@ -1353,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 );
@@ -4304,6 +4261,11 @@
{
DoLayoutChange();
SetBoundingRect( TRect() );
+ if( iExtension->iIfMskIconSet
+ && ( iCbaFlags & EEikCbaFlagAppMskIcon ) )
+ {
+ TRAP_IGNORE( UpdateIconL() );
+ }
if ( iFlags.IsSet( ECbaInsideDialog )
|| iFlags.IsSet( ECbaEmbedded ) )
{
@@ -4534,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 );
}
@@ -5741,6 +5706,8 @@
TRect screen( iAvkonAppUi->ApplicationRect() );
TBool softKeysUpAndDownMirrored = EFalse;
+ TRAP_IGNORE( CheckAndCreateStaconContextsL() );
+
TInt variety = 0;
if (AknLayoutFlags() & EAknLayoutCbaInStaconPaneLeft)
{
@@ -7918,6 +7885,80 @@
}
+// ---------------------------------------------------------------------------
+// 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 );
+ }
+ }
+ }
+
+
+
//
// class CEikCbaButton
//
@@ -8753,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 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/coctlsrc/eikspane.cpp Tue Jul 13 11:36:42 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() );
}
}
--- a/uifw/EikStd/coctlsrc/smileyiconrecord.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/coctlsrc/smileyiconrecord.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/coctlsrc/smileymanager.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/coctlsrc/smileymodel.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/dlgsrc/EIKCAPC.CPP Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/dlgsrc/EIKCAPCA.CPP Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/dlgsrc/EIKDIALG.CPP Tue Jul 13 11:36:42 2010 +0100
@@ -300,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;
@@ -1656,15 +1656,23 @@
#endif
GfxTransEffect::Begin(this, KGfxControlAppearAction);
MTouchFeedback* feedback = NULL;
- if(AknLayoutUtils::PenEnabled())
- {
- feedback = static_cast<MTouchFeedback*>(ExtensionInterface(KExIfTactileFeedbackUid));
- }
- if(feedback && CAknTransitionUtils::TransitionsEnabled(AknTransEffect::EComponentTransitionsOff ))
- {
- feedback->InstantFeedback(this, ETouchFeedbackIncreasingPopUp,
- ETouchFeedbackVibra, TPointerEvent());
- }
+ 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;
@@ -1677,11 +1685,6 @@
GfxTransEffect::NotifyExternalState(ECaptureComponentsEnd, (const TDesC8*)this);
GfxTransEffect::End(this);
- if(feedback)
- {
- feedback->InstantFeedback(this, ETouchFeedbackPopUp,
- ETouchFeedbackVibra, TPointerEvent());
- }
}
else
{
@@ -2432,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;
}
@@ -2454,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)
@@ -2658,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()
--- a/uifw/EikStd/dlgsrc/EIKDPAGE.CPP Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/dlgsrc/EIKDPAGE.CPP Tue Jul 13 11:36:42 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++ )
@@ -2377,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 )
@@ -2453,6 +2495,14 @@
{
ExposeLine(iCurrentLine,ETrue);
}
+
+ iExtension->iInitialLayoutDone = initialLayoutDone;
+
+ if ( IsForm() )
+ {
+ UpdatePhysics();
+ }
+
_AKNTRACE_FUNC_EXIT;
}
@@ -2897,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;
@@ -3079,13 +3133,7 @@
( iExtension->iFocusedClicked || iExtension->iUsesSingleClick ) &&
!iExtension->iScrolling )
{
- // Not need to sent key event when focus lost.
- CEikCaptionedControl* currentLine = (*iLines)[iCurrentLine];
- if ( currentLine->IsFocused() )
- {
- mskPress = ETrue;
- }
-
+ mskPress = ETrue;
callDefaultImplementation = EFalse;
}
if ( callDefaultImplementation && ( iExtension->iFocusedClicked ||
@@ -3114,7 +3162,7 @@
{
TKeyEvent key;
key.iCode=EKeyOK;
- key.iModifiers=0;
+ key.iModifiers=EModifierSpecial;
key.iRepeats = 0;
iEikonEnv->SimulateKeyEventL( key, EEventKey );
}
@@ -3303,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 )
@@ -4412,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/EIKSRVUI.CPP Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/srvuisrc/EIKSRVUI.CPP Tue Jul 13 11:36:42 2010 +0100
@@ -624,13 +624,12 @@
EXPORT_C void CEikServAppUiBase::HandleThreadExitL(RThread& aThread)
{
- _LIT(KAppArcServerThread, "AppArcServerThread");
if (aThread.Name() == ASCliDefinitions::ServerAndThreadName()) // alarm server died
{
aThread.Close(); // need to Close() before restarting with same name
iServerToRestart |= EAlwlSvr; // restarted under active object
}
- else if (aThread.Name() == KAppArcServerThread) // AppArc server died
+ else if (aThread.Name()==NameApaServServerThread()) // AppArc server died
{
aThread.Close();
iServerToRestart|=EApaSvr;
--- a/uifw/EikStd/srvuisrc/eikkeysoundserver.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/EikStd/srvuisrc/eikkeysoundserver.cpp Tue Jul 13 11:36:42 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
--- a/uifw/eikctl/src/EIKCLB.CPP Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/eikctl/src/EIKCLB.CPP Tue Jul 13 11:36:42 2010 +0100
@@ -840,7 +840,7 @@
TInt firstPotentialItemIndex = iTopItemIndex;
TInt lastPotentialItemIndex =
- iTopItemIndex + NumberOfItemsThatFitInRect( iViewRect );
+ iTopItemIndex + NumberOfItemsThatFitInRect( iViewRect ) - 1;
TBool backgroundDrawingSuppressed = ( listbox && listbox->BackgroundDrawingSuppressed() );
if ( iModel->NumberOfItems() == 0 )
--- a/uifw/eikctl/src/EIKCLBD.CPP Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/eikctl/src/EIKCLBD.CPP Tue Jul 13 11:36:42 2010 +0100
@@ -2076,20 +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 );
TRect itemRect( aRect );
DrawMarkingModeIcons( aItemProperties, aGc, itemRect );
if ( iExtension->iSubCellsMightIntersect )
{
CheckIfSubCellsIntersect( &textLines[0], &rectClipped[0], *aText, itemRect );
}
- if ( iExtension->iCurrentRow < listbox->BottomItemIndex() )
- {
- AknListUtils::DrawSeparator( aGc, aRect, aColors.iText, skin );
- }
- DrawHighLight( aGc, aRect, aHighlight, skin );
-
-
// The column draw loop
column = 0;
TInt subCellIndex = 0;
@@ -2464,7 +2462,11 @@
}
#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;
@@ -2548,13 +2550,6 @@
// pass 3 drawing
- 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 )
@@ -2848,9 +2843,18 @@
iExtension->iMarkingIconArray->Count() == 2 )
#endif // RD_TOUCH2_MARKING
{
- textRect.iTl.iX +=
- AknLayoutScalable_Avkon::list_single_graphic_pane_t1(
+ 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 ) );
--- a/uifw/eikctl/src/EIKMFNE.CPP Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/eikctl/src/EIKMFNE.CPP Tue Jul 13 11:36:42 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);
--- a/uifw/ganes/inc/HgVgMediaWallRenderer.h Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/ganes/inc/HgVgMediaWallRenderer.h Tue Jul 13 11:36:42 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/HgItem.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/ganes/src/HgItem.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/ganes/src/HgScroller.cpp Tue Jul 13 11:36:42 2010 +0100
@@ -372,7 +372,7 @@
iCurrentRow(-1),
iSelectedIndex(KErrNotFound),
iScrollBarType( EHgScrollerScrollBar ),
- iFirstTime(ETrue),
+ iResetViewPosition(ETrue),
iOldWinPos(KErrNotFound)
{
// No implementation required
@@ -423,15 +423,21 @@
// 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);
}
// -----------------------------------------------------------------------------
@@ -516,10 +522,10 @@
iPopupDrawer->Init( Rect(), iPopupFont );
}
- if(iFirstTime)
+ if(iResetViewPosition)
{
iViewPosition = TPoint(iWidth/2, iHeight/2);
- iFirstTime = EFalse;
+ iResetViewPosition = EFalse;
}
HandleViewPositionChanged();
@@ -607,7 +613,6 @@
iDetector->PointerEventL( aEvent );
HandleUpEventL( aEvent );
- iPointerDown = EFalse;
}
}
}
@@ -777,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();
}
}
@@ -804,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() )
@@ -831,6 +840,10 @@
}
}
}
+ else
+ {
+ iPointerDown = EFalse;
+ }
}
// -----------------------------------------------------------------------------
@@ -1046,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 );
@@ -1180,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;
--- a/uifw/ganes/src/HgVgMediaWall.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/ganes/src/HgVgMediaWall.cpp Tue Jul 13 11:36:42 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,34 +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
- {
- // draw with alpha to make a hole to composition layer
- SystemGc().SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha);
- SystemGc().SetBrushColor(TRgb(0,0,0,0));
- SystemGc().Clear();
- DrawOpenVG();
- }
+ 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();
}
// -----------------------------------------------------------------------------
@@ -445,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.
@@ -710,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);)
}
@@ -1085,7 +1065,9 @@
}
else
{
- iAnimationState = aOpening ? EHgVgMediaWallAnimationStateOpening : EHgVgMediaWallAnimationStateClosing;
+ iAnimationState = aOpening
+ ? EHgVgMediaWallAnimationStateOpening
+ : EHgVgMediaWallAnimationStateClosing;
StartAnimationTimer();
}
@@ -1102,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
@@ -1181,9 +1164,6 @@
iAnimationTimer->Cancel();
}
-
- SetFlags( EHgVgMediaWallDrawToWindowGC );
- DrawNow();
}
if( aType == KEikMessageUnfadeWindows )
@@ -1191,15 +1171,8 @@
ClearFlags( EHgVgMediaWallDrawToWindowGC );
DrawNow();
}
-
- if( aType == KEikDynamicLayoutVariantSwitch && !(iFlags & EHgVgMediaWallDrawToWindowGC) )
- {
- SetFlags( EHgVgMediaWallDrawToWindowGC );
- DrawNow();
- }
}
-
// ---------------------------------------------------------------------------
// CHgVgMediaWall::InitItemsL()
// ---------------------------------------------------------------------------
@@ -1253,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();
}
@@ -1413,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();
@@ -1582,7 +1553,8 @@
iScrollBar->SetViewPosition( TPoint(iSelectedIndex, 0) );
#ifdef MEDIAWALL_ORIENTATION_FIX
- iScrollBar->EnableLandscapeRendering( iMediaWallStyle == CHgVgMediaWall::EHgVgMediaWallStyleCoverflowFullScreen );
+ iScrollBar->EnableLandscapeRendering(
+ iMediaWallStyle == CHgVgMediaWall::EHgVgMediaWallStyleCoverflowFullScreen );
#endif
}
@@ -1886,7 +1858,8 @@
// CHgVgMediaWall::HandleDragging()
// ---------------------------------------------------------------------------
//
-void CHgVgMediaWall::HandleDragging(const AknTouchGestureFw::MAknTouchGestureFwDragEvent& aEvent)
+void CHgVgMediaWall::HandleDragging(
+ const AknTouchGestureFw::MAknTouchGestureFwDragEvent& aEvent)
{
switch (aEvent.State())
@@ -1991,7 +1964,8 @@
// CHgVgMediaWall::HandleDragStart()
// ---------------------------------------------------------------------------
//
-void CHgVgMediaWall::HandleDragStart(const AknTouchGestureFw::MAknTouchGestureFwDragEvent& /*aEvent*/)
+void CHgVgMediaWall::HandleDragStart(
+ const AknTouchGestureFw::MAknTouchGestureFwDragEvent& /*aEvent*/)
{
// cancel ongoing animation.
@@ -2019,7 +1993,8 @@
// CHgVgMediaWall::HandleDragOn()
// ---------------------------------------------------------------------------
//
-void CHgVgMediaWall::HandleDragOn(const AknTouchGestureFw::MAknTouchGestureFwDragEvent& aEvent)
+void CHgVgMediaWall::HandleDragOn(
+ const AknTouchGestureFw::MAknTouchGestureFwDragEvent& aEvent)
{
// calculate delta of dragging
@@ -2063,7 +2038,8 @@
// CHgVgMediaWall::HandleDragStop()
// ---------------------------------------------------------------------------
//
-void CHgVgMediaWall::HandleDragStop(const AknTouchGestureFw::MAknTouchGestureFwDragEvent& /*aEvent*/)
+void CHgVgMediaWall::HandleDragStop(
+ const AknTouchGestureFw::MAknTouchGestureFwDragEvent& /*aEvent*/)
{
iPointerDown = EFalse;
if (iMediaWallStyle == EHgVgMediaWallStyleGrid)
@@ -2118,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);
}
@@ -2139,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;
@@ -2174,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)
@@ -2189,7 +2171,8 @@
DrawOpenVG();
if (iMediaWallObserver)
- iMediaWallObserver->HandleMediaWallEvent((TInt)EHgVgMediaWallEventRequestHideSoftkeys, this);
+ iMediaWallObserver->HandleMediaWallEvent(
+ EHgVgMediaWallEventRequestHideSoftkeys, this);
}
}
--- a/uifw/ganes/src/HgVgMediaWallRenderer.cpp Tue Jun 01 15:52:55 2010 +0100
+++ b/uifw/ganes/src/HgVgMediaWallRenderer.cpp Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uifw/tsrc/public/basic/AknSoundServerStifTest/group/AknSoundServerStifTest_DoxyFile.txt Tue Jul 13 11:36:42 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 01 15:52:55 2010 +0100
+++ b/uiutils/Findutil/src/FindUtilChinese.cpp Tue Jul 13 11:36:42 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;