--- a/menucontentsrv/engsrc/menueng.cpp Tue May 25 13:01:39 2010 +0300
+++ b/menucontentsrv/engsrc/menueng.cpp Wed Jun 09 10:01:25 2010 +0300
@@ -567,7 +567,7 @@
}
-
+
// ---------------------------------------------------------
// CMenuEng::AppendNotifyL
// ---------------------------------------------------------
@@ -591,17 +591,19 @@
//
EXPORT_C TBool CMenuEng::Exist( TInt aId ) const
{
- MXCFWNode* node = NULL;
+ TBool exists(EFalse);
const RNodeArray& nodes = iTree->Nodes();
for ( TInt i = 0; i < nodes.Count(); i++ )
{
- node = nodes[i];
- if ( aId == Object( *node ).Id() )
+ CMenuEngObject& object = Object( *nodes[i] );
+ if ( aId == object.Id()
+ && !( ( object.Flags() & TMenuItem::EHidden )
+ || ( object.Flags() & TMenuItem::EMissing ) ) )
{
- return ETrue;
+ exists = ETrue;
}
}
- return EFalse;
+ return exists;
}
// ---------------------------------------------------------
// CMenuEng::RunL
@@ -718,13 +720,13 @@
if ( iActiveWait->IsStarted() )
{
iActiveWait->AsyncStop();
- }
-
+ }
+
iState = EDead;
iObserver.EngineError( aError );
// Can't delete the tree now, XCFW Engine keeps a pointer to it
// and still uses it even after reporting the error. :(
-
+
break;
}
@@ -785,9 +787,9 @@
if ( iActiveWait->IsStarted() )
{
iActiveWait->AsyncStop();
- }
-
- TBool legacyFormat = iObjectFactory->IsLegacyFormat();
+ }
+
+ TBool legacyFormat = iObjectFactory->IsLegacyFormat();
// Reset object factory in all cases.
iObjectFactory->Reset();
// Tree is up (maybe unsaved yet).
@@ -1130,7 +1132,7 @@
TraverseNodeL( aRootNode, idManagerInit );
// Make sure all nodes have ID.
TMenuEngIdSetter idSetter( *iIdManager );
- TraverseNodeL( aRootNode, idSetter );
+ TraverseNodeL( aRootNode, idSetter );
}
// ---------------------------------------------------------
@@ -1220,7 +1222,7 @@
__ASSERT_DEBUG( !iTree, User::Invariant() );
iTree = CXCFWTree::NewL();
// Legacy xml format supported only if the xml is from rom:
- iObjectFactory->SupportLegacyFormat( EFalse );
+ iObjectFactory->SupportLegacyFormat( EFalse );
iEngine->LoadL( *iTree, iRamFileName );
}
@@ -1238,7 +1240,7 @@
delete iTree; iTree = NULL;
iTree = CXCFWTree::NewL();
// Legacy xml format supported only if the xml is from rom:
- iObjectFactory->SupportLegacyFormat( ETrue );
+ iObjectFactory->SupportLegacyFormat( ETrue );
iEngine->LoadL( *iTree, fname );
}
@@ -1378,4 +1380,4 @@
}
}
-// End of File
+// End of File