--- 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