diff -r b01126ce0bec -r ba63c83f4716 idlehomescreen/xmluicontroller/src/transactionelement.cpp --- a/idlehomescreen/xmluicontroller/src/transactionelement.cpp Wed Sep 15 12:00:00 2010 +0300 +++ b/idlehomescreen/xmluicontroller/src/transactionelement.cpp Wed Oct 13 14:18:30 2010 +0300 @@ -24,7 +24,6 @@ #include "xmluicontrollerpanic.h" #include "aixmluiutils.h" #include "aixmluiconstants.h" -#include "aipolicyelement.h" #include "contentprioritymap.h" @@ -36,14 +35,13 @@ /** * Template method implementation */ -void MTransactionElement::CommitL( RAiPolicyElementArray& aPolicyArray, - RPropertyHashMap& aPropertyHashMap ) +void MTransactionElement::CommitL( TBool& aLayoutChanged, RPropertyHashMap& aPropertyHashMap ) { // Update UI element data UpdateDataL(); // Update CSS properties - ApplyPublishingPolicy( aPolicyArray, aPropertyHashMap ); + ApplyPublishingPolicy( aLayoutChanged, aPropertyHashMap ); } CTransactionElement::CTransactionElement( AiUtility::CContentPriorityMap& aContentPriorityMap ) @@ -63,6 +61,13 @@ iContentPriority = KErrNotFound; iElementLink.Deque(); + + iPolicyArray.Reset(); + } + +RAiPolicyElementArray& CTransactionElement::PolicyArray() + { + return iPolicyArray; } void CTransactionElement::SetContentPriority( TInt aPriority ) @@ -81,22 +86,20 @@ iTarget = &aTarget; } -void CTransactionElement::ApplyPublishingPolicy( RAiPolicyElementArray& aPolicyArray, - RPropertyHashMap& aPropertyHashMap ) +void CTransactionElement::ApplyPublishingPolicy( TBool& aLayoutChanged, RPropertyHashMap& aPropertyHashMap ) { // Ignore errors if CSS property could not be modified - TRAP_IGNORE( DoApplyPublishingPolicyL( aPolicyArray, aPropertyHashMap ) ); + TRAP_IGNORE( DoApplyPublishingPolicyL( aLayoutChanged, aPropertyHashMap ) ); } -void CTransactionElement::DoApplyPublishingPolicyL( RAiPolicyElementArray& aPolicyArray, - RPropertyHashMap& aPropertyHashMap ) +void CTransactionElement::DoApplyPublishingPolicyL( TBool& aLayoutChanged, RPropertyHashMap& aPropertyHashMap ) { RArray targetArray; CleanupClosePushL( targetArray ); - for ( TInt i = 0; i < aPolicyArray.Count() && iPropertyMap; ++i ) + for ( TInt i = 0; i < iPolicyArray.Count() && iPropertyMap; ++i ) { - TAiPolicyElement& element = aPolicyArray[ i ]; + TAiPolicyElement& element = iPolicyArray[ i ]; RArray elementArray; CleanupClosePushL( elementArray ); @@ -115,15 +118,15 @@ if( !found ) { // Mark this target to be processed - targetArray.AppendL( &(element.Target()) ); + targetArray.Append( &(element.Target()) ); - for( TInt i3 = 0; i3 < aPolicyArray.Count(); ++i3 ) + for( TInt i3 = 0; i3 < iPolicyArray.Count(); ++i3 ) { - TAiPolicyElement& element2 = aPolicyArray[ i3 ]; + TAiPolicyElement& element2 = iPolicyArray[ i3 ]; // find form target array if( &(element.Target()) == &(element2.Target()) ) { - elementArray.AppendL( element2 ); + elementArray.Append( element2 ); } } @@ -141,6 +144,10 @@ CleanupStack::PopAndDestroy(); // targetArray + if ( iPolicyArray.Count() > 0 ) + { + aLayoutChanged |= ETrue; + } } CXnNodeAppIf& CTransactionElement::Target() const