application/src/PodcastFeedView.cpp
changeset 26 71493655568a
parent 25 ae65906c4347
child 32 26a3f2dfba08
child 35 66c5303f3610
equal deleted inserted replaced
25:ae65906c4347 26:71493655568a
   209 	{
   209 	{
   210 	DP("CPodcastFeedView::HandleListBoxEventL BEGIN");
   210 	DP("CPodcastFeedView::HandleListBoxEventL BEGIN");
   211 
   211 
   212 	switch(aEventType)
   212 	switch(aEventType)
   213 		{
   213 		{
   214 #ifndef SYMBIAN1_UI
   214 		case EEventPenDownOnItem:
       
   215 			DP("PEN DOWN");
       
   216 			break;
       
   217 			
       
   218 //#ifndef SYMBIAN1_UI
   215 	case EEventItemClicked:
   219 	case EEventItemClicked:
   216 #endif
   220 		DP("SINGLE TAP");
       
   221 		break;
       
   222 //#endif
   217 	case EEventEnterKeyPressed:
   223 	case EEventEnterKeyPressed:
   218 	case EEventItemDoubleClicked:
   224 	case EEventItemDoubleClicked:
   219 	case EEventItemActioned:
   225 	case EEventItemActioned:
       
   226 		DP("DOUBLE TAP");
   220 			{
   227 			{
   221 			const RFeedInfoArray* sortedItems = NULL;
   228 			const RFeedInfoArray* sortedItems = NULL;
   222 			TInt index = iListContainer->Listbox()->CurrentItemIndex();
   229 			TInt index = iListContainer->Listbox()->CurrentItemIndex();
   223 			sortedItems = &iPodcastModel.FeedEngine().GetSortedFeeds();
   230 			sortedItems = &iPodcastModel.FeedEngine().GetSortedFeeds();
   224 
   231 
   559 			break;
   566 			break;
   560 		default:
   567 		default:
   561 			CPodcastListView::HandleCommandL(aCommand);
   568 			CPodcastListView::HandleCommandL(aCommand);
   562 			break;
   569 			break;
   563 		}
   570 		}
       
   571 	
       
   572 	iListContainer->SetLongTapDetected(EFalse); // in case we got here by long tapping
   564 	UpdateToolbar();
   573 	UpdateToolbar();
   565 	}
   574 	}
   566 
   575 
   567 void CPodcastFeedView::UpdateToolbar(TBool aVisible)
   576 void CPodcastFeedView::UpdateToolbar(TBool aVisible)
   568 {
   577 {
   958 	}
   967 	}
   959 
   968 
   960 void CPodcastFeedView::HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& /* aPenEventScreenLocation */)
   969 void CPodcastFeedView::HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& /* aPenEventScreenLocation */)
   961 {
   970 {
   962 	DP("CPodcastListView::HandleLongTapEventL BEGIN");
   971 	DP("CPodcastListView::HandleLongTapEventL BEGIN");
   963 	
   972 
   964 	if (iUpdatingAllRunning) {
   973 	if (iUpdatingAllRunning) {
   965 		return; // we don't allow feed manipulation while update is running
   974 		return; // we don't allow feed manipulation while update is running
   966 	}
   975 	}
   967 	
   976 
       
   977 	iListContainer->SetLongTapDetected(ETrue);
       
   978 
   968 	const TInt KListboxDefaultHeight = 19; // for some reason it returns 19 for an empty listbox in S^1
   979 	const TInt KListboxDefaultHeight = 19; // for some reason it returns 19 for an empty listbox in S^1
   969 	TInt lbHeight = iListContainer->Listbox()->CalcHeightBasedOnNumOfItems(
   980 	TInt lbHeight = iListContainer->Listbox()->CalcHeightBasedOnNumOfItems(
   970 			iListContainer->Listbox()->Model()->NumberOfItems()) - KListboxDefaultHeight;
   981 			iListContainer->Listbox()->Model()->NumberOfItems()) - KListboxDefaultHeight;
   971 
   982 
   972     if(iStylusPopupMenu && aPenEventLocation.iY < lbHeight)
   983     if(iStylusPopupMenu && aPenEventLocation.iY < lbHeight)