author | Sebastian Brannstrom <sebastianb@symbian.org> |
Thu, 21 Oct 2010 21:36:03 +0100 | |
branch | 3rded |
changeset 262 | 81bb9210fd4c |
parent 177 | 269e3f3e544a |
child 343 | 9c56bf585696 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
2 |
* Copyright (c) 2007-2010 Sebastian Brannstrom, Lars Persson, EmbedDev AB |
|
3 |
* |
|
4 |
* All rights reserved. |
|
5 |
* This component and the accompanying materials are made available |
|
6 |
* under the terms of the License "Eclipse Public License v1.0" |
|
7 |
* which accompanies this distribution, and is available |
|
8 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 |
* |
|
10 |
* Initial Contributors: |
|
11 |
* EmbedDev AB - initial contribution. |
|
12 |
* |
|
13 |
* Contributors: |
|
14 |
* |
|
15 |
* Description: |
|
16 |
* |
|
17 |
*/ |
|
18 |
||
19 |
#include "PodcastShowsView.h" |
|
20 |
#include "PodcastAppUi.h" |
|
21 |
#include "ShowEngine.h" |
|
22 |
#include "SettingsEngine.h" |
|
23 |
#include "PodcastApp.h" |
|
24 |
#include "imagehandler.h" |
|
25 |
#include "constants.h" |
|
26 |
||
27 |
#include <akntitle.h> |
|
28 |
#include <podcast.rsg> |
|
29 |
#include <podcast.mbg> |
|
30 |
#include <gulicon.h> |
|
31 |
#include <barsread.h> |
|
32 |
#include <aknnotedialog.h> |
|
33 |
#include <aknmessagequerydialog.h> |
|
34 |
||
35 |
#define KMaxMessageLength 200 |
|
36 |
||
37 |
_LIT(KSizeDownloadingOf, "%.1f/%.1f MB"); |
|
38 |
_LIT(KShowsSizeFormatS60, "%.1f MB"); |
|
39 |
||
5 | 40 |
_LIT(KShowFormat, "%d\t%S\t%S%S\t"); |
2 | 41 |
|
42 |
// these must correspond with TShowsIconIndex |
|
43 |
||
44 |
const TUint KShowIconArrayIds[] = |
|
45 |
{ |
|
46 |
EMbmPodcastAudio, |
|
47 |
EMbmPodcastAudio_mask, |
|
48 |
EMbmPodcastAudio_new, |
|
49 |
EMbmPodcastAudio_new_mask, |
|
50 |
EMbmPodcastAudio_queued, |
|
51 |
EMbmPodcastAudio_queued_mask, |
|
52 |
EMbmPodcastAudio_downloading, |
|
53 |
EMbmPodcastAudio_downloading_mask, |
|
54 |
EMbmPodcastAudio_downloaded, |
|
55 |
EMbmPodcastAudio_downloaded_mask, |
|
56 |
EMbmPodcastAudio_downloaded_new, |
|
57 |
EMbmPodcastAudio_downloaded_new_mask, |
|
58 |
EMbmPodcastAudio_failed, |
|
59 |
EMbmPodcastAudio_failed_mask, |
|
60 |
EMbmPodcastAudio_suspended, |
|
61 |
EMbmPodcastAudio_suspended_mask, |
|
60 | 62 |
EMbmPodcastVideo, |
63 |
EMbmPodcastVideo_mask, |
|
64 |
EMbmPodcastVideo_new, |
|
65 |
EMbmPodcastVideo_new_mask, |
|
66 |
EMbmPodcastVideo_queued, |
|
67 |
EMbmPodcastVideo_queued_mask, |
|
68 |
EMbmPodcastVideo_downloading, |
|
69 |
EMbmPodcastVideo_downloading_mask, |
|
70 |
EMbmPodcastVideo_downloaded, |
|
71 |
EMbmPodcastVideo_downloaded_mask, |
|
72 |
EMbmPodcastVideo_downloaded_new, |
|
73 |
EMbmPodcastVideo_downloaded_new_mask, |
|
74 |
EMbmPodcastVideo_failed, |
|
75 |
EMbmPodcastVideo_failed_mask, |
|
76 |
EMbmPodcastVideo_suspended, |
|
77 |
EMbmPodcastVideo_suspended_mask, |
|
78 |
EMbmPodcastFeed, |
|
79 |
EMbmPodcastFeed_mask, |
|
2 | 80 |
0, |
81 |
0 |
|
82 |
}; |
|
83 |
||
60 | 84 |
const TInt KVideoIconOffset = 8; |
85 |
||
2 | 86 |
CPodcastShowsView* CPodcastShowsView::NewL(CPodcastModel& aPodcastModel) |
87 |
{ |
|
88 |
CPodcastShowsView* self = CPodcastShowsView::NewLC(aPodcastModel); |
|
89 |
CleanupStack::Pop(self); |
|
90 |
return self; |
|
91 |
} |
|
92 |
||
93 |
CPodcastShowsView* CPodcastShowsView::NewLC(CPodcastModel& aPodcastModel) |
|
94 |
{ |
|
95 |
CPodcastShowsView* self = new ( ELeave ) CPodcastShowsView(aPodcastModel); |
|
96 |
CleanupStack::PushL(self); |
|
97 |
self->ConstructL(); |
|
98 |
return self; |
|
99 |
} |
|
100 |
||
101 |
CPodcastShowsView::CPodcastShowsView(CPodcastModel& aPodcastModel) : |
|
102 |
iPodcastModel(aPodcastModel) |
|
103 |
{ |
|
104 |
} |
|
105 |
||
106 |
void CPodcastShowsView::ConstructL() |
|
107 |
{ |
|
177
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
108 |
DP("CPodcastShowsView::ConstructL BEGIN"); |
2 | 109 |
BaseConstructL(R_PODCAST_SHOWSVIEW); |
110 |
CPodcastListView::ConstructL(); |
|
111 |
||
112 |
CreateIconsL(); |
|
113 |
||
114 |
iListContainer->Listbox()->SetListBoxObserver(this); |
|
115 |
||
116 |
iPodcastModel.FeedEngine().AddObserver(this); |
|
117 |
iPodcastModel.ShowEngine().AddObserver(this); |
|
118 |
||
177
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
119 |
DP("CPodcastShowsView::ConstructL END"); |
2 | 120 |
} |
121 |
||
122 |
void CPodcastShowsView::CreateIconsL() |
|
123 |
{ |
|
124 |
CArrayPtr< CGulIcon>* icons = new(ELeave) CArrayPtrFlat< CGulIcon>(1); |
|
125 |
CleanupStack::PushL(icons); |
|
126 |
TInt pos = 0; |
|
127 |
while (KShowIconArrayIds[pos] > 0) |
|
128 |
{ |
|
60 | 129 |
// Load the icon |
130 |
CFbsBitmap* bitmap= NULL; |
|
131 |
CFbsBitmap* mask= NULL; |
|
2 | 132 |
AknIconUtils::CreateIconL(bitmap, |
133 |
mask, |
|
134 |
iEikonEnv->EikAppUi()->Application()->BitmapStoreName(), |
|
135 |
KShowIconArrayIds[pos], |
|
136 |
KShowIconArrayIds[pos+1]); |
|
137 |
CleanupStack::PushL(bitmap); |
|
138 |
CleanupStack::PushL(mask); |
|
139 |
||
60 | 140 |
// Append the icon to icon array |
2 | 141 |
icons->AppendL(CGulIcon::NewL(bitmap, mask) ); |
142 |
CleanupStack::Pop(2); // bitmap, mask |
|
143 |
pos+=2; |
|
144 |
} |
|
145 |
||
146 |
iListContainer->Listbox()->ItemDrawer()->FormattedCellData()->SetIconArrayL(icons); |
|
147 |
CleanupStack::Pop(icons); // icons |
|
148 |
} |
|
149 |
||
150 |
TKeyResponse CPodcastShowsView::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType) |
|
151 |
{ |
|
152 |
if (aType == EEventKey) |
|
153 |
{ |
|
154 |
CShowInfo *activeShow = NULL; |
|
155 |
||
156 |
TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
|
157 |
if(index >= 0 && index < iPodcastModel.ActiveShowList().Count()) |
|
158 |
{ |
|
159 |
activeShow = iPodcastModel.ActiveShowList()[index]; |
|
160 |
} |
|
161 |
||
162 |
if (activeShow != NULL) { |
|
163 |
DP1("aKeyEvent.iCode=%d", aKeyEvent.iCode); |
|
164 |
switch (aKeyEvent.iCode) { |
|
165 |
case 117: |
|
166 |
case '*': |
|
167 |
case EKeySpace: |
|
168 |
if (activeShow->PlayState() == EPlayed) { |
|
169 |
HandleCommandL(EPodcastMarkAsUnplayed); |
|
170 |
} else { |
|
171 |
HandleCommandL(EPodcastMarkAsPlayed); |
|
172 |
} |
|
173 |
break; |
|
174 |
case 106: |
|
175 |
case '#': |
|
177
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
176 |
HandleCommandL(EPodcastShowInfo); |
2 | 177 |
break; |
178 |
case EKeyBackspace: |
|
179 |
case EKeyDelete: |
|
180 |
HandleCommandL(EPodcastDeleteShow); |
|
181 |
break; |
|
182 |
default: |
|
183 |
break; |
|
184 |
} |
|
185 |
} |
|
186 |
} |
|
187 |
return CPodcastListView::OfferKeyEventL(aKeyEvent, aType); |
|
188 |
} |
|
189 |
||
190 |
CPodcastShowsView::~CPodcastShowsView() |
|
191 |
{ |
|
192 |
iPodcastModel.ShowEngine().RemoveObserver(this); |
|
193 |
iPodcastModel.FeedEngine().RemoveObserver(this); |
|
194 |
||
195 |
} |
|
196 |
||
197 |
||
198 |
TUid CPodcastShowsView::Id() const |
|
199 |
{ |
|
200 |
return KUidPodcastShowsViewID; |
|
201 |
} |
|
202 |
||
203 |
void CPodcastShowsView::DoActivateL(const TVwsViewId& aPrevViewId, |
|
204 |
TUid aCustomMessageId, const TDesC8& aCustomMessage) |
|
205 |
{ |
|
206 |
DP("CPodcastShowsView::DoActivateL BEGIN"); |
|
49
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
38
diff
changeset
|
207 |
CPodcastListView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage); |
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
38
diff
changeset
|
208 |
|
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
38
diff
changeset
|
209 |
iPreviousView = TVwsViewId(KUidPodcast, KUidPodcastFeedViewID); |
2 | 210 |
|
211 |
UpdateViewTitleL(); |
|
212 |
UpdateFeedUpdateStateL(); |
|
213 |
DP("CPodcastShowsView::DoActivateL END"); |
|
214 |
} |
|
215 |
||
216 |
void CPodcastShowsView::DoDeactivate() |
|
217 |
{ |
|
218 |
CPodcastListView::DoDeactivate(); |
|
219 |
} |
|
220 |
||
221 |
// Engine callback when new shows are available |
|
222 |
void CPodcastShowsView::ShowListUpdatedL() |
|
223 |
{ |
|
224 |
UpdateListboxItemsL(); |
|
225 |
} |
|
226 |
||
227 |
void CPodcastShowsView::ShowDownloadUpdatedL(TInt aBytesOfCurrentDownload, TInt /*aBytesTotal*/) |
|
228 |
{ |
|
229 |
if (!iListContainer->IsVisible()) |
|
230 |
{ |
|
231 |
return; |
|
232 |
} |
|
233 |
||
234 |
CShowInfo *info = iPodcastModel.ShowEngine().ShowDownloading(); |
|
235 |
if (info) |
|
236 |
{ |
|
237 |
UpdateShowItemL(info->Uid(), aBytesOfCurrentDownload); |
|
238 |
} |
|
239 |
} |
|
240 |
||
34 | 241 |
void CPodcastShowsView::ShowDownloadFinishedL(TUint aShowUid, TInt aError) |
2 | 242 |
{ |
243 |
iProgressAdded = EFalse; |
|
34 | 244 |
CShowInfo *info = NULL; |
245 |
RShowInfoArray &fItems = iPodcastModel.ActiveShowList(); |
|
246 |
||
247 |
for (TInt i=0;i<fItems.Count();i++) |
|
248 |
{ |
|
249 |
if (fItems[i]->Uid() == aShowUid) |
|
250 |
{ |
|
251 |
info = fItems[i]; |
|
252 |
} |
|
253 |
} |
|
254 |
||
255 |
if (info == NULL) { |
|
256 |
return; |
|
257 |
} |
|
2 | 258 |
|
259 |
switch(aError) |
|
260 |
{ |
|
261 |
case KErrCouldNotConnect: |
|
262 |
{ |
|
263 |
TBuf<KMaxMessageLength> message; |
|
264 |
iEikonEnv->ReadResourceL(message, R_PODCAST_CONNECTION_ERROR); |
|
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
28
diff
changeset
|
265 |
ShowErrorMessageL(message); |
2 | 266 |
} |
267 |
break; |
|
6 | 268 |
default: |
2 | 269 |
break; |
270 |
} |
|
6 | 271 |
UpdateListboxItemsL(); |
2 | 272 |
} |
273 |
||
274 |
||
275 |
void CPodcastShowsView::FeedDownloadStartedL(TFeedState /*aState*/, TUint aFeedUid) |
|
276 |
{ |
|
277 |
// TODO make use of the fact that we know that the feed download is |
|
278 |
// started instead of checking feed engine states in UpdateFeedUpdateStateL. |
|
279 |
if (iPodcastModel.ActiveFeedInfo() != NULL |
|
280 |
&& iPodcastModel.ActiveFeedInfo()->Uid() == aFeedUid) |
|
281 |
{ |
|
8 | 282 |
UpdateFeedUpdateStateL(); |
2 | 283 |
} |
284 |
} |
|
285 |
||
286 |
void CPodcastShowsView::FeedDownloadFinishedL(TFeedState /*aState*/, TUint aFeedUid, TInt /*aError*/) |
|
287 |
{ |
|
288 |
DP("CPodcastShowsView::FeedDownloadFinishedL BEGIN"); |
|
166
58268495eb35
Fix for 2608 - Title is sometimes not reset to "Podcatcher" after leaving ShowsView
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
164
diff
changeset
|
289 |
if (iListContainer->IsVisible() && |
58268495eb35
Fix for 2608 - Title is sometimes not reset to "Podcatcher" after leaving ShowsView
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
164
diff
changeset
|
290 |
iPodcastModel.ActiveFeedInfo() != NULL && |
58268495eb35
Fix for 2608 - Title is sometimes not reset to "Podcatcher" after leaving ShowsView
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
164
diff
changeset
|
291 |
iPodcastModel.ActiveFeedInfo()->Uid() == aFeedUid) |
2 | 292 |
{ |
8 | 293 |
UpdateFeedUpdateStateL(); |
294 |
UpdateViewTitleL(); |
|
2 | 295 |
} |
296 |
DP("CPodcastShowsView::FeedDownloadFinishedL END"); |
|
297 |
} |
|
298 |
||
299 |
void CPodcastShowsView::HandleListBoxEventL(CEikListBox* /*aListBox*/, |
|
300 |
TListBoxEvent aEventType) |
|
301 |
{ |
|
302 |
switch (aEventType) |
|
303 |
{ |
|
304 |
case EEventEnterKeyPressed: |
|
305 |
case EEventItemActioned: |
|
306 |
case EEventItemDoubleClicked: |
|
307 |
{ |
|
308 |
RShowInfoArray &fItems = iPodcastModel.ActiveShowList(); |
|
309 |
TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
|
310 |
if (index>=0 && index< fItems.Count()) |
|
311 |
{ |
|
312 |
DP2("Handle event for podcast %S, downloadState is %d", &(fItems[index]->Title()), fItems[index]->DownloadState()); |
|
313 |
CShowInfo *showInfo = fItems[index]; |
|
314 |
||
315 |
switch (showInfo->DownloadState()) { |
|
316 |
case ENotDownloaded: |
|
38
c11e52c5acd2
Fix for download state not taking user from shows view to queue view
teknolog
parents:
34
diff
changeset
|
317 |
case EFailedDownload: |
2 | 318 |
HandleCommandL(EPodcastDownloadShow); |
319 |
break; |
|
38
c11e52c5acd2
Fix for download state not taking user from shows view to queue view
teknolog
parents:
34
diff
changeset
|
320 |
case EDownloading: |
2 | 321 |
case EQueued: |
322 |
AppUi()->ActivateLocalViewL(KUidPodcastQueueViewID, TUid::Uid(0), KNullDesC8()); |
|
323 |
((CPodcastAppUi*)AppUi())->SetActiveTab(KTabIdQueue); |
|
324 |
break; |
|
325 |
case EDownloaded: |
|
136
cee38af14bcf
Merged show playback error handling from S^3 branch
teknolog
parents:
130
diff
changeset
|
326 |
{ |
cee38af14bcf
Merged show playback error handling from S^3 branch
teknolog
parents:
130
diff
changeset
|
327 |
TRAPD(err, iPodcastModel.PlayPausePodcastL(showInfo, ETrue)); |
cee38af14bcf
Merged show playback error handling from S^3 branch
teknolog
parents:
130
diff
changeset
|
328 |
if (err != KErrNone) |
cee38af14bcf
Merged show playback error handling from S^3 branch
teknolog
parents:
130
diff
changeset
|
329 |
{ |
cee38af14bcf
Merged show playback error handling from S^3 branch
teknolog
parents:
130
diff
changeset
|
330 |
HBufC *error = iEikonEnv->AllocReadResourceLC(R_ERROR_PLAYBACK_FAILED); |
cee38af14bcf
Merged show playback error handling from S^3 branch
teknolog
parents:
130
diff
changeset
|
331 |
ShowErrorMessageL(*error); |
cee38af14bcf
Merged show playback error handling from S^3 branch
teknolog
parents:
130
diff
changeset
|
332 |
CleanupStack::PopAndDestroy(error); |
cee38af14bcf
Merged show playback error handling from S^3 branch
teknolog
parents:
130
diff
changeset
|
333 |
} |
90
d0c0c3e6f7a1
Added support for launching music and video player when tapping on a downloaded show
teknolog
parents:
70
diff
changeset
|
334 |
UpdateListboxItemsL(); |
136
cee38af14bcf
Merged show playback error handling from S^3 branch
teknolog
parents:
130
diff
changeset
|
335 |
} |
2 | 336 |
break; |
337 |
default: |
|
338 |
break; |
|
339 |
} |
|
340 |
} |
|
341 |
} |
|
342 |
break; |
|
343 |
default: |
|
344 |
break; |
|
345 |
} |
|
346 |
} |
|
347 |
||
348 |
void CPodcastShowsView::GetShowIcons(CShowInfo* aShowInfo, TInt& aIconIndex) |
|
349 |
{ |
|
350 |
TBool dlStop = iPodcastModel.SettingsEngine().DownloadSuspended(); |
|
34 | 351 |
|
352 |
switch (aShowInfo->DownloadState()) |
|
2 | 353 |
{ |
34 | 354 |
case EDownloaded: |
355 |
if (aShowInfo->PlayState() == ENeverPlayed) { |
|
356 |
aIconIndex = EDownloadedNewShowIcon; |
|
357 |
} else { |
|
358 |
aIconIndex = EDownloadedShowIcon; |
|
2 | 359 |
} |
34 | 360 |
break; |
361 |
case ENotDownloaded: |
|
362 |
if (aShowInfo->PlayState() == ENeverPlayed) { |
|
363 |
aIconIndex = ENewShowIcon; |
|
364 |
} else { |
|
365 |
aIconIndex = EShowIcon; |
|
366 |
} |
|
367 |
break; |
|
368 |
case EQueued: |
|
369 |
aIconIndex = dlStop ? ESuspendedShowIcon : EQuedShowIcon; |
|
370 |
break; |
|
371 |
case EDownloading: |
|
372 |
aIconIndex = dlStop ? ESuspendedShowIcon : EDownloadingShowIcon; |
|
373 |
break; |
|
374 |
case EFailedDownload: |
|
375 |
aIconIndex = EFailedShowIcon; |
|
376 |
break; |
|
2 | 377 |
} |
60 | 378 |
|
379 |
if (aShowInfo->ShowType() == EVideoPodcast) |
|
380 |
{ |
|
381 |
aIconIndex += KVideoIconOffset; |
|
382 |
} |
|
2 | 383 |
} |
384 |
||
385 |
||
386 |
void CPodcastShowsView::UpdateFeedUpdateStateL() |
|
387 |
{ |
|
388 |
TBool listboxDimmed = EFalse; |
|
389 |
||
390 |
if (iPodcastModel.FeedEngine().ClientState() != EIdle && iPodcastModel.ActiveFeedInfo() |
|
391 |
!= NULL && iPodcastModel.FeedEngine().ActiveClientUid() == iPodcastModel.ActiveFeedInfo()->Uid()) |
|
392 |
{ |
|
393 |
listboxDimmed = ETrue; |
|
394 |
} |
|
395 |
||
396 |
if ((iListContainer->Listbox()->IsDimmed() && !listboxDimmed) || (!iListContainer->Listbox()->IsDimmed() && listboxDimmed)) |
|
397 |
{ |
|
398 |
iListContainer->Listbox()->SetDimmed(listboxDimmed); |
|
399 |
} |
|
400 |
UpdateListboxItemsL(); |
|
401 |
} |
|
402 |
||
403 |
void CPodcastShowsView::FormatShowInfoListBoxItemL(CShowInfo& aShowInfo, TInt aSizeDownloaded) |
|
404 |
{ |
|
405 |
TBuf<32> infoSize; |
|
406 |
TInt iconIndex = 0; |
|
407 |
TBuf<KMaxShortDateFormatSpec*2> showDate; |
|
408 |
GetShowIcons(&aShowInfo, iconIndex); |
|
409 |
||
410 |
if(aSizeDownloaded > 0) |
|
411 |
{ |
|
412 |
if (aShowInfo.ShowSize() > 0) |
|
413 |
{ |
|
414 |
infoSize.Format(KSizeDownloadingOf(), ((float) aSizeDownloaded / (float) KSizeMb), |
|
415 |
((float)aShowInfo.ShowSize() / (float)KSizeMb)); |
|
416 |
} |
|
417 |
else |
|
418 |
{ |
|
419 |
infoSize.Format(KShowsSizeFormatS60(), (float)aSizeDownloaded / (float)KSizeMb); |
|
420 |
} |
|
421 |
} |
|
422 |
else if (aShowInfo.ShowSize() > 0) |
|
423 |
{ |
|
424 |
infoSize.Format(KShowsSizeFormatS60(), (float)aShowInfo.ShowSize() / (float)KSizeMb); |
|
425 |
} |
|
426 |
else { |
|
427 |
infoSize = KNullDesC(); |
|
428 |
} |
|
429 |
||
430 |
if (aShowInfo.PubDate().Int64() == 0) |
|
431 |
{ |
|
432 |
showDate = KNullDesC(); |
|
433 |
} |
|
434 |
else |
|
435 |
{ |
|
436 |
aShowInfo.PubDate().FormatL(showDate, KDateFormatShort()); |
|
437 |
} |
|
438 |
||
439 |
if(aShowInfo.LastError() != KErrNone) |
|
440 |
{ |
|
6 | 441 |
GetShowErrorText(infoSize, aShowInfo.LastError()); |
60 | 442 |
showDate.Zero(); |
2 | 443 |
} |
6 | 444 |
|
60 | 445 |
if (infoSize.Length() > 0 && showDate.Length() > 0) |
2 | 446 |
{ |
6 | 447 |
infoSize.Insert(0,_L(", ")); |
2 | 448 |
} |
449 |
||
6 | 450 |
iListboxFormatbuffer.Format(KShowFormat(), iconIndex, &aShowInfo.Title(), &showDate, &infoSize); |
2 | 451 |
} |
452 |
||
453 |
void CPodcastShowsView::GetShowErrorText(TDes &aErrorMessage, TInt aErrorCode) |
|
454 |
{ |
|
60 | 455 |
TRAP_IGNORE(((CPodcastAppUi*)AppUi())->GetErrorTextL(aErrorMessage,aErrorCode)); |
2 | 456 |
} |
457 |
||
458 |
void CPodcastShowsView::UpdateShowItemDataL(CShowInfo* aShowInfo,TInt aIndex, TInt aSizeDownloaded) |
|
459 |
{ |
|
460 |
FormatShowInfoListBoxItemL(*aShowInfo, aSizeDownloaded); |
|
461 |
iItemArray->Delete(aIndex); |
|
462 |
if(aIndex>= iItemArray->MdcaCount()) |
|
463 |
{ |
|
464 |
iItemArray->AppendL(iListboxFormatbuffer); |
|
465 |
} |
|
466 |
else |
|
467 |
{ |
|
468 |
iItemArray->InsertL(aIndex, iListboxFormatbuffer); |
|
469 |
} |
|
470 |
} |
|
471 |
||
472 |
void CPodcastShowsView::UpdateShowItemL(TUint aUid, TInt aSizeDownloaded) |
|
473 |
{ |
|
474 |
RShowInfoArray& array = iPodcastModel.ActiveShowList(); |
|
475 |
||
476 |
for (int i=0;i<array.Count();i++) { |
|
477 |
if (array[i]->Uid() == aUid) { |
|
478 |
UpdateShowItemDataL(array[i], i, aSizeDownloaded); |
|
479 |
if (iListContainer->Listbox()->TopItemIndex() <= i && |
|
480 |
iListContainer->Listbox()->BottomItemIndex() >= i) { |
|
481 |
iListContainer->Listbox()->DrawItem(i); |
|
482 |
} |
|
483 |
} |
|
484 |
} |
|
485 |
} |
|
486 |
||
487 |
void CPodcastShowsView::UpdateListboxItemsL() |
|
488 |
{ |
|
489 |
if (iListContainer->IsVisible()) |
|
490 |
{ |
|
491 |
TListItemProperties itemProps; |
|
492 |
TInt len = 0; |
|
493 |
||
8 | 494 |
iPodcastModel.GetShowsByFeedL(iPodcastModel.ActiveFeedInfo()->Uid()); |
2 | 495 |
|
496 |
RShowInfoArray &fItems = iPodcastModel.ActiveShowList(); |
|
497 |
len = fItems.Count(); |
|
498 |
||
499 |
if (iListContainer->Listbox() != NULL) |
|
500 |
{ |
|
501 |
TBool allUidsMatch = EFalse; |
|
502 |
||
503 |
if (len == iListContainer->Listbox()->Model()->NumberOfItems()) |
|
504 |
{ |
|
505 |
allUidsMatch = ETrue; |
|
506 |
TUint itemId = 0; |
|
507 |
for (TInt loop = 0; loop< len; loop++) |
|
508 |
{ |
|
509 |
itemId = iItemIdArray[loop]; |
|
510 |
if (fItems[loop]->Uid() != itemId) |
|
511 |
{ |
|
512 |
allUidsMatch = EFalse; |
|
513 |
break; |
|
514 |
} |
|
515 |
} |
|
516 |
} |
|
517 |
||
518 |
if (allUidsMatch && len > 0) |
|
519 |
{ |
|
520 |
for (TInt loop = 0; loop< len; loop++) |
|
34 | 521 |
{ |
6 | 522 |
UpdateShowItemDataL(fItems[loop], loop); |
2 | 523 |
} |
31
8a5ead064c4f
Shows view now updates correctl after Mark all played
teknolog
parents:
28
diff
changeset
|
524 |
iListContainer->Listbox()->DrawNow(); |
2 | 525 |
} |
526 |
else |
|
527 |
{ |
|
528 |
iListContainer->Listbox()->ItemDrawer()->ClearAllPropertiesL(); |
|
529 |
iListContainer->Listbox()->Reset(); |
|
530 |
iItemIdArray.Reset(); |
|
531 |
iItemArray->Reset(); |
|
532 |
||
533 |
if (len > 0) |
|
534 |
{ |
|
535 |
for (TInt i=0; i<len; i++) |
|
536 |
{ |
|
537 |
CShowInfo *si = fItems[i]; |
|
538 |
FormatShowInfoListBoxItemL(*si); |
|
539 |
iItemIdArray.Append(si->Uid()); |
|
540 |
iItemArray->AppendL(iListboxFormatbuffer); |
|
541 |
} |
|
542 |
} |
|
543 |
else |
|
544 |
{ |
|
545 |
iItemArray->Reset(); |
|
546 |
iItemIdArray.Reset(); |
|
547 |
||
548 |
itemProps.SetDimmed(ETrue); |
|
549 |
itemProps.SetHiddenSelection(ETrue); |
|
550 |
} |
|
551 |
iListContainer->Listbox()->HandleItemAdditionL(); |
|
552 |
} |
|
553 |
} |
|
554 |
} |
|
555 |
} |
|
556 |
||
557 |
/** |
|
558 |
* Command handling function intended for overriding by sub classes. |
|
559 |
* Default implementation is empty. |
|
560 |
* @param aCommand ID of the command to respond to. |
|
561 |
*/ |
|
562 |
void CPodcastShowsView::HandleCommandL(TInt aCommand) |
|
563 |
{ |
|
564 |
switch (aCommand) |
|
565 |
{ |
|
566 |
case EPodcastMarkAsPlayed: |
|
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
28
diff
changeset
|
567 |
HandleSetShowPlayedL(ETrue); |
2 | 568 |
break; |
569 |
case EPodcastMarkAsUnplayed: |
|
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
28
diff
changeset
|
570 |
HandleSetShowPlayedL(EFalse); |
2 | 571 |
break; |
572 |
case EPodcastMarkAllPlayed: |
|
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
28
diff
changeset
|
573 |
iPodcastModel.MarkSelectionPlayedL(); |
2 | 574 |
UpdateListboxItemsL(); |
575 |
break; |
|
576 |
case EPodcastDeleteShow: |
|
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
28
diff
changeset
|
577 |
HandleDeleteShowL(); |
2 | 578 |
break; |
579 |
case EPodcastDownloadShow: |
|
580 |
{ |
|
581 |
TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
|
33
64ed1227e68d
Fix for problem when new download can not be started after one is completed
teknolog
parents:
32
diff
changeset
|
582 |
|
2 | 583 |
if (index >= 0 && index < iPodcastModel.ActiveShowList().Count()) |
584 |
{ |
|
585 |
iPodcastModel.ShowEngine().AddDownloadL(*iPodcastModel.ActiveShowList()[index]); |
|
586 |
UpdateShowItemL(iPodcastModel.ActiveShowList()[index]->Uid(),-1); |
|
587 |
} |
|
588 |
} |
|
589 |
break; |
|
590 |
case EPodcastUpdateFeed: |
|
591 |
{ |
|
592 |
||
593 |
if (iPodcastModel.ActiveFeedInfo()->Url().Length()>0) |
|
594 |
{ |
|
595 |
TRAPD(error, iPodcastModel.FeedEngine().UpdateFeedL(iPodcastModel.ActiveFeedInfo()->Uid())); |
|
596 |
||
597 |
if (error != KErrNone) |
|
598 |
{ |
|
5 | 599 |
HBufC* str = |
2 | 600 |
iEikonEnv->AllocReadResourceLC(R_PODCAST_FEEDS_UPDATE_ERROR); |
601 |
User::InfoPrint(*str); |
|
602 |
CleanupStack::PopAndDestroy(str); |
|
603 |
} |
|
604 |
} |
|
605 |
} |
|
606 |
break; |
|
607 |
case EPodcastCancelUpdateAllFeeds: |
|
608 |
iPodcastModel.FeedEngine().CancelUpdateAllFeeds(); |
|
609 |
break; |
|
610 |
case EPodcastShowInfo: |
|
611 |
{ |
|
612 |
DisplayShowInfoDialogL(); |
|
613 |
}break; |
|
130
92572a695a1d
Added new experimental feature to show only new and downloaded shows; Updated SIS files
teknolog
parents:
90
diff
changeset
|
614 |
case EPodcastFilterShowsAll: |
92572a695a1d
Added new experimental feature to show only new and downloaded shows; Updated SIS files
teknolog
parents:
90
diff
changeset
|
615 |
iPodcastModel.ShowEngine().SetShowFilter(EAllShows); |
92572a695a1d
Added new experimental feature to show only new and downloaded shows; Updated SIS files
teknolog
parents:
90
diff
changeset
|
616 |
UpdateListboxItemsL(); |
92572a695a1d
Added new experimental feature to show only new and downloaded shows; Updated SIS files
teknolog
parents:
90
diff
changeset
|
617 |
break; |
92572a695a1d
Added new experimental feature to show only new and downloaded shows; Updated SIS files
teknolog
parents:
90
diff
changeset
|
618 |
case EPodcastFilterShowsDownloaded: |
92572a695a1d
Added new experimental feature to show only new and downloaded shows; Updated SIS files
teknolog
parents:
90
diff
changeset
|
619 |
iPodcastModel.ShowEngine().SetShowFilter(EDownloadedShows); |
92572a695a1d
Added new experimental feature to show only new and downloaded shows; Updated SIS files
teknolog
parents:
90
diff
changeset
|
620 |
UpdateListboxItemsL(); |
92572a695a1d
Added new experimental feature to show only new and downloaded shows; Updated SIS files
teknolog
parents:
90
diff
changeset
|
621 |
break; |
92572a695a1d
Added new experimental feature to show only new and downloaded shows; Updated SIS files
teknolog
parents:
90
diff
changeset
|
622 |
case EPodcastFilterShowsNew: |
92572a695a1d
Added new experimental feature to show only new and downloaded shows; Updated SIS files
teknolog
parents:
90
diff
changeset
|
623 |
iPodcastModel.ShowEngine().SetShowFilter(ENewShows); |
92572a695a1d
Added new experimental feature to show only new and downloaded shows; Updated SIS files
teknolog
parents:
90
diff
changeset
|
624 |
UpdateListboxItemsL(); |
92572a695a1d
Added new experimental feature to show only new and downloaded shows; Updated SIS files
teknolog
parents:
90
diff
changeset
|
625 |
break; |
92572a695a1d
Added new experimental feature to show only new and downloaded shows; Updated SIS files
teknolog
parents:
90
diff
changeset
|
626 |
case EPodcastFilterShowsNewAndDownloaded: |
92572a695a1d
Added new experimental feature to show only new and downloaded shows; Updated SIS files
teknolog
parents:
90
diff
changeset
|
627 |
iPodcastModel.ShowEngine().SetShowFilter(ENewAndDownloadedShows); |
92572a695a1d
Added new experimental feature to show only new and downloaded shows; Updated SIS files
teknolog
parents:
90
diff
changeset
|
628 |
UpdateListboxItemsL(); |
92572a695a1d
Added new experimental feature to show only new and downloaded shows; Updated SIS files
teknolog
parents:
90
diff
changeset
|
629 |
break; |
2 | 630 |
default: |
631 |
CPodcastListView::HandleCommandL(aCommand); |
|
632 |
break; |
|
633 |
} |
|
634 |
} |
|
635 |
||
636 |
void CPodcastShowsView::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane) |
|
637 |
{ |
|
177
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
638 |
TBool updatingState = iPodcastModel.FeedEngine().ClientState() != EIdle && iPodcastModel.ActiveFeedInfo() && |
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
639 |
iPodcastModel.FeedEngine().ActiveClientUid() == iPodcastModel.ActiveFeedInfo()->Uid(); |
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
640 |
|
2 | 641 |
if(aResourceId == R_PODCAST_SHOWSVIEW_MENU) |
177
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
642 |
{ |
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
643 |
aMenuPane->SetItemDimmed(EPodcastMarkAllPlayed, updatingState || iPodcastModel.ActiveShowList().Count() == 0); |
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
644 |
aMenuPane->SetItemDimmed(EPodcastUpdateFeed, updatingState); |
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
645 |
aMenuPane->SetItemDimmed(EPodcastCancelUpdateAllFeeds, !updatingState); |
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
646 |
aMenuPane->SetItemDimmed(EPodcastShowsShowMenu, updatingState || iPodcastModel.ActiveShowList().Count() == 0); |
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
647 |
} |
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
648 |
else if (aResourceId == R_SHOWS_SHOW_MENU) |
2 | 649 |
{ |
177
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
650 |
TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
651 |
if (index >= 0 && index < iPodcastModel.ActiveShowList().Count()) |
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
652 |
{ |
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
653 |
CShowInfo *info = iPodcastModel.ActiveShowList()[index]; |
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
654 |
TBool hideDeleteShowCmd = info->DownloadState() != EDownloaded; |
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
655 |
TBool hideMarkOld = info->PlayState() == EPlayed; |
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
656 |
|
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
657 |
aMenuPane->SetItemDimmed(EPodcastMarkAsPlayed, hideMarkOld); |
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
658 |
aMenuPane->SetItemDimmed(EPodcastMarkAsUnplayed, !hideMarkOld); |
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
659 |
aMenuPane->SetItemDimmed(EPodcastDeleteShow, hideDeleteShowCmd); |
269e3f3e544a
Lots of fixes for 3rd edition. First test SIS file, 0.90(3)
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
175
diff
changeset
|
660 |
} |
2 | 661 |
} |
662 |
} |
|
663 |
||
664 |
void CPodcastShowsView::DisplayShowInfoDialogL() |
|
665 |
{ |
|
666 |
TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
|
667 |
if (index >= 0 && index < iPodcastModel.ActiveShowList().Count()) |
|
668 |
{ |
|
669 |
CShowInfo* info = iPodcastModel.ActiveShowList()[index]; |
|
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
23
diff
changeset
|
670 |
|
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
23
diff
changeset
|
671 |
HBufC *title = info->Title().AllocL(); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
23
diff
changeset
|
672 |
HBufC *description = info->Description().AllocL(); |
2 | 673 |
|
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
23
diff
changeset
|
674 |
CAknMessageQueryDialog* note = new ( ELeave ) CAknMessageQueryDialog( description, title ); |
2 | 675 |
|
676 |
note->PrepareLC( R_SHOW_INFO_NOTE ); // Adds to CleanupStack |
|
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
23
diff
changeset
|
677 |
note->RunLD(); |
2 | 678 |
} |
679 |
} |
|
680 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
28
diff
changeset
|
681 |
void CPodcastShowsView::HandleSetShowPlayedL(TBool aPlayed) |
2 | 682 |
{ |
683 |
||
684 |
TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
|
685 |
||
686 |
if (index >= 0 && index < iPodcastModel.ActiveShowList().Count()) |
|
687 |
{ |
|
688 |
CShowInfo *info = iPodcastModel.ActiveShowList()[index]; |
|
689 |
info->SetPlayState(aPlayed ? EPlayed : ENeverPlayed); |
|
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
28
diff
changeset
|
690 |
iPodcastModel.ShowEngine().UpdateShowL(*info); |
2 | 691 |
UpdateShowItemDataL(iPodcastModel.ActiveShowList()[index], index, 0); |
692 |
iListContainer->Listbox()->DrawItem(index); |
|
693 |
} |
|
694 |
} |
|
695 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
28
diff
changeset
|
696 |
void CPodcastShowsView::HandleDeleteShowL() |
2 | 697 |
{ |
698 |
TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
|
699 |
||
700 |
if (index >= 0 && index < iPodcastModel.ActiveShowList().Count()) |
|
701 |
{ |
|
702 |
CShowInfo *info = iPodcastModel.ActiveShowList()[index]; |
|
703 |
TBuf<KMaxMessageLength> msg; |
|
704 |
TBuf<KMaxMessageLength> templ; |
|
705 |
iEikonEnv->ReadResourceL(templ, R_PODCAST_DELETE_SHOW_PROMPT); |
|
706 |
msg.Format(templ, &(info->Title())); |
|
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
28
diff
changeset
|
707 |
if (ShowQueryMessageL(msg)) |
2 | 708 |
{ |
709 |
iPodcastModel.ShowEngine().DeleteShowL(iPodcastModel.ActiveShowList()[index]->Uid()); |
|
710 |
||
711 |
// and mark as played, and not downloaded |
|
712 |
||
713 |
info->SetDownloadState(ENotDownloaded); |
|
714 |
info->SetPlayState(EPlayed); |
|
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
28
diff
changeset
|
715 |
iPodcastModel.ShowEngine().UpdateShowL(*info); |
2 | 716 |
|
717 |
UpdateShowItemDataL(iPodcastModel.ActiveShowList()[index], index, 0); |
|
718 |
iListContainer->Listbox()->DrawItem(index); |
|
719 |
} |
|
720 |
} |
|
721 |
} |
|
722 |
||
16 | 723 |
void CPodcastShowsView::DownloadQueueUpdatedL(TInt aDownloadingShows, TInt aQueuedShows) |
2 | 724 |
{ |
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
28
diff
changeset
|
725 |
((CPodcastAppUi*)AppUi())->UpdateQueueTabL(aDownloadingShows+aQueuedShows); |
34 | 726 |
UpdateListboxItemsL(); |
2 | 727 |
} |
728 |
||
729 |
void CPodcastShowsView::FeedUpdateAllCompleteL(TFeedState /*aState*/) |
|
730 |
{ |
|
731 |
UpdateListboxItemsL(); |
|
732 |
} |
|
733 |
||
734 |
void CPodcastShowsView::UpdateViewTitleL() |
|
735 |
{ |
|
736 |
DP("CPodcastShowsView::UpdateViewTitleL BEGIN"); |
|
737 |
CAknTitlePane* titlePane = static_cast<CAknTitlePane*> |
|
738 |
( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); |
|
739 |
||
740 |
TBool updatingState = iPodcastModel.FeedEngine().ClientState() != EIdle && |
|
741 |
iPodcastModel.FeedEngine().ActiveClientUid() == iPodcastModel.ActiveFeedInfo()->Uid(); |
|
742 |
||
743 |
if (updatingState) { |
|
744 |
SetEmptyTextL(R_PODCAST_EMPTY_LIST_UPDATING); |
|
745 |
} else { |
|
746 |
SetEmptyTextL(R_PODCAST_EMPTY_LIST); |
|
747 |
} |
|
748 |
||
749 |
if(iPodcastModel.ActiveFeedInfo()) |
|
750 |
{ |
|
751 |
if (iPodcastModel.ActiveFeedInfo()->Title() != KNullDesC) |
|
752 |
{ |
|
753 |
titlePane->SetTextL( iPodcastModel.ActiveFeedInfo()->Title(), ETrue ); |
|
754 |
} |
|
755 |
} |
|
756 |
else |
|
757 |
{ |
|
758 |
titlePane->SetTextToDefaultL(); |
|
759 |
} |
|
760 |
||
761 |
DP("CPodcastShowsView::UpdateViewTitleL END"); |
|
762 |
} |