calendarui/views/src/calenweekcontainer.cpp
branchRCL_3
changeset 30 d68a4b5d5885
parent 21 9711e452b5e9
child 36 9c5b1510919f
--- a/calendarui/views/src/calenweekcontainer.cpp	Tue May 11 16:12:24 2010 +0300
+++ b/calendarui/views/src/calenweekcontainer.cpp	Tue May 25 12:41:10 2010 +0300
@@ -402,7 +402,7 @@
 // (other items were commented in a header).
 // ----------------------------------------------------------------------------
 //
-void CCalenWeekContainer::SetActiveContextFromHighlightL()
+void CCalenWeekContainer::SetActiveContextFromHighlightL(TBool aInstAvailable)
     {
     TRACE_ENTRY_POINT;
 
@@ -424,7 +424,7 @@
         //    * Focus on instanceId and datetime
         // 2. Timed item, 1-n for each cell, on same/ different day
         //    * Focus on datetime
-        if( itemInfo.HasInstance() )
+        if( itemInfo.HasInstance() && aInstAvailable)
             {
             TCalenInstanceId instId = TCalenInstanceId::CreateL( *itemInfo.iInstance );
             if( !itemInfo.IsTimed() )       // todo/anniv/memo
@@ -438,13 +438,8 @@
                 {
                 TTime focusTime = CalenDateUtils::BeginningOfDay( iTime ) + itemInfo.iStartTime;
                 currentDayCalTime.SetTimeLocalL( focusTime );
- //               context.SetFocusDateAndTimeL( currentDayCalTime,
-  //                                              TVwsViewId( KUidCalendar, KUidCalenWeekView ) );
                 context.SetFocusDateAndTimeAndInstanceL( currentDayCalTime, instId, 
-                                                TVwsViewId( KUidCalendar, KUidCalenWeekView ) );
-                                                
-                TDateTime focusTimeTemp = focusTime.DateTime();
-                
+                                            TVwsViewId( KUidCalendar, KUidCalenWeekView ) );
                 }
             }
         else if( itemInfo.iStartTime.Int() == KErrNotFound )    // empty non-timed cell
@@ -2067,32 +2062,32 @@
         {
         TInt direction(0);
         if(aEventID == EAknNaviDecoratorEventLeftTabArrow)
-                    {
-                    if(AknLayoutUtils::LayoutMirrored())
-						{
-                        direction = 1;
-						}
-                    else
-						{
-                        direction = -1;
-						}
-                    }
-                    
-                else if(aEventID == EAknNaviDecoratorEventRightTabArrow)
-                    { 
-                    if(AknLayoutUtils::LayoutMirrored())
-						{
-                        direction = -1;
-						}
-                    else
-						{
-                        direction = 1;
-						}
-                    }
+            {
+            if(AknLayoutUtils::LayoutMirrored())
+                {
+                direction = 1;
+                }
+            else
+                {
+                direction = -1;
+                }
+            }            
+        else if(aEventID == EAknNaviDecoratorEventRightTabArrow)
+            { 
+            if(AknLayoutUtils::LayoutMirrored())
+                {
+                direction = -1;
+                }
+            else
+                {
+                direction = 1;
+                }
+            }
         else
             return;
+        
         HorizontalWeekMoveL(direction);
-        SetActiveContextFromHighlightL();
+        SetActiveContextFromHighlightL(EFalse);
         WeekView().SetStatusPaneFromActiveContextL();
         iView->BeginRepopulationL();
         }