phonebookui/Speeddial/src/SpdiaContainer.cpp
branchRCL_3
changeset 32 2828b4d142c0
parent 23 5586b4d2ec3e
child 39 a6539d1e8e43
--- a/phonebookui/Speeddial/src/SpdiaContainer.cpp	Tue Apr 27 16:23:35 2010 +0300
+++ b/phonebookui/Speeddial/src/SpdiaContainer.cpp	Tue May 11 16:00:21 2010 +0300
@@ -379,6 +379,7 @@
       
     TRAP_IGNORE( iGrid->ScrollBarFrame()->SetScrollBarVisibilityL(
         CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOff ) );
+    iGrid->ScrollBarFrame()->VerticalScrollBar()->SetRect( TRect( 0,0,0,0 ) );
     CFormattedCellListBoxData* data = iGrid->ItemDrawer()->FormattedCellData();
 
     data->SetTransparentSubCellL( SDM_TN_CIF_TURNED, ETrue );  //5
@@ -1046,6 +1047,17 @@
         return;
         }
 
+    // check if the position is in grid view
+    CAknGridView* gridView = iGrid->GridView();
+    TInt itemIndex = 0;        
+    TRect visibleItemsRect(gridView->ViewRect().iTl, 
+                 TSize(gridView->ItemSize(itemIndex).iWidth * gridView->NumberOfColsInView(), 
+                 gridView->ItemSize(itemIndex).iHeight * gridView->NumberOfRowsInView()));
+    if (!visibleItemsRect.Contains(aPointerEvent.iPosition))
+        {
+        return;
+        }
+
     // Check if touch is enabled or not.
     if ( !AknLayoutUtils::PenEnabled() )
         {
@@ -1148,14 +1160,14 @@
 // --------------------------------------------------------------------------
 //    
  void CSpdiaContainer::HandleLongTapEventL(
-        const TPoint& /*aPenEventLocation*/, 
-        const TPoint& aPenEventScreenLocation )
+        const TPoint& aPenEventLocation, 
+        const TPoint& /*aPenEventScreenLocation*/ )
     {
     // Get the Current Data Index
     TInt itemIndex( KErrNotFound );
 
     // Get position when user press screen
-    iGrid->View()->XYPosToItemIndex( aPenEventScreenLocation, itemIndex );
+    iGrid->View()->XYPosToItemIndex( aPenEventLocation, itemIndex );
 
     // Compare two index
     if ( AknLayoutUtils::PenEnabled() && ( itemIndex == iGrid->CurrentDataIndex() ) )
@@ -1202,7 +1214,7 @@
              statusPane->SwitchLayoutL( R_AVKON_STATUS_PANE_LAYOUT_USUAL );
              }
 
-         if ( statusPane->IsVisible() )
+         if ( statusPane->IsVisible()&&(!iView->IsShowVmbxDlg()) )
              {
              statusPane->MakeVisible( EFalse );
              }
@@ -1248,4 +1260,14 @@
             break;
         }
     }
+ 
+ // --------------------------------------------------------------------------
+ // CSpdiaContainer::GetViewDialogStatus
+ // Check whether the view note is displaying when making speeddial to background.
+ // --------------------------------------------------------------------------
+ // 
+ CSpdiaNoteDialog* CSpdiaContainer::GetViewDialogStatus()
+    {
+    return iDialog;
+    }
  // End of File