--- a/messagingappbase/mce/group/mce.rss Tue Sep 14 21:11:56 2010 +0300
+++ b/messagingappbase/mce/group/mce.rss Wed Sep 15 12:08:45 2010 +0300
@@ -330,6 +330,10 @@
{
txt="";
menu_pane = r_mce_folder_menu;
+ },
+ MENU_TITLE
+ {
+ menu_pane = R_AVKON_MENUPANE_MARK_MULTIPLE;
}
};
}
@@ -542,13 +546,6 @@
},
MENU_ITEM
{
- command = EMceCmdEditList;
- txt = qtn_mce_edit;
- cascade=r_mce_edit_menu;
- },
-
- MENU_ITEM
- {
command = EMceCmdMailboxSettings;
txt = qtn_mce_mail_settings;
},
@@ -639,48 +636,6 @@
};
}
-//----------------------------------------------------
-//
-// r_mce_edit_menu
-//
-//
-//----------------------------------------------------
-//
-RESOURCE MENU_PANE r_mce_edit_menu
- {
- items=
- {
- MENU_ITEM
- {
- command = EAknCmdMark;
- txt = qtn_mce_mark;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- {
- command = EAknCmdUnmark;
- txt = qtn_mce_unmark;
- flags = EEikMenuItemSpecific;
- },
-#ifdef RD_READ_MESSAGE_DELETION
- MENU_ITEM
- {
- command = EAknCmdMarkReadMsgs;
- txt = qtn_options_list_mark_read;
- },
-#endif //RD_READ_MESSAGE_DELETION
- MENU_ITEM
- {
- command = EAknMarkAll;
- txt = qtn_mce_mark_all;
- },
- MENU_ITEM
- {
- command = EAknUnmarkAll;
- txt = qtn_mce_unmark_all;
- }
- };
- }
//----------------------------------------------------
//
--- a/messagingappbase/mce/inc/MceMessageListContainer.h Tue Sep 14 21:11:56 2010 +0300
+++ b/messagingappbase/mce/inc/MceMessageListContainer.h Wed Sep 15 12:08:45 2010 +0300
@@ -158,7 +158,8 @@
/**
* From CMceMessageListContainerBase
*/
- virtual void ItemCountChangedL( TBool aItemsAdded );
+ virtual void ItemCountChangedL( TBool aItemsAdded,
+ CArrayFix<TInt>* aAddedIndexes = 0 );
/**
* From CMceMessageListContainerBase
@@ -360,6 +361,11 @@
* From CMceMessageListContainerBase
*/
void SetContainerFlag( TMceContainerFlags aFlag, TBool aState );
+
+ /**
+ * From CMceMessageListContainerBase
+ */
+ void SetMarkingModeOff();
public: // Functions from base classes
@@ -528,6 +534,8 @@
TMessageListOperationType iLastOperationType;
TBool iDialerEvent ;
+ CMsvEntrySelection* iAddedMsvIds;
+
};
#endif
--- a/messagingappbase/mce/inc/MceMessageListContainerBase.h Tue Sep 14 21:11:56 2010 +0300
+++ b/messagingappbase/mce/inc/MceMessageListContainerBase.h Wed Sep 15 12:08:45 2010 +0300
@@ -24,6 +24,7 @@
// INCLUDES
#include <coecntrl.h> // CCoeControl
#include <msvapi.h>
+#include <aknmarkingmodeobserver.h>
//#include "MceListContainer.h"
//#include "MceMessageListContTimer.h"
@@ -57,7 +58,8 @@
*/
class CMceMessageListContainerBase :
public CCoeControl,
- public MEikCommandObserver
+ public MEikCommandObserver,
+ public MAknMarkingModeObserver
{
public: // Constructors and destructor
@@ -65,6 +67,24 @@
* Destructor.
*/
virtual ~CMceMessageListContainerBase();
+
+ public: // From MAknMarkingModeObserver
+
+ /**
+ * This method is called when marking mode is activated or deactivated.
+ *
+ * @param aActivated @c ETrue if marking mode was activate, @c EFalse
+ * if marking mode was deactivated.
+ */
+ void MarkingModeStatusChanged( TBool aActivated );
+
+ /**
+ * This method is called just before marking mode is closed. Client can
+ * either accept or decline closing.
+ *
+ * @return @c ETrue if marking mode should be closed, otherwise @c EFalse.
+ */
+ TBool ExitMarkingMode() const;
public:
@@ -181,7 +201,8 @@
/**
* TODO: that is not needed if container would be msv session observer
*/
- virtual void ItemCountChangedL( TBool aItemsAdded ) = 0;
+ virtual void ItemCountChangedL( TBool aItemsAdded, CArrayFix<TInt>*
+ aAddedIndexes = 0 ) = 0;
/**
* Redraw the listbox.
@@ -459,6 +480,12 @@
* Updates icon array in case MTM is released (one row list)
*/
virtual void UpdateIconArrayL() = 0;
+
+ /**
+ * Sets Marking mode Off
+ */
+
+ virtual void SetMarkingModeOff() = 0;
protected:
--- a/messagingappbase/mce/inc/MceMessageListView.h Tue Sep 14 21:11:56 2010 +0300
+++ b/messagingappbase/mce/inc/MceMessageListView.h Wed Sep 15 12:08:45 2010 +0300
@@ -27,6 +27,7 @@
#include <msvapi.h>
#include <AiwServiceHandler.h>
#include <coemain.h>
+#include <eiklbo.h>
#include "MceMessageListContainer.h"
@@ -633,6 +634,29 @@
* screen. aClearer is used in CMceUi::HandleGainingForeground() when returning from viewers.
*/
void GetLocalScreenClearer( CAknLocalScreenClearer** &aClearer );
+ /**
+ * Set the iMarkingModeOn variable if MarkingMode is switched on
+ * @aValue: The value to be set to iMarkingModeOn variable
+ * Since 9.2
+ */
+ void SetMarkingMode( TBool aMarkingModeOn );
+ /**
+ * Get the iMarkingModeOn variable
+ * @return: the value of iMarkingModeOn
+ * Since 9.2
+ */
+ TBool MarkingMode() const;
+ /**
+ * Get iMsgListContainer->MessageCount() variable
+ * @return: The value of MessageCount()
+ * Since 9.2
+ */
+ TInt MessageCount() const;
+ /**
+ * Set the MarkingMode off and inform the same to container
+ * Since 9.2
+ */
+ void SetMarkingModeOff();
private: // Data
@@ -678,6 +702,8 @@
TBool iReadUnread;
//Variable for context command
TBool iContextCommand;
+ //To indicate if marking mode is on/off
+ TBool iMarkingModeOn;
};
inline void CMceMessageListView::UpdateViewL()
--- a/messagingappbase/mce/inc/MceOneRowMessageListContainer.h Tue Sep 14 21:11:56 2010 +0300
+++ b/messagingappbase/mce/inc/MceOneRowMessageListContainer.h Wed Sep 15 12:08:45 2010 +0300
@@ -133,7 +133,8 @@
/**
* From CMceMessageListContainerBase
*/
- virtual void ItemCountChangedL( TBool aItemsAdded );
+ virtual void ItemCountChangedL( TBool aItemsAdded,
+ CArrayFix<TInt>* aAddedIndexes = 0 );
/**
* From CMceMessageListContainerBase
@@ -333,6 +334,11 @@
* From CMceMessageListContainerBase
*/
void UpdateIconArrayL( );
+
+ /**
+ * From CMceMessageListContainerBase
+ */
+ void SetMarkingModeOff();
public: // Functions from base classes
--- a/messagingappbase/mce/src/MceMessageListContainer.cpp Tue Sep 14 21:11:56 2010 +0300
+++ b/messagingappbase/mce/src/MceMessageListContainer.cpp Wed Sep 15 12:08:45 2010 +0300
@@ -90,6 +90,7 @@
delete iListBox;
delete iListItems;
delete iSelectedEntries;
+ delete iAddedMsvIds;
}
// ----------------------------------------------------
@@ -138,7 +139,7 @@
iListBox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray );
iListBox->SetListBoxObserver( &iOwningView );
-
+ iListBox->SetMarkingModeObserver( this );
iSelectedEntries = new (ELeave) CMsvEntrySelection;
iListBox->CreateScrollBarFrameL( ETrue );
@@ -150,6 +151,8 @@
iPreviousInputMethod = EFalse;
+ iAddedMsvIds = new (ELeave) CMsvEntrySelection;
+
User::LeaveIfError( iQwertyModeStatusProperty.Attach(
KCRUidAvkon, KAknQwertyInputModeActive ));
@@ -269,15 +272,27 @@
// ----------------------------------------------------
// CMceMessageListContainer::ItemCountChangedL
// ----------------------------------------------------
-void CMceMessageListContainer::ItemCountChangedL( TBool aItemsAdded )
+void CMceMessageListContainer::ItemCountChangedL( TBool aItemsAdded,
+ CArrayFix<TInt>* aAddedIndexes )
{
if ( aItemsAdded )
{
- iListBox->HandleItemAdditionL();
+ if( aAddedIndexes )
+ {
+ iListBox->HandleItemAdditionL( *aAddedIndexes );
+ }
+ else
+ {
+ iListBox->HandleItemAdditionL();
+ }
}
else
{
iListBox->HandleItemRemovalL();
+ if( iOwningView.MarkingMode() && iListItems->MessageCount() <= 0 )
+ {
+ SetMarkingModeOff();
+ }
}
}
@@ -445,32 +460,9 @@
// ----------------------------------------------------
// CMceMessageListContainer::RefreshSelectionIndexesL
// ----------------------------------------------------
-void CMceMessageListContainer::RefreshSelectionIndexesL( TBool aForceUpdate )
+void CMceMessageListContainer::RefreshSelectionIndexesL( TBool /*aForceUpdate*/ )
{
- const CListBoxView::CSelectionIndexArray* selection =
- iListBox->View()->SelectionIndexes();
- if ( selection->Count() > 0 || aForceUpdate )
- {
- CArrayFixFlat<TInt>* newSelection = new ( ELeave )
- CArrayFixFlat<TInt>( KMceListContainerGranuality );
- CleanupStack::PushL( newSelection );
- const TInt count = iSelectedEntries->Count();
- for ( TInt loop = count; loop >0; loop--)
- {
- TInt index = iListItems->ItemIndex( (*iSelectedEntries)[loop-1] );
- if ( index > KErrNotFound )
- {
- newSelection->AppendL( index );
- }
- else
- {
- iSelectedEntries->Delete( loop-1 );
- }
- }
- iListBox->SetSelectionIndexesL( newSelection );
- CleanupStack::PopAndDestroy( newSelection );
- }
}
@@ -664,10 +656,15 @@
if ( aKeyEvent.iCode == EKeyLeftArrow || aKeyEvent.iCode == EKeyRightArrow )
{
+ if( iOwningView.MarkingMode() )
+ {
+ return EKeyWasConsumed;
+ }
return EKeyWasNotConsumed;
}
- if ( iOwningView.MenuBar()->ItemSpecificCommandsEnabled() && aKeyEvent.iCode == EKeyBackspace )
+
+ if ( ( iOwningView.MenuBar()->ItemSpecificCommandsEnabled() || SelectionCount() ) && aKeyEvent.iCode == EKeyBackspace )
{
MarkItemSelectionL();
SetAnchorItemIdL(
@@ -1322,6 +1319,39 @@
#ifdef _DEBUG
RDebug::Print(_L("CMceMessageListContainer2: iAnchorItemId 0x%x, iAnchorItemIndex %d"), iAnchorItemId, iAnchorItemIndex);
#endif
+ // listitem addition handling when all the new item indexes can be resolved
+ if( iOwningView.MarkingMode() && iAddedMsvIds->Count() > 0 )
+ {
+ TBool allItemsInTheList( ETrue );
+ CArrayFix<TInt>* addedIndexes = new( ELeave ) CArrayFixFlat<TInt> (
+ KMceListContainerGranuality );
+ CleanupStack::PushL( addedIndexes );
+ for( TInt i( 0 ); i < iAddedMsvIds->Count(); i++ )
+ {
+ TMsvId msvId = (*iAddedMsvIds)[i];
+ TInt index = iListItems->ItemIndex( msvId );
+ if ( index > KErrNotFound )
+ {
+ addedIndexes->AppendL( index );
+ }
+ else
+ {
+ allItemsInTheList = EFalse;
+ break;
+ }
+ }
+ if( allItemsInTheList )
+ {
+ ItemCountChangedL( ETrue, addedIndexes );
+ iAddedMsvIds->Reset();
+ }
+ CleanupStack::PopAndDestroy( addedIndexes );
+ addedIndexes = NULL;
+ }
+ else if( iAddedMsvIds->Count() > 0 )
+ {
+ iAddedMsvIds->Reset();
+ }
switch ( aEvent )
{
case MMsvSessionObserver::EMsvEntriesDeleted:
@@ -1356,11 +1386,31 @@
}
break;
case MMsvSessionObserver::EMsvEntriesCreated:
+ {
+ if( iOwningView.MarkingMode() )
+ {
+ // list item count not updated fast enough in hw so let's
+ // collect added ids for future handling
+ for( TInt i( 0 ); i < aSelection.Count(); i++ )
+ {
+ TMsvId msvId = (aSelection)[ i ];
+ if( iAddedMsvIds->Find( msvId ) == KErrNotFound )
+ {
+ iAddedMsvIds->AppendL( msvId );
+ }
+ }
+ }
+ else
+ {
+ ItemCountChangedL( ETrue );
+ }
+ }
case MMsvSessionObserver::EMsvEntriesChanged:
{
-
- ItemCountChangedL( ETrue );
-
+ if( aEvent == MMsvSessionObserver::EMsvEntriesChanged )
+ {
+ ItemCountChangedL( ETrue );
+ }
if ( iLastOperationType != EMessageListOperationConnect &&
iAnchorItemId != KErrNotFound )
{
@@ -1539,4 +1589,12 @@
// do nothing for two row list.
}
+void CMceMessageListContainer::SetMarkingModeOff()
+ {
+ if( iListBox )
+ {
+ iListBox->SetMarkingMode( EFalse );
+ }
+ }
+
// End of File
--- a/messagingappbase/mce/src/MceMessageListContainerBase.cpp Tue Sep 14 21:11:56 2010 +0300
+++ b/messagingappbase/mce/src/MceMessageListContainerBase.cpp Wed Sep 15 12:08:45 2010 +0300
@@ -21,6 +21,7 @@
// INCLUDE FILES
#include "MceMessageListContainerBase.h"
+#include "MceMessageListView.h"
#include <bldvariant.hrh>
// CONSTANTS
@@ -38,4 +39,23 @@
{
}
+// -----------------------------------------------------------------------------
+// CMceMessageListContainerBase::MarkingModeStatusChanged()
+//
+// -----------------------------------------------------------------------------
+//
+void CMceMessageListContainerBase::MarkingModeStatusChanged( TBool aActivated )
+ {
+ iOwningView.SetMarkingMode( aActivated );
+ }
+
+// -----------------------------------------------------------------------------
+// CMceMessageListContainerBase::ExitMarkingMode()
+//
+// -----------------------------------------------------------------------------
+//
+TBool CMceMessageListContainerBase::ExitMarkingMode() const
+ {
+ return ETrue;
+ }
// End of file
--- a/messagingappbase/mce/src/MceMessageListItemArray.cpp Tue Sep 14 21:11:56 2010 +0300
+++ b/messagingappbase/mce/src/MceMessageListItemArray.cpp Wed Sep 15 12:08:45 2010 +0300
@@ -228,6 +228,11 @@
delete iListBoxText;
delete iNumberOfMessagesStrings;
delete iUiRegistry;
+ if(iMsgIndex)
+ {
+ delete iMsgIndex;
+ iMsgIndex = NULL;
+ }
}
--- a/messagingappbase/mce/src/MceMessageListView.cpp Tue Sep 14 21:11:56 2010 +0300
+++ b/messagingappbase/mce/src/MceMessageListView.cpp Wed Sep 15 12:08:45 2010 +0300
@@ -483,6 +483,12 @@
iDateTimeNotifier->Start();
}
+ // if we are in marking mode then "press" rsk
+ // cancel to return to normal mode
+ if( iMarkingModeOn )
+ {
+ SetMarkingModeOff();
+ }
MCELOGGER_LEAVEFN("CMceMessageListView::DoActivateL()");
}
@@ -554,33 +560,7 @@
iMceUi->GoOfflineL( iMsgListContainer->FolderEntry().iServiceId );
}
break;
- }
- case EAknCmdMark:
- {
- iMsgListContainer->AddCurrentItemToSelectionL();
- SetMSKButtonL();
- break;
- }
- case EAknCmdUnmark:
- {
- iMsgListContainer->RemoveCurrentItemFromSelection();
- SetMSKButtonL();
- break;
- }
- case EAknUnmarkAll:
- {
- iMsgListContainer->ClearSelection();
- SetMSKButtonL();
- break;
- }
-
- case EAknMarkAll:
- {
- iMsgListContainer->AddAllToSelectionL();
- SetMSKButtonL();
- break;
- }
-
+ }
case EAknCmdMarkReadMsgs:
{
FindAllReadMsgAndMarkL();
@@ -1031,10 +1011,6 @@
switch ( aResourceId )
{
case R_MCE_FOLDER_MENU:
- if(!listPopulated)
- {
- aMenuPane->SetItemDimmed( EMceCmdEditList, ETrue );
- }
aMenuPane->SetItemDimmed( EAknCmdHelp,
!FeatureManager::FeatureSupported( KFeatureIdHelp ) );
@@ -1105,9 +1081,7 @@
}
break;
- case R_MCE_EDIT_MENU:
- EditMenuL( aMenuPane );
- break;
+
case R_MCE_FETCH_MENU:
FetchMenuL( aMenuPane );
break;
@@ -1446,12 +1420,12 @@
}
if ( iFolderId == KMsvGlobalOutBoxIndexEntryId )
{
- aMenuPane->SetItemDimmed( EMceCmdEditList, ETrue );
+ aMenuPane->SetItemDimmed( EAknCmdMarkingModeEnter, ETrue );
}
else if ( count > 0 && totalCount == subfolderCount )
{
// only folders in the list, then "Edit" submenu would be empty so delete it
- aMenuPane->SetItemDimmed( EMceCmdEditList, ETrue );
+ aMenuPane->SetItemDimmed( EAknCmdMarkingModeEnter, ETrue );
aMenuPane->SetItemDimmed( EMceCmdSort, ETrue );
}
@@ -1595,7 +1569,7 @@
void CMceMessageListView::FolderMenuNoItemsL( CEikMenuPane* aMenuPane ) const
{
aMenuPane->SetItemDimmed( EAknCmdOpen, ETrue );
- aMenuPane->SetItemDimmed( EMceCmdEditList, ETrue );
+ aMenuPane->SetItemDimmed( EAknCmdMarkingModeEnter, ETrue );
aMenuPane->SetItemDimmed( EMceCmdDelete, ETrue );
aMenuPane->SetItemDimmed( EMceCmdUndelete, ETrue );
aMenuPane->SetItemDimmed( EMceCmdMove, ETrue );
@@ -2240,7 +2214,7 @@
aMenuPane->SetItemDimmed( EMceCmdNewFolder, ETrue );
aMenuPane->SetItemDimmed( EMceCmdRenameFolder, ETrue );
aMenuPane->SetItemDimmed( EMceCmdCopy, ETrue );
- aMenuPane->SetItemDimmed( EMceCmdEditList, ETrue );
+ aMenuPane->SetItemDimmed( EAknCmdMarkingModeEnter, ETrue );
aMenuPane->SetItemDimmed( EMceCmdMailboxSettings, ETrue );
// + MessageDetails
}
@@ -2304,7 +2278,7 @@
// SyncML Outbox
if ( SyncMlOutboxInbox( KMsvGlobalOutBoxIndexEntryIdValue ) )
{
- aMenuPane->SetItemDimmed( EMceCmdEditList, ETrue );
+ aMenuPane->SetItemDimmed( EAknCmdMarkingModeEnter, ETrue );
aMenuPane->SetItemDimmed( EAknCmdOpen, ETrue );
aMenuPane->SetItemDimmed( EMceCmdFetch, ETrue );
aMenuPane->SetItemDimmed( EMceCmdMarkAsRead, ETrue );
@@ -4256,5 +4230,45 @@
{
aClearer = &iLocalScreenClearer;
}
+// ----------------------------------------------------
+// CMceMessageListView::SetMarkingMode( TBool aMarkingModeOn )
+// ----------------------------------------------------
+
+void CMceMessageListView::SetMarkingMode( TBool aMarkingModeOn )
+ {
+ iMarkingModeOn = aMarkingModeOn;
+ }
+// ----------------------------------------------------
+// CMceMessageListView::MarkingMode() const
+// ----------------------------------------------------
+
+TBool CMceMessageListView::MarkingMode() const
+ {
+ return iMarkingModeOn;
+ }
+// ----------------------------------------------------
+// CMceMessageListView::MessageCount() const
+// ----------------------------------------------------
+
+TInt CMceMessageListView::MessageCount() const
+ {
+ if ( iMsgListContainer )
+ {
+ return iMsgListContainer->MessageCount();
+ }
+ return 0;
+ }
+// ----------------------------------------------------
+// CMceMessageListView::SetMarkingModeOff()
+// ----------------------------------------------------
+
+void CMceMessageListView::SetMarkingModeOff()
+ {
+ if( iMsgListContainer )
+ {
+ iMsgListContainer->SetMarkingModeOff();
+ }
+ iMarkingModeOn = EFalse;
+ }
// End of File
--- a/messagingappbase/mce/src/MceMessageListboxItemDrawer.cpp Tue Sep 14 21:11:56 2010 +0300
+++ b/messagingappbase/mce/src/MceMessageListboxItemDrawer.cpp Wed Sep 15 12:08:45 2010 +0300
@@ -22,6 +22,7 @@
// INCLUDE FILES
#include "MceMessageListContainer.h"
#include "MceMessageListboxItemDrawer.h"
+#include "MceIds.h"
// ================= MEMBER FUNCTIONS =======================
@@ -57,7 +58,12 @@
{
TListItemProperties properties;
properties.SetColor( iTextColor );
-
+ //only for MyFolders set the Hidden Selection, no folder should be able to be selected
+ if ( iMessageListContainer.CurrentFolderId() == KMceDocumentsEntryId )
+ {
+ properties.SetHiddenSelection( iMessageListContainer.IsItemFolder( aItemIndex ) ||
+ iMessageListContainer.SyncMlOutboxOpened() );
+ }
return properties;
}
--- a/messagingappbase/mce/src/MceOneRowMessageListArrayLoader.cpp Tue Sep 14 21:11:56 2010 +0300
+++ b/messagingappbase/mce/src/MceOneRowMessageListArrayLoader.cpp Wed Sep 15 12:08:45 2010 +0300
@@ -142,9 +142,10 @@
delete iFolderEntry;
delete iEntriesToBeAdded;
delete iEntriesReceivedDuringListCreation;
- if ( iEmailFramework )
+ if ( iCmailSelectionList )
{
delete iCmailSelectionList ;
+ iCmailSelectionList = NULL;
}
iMarkedArray.Close();
}
@@ -2130,7 +2131,12 @@
// ----------------------------------------------------
void CMceOneRowListItemArrayLoader::CreateCmailEntryIndexL()
{
- iCmailSelectionList = new( ELeave ) CMsvEntrySelection() ;
+ if(iCmailSelectionList)
+ {
+ delete iCmailSelectionList;
+ iCmailSelectionList = NULL;
+ }
+ iCmailSelectionList = new( ELeave ) CMsvEntrySelection() ;
//Find email messages
CMsvEntrySelection *smtpselection = iFolderEntry->ChildrenWithMtmL( KUidMsgTypeSMTP );
--- a/messagingappbase/mce/src/MceOneRowMessageListContainer.cpp Tue Sep 14 21:11:56 2010 +0300
+++ b/messagingappbase/mce/src/MceOneRowMessageListContainer.cpp Wed Sep 15 12:08:45 2010 +0300
@@ -195,6 +195,7 @@
iTreeListBox->EnableTabModeFunctionIndicatorsL( ETrue );
iTreeListBox->SetFlags( iTreeListBox->Flags() ^ KAknTreeListLooping ^ KAknTreeListMarkable );
iTreeListBox->AddObserverL( this );
+ iTreeListBox->SetMarkingModeObserver( this );
iBgContext = CAknsBasicBackgroundControlContext::NewL(
KAknsIIDQsnBgAreaMain, iAvkonAppUi->ApplicationRect(), EFalse );
@@ -795,9 +796,14 @@
// CMceOneRowMessageListContainer::ItemCountChangedL
// ----------------------------------------------------
//
-void CMceOneRowMessageListContainer::ItemCountChangedL( TBool /* aItemsAdded */ )
+void CMceOneRowMessageListContainer::ItemCountChangedL( TBool /* aItemsAdded */,
+ CArrayFix<TInt>* /* aAddedIndexes */ )
{
ResetListbox();
+ if( iOwningView.MarkingMode() && iListItems->MessageCount() <= 0 )
+ {
+ SetMarkingModeOff();
+ }
}
@@ -1224,6 +1230,10 @@
default:
break;
};
+ if( iOwningView.MarkingMode() && iListItems->MessageCount() <= 0 )
+ {
+ SetMarkingModeOff();
+ }
}
@@ -1332,7 +1342,8 @@
return EKeyWasNotConsumed;
}
- if ( iOwningView.MenuBar()->ItemSpecificCommandsEnabled() && aKeyEvent.iCode == EKeyBackspace )
+
+ if ( ( GetMarkedItemsCountL() || iOwningView.MenuBar()->ItemSpecificCommandsEnabled() ) && aKeyEvent.iCode == EKeyBackspace )
{
MarkItemSelectionL();
SetAnchorItemIdL(
@@ -2572,4 +2583,19 @@
}
return isMailMtm;
}
+// ----------------------------------------------------
+// CMceOneRowMessageListContainer::SetMarkingModeOff
+// ----------------------------------------------------
+void CMceOneRowMessageListContainer::SetMarkingModeOff()
+ {
+ RWsSession wsSession = CCoeEnv::Static()->WsSession();
+ TKeyEvent keyEvent;
+ keyEvent.iCode = EKeyCBA2;
+ keyEvent.iScanCode = EStdKeyDevice1;
+ keyEvent.iModifiers = 0;
+ keyEvent.iRepeats = 0;
+ wsSession.SimulateKeyEvent( keyEvent );
+ wsSession.Flush();
+ }
+
// End of File
--- a/messagingappbase/mce/src/mceui.cpp Tue Sep 14 21:11:56 2010 +0300
+++ b/messagingappbase/mce/src/mceui.cpp Wed Sep 15 12:08:45 2010 +0300
@@ -4982,6 +4982,11 @@
{
return;
}
+ if( !MceViewActive( EMceDeliveryReportsViewActive ) &&
+ iMceListView->MarkingMode() )
+ {
+ return;
+ }
TInt count = iTabsArray->Count();
TMsvId newId = KMsvGlobalInBoxIndexEntryId;
if ( aIndex < count )
@@ -6661,16 +6666,27 @@
// ----------------------------------------------------
void CMceUi::ResetAndHide()
{
- // To close embedded MsgEditor
- if ( IsEditorOpen() )
- {
- CloseEditorApp();
- }
+ if( MceViewActive( EMceMessageViewActive ) && iMceListView
+ && iMceListView->MarkingMode() )
+ {
+ iMceListView->SetMarkingModeOff();
+ iMceListView->SetMarkingMode( EFalse );
+ RemoveTabs();
+ delete iDecoratedTabGroup;
+ iDecoratedTabGroup = NULL;
+ delete iTabsArray;
+ iTabsArray = NULL;
+ SetCustomControl(1); // Disable bring-to-foreground on view activation
+ TRAP_IGNORE( CAknViewAppUi::CreateActivateViewEventL( \
+ KMessagingCentreMainViewUid, \
+ TUid::Uid(KMceHideInBackground), \
+ KNullDesC8 ) ) ;
+ }
// Messaging was not exiting properly when "exit" is pressed from settings dialog.
// iMceUiFlags.MceFlag( EMceUiFlagsSettingsDialogOpen ) will be true
// when we exit from any of the settings Dialog.
// Closing of Settings dialogs will be taken care by AVKON.
- if (!(MceViewActive( EMceMainViewActive) && IsForeground()) ||
+ else if (!(MceViewActive( EMceMainViewActive) && IsForeground()) ||
iMceUiFlags.MceFlag( EMceUiFlagsSettingsDialogOpen ) || iSimDialogOpen )
{
SetCustomControl(1); // Disable bring-to-foreground on view activation
--- a/messagingappbase/mcesettings/group/MceSettings.rss Tue Sep 14 21:11:56 2010 +0300
+++ b/messagingappbase/mcesettings/group/MceSettings.rss Wed Sep 15 12:08:45 2010 +0300
@@ -31,7 +31,7 @@
#include <muiusettingsarray.rh>
#include "MceSettingsIds.hrh"
#include <mcesettings.loc>
-#include "mcesettings_diy.loc"
+#include <mcesettings_diy.loc>
#include <avkon.loc>
// for AIW_INTEREST resource
--- a/messagingappbase/mcesettings/group/MceSettingsEmailSel.rss Tue Sep 14 21:11:56 2010 +0300
+++ b/messagingappbase/mcesettings/group/MceSettingsEmailSel.rss Wed Sep 15 12:08:45 2010 +0300
@@ -26,7 +26,7 @@
#include <avkon.rh>
#include <avkon.rsg>
-#include "mcesettings_diy.loc" // localization file if needed
+#include <mcesettings_diy.loc> // localization file if needed
#include "MceSettingsEmailSel.hrh"
// CONSTANTS
--- a/messagingappbase/mcesettings/group/bld.inf Tue Sep 14 21:11:56 2010 +0300
+++ b/messagingappbase/mcesettings/group/bld.inf Wed Sep 15 12:08:45 2010 +0300
@@ -39,7 +39,7 @@
../rom/MceSettings.iby CORE_APP_LAYER_IBY_EXPORT_PATH(mcesettings.iby)
../loc/MceSettings.loc APP_LAYER_LOC_EXPORT_PATH(MceSettings.loc)
../inc/MceSettingsEmailSel.h |../../../inc/mcesettingsemailsel.h
-../rom/MceSettingsResources.iby CORE_APP_LAYER_IBY_EXPORT_PATH(MceSettingsResources.iby)
+../rom/MceSettingsResources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(MceSettingsResources.iby)
../sis/Mcesettings_stub.SIS /epoc32/data/z/system/install/mcesettings_stub.sis
../loc/mcesettings_diy.loc APP_LAYER_LOC_EXPORT_PATH(mcesettings_diy.loc)
--- a/messagingappbase/mcesettings/src/MceSettingsGeneralSettingsDialog.cpp Tue Sep 14 21:11:56 2010 +0300
+++ b/messagingappbase/mcesettings/src/MceSettingsGeneralSettingsDialog.cpp Wed Sep 15 12:08:45 2010 +0300
@@ -434,10 +434,12 @@
{
if ( iMemoryInUse )
{
+ delete (*iMceSettingsArray)[EMceGeneralSettingsMailListType].iMuiuSettingsItemArray;
iMceSettingsArray->Delete(EMceGeneralSettingsMailListType);
}
else
{
+ delete (*iMceSettingsArray)[MceGeneralSettingsMailListType].iMuiuSettingsItemArray;
iMceSettingsArray->Delete(MceGeneralSettingsMailListType);
}
}
--- a/messagingappbase/msgavkon/muiu_internal/settingsarray/src/MuiuSettingsArray.cpp Tue Sep 14 21:11:56 2010 +0300
+++ b/messagingappbase/msgavkon/muiu_internal/settingsarray/src/MuiuSettingsArray.cpp Wed Sep 15 12:08:45 2010 +0300
@@ -111,9 +111,9 @@
item.iLabelText.Copy( *txt );
TBool flag = EFalse;
//If string retrived from resource is "Message sent as"
+ CleanupStack::PushL( txt );
flag = IsMessageSentStringL( txt );
-
- delete txt;
+ CleanupStack::PopAndDestroy( txt );
const TMuiuSettingsType type = ( TMuiuSettingsType ) reader.ReadInt16();
item.iType = type;
@@ -127,25 +127,24 @@
if ( type == EMuiuSettingsSelectionList && array_id )
{
- CDesCArrayFlat* array =
- new( ELeave ) CDesCArrayFlat( KMuiuSettingsArrayGranularity );
- CleanupStack::PushL( array );
- TResourceReader reader2;
- env->CreateResourceReaderLC( reader2, array_id );
+ TResourceReader arrayReader;
+ env->CreateResourceReaderLC( arrayReader, array_id );
- const TInt count = reader2.ReadInt16();
- for ( TInt loop = 0; loop < count; loop++ )
+ CDesCArrayFlat* array = arrayReader.ReadDesCArrayL();
+
+ if ( !flag && array )
{
- HBufC* txt = reader2.ReadHBufCL();
- CleanupStack::PushL( txt );
- array->AppendL( *txt );
- CleanupStack::PopAndDestroy(); // txt
+ item.iMuiuSettingsItemArray = array;
+ CleanupStack::PushL( array );
+ AppendL( item );
+ CleanupStack::Pop( array );
}
- CleanupStack::PopAndDestroy(); //reader2
- item.iMuiuSettingsItemArray = array;
- if(!flag)
- AppendL( item );
- CleanupStack::Pop( array ); //array
+ else
+ {
+ delete array;
+ }
+
+ CleanupStack::PopAndDestroy();
}
else
{
--- a/mobilemessaging/audiomsg/src/audiomessageappui.cpp Tue Sep 14 21:11:56 2010 +0300
+++ b/mobilemessaging/audiomsg/src/audiomessageappui.cpp Wed Sep 15 12:08:45 2010 +0300
@@ -343,7 +343,14 @@
delete iInsertOperation;
if ( iWaitDialog )
{
+ // iWaitDialog->ProcessFinishedL is for
+ // cancellation\closing of wait dialog is asynchronous operation. it never gets so
+ // far that dialog would be really deleted before the application terminates.
+ // so to avoid memory leak , deleting the iWaitDialog.
+ iWaitDialog->SetCallback( NULL );
TRAP_IGNORE( iWaitDialog->ProcessFinishedL() );
+ delete iWaitDialog;
+ iWaitDialog = NULL;
}
delete iIdle;
delete iAbsorber;
--- a/msg_plat/messaging_center_ui_utilities_api/inc/muiumsginfo.h Tue Sep 14 21:11:56 2010 +0300
+++ b/msg_plat/messaging_center_ui_utilities_api/inc/muiumsginfo.h Wed Sep 15 12:08:45 2010 +0300
@@ -27,7 +27,7 @@
// INCLUDES
#include <e32base.h>
-#include <coneresloader.h>
+#include <ConeResLoader.h>
// DATA TYPES
--- a/msg_pub/plugin_bio_control_api/inc/MMsgBioControl.h Tue Sep 14 21:11:56 2010 +0300
+++ b/msg_pub/plugin_bio_control_api/inc/MMsgBioControl.h Wed Sep 15 12:08:45 2010 +0300
@@ -24,7 +24,7 @@
// INCLUDES
#include <e32std.h>
#include <e32base.h>
-#include <msgeditor.hrh> // for enums
+#include <MsgEditor.hrh> // for enums
// CONSTANTS