# HG changeset patch # User teknolog # Date 1267391980 0 # Node ID 71493655568a8ee1febbeaefbe0c81d04ddb8ef3 # Parent ae65906c4347a4c77f725b67858c88b365032544 Workaround for long tap on selected item issue diff -r ae65906c4347 -r 71493655568a application/inc/PodcastListView.h --- a/application/inc/PodcastListView.h Sun Feb 28 20:09:49 2010 +0000 +++ b/application/inc/PodcastListView.h Sun Feb 28 21:19:40 2010 +0000 @@ -63,7 +63,9 @@ void ScrollToVisible(); void Draw(const TRect& aRect) const; - CEikFormattedCellListBox * iListbox; + void SetLongTapDetected(TBool aLongTapDetected); + + CEikFormattedCellListBox * iListbox; protected: TTypeUid::Ptr MopSupplyObject( TTypeUid aId ); @@ -73,6 +75,8 @@ MKeyEventListener* iKeyEventListener; MPointerListener* iPointerListener; CAknsBasicBackgroundControlContext* iBgContext; + TBool iLongTapDetected; + }; diff -r ae65906c4347 -r 71493655568a application/sis/podcatcher_udeb.sis Binary file application/sis/podcatcher_udeb.sis has changed diff -r ae65906c4347 -r 71493655568a application/sis/podcatcher_udeb_signed.sis Binary file application/sis/podcatcher_udeb_signed.sis has changed diff -r ae65906c4347 -r 71493655568a application/sis/podcatcher_urel.sis Binary file application/sis/podcatcher_urel.sis has changed diff -r ae65906c4347 -r 71493655568a application/sis/podcatcher_urel_signed.sis Binary file application/sis/podcatcher_urel_signed.sis has changed diff -r ae65906c4347 -r 71493655568a application/src/PodcastFeedView.cpp --- a/application/src/PodcastFeedView.cpp Sun Feb 28 20:09:49 2010 +0000 +++ b/application/src/PodcastFeedView.cpp Sun Feb 28 21:19:40 2010 +0000 @@ -211,12 +211,19 @@ switch(aEventType) { -#ifndef SYMBIAN1_UI + case EEventPenDownOnItem: + DP("PEN DOWN"); + break; + +//#ifndef SYMBIAN1_UI case EEventItemClicked: -#endif + DP("SINGLE TAP"); + break; +//#endif case EEventEnterKeyPressed: case EEventItemDoubleClicked: case EEventItemActioned: + DP("DOUBLE TAP"); { const RFeedInfoArray* sortedItems = NULL; TInt index = iListContainer->Listbox()->CurrentItemIndex(); @@ -561,6 +568,8 @@ CPodcastListView::HandleCommandL(aCommand); break; } + + iListContainer->SetLongTapDetected(EFalse); // in case we got here by long tapping UpdateToolbar(); } @@ -960,11 +969,13 @@ void CPodcastFeedView::HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& /* aPenEventScreenLocation */) { DP("CPodcastListView::HandleLongTapEventL BEGIN"); - + if (iUpdatingAllRunning) { return; // we don't allow feed manipulation while update is running } - + + iListContainer->SetLongTapDetected(ETrue); + const TInt KListboxDefaultHeight = 19; // for some reason it returns 19 for an empty listbox in S^1 TInt lbHeight = iListContainer->Listbox()->CalcHeightBasedOnNumOfItems( iListContainer->Listbox()->Model()->NumberOfItems()) - KListboxDefaultHeight; diff -r ae65906c4347 -r 71493655568a application/src/PodcastListView.cpp --- a/application/src/PodcastListView.cpp Sun Feb 28 20:09:49 2010 +0000 +++ b/application/src/PodcastListView.cpp Sun Feb 28 21:19:40 2010 +0000 @@ -100,6 +100,11 @@ } } +void CPodcastListContainer::SetLongTapDetected(TBool aLongTapDetected) + { + iLongTapDetected = aLongTapDetected; + } + void CPodcastListContainer::HandleResourceChange(TInt aType) { switch( aType ) @@ -161,8 +166,11 @@ if (iPointerListener) iPointerListener->PointerEventL(aPointerEvent); - // Call base class HandlePointerEventL() - CCoeControl::HandlePointerEventL(aPointerEvent); + // Call base class HandlePointerEventL() if not a long tap + if (!iLongTapDetected) + { + CCoeControl::HandlePointerEventL(aPointerEvent); + } } @@ -362,7 +370,7 @@ void CPodcastListView::HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& /* aPenEventScreenLocation */) { DP("CPodcastListView::HandleLongTapEventL BEGIN"); - + iListContainer->SetLongTapDetected(ETrue); const TInt KListboxDefaultHeight = 19; // for some reason it returns 19 for an empty listbox in S^1 TInt lbHeight = iListContainer->Listbox()->CalcHeightBasedOnNumOfItems( iListContainer->Listbox()->Model()->NumberOfItems()) - KListboxDefaultHeight;