calendarui/views/src/calentodocontainer.cpp
branchRCL_3
changeset 36 9c5b1510919f
parent 21 9711e452b5e9
child 48 bf573002ff72
equal deleted inserted replaced
30:d68a4b5d5885 36:9c5b1510919f
   276     {
   276     {
   277     TRACE_ENTRY_POINT;
   277     TRACE_ENTRY_POINT;
   278     delete iController;
   278     delete iController;
   279     delete iDesArray;
   279     delete iDesArray;
   280     delete iListBox;
   280     delete iListBox;
   281     delete iEmptyListText;
   281     //delete iEmptyListText;
   282     
   282     
   283     iColorUidArray.Close();
   283     iColorUidArray.Close();
   284     TRACE_EXIT_POINT;
   284     TRACE_EXIT_POINT;
   285     }
   285     }
   286 	
   286 	
   388     CAknIconArray* iconList = CreateIconsL( iIconIndices, KCalenTodoViewUidValue ); 
   388     CAknIconArray* iconList = CreateIconsL( iIconIndices, KCalenTodoViewUidValue ); 
   389 
   389 
   390     // Transfer iconlist ownership to the listbox
   390     // Transfer iconlist ownership to the listbox
   391     iListBox->ItemDrawer()->ColumnData()->SetIconArray( iconList );
   391     iListBox->ItemDrawer()->ColumnData()->SetIconArray( iconList );
   392 
   392 
   393     // Save empty text and set null for list box.
   393     /*// Save empty text and set null for list box.
   394     // It is made not to display "No data".
   394     // It is made not to display "No data".
   395     iEmptyListText = iListBox->View()->EmptyListText()->AllocL();
   395     iEmptyListText = iListBox->View()->EmptyListText()->AllocL();
   396     iListBox->View()->SetListEmptyTextL( KNullDesC );
   396     //iListBox->View()->SetListEmptyTextL( KNullDesC );*/
       
   397     
       
   398     // Set text for empty listbox
       
   399     HBufC* emptyText = StringLoader::LoadLC(R_CALEN_QTN_CALE_NO_EVENTS,
       
   400                                             iEikonEnv);
       
   401     iListBox->View()->SetListEmptyTextL( *emptyText ); //Whenever listbox is empty, it will set with this empty text.
       
   402     CleanupStack::PopAndDestroy(emptyText);
   397 
   403 
   398     TRACE_EXIT_POINT;
   404     TRACE_EXIT_POINT;
   399     }
   405     }
   400 
   406 
   401 // ----------------------------------------------------------------------------
   407 // ----------------------------------------------------------------------------
   474 void CCalenTodoContainer::SetHighlightingL()
   480 void CCalenTodoContainer::SetHighlightingL()
   475     {
   481     {
   476     TRACE_ENTRY_POINT;
   482     TRACE_ENTRY_POINT;
   477 
   483 
   478     TInt focusIx = KErrNotFound;
   484     TInt focusIx = KErrNotFound;
   479 
   485     TInt topIx = KErrNotFound;
       
   486     
       
   487     topIx = iListBox->TopItemIndex();
   480     // If top item is specified, set it
   488     // If top item is specified, set it
   481     if ( iFirstEntryOnScreenIndex != KErrNotFound )
   489     if ( topIx != KErrNotFound )
   482         {
   490         {
   483         iListBox->SetTopItemIndex( iFirstEntryOnScreenIndex );
   491         iListBox->SetTopItemIndex( topIx );
   484         }
   492         }
   485 
   493 
   486     if ( iHighlightedRowNumber != KErrNotFound )
   494     if ( iHighlightedRowNumber != KErrNotFound )
   487         {
   495         {
   488         focusIx = iHighlightedRowNumber;
   496         focusIx = iHighlightedRowNumber;
   589         }
   597         }
   590    
   598    
   591     CleanupStack::PopAndDestroy( listDes );
   599     CleanupStack::PopAndDestroy( listDes );
   592     CleanupStack::PopAndDestroy( &calendarInfoList ); 
   600     CleanupStack::PopAndDestroy( &calendarInfoList ); 
   593     iListBox->HandleItemAdditionL();
   601     iListBox->HandleItemAdditionL();
   594     iListBox->View()->SetListEmptyTextL( *iEmptyListText );
   602     //iListBox->View()->SetListEmptyTextL( *iEmptyListText );
   595 
   603 
   596     TRACE_EXIT_POINT;
   604     TRACE_EXIT_POINT;
   597     }
   605     }
   598 
   606 
   599 // ----------------------------------------------------------------------------
   607 // ----------------------------------------------------------------------------
  1184 
  1192 
  1185     if(AknLayoutUtils::PenEnabled())
  1193     if(AknLayoutUtils::PenEnabled())
  1186         {
  1194         {
  1187         TInt pointerIndex(-1);
  1195         TInt pointerIndex(-1);
  1188         TBool isItem (iListBox->View()->XYPosToItemIndex(aPointerEvent.iPosition, pointerIndex));
  1196         TBool isItem (iListBox->View()->XYPosToItemIndex(aPointerEvent.iPosition, pointerIndex));
  1189 
  1197         
       
  1198         if(aPointerEvent.iType == TPointerEvent::EButton1Down)
       
  1199 		{
       
  1200                 this->GenerateTactileFeedback(); //Tactile feedback.
       
  1201 		}	
       
  1202         
  1190         if(isItem == EFalse && IsEmptyView())
  1203         if(isItem == EFalse && IsEmptyView())
  1191             {
  1204             {
  1192             iListBox->HandlePointerEventL(aPointerEvent);
  1205             iListBox->HandlePointerEventL(aPointerEvent);
  1193             iView->HandleCommandL(ECalenCmdOpenMskDialog);
  1206             iView->HandleCommandL(ECalenCmdOpenMskDialog);
  1194             return;
  1207             return;