menufw/menufwui/mmwidgets/src/mmwidgetcontainer.cpp
branchRCL_3
changeset 102 ba63c83f4716
parent 88 3321d3e205b6
--- a/menufw/menufwui/mmwidgets/src/mmwidgetcontainer.cpp	Wed Sep 15 12:00:00 2010 +0300
+++ b/menufw/menufwui/mmwidgets/src/mmwidgetcontainer.cpp	Wed Oct 13 14:18:30 2010 +0300
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description:
-*  Version     : %version: MM_71.1.17.1.75 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: MM_71.1.17.1.70.2.1 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -111,8 +111,7 @@
     , iRecipientId( KErrNotFound )
     , iEventParameters( NULL )
     , iDialogOpened( EFalse )
-    , iHighlightVisibleBeforeLongTap( EFalse )    
-    , iResetHighlight( EFalse )
+    , iHighlightVisibleBeforeLongTap( EFalse )
     {
     iWidgetPositionCache.iValid = EFalse;
     }
@@ -216,8 +215,8 @@
         {
         iDraggedIndex = KErrNotFound;
         }
-    iItemRelativeTapPoint = aPointerEvent.iPosition
-            - iWidget->View()->ItemPos( iDraggedIndex );
+    iItemRelativeTapPoint = aPointerEvent.iPosition - iWidget->View()->ItemPos(
+        iDraggedIndex );
     }
 
 // -----------------------------------------------------------------------------
@@ -314,7 +313,7 @@
         {
         iDragAndDropObserver->HandleDragOverL( GetHighlight() );
         }
-
+    
     TPoint centerPoint( aPointerEvent.iPosition );
     if( WidgetType() == EGridWidget )
         { // move item's TL corner by half width/height to center item horizontally.
@@ -327,7 +326,7 @@
         // move item's L of corner by half height to center item horizontally.
         centerPoint.iY -= ( iWidget->View()->ItemSize( highlight ).iHeight / 2 );
         }
-
+    
     if( !tooFast )
         {
         TSize itemSize = iWidget->View()->ItemSize( highlight );
@@ -678,16 +677,6 @@
         HandleButtonDownL( aPointerEvent );
         iDragAndDropObserver->HandleDragStartL( GetHighlight() );
         }
-    else if( IsNoItemDragged() && ( aPointerEvent.iType
-            == TPointerEvent::EButton1Up ) )
-        {
-        iWidget->View()->ItemDrawer()->SetFlags(
-                CListItemDrawer::ESingleClickDisabledHighlight );
-        TInt highlight = GetHighlight();
-        CListBoxView* view = Widget()->View();
-        Widget()->DrawNow( TRect( view->ItemPos( highlight ),
-                view->ItemSize( highlight ) ) );
-        }
     else if( ( aPointerEvent.iType == TPointerEvent::EDrag
             || aPointerEvent.iType == TPointerEvent::EButtonRepeat )
             && iDraggedIndex != KErrNotFound )
@@ -1154,9 +1143,9 @@
 
     if( resp == EKeyWasNotConsumed )
         {
-        resp = iWidget->OfferKeyEventL( aKeyEvent, aType );        
+        resp = iWidget->OfferKeyEventL( aKeyEvent, aType );
         }
-        
+
     if( iKeyEventObserver )
         {
         resp = iKeyEventObserver->HandleKeyPressedL( aKeyEvent, aType );
@@ -1176,7 +1165,7 @@
 
             SetHighlightVisibilityL( ETrue );
             SetDefaultHighlightL( ETrue );
-            HandleForegroundGainedL();            
+            HandleForegroundGainedL();
             }
         }
     return resp;
@@ -1744,9 +1733,7 @@
     iWidgetPositionCache.iValid = EFalse;
     iWidgetPositionCache.iHighlightedItemId = KErrNotFound;
     Widget()->SetTopItemIndex( 0 );
-    Widget()->View()->SetCurrentItemIndex( 0 );
     SetVerticalItemOffset( 0 );
-    iResetHighlight = ETrue;
     }
 
 // ---------------------------------------------------------------------------
@@ -1890,12 +1877,11 @@
 //
 EXPORT_C TBool CMmWidgetContainer::ScrollToItemL( TInt aIndex )
     {
-    TBool scrollConsumed( EFalse );
+    TInt scrollConsumed( EFalse );
     if( aIndex >= 0 && aIndex <= NumberOfItems() )
         {
         scrollConsumed = AlignBottomOfViewL();
-        if ( ( !scrollConsumed || iResetHighlight )
-                && Widget()->View()->ItemIsPartiallyVisible(aIndex) )
+        if ( !scrollConsumed && Widget()->View()->ItemIsPartiallyVisible(aIndex))
             {
             //			the case when the item is partially visible at top or
             //			bottom of screen. The view is scrolled the offset to
@@ -1911,6 +1897,7 @@
                 ScrollInPixelsL( offset );
                 scrollConsumed = ETrue;
                 }
+
             }
         else if( !Widget()->View()->ItemIsVisible( aIndex ) )
             {
@@ -1920,7 +1907,6 @@
             AlignBottomOfViewL();
             scrollConsumed = ETrue;
             }
-        iResetHighlight = EFalse;
         }
     return scrollConsumed;
     }
@@ -2083,14 +2069,4 @@
         iListBoxObserver->HandleListBoxEventL( aListBox, aEventType );
         }
     }
-                                  
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CMmWidgetContainer::SetWidgetCommingFromBackground( TBool /*aCommingFromBackground*/)
-    {
-    // this method must not be implemented. Change and implement only descended methods.    
-    }
-
 //End of file