# HG changeset patch # User Sebastian Brannstrom # Date 1288528359 0 # Node ID 091fa3bf3295638f4b9debaeaeba2c7bac5e7961 # Parent e7776f6a21988be28052d1f88c966126ec460b82 Cleanup diff -r e7776f6a2198 -r 091fa3bf3295 application/inc/PodcastListView.h --- a/application/inc/PodcastListView.h Sun Oct 31 12:16:04 2010 +0000 +++ b/application/inc/PodcastListView.h Sun Oct 31 12:32:39 2010 +0000 @@ -66,15 +66,18 @@ void ScrollToVisible(); void Draw(const TRect& aRect) const; TBool IsLandscape(); - protected: + + public: + CAknSingleLargeStyleListBox * iListboxLandscape; + CAknDoubleLargeStyleListBox * iListboxPortrait; + + protected: TTypeUid::Ptr MopSupplyObject( TTypeUid aId ); private: MContainerListener* iContainerListener; CAknsBasicBackgroundControlContext* iBgContext; - CAknSingleLargeStyleListBox * iListboxLandscape; - CAknDoubleLargeStyleListBox * iListboxPortrait; CEikColumnListBox * iListbox; TBool iLandscape; CDesCArray* iItemArrayShort; diff -r e7776f6a2198 -r 091fa3bf3295 application/src/PodcastFeedView.cpp --- a/application/src/PodcastFeedView.cpp Sun Oct 31 12:16:04 2010 +0000 +++ b/application/src/PodcastFeedView.cpp Sun Oct 31 12:32:39 2010 +0000 @@ -226,7 +226,7 @@ void CPodcastFeedView::HandleListBoxEventL(CEikListBox* /* aListBox */, TListBoxEvent aEventType) { - DP("CPodcastFeedView::HandleListBoxEventL BEGIN"); +// DP("CPodcastFeedView::HandleListBoxEventL BEGIN"); switch(aEventType) { @@ -250,7 +250,7 @@ default: break; } - DP("CPodcastFeedView::HandleListBoxEventL END"); +// DP("CPodcastFeedView::HandleListBoxEventL END"); } void CPodcastFeedView::FeedUpdateAllCompleteL(TFeedState /*aState*/) @@ -537,9 +537,8 @@ break; case EPodcastUpdateAllFeeds: { - SwitchListbox(); - //iPodcastModel.FeedEngine().UpdateAllFeedsL(); - //UpdateToolbar(); + iPodcastModel.FeedEngine().UpdateAllFeedsL(); + UpdateToolbar(); }break; case EPodcastUpdateFeed: { diff -r e7776f6a2198 -r 091fa3bf3295 application/src/PodcastListView.cpp --- a/application/src/PodcastListView.cpp Sun Oct 31 12:16:04 2010 +0000 +++ b/application/src/PodcastListView.cpp Sun Oct 31 12:32:39 2010 +0000 @@ -87,14 +87,12 @@ if (aRect.Width() > aRect.Height()) { - DP("Landscape mode"); iLandscape = ETrue; iListbox = iListboxLandscape; iListboxLandscape->MakeVisible(ETrue); } else { - DP("Portrait mode"); iLandscape = EFalse; iListboxPortrait->MakeVisible(ETrue); iListbox = (CEikColumnListBox*) iListboxPortrait; @@ -154,16 +152,12 @@ { DP2("CPodcastListContainer::SizeChanged() BEGIN, width=%d, height=%d",Size().iWidth, Size().iHeight); - //TBool nowLandscape = ETrue;//!iLandscape; - TBool nowLandscape = Size().iWidth > Size().iHeight; - //TBool orientationChanged = nowLandscape && !iLandscape; - - iLandscape = nowLandscape; + iLandscape = Size().iWidth > Size().iHeight; if (iContainerListener) iContainerListener->SizeChanged(); - if (nowLandscape) + if (iLandscape) { iListboxPortrait->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOff ); iListboxPortrait->UpdateScrollBarsL(); @@ -220,7 +214,6 @@ { DP1("SetTextArray, aArray.Count=%d", aArray->Count()); iItemArrayShort->Reset(); - DP("after reset"); for (int i=0;iCount();i++) { TBuf<1024> line; @@ -448,7 +441,8 @@ void CPodcastListView::SetEmptyTextL(TInt aResourceId) { HBufC* emptyText = iEikonEnv->AllocReadResourceLC(aResourceId); - iListContainer->Listbox()->View()->SetListEmptyTextL(*emptyText); + iListContainer->iListboxPortrait->View()->SetListEmptyTextL(*emptyText); + iListContainer->iListboxLandscape->View()->SetListEmptyTextL(*emptyText); CleanupStack::PopAndDestroy(emptyText); }