calendarui/commonutils/src/CalenStatusPaneUtilsImpl.cpp
branchRCL_3
changeset 60 96907930389d
parent 48 bf573002ff72
child 67 1539a383d7b6
equal deleted inserted replaced
59:aba12c885d83 60:96907930389d
    70     {
    70     {
    71     TRACE_ENTRY_POINT;
    71     TRACE_ENTRY_POINT;
    72     
    72     
    73     if( ( iNaviLabel != NULL ) && ( iNaviContainer->Top() == iNaviLabel ) )
    73     if( ( iNaviLabel != NULL ) && ( iNaviContainer->Top() == iNaviLabel ) )
    74         {
    74         {
    75         iNaviContainer->Pop( iNaviLabel );
    75         if( iNaviLabel->ControlType() == CAknNavigationDecorator::ENotSpecified 
    76         delete iNaviLabel;
    76                   || iNaviLabel->ControlType() == CAknNavigationDecorator::ENaviLabel)
    77         iNaviLabel = NULL;
    77             {
       
    78             iNaviContainer->Pop( iNaviLabel );
       
    79             delete iNaviLabel;
       
    80             iNaviLabel = NULL;          
       
    81             }
    78         }
    82         }
    79     
    83     
    80     TRACE_EXIT_POINT;
    84     TRACE_EXIT_POINT;
    81     }
    85     }
    82 // -----------------------------------------------------------------------------
    86 // -----------------------------------------------------------------------------
   156      // displaying calendar name and icon in navi pane.
   160      // displaying calendar name and icon in navi pane.
   157      if(iNaviLabel != NULL && iNaviLabel->ControlType() == CAknNavigationDecorator::ENotSpecified)
   161      if(iNaviLabel != NULL && iNaviLabel->ControlType() == CAknNavigationDecorator::ENotSpecified)
   158          {
   162          {
   159          CCoeControl* coeRes = iNaviLabel->DecoratedControl();
   163          CCoeControl* coeRes = iNaviLabel->DecoratedControl();
   160          CCustomNaviControl *actualLabel = static_cast<CCustomNaviControl*>(coeRes);
   164          CCustomNaviControl *actualLabel = static_cast<CCustomNaviControl*>(coeRes);
   161          actualLabel->SetCalendarNameAndColor(aName, aColor);
   165          actualLabel->SetCalendarNameAndColorL(aName, aColor);
   162          actualLabel->DrawDeferred();
   166          actualLabel->DrawDeferred();
   163          iNaviContainer->ReplaceL(*iNaviLabel, *iNaviLabel);
   167          iNaviContainer->ReplaceL(*iNaviLabel, *iNaviLabel);
   164          }
   168          }
   165      else
   169      else
   166          {
   170          {
   265     delete iNoYearDateFormat;
   269     delete iNoYearDateFormat;
   266     delete iShortDateFormat;
   270     delete iShortDateFormat;
   267     delete iLongDateFormat;
   271     delete iLongDateFormat;
   268     delete iMonthArray;
   272     delete iMonthArray;
   269     delete iDayNameArray;
   273     delete iDayNameArray;
   270     if( iNaviLabel )
   274     if( iNaviLabel && iNaviContainer->Top() == iNaviLabel)
   271         {
   275         {
   272         delete iNaviLabel;
   276         delete iNaviLabel;
   273         }
   277         }
   274     
   278     
   275     
   279