calendarui/controller/src/calenviewmanager.cpp
branchRCL_3
changeset 28 96907930389d
parent 27 aba12c885d83
child 29 12af337248b1
equal deleted inserted replaced
27:aba12c885d83 28:96907930389d
   374     iKnownPlugins.AppendL( aPluginUid );
   374     iKnownPlugins.AppendL( aPluginUid );
   375 
   375 
   376     RPointerArray<CCalenView> customViews;
   376     RPointerArray<CCalenView> customViews;
   377     CleanupResetAndDestroyPushL( customViews );
   377     CleanupResetAndDestroyPushL( customViews );
   378 
   378 
   379     CustomisationManager().GetCustomViewsL( aPluginUid, customViews );
   379     TRAP_IGNORE(CustomisationManager().GetCustomViewsL( aPluginUid, customViews ));
   380     for( TInt viewIndex( customViews.Count()-1 ); viewIndex >= 0; --viewIndex )
   380     for( TInt viewIndex( customViews.Count()-1 ); viewIndex >= 0; --viewIndex )
   381         {
   381         {
   382         CCalenView* customView = customViews[viewIndex];
   382         CCalenView* customView = customViews[viewIndex];
   383         iAppUi.AddViewL( customView );
   383         iAppUi.AddViewL( customView );
   384         customViews.Remove( viewIndex );
   384         customViews.Remove( viewIndex );
   576             {
   576             {
   577             // set the view iPreviousToDayView to handle the day view's cba
   577             // set the view iPreviousToDayView to handle the day view's cba
   578             // when returning from event view.
   578             // when returning from event view.
   579             // From month/week view -> day view -> event view -> day view
   579             // From month/week view -> day view -> event view -> day view
   580             iPreviousToDayView = iCurrentViewId;
   580             iPreviousToDayView = iCurrentViewId;
       
   581             if(iAvoidRepopulation)
       
   582                 {
       
   583                 iAvoidRepopulation = EFalse;
       
   584                 }
   581             RequestActivationL( KUidCalenDayView, KUidCalenShowBackCba );
   585             RequestActivationL( KUidCalenDayView, KUidCalenShowBackCba );
   582             }
   586             }
   583             break;
   587             break;
   584         case ECalenForwardsToWeekView:
   588         case ECalenForwardsToWeekView:
   585             {
   589             {
   586             // set the view iPreviousToWeekView to handle the week view's cba
   590             // set the view iPreviousToWeekView to handle the week view's cba
   587             // From month view -> week view 
   591             // From month view -> week view 
   588             iPreviousToWeekView = iCurrentViewId;
   592             iPreviousToWeekView = iCurrentViewId;
       
   593             if(iAvoidRepopulation)
       
   594                 {
       
   595                 iAvoidRepopulation = EFalse;
       
   596                 }
   589             RequestActivationL( KUidCalenWeekView, KUidCalenShowBackCba );
   597             RequestActivationL( KUidCalenWeekView, KUidCalenShowBackCba );
   590             }
   598             }
   591             break;
   599             break;
   592         case ECalenNextView:
   600         case ECalenNextView:
   593             {
   601             {
   630             // reactivate the current view
   638             // reactivate the current view
   631             //RequestActivationL(iCurrentViewId.iViewUid);
   639             //RequestActivationL(iCurrentViewId.iViewUid);
   632             RequestActivationL(KUidCalenDayView);
   640             RequestActivationL(KUidCalenDayView);
   633 
   641 
   634 			// dim "today" toolbar item since focus is on today            
   642 			// dim "today" toolbar item since focus is on today            
   635             iToolbar->Toolbar().SetItemDimmed( ECalenGotoToday, ETrue, ETrue);
   643             //iToolbar->Toolbar().SetItemDimmed( ECalenGotoToday, ETrue, ETrue);
   636             }
   644             }
   637             break;
   645             break;
   638 
   646 
   639         default:
   647         default:
   640             break;
   648             break;
  1613 // ----------------------------------------------------------------------------
  1621 // ----------------------------------------------------------------------------
  1614 void CCalenViewManager::HandleSystemTimeChangeNotificationL()
  1622 void CCalenViewManager::HandleSystemTimeChangeNotificationL()
  1615     {
  1623     {
  1616     TRACE_ENTRY_POINT;
  1624     TRACE_ENTRY_POINT;
  1617     
  1625     
  1618     if( iController.IsFasterAppFlagEnabled() )
       
  1619         {
       
  1620         //Set the context whenever system time is changed
  1626         //Set the context whenever system time is changed
  1621         TUid newViewUid = iSetting->DefaultView();
  1627         TUid newViewUid = iSetting->DefaultView();
  1622         MCalenContext& context = iController.Services().Context();
  1628         MCalenContext& context = iController.Services().Context();
  1623         TCalTime focusTime = context.DefaultCalTimeForViewsL();
  1629         TCalTime focusTime = context.DefaultCalTimeForViewsL();
  1624         context.SetFocusDateAndTimeL( focusTime,
  1630         context.SetFocusDateAndTimeL( focusTime,
  1625                                       TVwsViewId( KUidCalendar, newViewUid ));
  1631                                       TVwsViewId( KUidCalendar, newViewUid ));
  1626 
  1632     if( iController.IsFasterAppFlagEnabled() )
       
  1633         {
  1627         // reset tha flag iAvoidRepopulation to refresh the view whenever
  1634         // reset tha flag iAvoidRepopulation to refresh the view whenever
  1628         // system time is changed
  1635         // system time is changed
  1629         iAvoidRepopulation = EFalse;
  1636         iAvoidRepopulation = EFalse;
  1630         
  1637         
  1631         if(IsNativeView(newViewUid))
  1638         if(IsNativeView(newViewUid))