equal
deleted
inserted
replaced
85 iListboxPortrait->SetSize(aRect.Size()); |
85 iListboxPortrait->SetSize(aRect.Size()); |
86 iListboxPortrait->MakeVisible(EFalse); |
86 iListboxPortrait->MakeVisible(EFalse); |
87 |
87 |
88 if (aRect.Width() > aRect.Height()) |
88 if (aRect.Width() > aRect.Height()) |
89 { |
89 { |
90 DP("Landscape mode"); |
|
91 iLandscape = ETrue; |
90 iLandscape = ETrue; |
92 iListbox = iListboxLandscape; |
91 iListbox = iListboxLandscape; |
93 iListboxLandscape->MakeVisible(ETrue); |
92 iListboxLandscape->MakeVisible(ETrue); |
94 } |
93 } |
95 else |
94 else |
96 { |
95 { |
97 DP("Portrait mode"); |
|
98 iLandscape = EFalse; |
96 iLandscape = EFalse; |
99 iListboxPortrait->MakeVisible(ETrue); |
97 iListboxPortrait->MakeVisible(ETrue); |
100 iListbox = (CEikColumnListBox*) iListboxPortrait; |
98 iListbox = (CEikColumnListBox*) iListboxPortrait; |
101 } |
99 } |
102 |
100 |
152 |
150 |
153 void CPodcastListContainer::SizeChanged() |
151 void CPodcastListContainer::SizeChanged() |
154 { |
152 { |
155 DP2("CPodcastListContainer::SizeChanged() BEGIN, width=%d, height=%d",Size().iWidth, Size().iHeight); |
153 DP2("CPodcastListContainer::SizeChanged() BEGIN, width=%d, height=%d",Size().iWidth, Size().iHeight); |
156 |
154 |
157 //TBool nowLandscape = ETrue;//!iLandscape; |
155 iLandscape = Size().iWidth > Size().iHeight; |
158 TBool nowLandscape = Size().iWidth > Size().iHeight; |
|
159 //TBool orientationChanged = nowLandscape && !iLandscape; |
|
160 |
|
161 iLandscape = nowLandscape; |
|
162 |
156 |
163 if (iContainerListener) |
157 if (iContainerListener) |
164 iContainerListener->SizeChanged(); |
158 iContainerListener->SizeChanged(); |
165 |
159 |
166 if (nowLandscape) |
160 if (iLandscape) |
167 { |
161 { |
168 iListboxPortrait->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOff ); |
162 iListboxPortrait->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOff ); |
169 iListboxPortrait->UpdateScrollBarsL(); |
163 iListboxPortrait->UpdateScrollBarsL(); |
170 iListboxPortrait->MakeVisible(EFalse); |
164 iListboxPortrait->MakeVisible(EFalse); |
171 iListboxLandscape->MakeVisible(ETrue); |
165 iListboxLandscape->MakeVisible(ETrue); |
218 |
212 |
219 void CPodcastListContainer::SetTextArray(CDesCArray* aArray) |
213 void CPodcastListContainer::SetTextArray(CDesCArray* aArray) |
220 { |
214 { |
221 DP1("SetTextArray, aArray.Count=%d", aArray->Count()); |
215 DP1("SetTextArray, aArray.Count=%d", aArray->Count()); |
222 iItemArrayShort->Reset(); |
216 iItemArrayShort->Reset(); |
223 DP("after reset"); |
|
224 for (int i=0;i<aArray->Count();i++) |
217 for (int i=0;i<aArray->Count();i++) |
225 { |
218 { |
226 TBuf<1024> line; |
219 TBuf<1024> line; |
227 line.Copy((*aArray)[i]); |
220 line.Copy((*aArray)[i]); |
228 TInt tpos = line.LocateReverse('\t'); |
221 TInt tpos = line.LocateReverse('\t'); |
446 } |
439 } |
447 |
440 |
448 void CPodcastListView::SetEmptyTextL(TInt aResourceId) |
441 void CPodcastListView::SetEmptyTextL(TInt aResourceId) |
449 { |
442 { |
450 HBufC* emptyText = iEikonEnv->AllocReadResourceLC(aResourceId); |
443 HBufC* emptyText = iEikonEnv->AllocReadResourceLC(aResourceId); |
451 iListContainer->Listbox()->View()->SetListEmptyTextL(*emptyText); |
444 iListContainer->iListboxPortrait->View()->SetListEmptyTextL(*emptyText); |
|
445 iListContainer->iListboxLandscape->View()->SetListEmptyTextL(*emptyText); |
452 CleanupStack::PopAndDestroy(emptyText); |
446 CleanupStack::PopAndDestroy(emptyText); |
453 } |
447 } |
454 |
448 |
455 void CPodcastListView::ShowOkMessageL(TDesC &aText) |
449 void CPodcastListView::ShowOkMessageL(TDesC &aText) |
456 { |
450 { |