--- a/uifw/EikStd/coctlsrc/EIKMENUP.CPP Tue May 11 16:27:42 2010 +0300
+++ b/uifw/EikStd/coctlsrc/EIKMENUP.CPP Tue May 25 12:58:19 2010 +0300
@@ -238,7 +238,8 @@
EContextSensitive,
ESkipScrollbarUpdate,
EHighlightEnabled,
- EHideViewSpecificCommands
+ EHideViewSpecificCommands,
+ EHideMarkAndUnmark
};
/**
@@ -2260,6 +2261,19 @@
iEditMenuObserver->DynInitMenuPaneL( aCascadeMenuId, iCascadeMenuPane );
}
+ if ( iExtension->iFlags.IsSet( CEikMenuPaneExtension::EHideMarkAndUnmark ) )
+ {
+ TInt pos;
+ if ( iCascadeMenuPane->MenuItemExists( EAknCmdMark, pos ) )
+ {
+ iCascadeMenuPane->SetItemDimmed( EAknCmdMark, ETrue );
+ }
+ if ( iCascadeMenuPane->MenuItemExists( EAknCmdUnmark, pos ) )
+ {
+ iCascadeMenuPane->SetItemDimmed( EAknCmdUnmark, ETrue );
+ }
+ }
+
iCascadeMenuPane->iExtension->PrepareCascadeForItemCommandsL();
iCascadeMenuPane->iExtension->EnableHighlight( EFalse );
iCascadeMenuPane->FilterDimmedItems();
@@ -3123,7 +3137,10 @@
_AKNTRACE( "commandId = %d", commandId );
TBool isDeleted = EFalse;
iIsDeleted = &isDeleted;
+
+ CleanupStack::PushL( TCleanupItem( CleanLocalRef, this ) );
iMenuObserver->ProcessCommandL( commandId );
+ CleanupStack::Pop();
if ( !isDeleted )
{
@@ -6702,5 +6719,31 @@
}
}
+// -----------------------------------------------------------------------------
+// CEikMenuPane::HideMarkAndUnmark
+// -----------------------------------------------------------------------------
+//
+void CEikMenuPane::HideMarkAndUnmark( TBool aHide )
+ {
+ if ( aHide )
+ {
+ iExtension->iFlags.Set( CEikMenuPaneExtension::EHideMarkAndUnmark );
+ }
+ else
+ {
+ iExtension->iFlags.Clear( CEikMenuPaneExtension::EHideMarkAndUnmark );
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// CEikMenuPane::CleanLocalRef
+// -----------------------------------------------------------------------------
+//
+void CEikMenuPane::CleanLocalRef( TAny* any )
+ {
+ static_cast<CEikMenuPane*>( any )->iIsDeleted = NULL;
+ }
+
+
// end of file