# HG changeset patch # User teknolog # Date 1267119186 0 # Node ID aab3aa4acdd6e247e59081e3ec26725a1191ac10 # Parent a7a43293ae564bdfedd74586b27bc2c884b1814e Checked all TRAP_IGNORE diff -r a7a43293ae56 -r aab3aa4acdd6 application/inc/PodcastFeedView.h --- a/application/inc/PodcastFeedView.h Thu Feb 25 17:12:04 2010 +0000 +++ b/application/inc/PodcastFeedView.h Thu Feb 25 17:33:06 2010 +0000 @@ -96,6 +96,9 @@ // from MImageHandlerCallback void ImageOperationCompleteL(TInt aError); + + void HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& aPenEventScreenLocation); + private: void FormatFeedInfoListBoxItemL(CFeedInfo& aFeedInfo, TBool aIsUpdating = EFalse); void HandleAddFeedL(); diff -r a7a43293ae56 -r aab3aa4acdd6 application/src/PodcastFeedView.cpp --- a/application/src/PodcastFeedView.cpp Thu Feb 25 17:12:04 2010 +0000 +++ b/application/src/PodcastFeedView.cpp Thu Feb 25 17:33:06 2010 +0000 @@ -939,3 +939,23 @@ { iEikonEnv->GetErrorText(aErrorMessage, aErrorCode); } + +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 + } + + 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; + + if(iStylusPopupMenu && aPenEventLocation.iY < lbHeight) + { + iStylusPopupMenu->ShowMenu(); + iStylusPopupMenu->SetPosition(aPenEventLocation); + } + DP("CPodcastListView::HandleLongTapEventL END"); +} diff -r a7a43293ae56 -r aab3aa4acdd6 application/src/PodcastQueueView.cpp --- a/application/src/PodcastQueueView.cpp Thu Feb 25 17:12:04 2010 +0000 +++ b/application/src/PodcastQueueView.cpp Thu Feb 25 17:33:06 2010 +0000 @@ -236,7 +236,7 @@ { iProgressAdded = EFalse; - iPodcastModel.GetShowsDownloading(); + iPodcastModel.GetShowsDownloadingL(); UpdateListboxItemsL(); UpdateToolbar(); @@ -262,7 +262,7 @@ if (iPodcastModel.ActiveFeedInfo() != NULL && iPodcastModel.ActiveFeedInfo()->Uid() == aFeedUid) { - TRAP_IGNORE(UpdateFeedUpdateStateL()); + UpdateFeedUpdateStateL(); UpdateToolbar(); } } @@ -275,7 +275,7 @@ if (iPodcastModel.ActiveFeedInfo() != NULL && iPodcastModel.ActiveFeedInfo()->Uid() == aFeedUid) { - TRAP_IGNORE(UpdateFeedUpdateStateL()); + UpdateFeedUpdateStateL(); } DP("CPodcastQueueView::FeedDownloadFinishedL END"); } @@ -430,7 +430,7 @@ TListItemProperties itemProps; TInt len = 0; - iPodcastModel.GetShowsDownloading(); + iPodcastModel.GetShowsDownloadingL(); RShowInfoArray &fItems = iPodcastModel.ActiveShowList(); len = fItems.Count(); diff -r a7a43293ae56 -r aab3aa4acdd6 application/src/PodcastShowsView.cpp --- a/application/src/PodcastShowsView.cpp Thu Feb 25 17:12:04 2010 +0000 +++ b/application/src/PodcastShowsView.cpp Thu Feb 25 17:33:06 2010 +0000 @@ -311,7 +311,7 @@ if (iPodcastModel.ActiveFeedInfo() != NULL && iPodcastModel.ActiveFeedInfo()->Uid() == aFeedUid) { - TRAP_IGNORE(UpdateFeedUpdateStateL()); + UpdateFeedUpdateStateL(); UpdateToolbar(); } } @@ -324,8 +324,8 @@ if (iPodcastModel.ActiveFeedInfo() != NULL && iPodcastModel.ActiveFeedInfo()->Uid() == aFeedUid) { - TRAP_IGNORE(UpdateFeedUpdateStateL()); - TRAP_IGNORE(UpdateViewTitleL()); + UpdateFeedUpdateStateL(); + UpdateViewTitleL(); } DP("CPodcastShowsView::FeedDownloadFinishedL END"); } @@ -518,7 +518,7 @@ TListItemProperties itemProps; TInt len = 0; - iPodcastModel.GetShowsByFeed(iPodcastModel.ActiveFeedInfo()->Uid()); + iPodcastModel.GetShowsByFeedL(iPodcastModel.ActiveFeedInfo()->Uid()); RShowInfoArray &fItems = iPodcastModel.ActiveShowList(); len = fItems.Count(); diff -r a7a43293ae56 -r aab3aa4acdd6 engine/inc/PodcastModel.h --- a/engine/inc/PodcastModel.h Thu Feb 25 17:12:04 2010 +0000 +++ b/engine/inc/PodcastModel.h Thu Feb 25 17:33:06 2010 +0000 @@ -88,11 +88,11 @@ sqlite3* DB(); - IMPORT_C void GetAllShows(); - IMPORT_C void GetNewShows(); - IMPORT_C void GetShowsDownloaded(); - IMPORT_C void GetShowsDownloading(); - IMPORT_C void GetShowsByFeed(TUint aFeedUid); + IMPORT_C void GetAllShowsL(); + IMPORT_C void GetNewShowsL(); + IMPORT_C void GetShowsDownloadedL(); + IMPORT_C void GetShowsDownloadingL(); + IMPORT_C void GetShowsByFeedL(TUint aFeedUid); IMPORT_C void MarkSelectionPlayed(); TInt FindActiveShowByUid(TUint aUid); diff -r a7a43293ae56 -r aab3aa4acdd6 engine/src/FeedEngine.cpp --- a/engine/src/FeedEngine.cpp Thu Feb 25 17:12:04 2010 +0000 +++ b/engine/src/FeedEngine.cpp Thu Feb 25 17:33:06 2010 +0000 @@ -230,16 +230,13 @@ void CFeedEngine::NewShowL(CShowInfo& aItem) { - //DP4("\nTitle: %S\nURL: %S\nDescription length: %d\nFeed: %d", &(item->Title()), &(item->Url()), item->Description().Length(), item->FeedUid()); - HBufC* description = HBufC::NewLC(KMaxDescriptionLength); TPtr ptr(description->Des()); ptr.Copy(aItem.Description()); PodcastUtils::CleanHtmlL(ptr); - //DP1("New show has feed ID: %u") item->FeedUid()); - TRAP_IGNORE(aItem.SetDescriptionL(*description)); + + aItem.SetDescriptionL(*description); CleanupStack::PopAndDestroy(description); - //DP1("Description: %S", &description); if (iCatchupMode) { // in catchup mode, we let one show be unplayed @@ -475,8 +472,7 @@ { TBuf title; title.Copy(item->Title()); - TRAP_IGNORE(item->SetTitleL(title)); - //DBUpdateFeed(*item); + item->SetTitleL(title); // if this leaves we are out of memory } diff -r a7a43293ae56 -r aab3aa4acdd6 engine/src/PodcastModel.cpp --- a/engine/src/PodcastModel.cpp Thu Feb 25 17:12:04 2010 +0000 +++ b/engine/src/PodcastModel.cpp Thu Feb 25 17:33:06 2010 +0000 @@ -378,34 +378,34 @@ return iapId; } -EXPORT_C void CPodcastModel::GetAllShows() +EXPORT_C void CPodcastModel::GetAllShowsL() { iActiveShowList.ResetAndDestroy(); - TRAP_IGNORE(iShowEngine->GetAllShowsL(iActiveShowList)); + iShowEngine->GetAllShowsL(iActiveShowList); } -EXPORT_C void CPodcastModel::GetNewShows() +EXPORT_C void CPodcastModel::GetNewShowsL() { iActiveShowList.ResetAndDestroy(); - TRAP_IGNORE(iShowEngine->GetNewShowsL(iActiveShowList)); + iShowEngine->GetNewShowsL(iActiveShowList); } -EXPORT_C void CPodcastModel::GetShowsDownloaded() +EXPORT_C void CPodcastModel::GetShowsDownloadedL() { iActiveShowList.ResetAndDestroy(); - TRAP_IGNORE(iShowEngine->GetShowsDownloadedL(iActiveShowList)); + iShowEngine->GetShowsDownloadedL(iActiveShowList); } -EXPORT_C void CPodcastModel::GetShowsDownloading() +EXPORT_C void CPodcastModel::GetShowsDownloadingL() { iActiveShowList.ResetAndDestroy(); - TRAP_IGNORE(iShowEngine->GetShowsDownloadingL(iActiveShowList)); + iShowEngine->GetShowsDownloadingL(iActiveShowList); } -EXPORT_C void CPodcastModel::GetShowsByFeed(TUint aFeedUid) +EXPORT_C void CPodcastModel::GetShowsByFeedL(TUint aFeedUid) { iActiveShowList.ResetAndDestroy(); - TRAP_IGNORE(iShowEngine->GetShowsByFeedL(iActiveShowList, aFeedUid)); + iShowEngine->GetShowsByFeedL(iActiveShowList, aFeedUid); } EXPORT_C void CPodcastModel::MarkSelectionPlayed()