# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1273583404 -10800 # Node ID fbb813aef148f6b3a60251491e434a70d767e562 # Parent e00582ce7ecd38a96baa27e8a364cd50d07b0c8e Revision: 201017 Kit: 201019 diff -r e00582ce7ecd -r fbb813aef148 messagingappbase/mce/inc/MceBitmapResolver.h --- a/messagingappbase/mce/inc/MceBitmapResolver.h Tue Apr 27 16:33:37 2010 +0300 +++ b/messagingappbase/mce/inc/MceBitmapResolver.h Tue May 11 16:10:04 2010 +0300 @@ -28,6 +28,9 @@ #include "mcetemplate.h" #include +//cmail update +#define KUidMsgTypeFsMtmVal 0x2001F406 + // CONSTANTS const TInt KMceMmsPriority = 1; // For loading the MMS priority icons @@ -145,6 +148,26 @@ * @return ETrue if unread children found. */ TBool HasUnreadMessagesL( const TMsvId aId, TInt& aMessages, TInt& aUnreadMessages ); + + /** + * Find Visible Count for local service Draft\sent\outbox folder + * Unread message check is not required. + * @param aId: folder ID of local service. + * @return TInt Return Message Count visble in messaging main view + */ + TInt FindVisibleCountL(TMsvId aFolderId ) const; + + /** + * Find Visible Count for local service Inbox folder + * Unread message check is required here to show Inbox icon with u + * @param aId: folder ID of local service. + * @param aUnreadMessages: It will be True if Inbox has atleast + * one unread message. + * @return TInt Return Message Count visble in messaging main view + */ + TInt FindVisibleCountWithUnreadMessageL(TMsvId aFolderId , TBool& aUnreadMessages) const; + + #else /** @@ -253,8 +276,13 @@ TInt iBitmapsLoaded; TInt iDescriptionLength; - - + + /** + * Email Framework Feature flag. + * ETure if Feature in ON + * otherwsie EFalse. + */ + TBool iEmailFramework; }; diff -r e00582ce7ecd -r fbb813aef148 messagingappbase/mce/inc/MceListItem.h --- a/messagingappbase/mce/inc/MceListItem.h Tue Apr 27 16:33:37 2010 +0300 +++ b/messagingappbase/mce/inc/MceListItem.h Tue May 11 16:10:04 2010 +0300 @@ -40,6 +40,16 @@ TBool iExtraItem; TMsvId iMsvId; TMcePrintableText iPrintableText; + + /** + * It Refers to the complte string visble + * in main view for any folder. + * It is used as a chache to improve the + * performance when Flick is in progress + * in Main list view. + */ + TMcePrintableText iText; + TInt iIconIndex; TMcePrintableText iSecondaryText; TInt iApplicationUid; diff -r e00582ce7ecd -r fbb813aef148 messagingappbase/mce/inc/MceMainViewListItemArray.h --- a/messagingappbase/mce/inc/MceMainViewListItemArray.h Tue Apr 27 16:33:37 2010 +0300 +++ b/messagingappbase/mce/inc/MceMainViewListItemArray.h Tue May 11 16:10:04 2010 +0300 @@ -65,6 +65,14 @@ */ virtual void MceListItemArrayChangedL( ) = 0; + + /** + * Called when Main view refresh is happening + * and need to know flick is ON\OFF + */ + virtual TBool MceListItemArrayFlickEvent( + ) = 0; + }; @@ -457,8 +465,6 @@ */ void ReadMainViewItemsFromRepositoryL(); - //Calculates the visible count excluding FS email stuff - TInt FindVisibleCountL(TMsvId serviceId) const; /** * Creates Conversation string for main view listbox. * @param aIndex: index of the message to be drawn diff -r e00582ce7ecd -r fbb813aef148 messagingappbase/mce/inc/MceMainViewListView.h --- a/messagingappbase/mce/inc/MceMainViewListView.h Tue Apr 27 16:33:37 2010 +0300 +++ b/messagingappbase/mce/inc/MceMainViewListView.h Tue May 11 16:10:04 2010 +0300 @@ -165,6 +165,14 @@ * From MMceMainViewListItemArrayObserver */ virtual void MceListItemArrayChangedL( ); + + /** + * Called Main view refresh is happening + * and need to know flick is ON\OFF + * @return ETrue if flick is ON + * otherwise OFF + */ + TBool MceListItemArrayFlickEvent(); protected: // Functions from base classes @@ -298,6 +306,12 @@ * KFeatureIdFfEmailFramework is enabled */ TBool iEmailFramework; + /** + * Flag that shows Flicking status in Main View + * ETrue if ON + * otherwsie EFalse + */ + TBool iFlick; }; #endif diff -r e00582ce7ecd -r fbb813aef148 messagingappbase/mce/src/MceBitmapResolver.cpp --- a/messagingappbase/mce/src/MceBitmapResolver.cpp Tue Apr 27 16:33:37 2010 +0300 +++ b/messagingappbase/mce/src/MceBitmapResolver.cpp Tue May 11 16:10:04 2010 +0300 @@ -25,6 +25,8 @@ #include "MtmRegistryObserver.h" // mmtmuidataregistryobserver #include #include // fixed entry ids +#include // cmtmstore +#include #include // CGulIcon #include // cakniconarray #include // CFbsFont @@ -32,6 +34,8 @@ #include // bitmap enums #include // EMtudEntryStateOpen #include // mtm uids +#include +#include #include "MceUtils.h" #include "MceListItem.h" #include "MceBitmapResolver.h" @@ -39,7 +43,6 @@ #include // security data caging #include -#include #include @@ -148,8 +151,8 @@ CreateAndAppendIconL( KAknsIIDQgnIndiConnectionAlwaysAdd, iFilenameMuiu, EMbmMuiuQgn_indi_connection_always_add, &listItem, ETrue ); CreateAndAppendIconL( KAknsIIDQgnIndiConnectionInactiveAdd, iFilenameMuiu, EMbmMuiuQgn_indi_connection_inactive_add, &listItem, ETrue ); CreateAndAppendIconL( KAknsIIDQgnIndiConnectionInactiveAdd, iFilenameMuiu, EMbmMuiuQgn_indi_connection_on_roam_add, &listItem, ETrue ); - CreateAndAppendIconL( KAknsIIDQgnIndiMcePriorityHigh, iFilenameAvkon, EMbmAvkonQgn_indi_mce_priority_high, &listItem ); - CreateAndAppendIconL( KAknsIIDQgnIndiMcePriorityLow, iFilenameAvkon, EMbmAvkonQgn_indi_mce_priority_low, &listItem ); + CreateAndAppendIconL( KAknsIIDQgnIndiMcePriorityHigh, iFilenameAvkon, EMbmAvkonQgn_indi_mce_priority_high, &listItem, ETrue ); + CreateAndAppendIconL( KAknsIIDQgnIndiMcePriorityLow, iFilenameAvkon, EMbmAvkonQgn_indi_mce_priority_low, &listItem, ETrue ); _LIT( KMceExtraIconsDirAndFile,"MceExtraIcons.mbm" ); TParse cvfp; @@ -162,6 +165,13 @@ CreateAndAppendIconL( KAknsIIDQgnPropMceUnknownRead, EMbmMuiuQgn_prop_mce_unknown_read ); iDescriptionLength = MceUtils::DescriptionLengthL(); + FeatureManager::InitializeLibL(); + iEmailFramework = EFalse; + if ( FeatureManager::FeatureSupported( KFeatureIdFfEmailFramework ) ) + { + iEmailFramework = ETrue; + } + FeatureManager::UnInitializeLib(); } // ---------------------------------------------------- @@ -208,8 +218,6 @@ { if ( aColorSkinnedIcon ) { - TRgb rgb; // What to add here? - AknsUtils::CreateColorIconL( skins, aId, @@ -220,7 +228,7 @@ aFileName, aBitmapIndex, aBitmapIndex + 1, - rgb ); + KRgbBlack); } else { @@ -396,7 +404,7 @@ { foundIndex = LocalEntryBitmapIndex( id ); - // check if folder has unread messages + //Get count and check if inbox folder has unread messages if ( id == KMsvGlobalInBoxIndexEntryId || id == KMceDocumentsEntryId || id == KMsvDraftEntryIdValue || @@ -405,10 +413,39 @@ id >= KFirstFreeEntryId ) { - TRAPD(err, ( unreadMessages = HasUnreadMessagesL( id, aMessageCount, unreadCount ) ) ); - if (err == KErrNone && unreadMessages ) + // In case of inbox, need to know message count and is + // there at least one unread message. + // No need of unread count and sub folder checking + + if(id == KMsvGlobalInBoxIndexEntryId ) { - foundIndex++; + TRAPD(err, aMessageCount = + FindVisibleCountWithUnreadMessageL(id, unreadMessages)); + + if (err == KErrNone && unreadMessages ) + { + foundIndex++; + } + } + // for Draft/outbox/sent no need to go for sub folder checking + // and unread count checking + else if(id == KMsvDraftEntryIdValue || + id == KMsvSentEntryIdValue || + id == KMsvGlobalOutBoxIndexEntryIdValue) + { + TRAP_IGNORE(aMessageCount = FindVisibleCountL(id)); + } + + else if(id == KMceDocumentsEntryId) + { + // no logic change for draft + // need total count, including sub folder count + // need unread message info also to show proper icon. + TRAPD(err, ( unreadMessages = HasUnreadMessagesL( id, aMessageCount, unreadCount ) ) ); + if (err == KErrNone && unreadMessages ) + { + foundIndex++; + } } } } @@ -653,7 +690,7 @@ } } - CleanupStack::PopAndDestroy(); // entry + CleanupStack::PopAndDestroy(entry); // entry return aUnreadMessages; } @@ -959,4 +996,122 @@ return iDescriptionLength; } +#ifdef RD_MSG_NAVIPANE_IMPROVEMENT +// ---------------------------------------------------- +// CMceBitmapResolver::FindVisibleCountL +// ---------------------------------------------------- +TInt CMceBitmapResolver::FindVisibleCountL(TMsvId aFolderId ) const + { + // This function can be optimzied further + // after the new optimized API from message store + // This is applicable for Draft\sent\outbox + + TInt visiblecount=0; + TInt emailcount=0; + TInt itemcount; + + // Cmail message count needs to be filtered + CMsvEntry* entry = iSession->GetEntryL( aFolderId ); + CleanupStack::PushL( entry ); + itemcount=entry->Count(); + + //Find email messages + CMsvEntrySelection *smtpselection = entry->ChildrenWithMtmL( KUidMsgTypeSMTP ); + CleanupStack::PushL( smtpselection ); + + CMsvEntrySelection *pop3selection = NULL; + CMsvEntrySelection *imapselection = NULL ; + CMsvEntrySelection *cmailselection = NULL ; + + if(!iEmailFramework) + { + pop3selection = entry->ChildrenWithMtmL( KUidMsgTypePOP3 ); + CleanupStack::PushL( pop3selection ); + imapselection = entry->ChildrenWithMtmL( KUidMsgTypeIMAP4 ); + CleanupStack::PushL( imapselection ); + } + else + { + cmailselection = entry->ChildrenWithMtmL( + TUid::Uid(KUidMsgTypeFsMtmVal)); + CleanupStack::PushL( cmailselection ); + } + + if ( smtpselection!=0 && smtpselection->Count()>0 ) + { + emailcount=emailcount+smtpselection->Count(); + } + + if(!iEmailFramework) + { + if ( pop3selection!=0 && pop3selection->Count()>0 ) + { + emailcount=emailcount+pop3selection->Count(); + } + if ( imapselection!=0 && imapselection->Count()>0 ) + { + emailcount=emailcount+imapselection->Count(); + } + } + else + { + if ( cmailselection!=0 && cmailselection->Count()>0 ) + { + emailcount=emailcount+cmailselection->Count(); + } + } + + visiblecount = itemcount - emailcount; + + if(iEmailFramework) + { + CleanupStack::PopAndDestroy( cmailselection ); + } + else + { + CleanupStack::PopAndDestroy(imapselection); + CleanupStack::PopAndDestroy( pop3selection ); + } + CleanupStack::PopAndDestroy( smtpselection ); + CleanupStack::PopAndDestroy( entry ); + return visiblecount; + } + +// ---------------------------------------------------- +// CMceBitmapResolver::FindVisibleCountWithUnreadMessageL +// ---------------------------------------------------- +TInt CMceBitmapResolver::FindVisibleCountWithUnreadMessageL(TMsvId aFolderId + , TBool& aUnreadMessages) const + { + // This function can be optimzied further + // after the new optimized API from message store + // This is applicable for Inbox + + aUnreadMessages = EFalse; + TInt itemcount; + CMsvEntry* entry = iSession->GetEntryL( aFolderId ); + CleanupStack::PushL( entry ); + itemcount=entry->Count(); + + // No need of cmail filtering, because Mailbox has its own + // Inbox folder + // Check at least one Unread message + for ( TInt loop = 0; loop < itemcount; loop++ ) + { + const TMsvEntry& tEntry = (*entry)[loop]; + if ( tEntry.iType == KUidMsvMessageEntry ) + { + if ( tEntry.Unread() ) + { + aUnreadMessages= ETrue; + break; + } + } + } + CleanupStack::PopAndDestroy( entry ); + + return itemcount; + } + +#endif //RD_MSG_NAVIPANE_IMPROVEMENT // End of File diff -r e00582ce7ecd -r fbb813aef148 messagingappbase/mce/src/MceMainViewListItemArray.cpp --- a/messagingappbase/mce/src/MceMainViewListItemArray.cpp Tue Apr 27 16:33:37 2010 +0300 +++ b/messagingappbase/mce/src/MceMainViewListItemArray.cpp Tue May 11 16:10:04 2010 +0300 @@ -229,7 +229,8 @@ aListItem.iMsvId = id; aListItem.iExtraItem = EFalse; - aListItem.iIconIndex = KErrNotFound; + aListItem.iIconIndex = KErrNotFound; + aListItem.iText.Zero(); } // --------------------------------------------------------------------------- @@ -353,7 +354,7 @@ aNewItem.iPrintableText.AppendNum( index ); aNewItem.iPrintableText.Append( KColumnListSeparator ); aNewItem.iPrintableText.Append( tempText ); - + aNewItem.iText.Zero(); InsertL( aIndex, aNewItem ); } @@ -407,7 +408,7 @@ aNewItem.iPrintableText.Append( tempText ); aNewItem.iPrintableText.Append( KColumnListSeparator ); aNewItem.iPrintableText.Append( secondarytxt ); - + aNewItem.iText.Zero(); InsertL( aIndex, aNewItem ); } @@ -457,7 +458,7 @@ tempText.Zero(); TMsvEntry entry; TMsvId serviceId; - TInt visiblecount=0; + const TMceListItem& item = At( aIndex ); if ( iSession->GetEntry( item.iMsvId, serviceId, entry ) == KErrNone ) { @@ -465,38 +466,26 @@ { TInt messageCount = 0; TMsvId id = entry.Id(); + CONST_CAST( TMceListItem*, &item)->iIconIndex = iBitmapResolver.BitmapIndex( entry, messageCount ); if(iDefaultViewSettings == KMceConversationview && id == KMsvGlobalInBoxIndexEntryId ) { CONST_CAST( TMceListItem*, &item)->iIconIndex = EMceBitmapIndexInbox; - } - else - { - CONST_CAST( TMceListItem*, &item)->iIconIndex = iBitmapResolver.BitmapIndex( entry, messageCount ); - } + } CONST_CAST( TMceListItem*, &item)->iMessageCount = messageCount; } + else if(iListItemArrayObserver ) + { + if(iListItemArrayObserver->MceListItemArrayFlickEvent()) + { + return item.iText; + } + } + tempText.AppendNum( item.iIconIndex ); tempText.Append( KColumnListSeparator ); tempText.Append( item.iPrintableText ); - if((iSelectableEmail)||(iEmailFramework)) - { - if( item.iMsvId == KMsvDraftEntryId || - item.iMsvId == KMsvSentEntryId || - item.iMsvId == KMsvDeletedEntryFolderEntryId || - item.iMsvId == KMsvGlobalInBoxIndexEntryId || item.iMsvId == KMsvGlobalOutBoxIndexEntryId ) - { - TRAP_IGNORE( visiblecount = FindVisibleCountL(item.iMsvId) ); - AppendMessageCountString( tempText, visiblecount ); - } - else - { - AppendMessageCountString( tempText, item.iMessageCount ); - } - } - else - { - AppendMessageCountString( tempText, item.iMessageCount ); - } + AppendMessageCountString( tempText, item.iMessageCount ); + if ( entry.Connected() ) { if ( iRoaming ) @@ -542,7 +531,6 @@ tempText.AppendNum( (TInt) EMceBitmapIndexInactiveAdd ); } } - } } else @@ -551,8 +539,11 @@ __ASSERT_DEBUG( 0, Panic(EMceListItemArrayEntryNotFound ) ); tempText.AppendNum( (TInt)EMceBitmapIndexUnknown ); tempText.Append( KColumnListSeparator ); - tempText.Append( item.iPrintableText ); + tempText.Append( item.iPrintableText ); } + //save the complete string as chache, will be used when flick will start + CONST_CAST( TMceListItem*, &item)->iText.Zero(); + CONST_CAST( TMceListItem*, &item)->iText.Copy(tempText); return tempText; } @@ -1029,15 +1020,12 @@ { TInt messageCount = 0; TMsvId id = entry.Id(); + item.iIconIndex = iBitmapResolver.BitmapIndex( entry, messageCount ); if(iDefaultViewSettings == KMceConversationview && id == KMsvGlobalInBoxIndexEntryId ) { - item.iIconIndex = EMceBitmapIndexInbox; + item.iIconIndex = EMceBitmapIndexInbox; } - else - { - item.iIconIndex = iBitmapResolver.BitmapIndex( entry, messageCount ); - } - item.iMessageCount = messageCount; + item.iMessageCount = messageCount; // item.iUnreadMessageCount = unreadMessageCount; if ( iListItemArrayObserver ) { @@ -1200,104 +1188,40 @@ } // ---------------------------------------------------- -// CMceMainViewListItemArray::FindVisibleCountL() -// ---------------------------------------------------- -TInt CMceMainViewListItemArray::FindVisibleCountL(TMsvId serviceId ) const - { - TInt visiblecount=0; - TInt emailcount=0; - TInt itemcount; - CMsvEntry* entry = iSession->GetEntryL( serviceId ); - CleanupStack::PushL( entry ); - itemcount=entry->Count(); - - //Find email messages - CMsvEntrySelection *smtpselection = entry->ChildrenWithMtmL( KUidMsgTypeSMTP ); - CleanupStack::PushL( smtpselection ); - - CMsvEntrySelection *pop3selection = NULL; - CMsvEntrySelection *imapselection = NULL ; - CMsvEntrySelection *cmailselection = NULL ; - - if(!iEmailFramework) - { - pop3selection = entry->ChildrenWithMtmL( KUidMsgTypePOP3 ); - CleanupStack::PushL( pop3selection ); - imapselection = entry->ChildrenWithMtmL( KUidMsgTypeIMAP4 ); - CleanupStack::PushL( imapselection ); - } - else - { - cmailselection = entry->ChildrenWithMtmL( - TUid::Uid(KUidMsgTypeFsMtmVal)); - CleanupStack::PushL( cmailselection ); - } - - if ( smtpselection!=0 && smtpselection->Count()>0 ) - { - emailcount=emailcount+smtpselection->Count(); - } - - if(!iEmailFramework) - { - if ( pop3selection!=0 && pop3selection->Count()>0 ) - { - emailcount=emailcount+pop3selection->Count(); - } - if ( imapselection!=0 && imapselection->Count()>0 ) - { - emailcount=emailcount+imapselection->Count(); - } - } - else - { - if ( cmailselection!=0 && cmailselection->Count()>0 ) - { - emailcount=emailcount+cmailselection->Count(); - } - } - - visiblecount = itemcount - emailcount; - - if(iEmailFramework) - { - CleanupStack::PopAndDestroy( cmailselection ); - } - else - { - CleanupStack::PopAndDestroy(imapselection); - CleanupStack::PopAndDestroy( pop3selection ); - } - CleanupStack::PopAndDestroy( smtpselection ); - CleanupStack::PopAndDestroy( entry ); - return visiblecount; - } -// ---------------------------------------------------- // CMceMainViewListItemArray::CreateConversationsListItem() // ---------------------------------------------------- TPtrC CMceMainViewListItemArray::CreateConversationsListItem( TInt aIndex ) const { const TMceListItem& item = At( aIndex ); - TPtr tempText = iListBoxText->Des(); - tempText.Zero(); - TInt bitmapidx = EMceBitmapIndexConversation; - if(iDefaultViewSettings == KMceConversationview ) - { - TInt msgCount = 0; - TInt unreadCount = 0; - iBitmapResolver.HasUnreadMessagesL(KMsvGlobalInBoxIndexEntryId,msgCount,unreadCount); - if( unreadCount > 0 ) + if(!iListItemArrayObserver->MceListItemArrayFlickEvent()) + { + TPtr tempText = iListBoxText->Des(); + tempText.Zero(); + TInt bitmapidx = EMceBitmapIndexConversation; + if(iDefaultViewSettings == KMceConversationview ) { - bitmapidx = EMceBitmapIndexConversationNew ; - } - } - tempText.AppendNum(bitmapidx); - TPtrC Ptr(item.iPrintableText); - TInt len = Ptr.Length(); - TInt pos = Ptr.Locate(KColumnListSeparator); - TPtrC Ptr1(Ptr.Mid(pos)); - tempText.Append(Ptr1); - return tempText; + TInt msgCount = 0; + TInt unreadCount = 0; + iBitmapResolver.HasUnreadMessagesL(KMsvGlobalInBoxIndexEntryId,msgCount,unreadCount); + if( unreadCount > 0 ) + { + bitmapidx = EMceBitmapIndexConversationNew ; + } + } + tempText.AppendNum(bitmapidx); + TPtrC Ptr(item.iPrintableText); + TInt len = Ptr.Length(); + TInt pos = Ptr.Locate(KColumnListSeparator); + TPtrC Ptr1(Ptr.Mid(pos)); + tempText.Append(Ptr1); + CONST_CAST( TMceListItem*, &item)->iText.Zero(); + CONST_CAST( TMceListItem*, &item)->iText.Copy(tempText); + return tempText; + } + else + { + return item.iText; + } } // ---------------------------------------------------- diff -r e00582ce7ecd -r fbb813aef148 messagingappbase/mce/src/MceMainViewListView.cpp --- a/messagingappbase/mce/src/MceMainViewListView.cpp Tue Apr 27 16:33:37 2010 +0300 +++ b/messagingappbase/mce/src/MceMainViewListView.cpp Tue May 11 16:10:04 2010 +0300 @@ -113,9 +113,10 @@ iSelectedIndex( KErrNotFound ), iTopItemIndex( 0 ), iSelectionFolderId( KMsvNullIndexEntryId ), - iEmailClientIntegration(EFalse), - iSelectableEmail(EFalse), - iEmailFramework(EFalse) + iEmailClientIntegration(EFalse), + iSelectableEmail(EFalse), + iEmailFramework(EFalse), + iFlick(EFalse) { iSessionHolder.AddClient(); } @@ -453,6 +454,12 @@ iMsgListContainer->SetMskL(); } break; + case EEventFlickStarted: + iFlick = ETrue; + break; + case EEventFlickStopped: + iFlick = EFalse; + break; default: break; @@ -1102,6 +1109,14 @@ } // ---------------------------------------------------- +// CMceMainViewListView::MceListItemArrayFlickEvent +// ---------------------------------------------------- +TBool CMceMainViewListView::MceListItemArrayFlickEvent() + { + return iFlick; + } + +// ---------------------------------------------------- // CMceMainViewListView::AiwSyncParamListLC // ---------------------------------------------------- CAiwGenericParamList* CMceMainViewListView::AiwSyncParamListLC(TInt /*aId*/, const TDesC& aText) diff -r e00582ce7ecd -r fbb813aef148 messagingappbase/mcesettings/inc/MceSettingsDialog.h --- a/messagingappbase/mcesettings/inc/MceSettingsDialog.h Tue Apr 27 16:33:37 2010 +0300 +++ b/messagingappbase/mcesettings/inc/MceSettingsDialog.h Tue May 11 16:10:04 2010 +0300 @@ -25,7 +25,7 @@ #include #include -#include "MceSettingsTitlePaneHandlerDialog.h" +#include "mcesettingstitlepanehandlerdialog.h" #include diff -r e00582ce7ecd -r fbb813aef148 messagingappbase/msgavkon/msgindicatorplugin/inc/msgindicatorpluginimplementation.h --- a/messagingappbase/msgavkon/msgindicatorplugin/inc/msgindicatorpluginimplementation.h Tue Apr 27 16:33:37 2010 +0300 +++ b/messagingappbase/msgavkon/msgindicatorplugin/inc/msgindicatorpluginimplementation.h Tue May 11 16:10:04 2010 +0300 @@ -24,7 +24,7 @@ // Until aknstylusactivatedpopupcontent.h is fixed // INCLUDES -#include +#include #include // CAknIndicatorPlugin #include // Controlling the preview pop-up component #include // Stylus activated pop-up conten diff -r e00582ce7ecd -r fbb813aef148 messagingappbase/msgavkon/muiu_internal/flagger/inc/MuiuFlagger.h --- a/messagingappbase/msgavkon/muiu_internal/flagger/inc/MuiuFlagger.h Tue Apr 27 16:33:37 2010 +0300 +++ b/messagingappbase/msgavkon/muiu_internal/flagger/inc/MuiuFlagger.h Tue May 11 16:10:04 2010 +0300 @@ -22,7 +22,7 @@ #define CMUIUFLAGGER_H // INCLUDES -#include "MuiuFlags.h" +#include "muiuflags.h" #include // CONSTANTS diff -r e00582ce7ecd -r fbb813aef148 messagingappbase/msgavkon/muiu_internal/servicesinternal/inc/MuiuContactService.h --- a/messagingappbase/msgavkon/muiu_internal/servicesinternal/inc/MuiuContactService.h Tue Apr 27 16:33:37 2010 +0300 +++ b/messagingappbase/msgavkon/muiu_internal/servicesinternal/inc/MuiuContactService.h Tue May 11 16:10:04 2010 +0300 @@ -21,7 +21,7 @@ #define MUIUCONTACTSERVICE_H #include // CBase -#include "MuiuMsvUiServiceUtilitiesInternal.h" +#include "muiumsvuiserviceutilitiesinternal.h" class CMuiuContactAddressMatcher; class CMsgVoIPExtension; diff -r e00582ce7ecd -r fbb813aef148 messagingappbase/msgavkon/muiu_internal/servicesinternal/inc/MuiuLock.h --- a/messagingappbase/msgavkon/muiu_internal/servicesinternal/inc/MuiuLock.h Tue Apr 27 16:33:37 2010 +0300 +++ b/messagingappbase/msgavkon/muiu_internal/servicesinternal/inc/MuiuLock.h Tue May 11 16:10:04 2010 +0300 @@ -22,7 +22,7 @@ class CRepository; -#include "MessagingInternalCRKeys.h" +#include "messaginginternalcrkeys.h" // Lock identifier for messaging settings access diff -r e00582ce7ecd -r fbb813aef148 messagingappbase/msgeditor/viewinc/MsgBodyControlEditor.h --- a/messagingappbase/msgeditor/viewinc/MsgBodyControlEditor.h Tue Apr 27 16:33:37 2010 +0300 +++ b/messagingappbase/msgeditor/viewinc/MsgBodyControlEditor.h Tue May 11 16:10:04 2010 +0300 @@ -23,6 +23,7 @@ // ========== INCLUDE FILES ================================ #include +#include #include "MsgExpandableControlEditor.h" // for CMsgExpandableControlEditor #include "MsgEditor.hrh" @@ -44,7 +45,8 @@ * Defines an editor for the body control. */ class CMsgBodyControlEditor : public CMsgExpandableControlEditor, - public MItemFinderObserver + public MItemFinderObserver, + public MAknItemFinderObserver { public: @@ -138,6 +140,13 @@ public: // from MItemFinderObserver void HandleParsingComplete(); + + public: // from MAknItemFinderObserver + + void HandleFindItemEventL( + const CItemFinder::CFindItemExt& aItem, + MAknItemFinderObserver::TEventFlag aEvent, + TUint aFlags = 0 ); public: // new diff -r e00582ce7ecd -r fbb813aef148 messagingappbase/msgeditor/viewsrc/MsgAddressControl.cpp --- a/messagingappbase/msgeditor/viewsrc/MsgAddressControl.cpp Tue Apr 27 16:33:37 2010 +0300 +++ b/messagingappbase/msgeditor/viewsrc/MsgAddressControl.cpp Tue May 11 16:10:04 2010 +0300 @@ -742,7 +742,6 @@ EXPORT_C void CMsgAddressControl::SetAddressFieldAutoHighlight( TBool aValidHighlightable ) { iAddressControlEditor->SetAddressFieldAutoHighlight( aValidHighlightable ); - TRAP_IGNORE( iAddressControlEditor->CheckHighlightingL() ); DrawDeferred(); } @@ -821,8 +820,6 @@ { iAddressControlEditor->PrepareForViewing(); - // TODO: Implement better error handling? - TRAP_IGNORE( iAddressControlEditor->CheckHighlightingL() ); } } } @@ -1149,15 +1146,6 @@ { CMsgExpandableControl::FocusChanged( aDrawNow ); - // TODO: Implement better error handling? - if ( !IsFocused() ) - { - TRAP_IGNORE( iAddressControlEditor->TurnHighlightingOffL() ); - } - else - { - TRAP_IGNORE( iAddressControlEditor->CheckHighlightingL() ); - } } // --------------------------------------------------------- diff -r e00582ce7ecd -r fbb813aef148 messagingappbase/msgeditor/viewsrc/MsgAddressControlEditor.cpp --- a/messagingappbase/msgeditor/viewsrc/MsgAddressControlEditor.cpp Tue Apr 27 16:33:37 2010 +0300 +++ b/messagingappbase/msgeditor/viewsrc/MsgAddressControlEditor.cpp Tue May 11 16:10:04 2010 +0300 @@ -1667,9 +1667,16 @@ const TKeyEvent& aKeyEvent, TEventCode aType ) { if ( IsReadOnly() && - aKeyEvent.iCode == EKeyUpArrow && + ( aKeyEvent.iCode == EKeyUpArrow || + aKeyEvent.iCode == EKeyEnter || + aKeyEvent.iCode == EKeyDevice3 ) && iValidHighlightable ) { + if ( !SelectionLength() ) + { + // Enable highlight if hw keys used + CheckHighlightingL(); + } return EKeyWasConsumed; } return CMsgExpandableControlEditor::OfferKeyEventL( aKeyEvent, aType ); @@ -1723,16 +1730,28 @@ else { forwardRequest = EFalse; - } + + if ( docPos < TextLength() ) + { + // Enable highlight on pointer down + CheckHighlightingL(); + } + } } else if ( aPointerEvent.iType == TPointerEvent::EButton1Up ) { if ( currentField && iPreviousField == currentField ) { + // We will send new EMsgFindItemEvent so that we can separate + // single click item activation and old key based activation. + // This is just quick fix for doing it, other implementations should + // be considered(e.g. storing state in editor or using some flags). + // This is done because in AppUI::HandleKeyEvent we must separate + // activation methods for enabling highlight when using keys. TKeyEvent event; - event.iCode = EKeyDevice3; - event.iScanCode = EStdKeyDevice3; + event.iCode = EMsgFindItemKeyEvent; + event.iScanCode = EMsgFindItemKeyEvent; event.iModifiers = 0; event.iRepeats = 0; @@ -1740,6 +1759,12 @@ forwardRequest = EFalse; } + + if ( SelectionLength() ) + { + // Disable highlight on pointer up + ClearSelectionL(); + } } } } @@ -1772,7 +1797,8 @@ CMsgExpandableControlEditor::HandlePointerEventL( aPointerEvent ); } #ifdef RD_TACTILE_FEEDBACK - else if(aPointerEvent.iType == TPointerEvent::EButton1Down) + else if( aPointerEvent.iType == TPointerEvent::EButton1Down + && SelectionLength() ) { MTouchFeedback* feedback = MTouchFeedback::Instance(); if ( feedback ) @@ -1977,10 +2003,6 @@ #endif SetWordWrapL( EFalse ); - if ( AddressFieldAutoHighlight() ) - { - SelectAllL(); // for automatic highlight - } } CMsgExpandableControlEditor::PrepareForReadOnlyL( aReadOnly ); diff -r e00582ce7ecd -r fbb813aef148 messagingappbase/msgeditor/viewsrc/MsgBodyControlEditor.cpp --- a/messagingappbase/msgeditor/viewsrc/MsgBodyControlEditor.cpp Tue Apr 27 16:33:37 2010 +0300 +++ b/messagingappbase/msgeditor/viewsrc/MsgBodyControlEditor.cpp Tue May 11 16:10:04 2010 +0300 @@ -37,6 +37,8 @@ #include "MsgBaseControl.h" // for TMsgEditPermissionFlags #include "MsgBaseControlObserver.h" // for MMsgBaseControlObserver #include "MsgEditorCustomDraw.h" // for CMsgEditorCustomDraw +#include "MsgEditor.hrh" +#include // resouce identifiers // ========== EXTERNAL DATA STRUCTURES ===================== @@ -81,7 +83,10 @@ // CMsgBodyControlEditor::~CMsgBodyControlEditor() { - + if (iItemFinder) + { + TRAP_IGNORE(iItemFinder->SetItemFinderObserverL( NULL )); + } } // --------------------------------------------------------- @@ -114,6 +119,8 @@ CItemFinder::EUriScheme ); iItemFinder->AddObserver( *this ); + iItemFinder->SetItemFinderObserverL( this ); + iFocusChangedBeforeParseFinish = EFalse; CEikRichTextEditor::ConstructL( iParentControl, 0, iMaxNumberOfChars, edwinFlags ); @@ -250,6 +257,27 @@ { switch ( aKeyEvent.iCode ) { + case EKeyDevice3: + case EKeyEnter: + { + // Restore highlight + const CItemFinder::CFindItemExt& item = + iItemFinder->CurrentItemExt(); + + if ( item.iItemType != CItemFinder::ENoneSelected ) + { + SetSelectionL( item.iStart, item.iEnd + 1 ); + } + else if ( iInitTop ) + { + SetHighlightL( 0, EMsgFocusDown, ETrue ); + } + else + { + SetHighlightL( TextLength(), EMsgFocusUp, ETrue ); + } + return EKeyWasConsumed; + } case EKeyUpArrow: case EKeyDownArrow: break; @@ -271,6 +299,35 @@ } // --------------------------------------------------------- +// CMsgBodyControlEditor::HandleFindItemEventL +// +// Handles finditem events. +// --------------------------------------------------------- +// +void CMsgBodyControlEditor::HandleFindItemEventL( + const CItemFinder::CFindItemExt& aItem, + MAknItemFinderObserver::TEventFlag aEvent, + TUint aFlags) + { + // We will send new EMsgFindItemEvent so that we can separate + // single click item activation and old key based activation. + // This is just quick fix for doing it, other implementations should + // be considered(e.g. storing state in editor or using some flags). + // This is done because in AppUI::HandleKeyEvent we must separate + // activation methods for enabling highlight when using keys. + if ( MAknItemFinderObserver::EPointerEvent == aEvent ) + { + TKeyEvent event; + event.iCode = EMsgFindItemKeyEvent; + event.iScanCode = EMsgFindItemKeyEvent; + event.iModifiers = 0; + event.iRepeats = 0; + + iCoeEnv->WsSession().SimulateKeyEvent( event ); + } + } + +// --------------------------------------------------------- // CMsgBodyControlEditor::HandlePointerEventL // // Handles pointer events. @@ -297,39 +354,14 @@ if ( aPointerEvent.iType == TPointerEvent::EButton1Down ) { - iPreviousItemStart = -1; - iPreviousItemLength = -1; - - if ( tappedOverTag ) + if ( !tappedOverTag ) { - TPoint relativeTapPoint( aPointerEvent.iPosition - iPosition ); - if ( iItemFinder->ItemWasTappedL( relativeTapPoint ) ) - { - iPreviousItemStart = start; - iPreviousItemLength = length; - - forwardRequest = EFalse; - } + // Reset current finditem + iItemFinder->ResetCurrentItem(); } else { - iItemFinder->ResetCurrentItem(); - } - } - else if ( aPointerEvent.iType == TPointerEvent::EButton1Up ) - { - if ( tappedOverTag && - start >= iPreviousItemStart && - length <= iPreviousItemLength ) - { - TKeyEvent event; - event.iCode = EKeyDevice3; - event.iScanCode = EStdKeyDevice3; - event.iModifiers = 0; - event.iRepeats = 0; - - iCoeEnv->WsSession().SimulateKeyEvent( event ); - + // Find item tapped, do not forward event forwardRequest = EFalse; } } diff -r e00582ce7ecd -r fbb813aef148 messagingappbase/msgeditor/viewsrc/MsgEditorKeyCatcher.cpp --- a/messagingappbase/msgeditor/viewsrc/MsgEditorKeyCatcher.cpp Tue Apr 27 16:33:37 2010 +0300 +++ b/messagingappbase/msgeditor/viewsrc/MsgEditorKeyCatcher.cpp Tue May 11 16:10:04 2010 +0300 @@ -104,10 +104,13 @@ // All printable characters except # which means user is changing case. // SCT of address control contains less characters, however. // There is a drawback here: pressing cancel in SCT still may add delimiters. - if ( aKeyEvent.iCode >= 32 && - aKeyEvent.iCode <= 255 && - aKeyEvent.iCode != '#' ) - { + if(aKeyEvent.iCode == ';') + { + return EKeyWasNotConsumed; + } + else if ( aKeyEvent.iCode >= 32 && aKeyEvent.iCode <= 255 && + aKeyEvent.iCode != '#') + { iEditor->PreInsertEditorFormattingL( aKeyEvent ); return EKeyWasNotConsumed; } diff -r e00582ce7ecd -r fbb813aef148 messagingappbase/msgeditor/viewsrc/MsgEditorView.cpp --- a/messagingappbase/msgeditor/viewsrc/MsgEditorView.cpp Tue Apr 27 16:33:37 2010 +0300 +++ b/messagingappbase/msgeditor/viewsrc/MsgEditorView.cpp Tue May 11 16:10:04 2010 +0300 @@ -2248,7 +2248,7 @@ if ( lineRect.Height() ) { - if ( lineRect.iBr.iY > iViewRect.Height() ) + if (lineRect.Height() >= iViewRect.Height()) { // the view must be scrolled up. delta = iViewRect.Height() - lineRect.iBr.iY; diff -r e00582ce7ecd -r fbb813aef148 messagingappbase/ncnlist/src/NcnModel.cpp --- a/messagingappbase/ncnlist/src/NcnModel.cpp Tue Apr 27 16:33:37 2010 +0300 +++ b/messagingappbase/ncnlist/src/NcnModel.cpp Tue May 11 16:10:04 2010 +0300 @@ -26,8 +26,8 @@ #include "CVoiceMailManager.h" #include -#include -#include +#include +#include // ================= LOCAL CONSTANTS ======================= namespace diff -r e00582ce7ecd -r fbb813aef148 messagingappbase/smartmessaging/richbio/src/CRichBio.cpp --- a/messagingappbase/smartmessaging/richbio/src/CRichBio.cpp Tue Apr 27 16:33:37 2010 +0300 +++ b/messagingappbase/smartmessaging/richbio/src/CRichBio.cpp Tue May 11 16:10:04 2010 +0300 @@ -25,7 +25,7 @@ #include // Fonts #include // CMsgExpandableControlEditor #include // MaxBodyHeight -#include // TAknLayoutId +#include // TAknLayoutId #include #include // LAF diff -r e00582ce7ecd -r fbb813aef148 mobilemessaging/mmsui/viewersrc/UniMmsViewerAppUi.cpp --- a/mobilemessaging/mmsui/viewersrc/UniMmsViewerAppUi.cpp Tue Apr 27 16:33:37 2010 +0300 +++ b/mobilemessaging/mmsui/viewersrc/UniMmsViewerAppUi.cpp Tue May 11 16:10:04 2010 +0300 @@ -170,6 +170,7 @@ #include // CMmsClientMtm, mmsconst.h #include #include +#include #include "MmsViewer.hrh" // application specific commands & enums #include "UniMmsViewerDocument.h" // CMmsViewerDocument @@ -1160,10 +1161,24 @@ return; } - TInt focusedControl = FocusedControlId( ); + TInt focusedControl = FocusedControlId( ); + + TBool senderHighlighted = EFalse; + if ( focusedControl == EMsgComponentIdFrom ) + { + CMsgAddressControl* address = static_cast( + iView->ControlById( EMsgComponentIdFrom ) ); + + if ( address && address->Editor().SelectionLength() ) + { + senderHighlighted = ETrue; + } + } + if ( !IsOwnMessage( ) ) { - if( (FocusedControlId( ) == EMsgComponentIdFrom) && ( ( iMtm->Sender( ) ).Length() ) ) + if( ( FocusedControlId( ) == EMsgComponentIdFrom) && ( ( iMtm->Sender( ) ).Length() ) + && senderHighlighted ) { iFindItemMenu->SetSenderHighlightStatus( ETrue ); iFindItemMenu->SetSenderDisplayText( TMmsGenUtils::PureAddress( iMtm->Sender( ) ) ); @@ -1173,11 +1188,14 @@ iFindItemMenu->SetSenderHighlightStatus( EFalse ); } } - iFindItemMenu->AddItemFindMenuL( - ( focusedControl == EMsgComponentIdBody ) ? iView->ItemFinder( ) : 0, + + iFindItemMenu->AddItemFindMenuL( + ( iView->ItemFinder()->CurrentSelection().Length() ) + ? iView->ItemFinder( ) : 0, aMenuPane, EFindItemMenuPlaceHolder, - TMmsGenUtils::PureAddress( iMtm->Sender( ) ), + senderHighlighted ? + TMmsGenUtils::PureAddress( iMtm->Sender( ) ) : KNullDesC(), iHeader->Alias( ) && !iHeader->IsRemoteAlias( ) ? ETrue : EFalse, //"Is sender known" EFalse ); @@ -1606,7 +1624,39 @@ break; case EKeyDevice3: //Selection key case EKeyEnter: //Enter Key - { + { + if( iView->FocusedControl()->ControlType() == EMsgAddressControl ) + { + CMsgAddressControl* address = static_cast( + iView->FocusedControl() ); + if ( address && !address->Editor().SelectionLength() ) + { + // restore highlight to address field + return address->Editor().OfferKeyEventL( aKeyEvent, aType ); + } + } + else if ( iView->FocusedControl()->ControlType() == EMsgBodyControl ) + { + CItemFinder* itemFinder = iView->ItemFinder(); + if ( FocusedControlId() == EMsgComponentIdBody + && itemFinder ) + { + if ( !itemFinder->CurrentSelection().Length() ) + { + CMsgBodyControl* body = static_cast( + iView->FocusedControl() ); + if ( body ) + { + // restore highlight to current itemfinder item + return body->Editor().OfferKeyEventL( aKeyEvent, aType ); + } + } + } + } + // fall through + } + case EMsgFindItemKeyEvent: + { TInt focusedControl = FocusedControlId( ); CMsgMediaControl* control = MediaControlById(focusedControl); if (control) @@ -1985,6 +2035,12 @@ } } TBool objectsOk = CanForwardObjectsL( aResourceId ); + TInt conformanceSize = KClassMaxSizeVideoRich; + if(iMmsConformance->ConformanceVersion() > KMmsVersion12) + { + conformanceSize = KClassMaxSizeMegapixel; + } + if ( objectsOk && Document( )->CreationMode( ) == EMmsCreationModeWarning ) { if ( Document( )->SmilType( ) != EMmsSmil || @@ -1993,7 +2049,7 @@ aResourceId = 0; return ShowGuidedModeConfirmationQueryL( R_MMSVIEWER_QUEST_GUIDED_PRESENTATION ); } - else if ( msgSize > KClassMaxSizeVideoRich ) + else if ( msgSize > conformanceSize ) { aResourceId = 0; return ShowGuidedModeConfirmationQueryL( R_MMSVIEWER_QUEST_GUIDED_INC_OBJ ); diff -r e00582ce7ecd -r fbb813aef148 mobilemessaging/smsui/viewerinc/MsgSmsViewerAppUi.h --- a/mobilemessaging/smsui/viewerinc/MsgSmsViewerAppUi.h Tue Apr 27 16:33:37 2010 +0300 +++ b/mobilemessaging/smsui/viewerinc/MsgSmsViewerAppUi.h Tue May 11 16:10:04 2010 +0300 @@ -561,6 +561,18 @@ */ void QuickSmsMsgNaviHandlingL( CMsvStore* aStore ); + /** + * Checks wheter current find item is highlighted + * @return ETrue if highlight enabled + */ + TBool FindItemHighlighted(); + + /** + * Returns id of focused control + * @return id of focused control + */ + TInt FocusedControlId(); + protected: // Data // Note: diff -r e00582ce7ecd -r fbb813aef148 mobilemessaging/smsui/viewersrc/MsgSmsViewerAppUi.cpp --- a/mobilemessaging/smsui/viewersrc/MsgSmsViewerAppUi.cpp Tue Apr 27 16:33:37 2010 +0300 +++ b/mobilemessaging/smsui/viewersrc/MsgSmsViewerAppUi.cpp Tue May 11 16:10:04 2010 +0300 @@ -965,7 +965,20 @@ case R_SMSV_OPTIONSMENUPANE_CLASS0: { TPtrC senderNumber = KNullDesC(); - if ( iFlags.iValidSenderNumber ) + + TBool senderHighlighted = EFalse; + if ( FocusedControlId( ) == EMsgComponentIdFrom ) + { + CMsgAddressControl* address = static_cast( + iView->ControlById( EMsgComponentIdFrom ) ); + + if ( address && address->Editor().SelectionLength() ) + { + senderHighlighted = ETrue; + } + } + if ( iFlags.iValidSenderNumber + && senderHighlighted ) { senderNumber.Set( iNumber ); } @@ -978,7 +991,7 @@ else if(iFindItemMenu) { iFindItemMenu->AddItemFindMenuL( - IsBodyFocused() ? iView->ItemFinder() : 0, + FindItemHighlighted() ? iView->ItemFinder() : 0, aMenuPane, EFindItemMenuPlaceHolder, senderNumber, iRecipientstring.Length() != 0 ? ETrue : EFalse, @@ -1078,14 +1091,31 @@ // add automatic highlight menus TPtrC senderNumber = KNullDesC(); + + TBool senderHighlighted = EFalse; + if ( FocusedControlId( ) == EMsgComponentIdFrom ) + { + CMsgAddressControl* address = static_cast( + iView->ControlById( EMsgComponentIdFrom ) ); + + if ( address && address->Editor().SelectionLength() ) + { + senderHighlighted = ETrue; + } + } + if ( iFlags.iIsEmailMessage ) // SMS originating address is email address { - senderNumber.Set( iRecipientstring ); + if ( senderHighlighted ) + { + senderNumber.Set( iRecipientstring ); + } iFindItemMenu->SetSenderDescriptorType( CItemFinder::EEmailAddress ); } else {// SMS originating adddress is Phone number - if ( iFlags.iValidSenderNumber ) + if ( iFlags.iValidSenderNumber + && senderHighlighted ) { senderNumber.Set( iNumber ); } @@ -1099,7 +1129,7 @@ iView->ControlById( EMsgComponentIdFrom ) == iView->FocusedControl() ); iFindItemMenu->SetSenderDisplayText( senderNumber ); iFindItemMenu->AddItemFindMenuL( - IsBodyFocused() ? iView->ItemFinder() : 0, + FindItemHighlighted() ? iView->ItemFinder() : 0, aMenuPane, EFindItemMenuPlaceHolder, senderNumber, iFlags.iIsEmailMessage ? EFalse : ( iRecipientstring.Length() != 0 ) ); @@ -1110,7 +1140,7 @@ iView->ControlById( EMsgComponentIdFrom ) == iView->FocusedControl() ); iFindItemMenu->SetSenderDisplayText( senderNumber ); iFindItemMenu->AddItemFindMenuL( - IsBodyFocused() ? iView->ItemFinder() : 0, + FindItemHighlighted() ? iView->ItemFinder() : 0, aMenuPane, EFindItemMenuPlaceHolder, senderNumber, ETrue ); @@ -1580,7 +1610,40 @@ } case EKeyDevice3: case EKeyEnter: - {// Selection-key checking (Context sensitive menu) + { + if( iView->FocusedControl()->ControlType() == EMsgAddressControl ) + { + CMsgAddressControl* address = static_cast( + iView->FocusedControl() ); + if ( address && !address->Editor().SelectionLength() ) + { + // restore highlight to address field + return address->Editor().OfferKeyEventL( aKeyEvent, aType ); + } + } + else if ( iView->FocusedControl()->ControlType() == EMsgBodyControl ) + { + CItemFinder* itemFinder = iView->ItemFinder(); + if ( FocusedControlId() == EMsgComponentIdBody + && itemFinder ) + { + if ( !itemFinder->CurrentSelection().Length() ) + { + CMsgBodyControl* body = static_cast( + iView->FocusedControl() ); + if ( body ) + { + // restore highlight to current itemfinder item + return body->Editor().OfferKeyEventL( aKeyEvent, aType ); + } + } + } + } + // fall through + } + case EMsgFindItemKeyEvent: + { + // Selection-key checking (Context sensitive menu) // (with Class 0 just show the menu) if ( !iClass0CBA ) { @@ -3064,4 +3127,34 @@ iTypeMsg = pduType; //for successful launch save the PDU Type. } +// --------------------------------------------------------- +// CMsgSmsViewerAppUi::FindItemHighlighted +// Checks wheter current find item is highlighted +// --------------------------------------------------------- +// +TBool CMsgSmsViewerAppUi::FindItemHighlighted() + { + if ( iView->ItemFinder() && + iView->ItemFinder()->CurrentSelection().Length() ) + { + return ETrue; + } + return EFalse; + } + +// --------------------------------------------------------- +// CMsgSmsViewerAppUi::FocusedControlId +// Returns id of focused control +// --------------------------------------------------------- +// +TInt CMsgSmsViewerAppUi::FocusedControlId( ) + { + TInt controlType = EMsgComponentIdNull; + if ( iView && iView->FocusedControl( ) ) + { + controlType = iView->FocusedControl( )->ControlId( ); + } + return controlType; + } + // End of File diff -r e00582ce7ecd -r fbb813aef148 mobilemessaging/unieditor/application/src/UniEditorAppUi.cpp --- a/mobilemessaging/unieditor/application/src/UniEditorAppUi.cpp Tue Apr 27 16:33:37 2010 +0300 +++ b/mobilemessaging/unieditor/application/src/UniEditorAppUi.cpp Tue May 11 16:10:04 2010 +0300 @@ -4656,7 +4656,8 @@ //Enable the insert toolbar if( iFixedToolbar ) { - iFixedToolbar->SetItemDimmed( EUniCmdFixedToolbarInsert, EFalse, ETrue ); + iFixedToolbar->SetItemDimmed( EUniCmdFixedToolbarInsert, EFalse, ETrue ); + HandleResourceChangeL(KEikDynamicLayoutVariantSwitch); } } @@ -4724,7 +4725,8 @@ //Enable the insert toolbar if( iFixedToolbar ) { - iFixedToolbar->SetItemDimmed( EUniCmdFixedToolbarInsert, EFalse, ETrue ); + iFixedToolbar->SetItemDimmed( EUniCmdFixedToolbarInsert, EFalse, ETrue ); + HandleResourceChangeL(KEikDynamicLayoutVariantSwitch); } } @@ -4791,7 +4793,8 @@ //Enable the insert toolbar if( iFixedToolbar ) { - iFixedToolbar->SetItemDimmed( EUniCmdFixedToolbarInsert, EFalse, ETrue ); + iFixedToolbar->SetItemDimmed( EUniCmdFixedToolbarInsert, EFalse, ETrue ); + HandleResourceChangeL(KEikDynamicLayoutVariantSwitch); } } diff -r e00582ce7ecd -r fbb813aef148 mobilemessaging/unieditor/application/src/UniEditorProcessImageOperation.cpp --- a/mobilemessaging/unieditor/application/src/UniEditorProcessImageOperation.cpp Tue Apr 27 16:33:37 2010 +0300 +++ b/mobilemessaging/unieditor/application/src/UniEditorProcessImageOperation.cpp Tue May 11 16:10:04 2010 +0300 @@ -44,6 +44,8 @@ #include +#include + #include "UniClientMtm.h" #include "UniEditorEnum.h" #include "UniEditorDocument.h" @@ -464,12 +466,20 @@ } TBool largeImageQuery = EFalse; + TInt conformanceWidth = KImageRichWidth; + TInt conformanceHeight = KImageRichHeight; + + if (iDocument.DataModel()->MmsConformance().ConformanceVersion()> KMmsVersion12) + { + conformanceWidth = KImageMegapixelWidth; + conformanceHeight = KImageMegapixelHeight; + } if ( iProcessMethod == EUniProcessImgMethodNone ) { // Image won't be processed - if ( ( origSize.iWidth > KImageRichWidth || - origSize.iHeight > KImageRichHeight ) && + if ( ( origSize.iWidth > conformanceWidth || + origSize.iHeight > conformanceHeight ) && ( iImageInfo->FileSize() + iMessageSize ) < iDocument.MaxMessageSize() ) { // Original image width or height is "non-conformant" and original image would @@ -480,8 +490,8 @@ else { // Image will be processed - if ( scaleSize.iWidth > KImageRichWidth || - scaleSize.iHeight > KImageRichHeight ) + if ( scaleSize.iWidth > conformanceWidth || + scaleSize.iHeight > conformanceHeight ) { // Processed image is "non-conformant" after processing. largeImageQuery = ETrue; diff -r e00582ce7ecd -r fbb813aef148 mobilemessaging/unieditor/inc/UniMsvEntry.h --- a/mobilemessaging/unieditor/inc/UniMsvEntry.h Tue Apr 27 16:33:37 2010 +0300 +++ b/mobilemessaging/unieditor/inc/UniMsvEntry.h Tue May 11 16:10:04 2010 +0300 @@ -24,7 +24,7 @@ #include #include -#include +#include // CONSTANTS @@ -112,7 +112,7 @@ }; -#include +#include #endif // __UNIMSVENTRY_H diff -r e00582ce7ecd -r fbb813aef148 msg_pub/messaging_editor_constants_api/inc/MsgEditor.hrh --- a/msg_pub/messaging_editor_constants_api/inc/MsgEditor.hrh Tue Apr 27 16:33:37 2010 +0300 +++ b/msg_pub/messaging_editor_constants_api/inc/MsgEditor.hrh Tue May 11 16:10:04 2010 +0300 @@ -173,6 +173,13 @@ EMsgDispSizeSmall, EMsgFirstFreeComponentSpecificCommand = 2000 }; + + +//Internal Enumeration for find item functionality +enum TMsgFindItemKeyCommands + { + EMsgFindItemKeyEvent = 0x55555555 + }; #endif