menucontentsrv/engsrc/menueng.cpp
branchRCL_3
changeset 101 9e077f9a342c
parent 82 ace62b58f4b2
equal deleted inserted replaced
82:ace62b58f4b2 101:9e077f9a342c
   643         case ELoadRomFile:
   643         case ELoadRomFile:
   644             {
   644             {
   645             // Error loading ROM tree is fatal. Nothing we can do.
   645             // Error loading ROM tree is fatal. Nothing we can do.
   646             User::LeaveIfError( iStatus.Int() );
   646             User::LeaveIfError( iStatus.Int() );
   647             iState = ESaveFile;
   647             iState = ESaveFile;
       
   648             AppendPredefinedAttributeL();
   648             SaveTempFileL();
   649             SaveTempFileL();
   649             break;
   650             break;
   650             }
   651             }
   651 
   652 
   652         case ESaveFile:
   653         case ESaveFile:
  1199         CleanupStack::PopAndDestroy( &nodes );
  1200         CleanupStack::PopAndDestroy( &nodes );
  1200         }
  1201         }
  1201     }
  1202     }
  1202 
  1203 
  1203 // ---------------------------------------------------------
  1204 // ---------------------------------------------------------
       
  1205 // 
       
  1206 // ---------------------------------------------------------
       
  1207 //
       
  1208 void CMenuEng::AppendPredefinedAttributeL( )
       
  1209     {
       
  1210     __ASSERT_DEBUG( iTree, User::Invariant() );
       
  1211     MXCFWNode* root = iTree->Root();
       
  1212     RNodeArray nodes;
       
  1213     CleanupClosePushL( nodes );
       
  1214     iTree->GetNodesOfTypeL(KMenuTypeApp(),nodes, root, ETrue );
       
  1215     for (TInt i = 0; i<nodes.Count(); i++)
       
  1216     	{
       
  1217         CMenuEngObject* object = &Object( *nodes[i] );
       
  1218         object->SetAttributeL( KMenuAttrPredefined(), KNullDesC(), EFalse );
       
  1219     	}
       
  1220     CleanupStack::PopAndDestroy( &nodes );
       
  1221     }
       
  1222 
       
  1223 // ---------------------------------------------------------
  1204 // CMenuEng::SelfComplete
  1224 // CMenuEng::SelfComplete
  1205 // ---------------------------------------------------------
  1225 // ---------------------------------------------------------
  1206 //
  1226 //
  1207 void CMenuEng::SelfComplete( TInt aError )
  1227 void CMenuEng::SelfComplete( TInt aError )
  1208     {
  1228     {