diff -r 1526727a5b85 -r 899e4666ea9a idlehomescreen/xmluirendering/uiengine/src/xnnodeimpl.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnnodeimpl.cpp Fri Mar 26 15:15:17 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnnodeimpl.cpp Wed May 12 13:12:59 2010 +0300 @@ -43,7 +43,6 @@ #include "xneditmode.h" #include "xneditor.h" #include "xntext.h" -#include "xnhittest.h" #include "xnscrollablecontroladapter.h" #include "xnviewdata.h" #include "xnrootdata.h" @@ -266,8 +265,6 @@ CXnDomNode& aEventNode, CXnDomNode& aTriggerNode, CXnNode& aEventData ); static void RunFullScreenEffectL( CXnUiEngine& aEngine, CXnDomNode& aEventNode ); -static void RunActivateViewL( - CXnNodeImpl* aThis, CXnUiEngine& aEngine, CXnDomNode& aEventNode ); static void RunActivateNextViewL( CXnUiEngine& aEngine, CXnDomNode& aEventNode ); static void RunActivatePreviousViewL( CXnUiEngine& aEngine, CXnDomNode& aEventNode ); static void RunAddViewL( CXnUiEngine& aEngine, CXnDomNode& aEventNode ); @@ -895,7 +892,7 @@ TInt level( XnDirtyLevel::ENone ); EnableStatePropertyL( - aNode, aPseudoClass, CXnNode::WidthL, + aNode, aPseudoClass, &CXnNode::WidthL, aLayoutPropertyCache->iWidth, aLayoutPropertyCache->iWidths, level ); @@ -2773,39 +2770,6 @@ } // ----------------------------------------------------------------------------- -// RunActivateViewL -// ----------------------------------------------------------------------------- -// -static void RunActivateViewL( - CXnNodeImpl* aThis, - CXnUiEngine& aEngine, - CXnDomNode& aEventNode ) - { - CXnDomList& children( aEventNode.ChildNodes() ); - - TInt count( children.Length() ); - - for ( TInt i = 0; i < count; ++i ) - { - CXnDomNode* node = static_cast< CXnDomNode* >( children.Item( i ) ); - - const TDesC8& type( node->Name() ); - - if ( type == XnPropertyNames::action::KProperty ) - { - const TDesC8& id( node->AttributeValue( XnPropertyNames::action::KValue ) ); - - CXnNode* viewNode( aEngine.FindNodeByIdL( id, aThis->Namespace() ) ); - - if ( viewNode ) - { - aEngine.ActivateViewL( *viewNode ); - } - } - } - } - -// ----------------------------------------------------------------------------- // RunActivateNextViewL // ----------------------------------------------------------------------------- // @@ -3560,7 +3524,8 @@ if ( menuIf ) { - menuIf->TryDisplayingMenuBarL( *menuId ); + aEngine.Editor()->SetTargetPlugin( aEngine.FocusedNode() ); + menuIf->TryDisplayingMenuBarL( *menuId, EFalse ); } CleanupStack::PopAndDestroy( menuId ); @@ -3947,10 +3912,6 @@ { RunRemoveViewL( aEngine, aEventNode ); } - else if ( nameString == XnPropertyNames::action::event::KActivateView ) - { - RunActivateViewL( aThis, aEngine, aEventNode ); - } else if ( nameString == XnPropertyNames::action::event::KActivate ) { RunActivateL( aThis, aEngine, aEventNode ); @@ -7125,19 +7086,9 @@ XnComponentInterface::MakeInterfaceL( popup, tooltipNode ); - if ( popup ) + if ( popup && aSource != XnEventSource::EStylus ) { - if ( aSource == XnEventSource::EStylus ) - { - const TTimeIntervalMicroSeconds32 delay( 1000 * 100 ); - const TTimeIntervalMicroSeconds32 display( 1000 * 1000 * 6 ); - - popup->ShowPopupL( aRect, delay, display ); - } - else - { - popup->ShowPopupL( aRect ); - } + popup->ShowPopupL( aRect ); } } } @@ -9080,15 +9031,34 @@ } if ( source != -1 && target != -1 ) { + TBool swap = EFalse; + CXnPluginData* data( aTarget->UiEngine()->ViewManager()-> + ActiveViewData().Plugin( aTarget ) ); + if ( data && !data->Occupied() ) + { + // target is empty widget, swap widget places + swap = ETrue; + } + if ( target < source ) { iChildren.InsertL( aSource, target ); iChildren.Remove( source + 1 ); + if ( swap ) + { + iChildren.Remove( target + 1 ); + iChildren.InsertL( aTarget, source ); + } } else if ( source < target ) { iChildren.Remove( source ); iChildren.InsertL( aSource, target ); + if ( swap ) + { + iChildren.Insert( aTarget, source ); + iChildren.Remove( target ); + } } // put the locked nodes to the original places