author | Sebastian Brannstrom <sebastianb@symbian.org> |
Sat, 13 Nov 2010 11:53:11 +0000 | |
branch | RCL_3 |
changeset 341 | a648d7ca5e27 |
parent 320 | e3ec8e436951 |
child 367 | 4b75876aa85a |
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 "PodcastQueueView.h" |
|
20 |
#include "PodcastAppUi.h" |
|
21 |
#include "ShowEngine.h" |
|
22 |
#include "SettingsEngine.h" |
|
23 |
#include "PodcastApp.h" |
|
24 |
#include "Constants.h" |
|
25 |
#include "imagehandler.h" |
|
26 |
#include "PodcastShowsView.h" |
|
27 |
||
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 |
||
38 |
CPodcastQueueView* CPodcastQueueView::NewL(CPodcastModel& aPodcastModel) |
|
39 |
{ |
|
40 |
CPodcastQueueView* self = CPodcastQueueView::NewLC(aPodcastModel); |
|
41 |
CleanupStack::Pop(self); |
|
42 |
return self; |
|
43 |
} |
|
44 |
||
45 |
CPodcastQueueView* CPodcastQueueView::NewLC(CPodcastModel& aPodcastModel) |
|
46 |
{ |
|
47 |
CPodcastQueueView* self = new ( ELeave ) CPodcastQueueView(aPodcastModel); |
|
48 |
CleanupStack::PushL(self); |
|
49 |
self->ConstructL(); |
|
50 |
return self; |
|
51 |
} |
|
52 |
||
53 |
CPodcastQueueView::CPodcastQueueView(CPodcastModel& aPodcastModel) : |
|
121
1cc7501102a8
CPodcastQueueView now inherits CPodcastShowsView instead of CPodcastListView. This removes the duplicated code between the two classes.
teknolog
parents:
117
diff
changeset
|
54 |
CPodcastShowsView(aPodcastModel) |
2 | 55 |
{ |
56 |
} |
|
57 |
||
58 |
void CPodcastQueueView::ConstructL() |
|
59 |
{ |
|
60 |
BaseConstructL(R_PODCAST_QUEUEVIEW); |
|
61 |
CPodcastListView::ConstructL(); |
|
121
1cc7501102a8
CPodcastQueueView now inherits CPodcastShowsView instead of CPodcastListView. This removes the duplicated code between the two classes.
teknolog
parents:
117
diff
changeset
|
62 |
|
1cc7501102a8
CPodcastQueueView now inherits CPodcastShowsView instead of CPodcastListView. This removes the duplicated code between the two classes.
teknolog
parents:
117
diff
changeset
|
63 |
CreateIconsL(); |
2 | 64 |
|
65 |
iPodcastModel.FeedEngine().AddObserver(this); |
|
66 |
iPodcastModel.ShowEngine().AddObserver(this); |
|
126 | 67 |
|
2 | 68 |
SetEmptyTextL(R_PODCAST_EMPTY_QUEUE); |
69 |
} |
|
70 |
||
71 |
TKeyResponse CPodcastQueueView::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType) |
|
72 |
{ |
|
73 |
if (aType == EEventKey) |
|
74 |
{ |
|
75 |
CShowInfo *activeShow = NULL; |
|
76 |
||
77 |
TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
|
78 |
if(index >= 0 && index < iPodcastModel.ActiveShowList().Count()) |
|
79 |
{ |
|
80 |
activeShow = iPodcastModel.ActiveShowList()[index]; |
|
81 |
} |
|
82 |
||
83 |
if (activeShow != NULL) { |
|
84 |
DP1("aKeyEvent.iCode=%d", aKeyEvent.iCode); |
|
85 |
switch (aKeyEvent.iCode) { |
|
86 |
case EKeyBackspace: |
|
87 |
case EKeyDelete: |
|
88 |
HandleCommandL(EPodcastRemoveDownload); |
|
89 |
break; |
|
90 |
default: |
|
91 |
break; |
|
92 |
} |
|
93 |
UpdateToolbar(); |
|
94 |
} |
|
95 |
} |
|
96 |
return CPodcastListView::OfferKeyEventL(aKeyEvent, aType); |
|
97 |
} |
|
98 |
||
99 |
CPodcastQueueView::~CPodcastQueueView() |
|
100 |
{ |
|
101 |
iPodcastModel.ShowEngine().RemoveObserver(this); |
|
102 |
iPodcastModel.FeedEngine().RemoveObserver(this); |
|
103 |
} |
|
104 |
||
105 |
||
106 |
TUid CPodcastQueueView::Id() const |
|
107 |
{ |
|
108 |
return KUidPodcastQueueViewID; |
|
109 |
} |
|
110 |
||
111 |
void CPodcastQueueView::DoActivateL(const TVwsViewId& aPrevViewId, |
|
112 |
TUid aCustomMessageId, const TDesC8& aCustomMessage) |
|
113 |
{ |
|
114 |
DP("CPodcastQueueView::DoActivateL BEGIN"); |
|
115 |
||
116 |
CPodcastListView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage); |
|
45
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
36
diff
changeset
|
117 |
iPreviousView = aPrevViewId; |
2 | 118 |
|
119 |
UpdateFeedUpdateStateL(); |
|
120 |
UpdateToolbar(); |
|
121 |
DP("CPodcastQueueView::DoActivateL END"); |
|
122 |
} |
|
123 |
||
124 |
void CPodcastQueueView::DoDeactivate() |
|
125 |
{ |
|
126 |
CPodcastListView::DoDeactivate(); |
|
127 |
} |
|
128 |
||
129 |
void CPodcastQueueView::HandleListBoxEventL(CEikListBox* /*aListBox*/, |
|
130 |
TListBoxEvent aEventType) |
|
131 |
{ |
|
132 |
switch (aEventType) |
|
133 |
{ |
|
137
eefed4bda2e2
Minor fixes to comply with single tap technical solution description. By this I consider bug 2056 closed.
teknolog
parents:
126
diff
changeset
|
134 |
case EEventItemSingleClicked: |
2 | 135 |
case EEventEnterKeyPressed: |
136 |
case EEventItemActioned: |
|
137 |
case EEventItemDoubleClicked: |
|
138 |
break; |
|
139 |
default: |
|
140 |
break; |
|
141 |
} |
|
142 |
UpdateToolbar(); |
|
143 |
} |
|
144 |
||
145 |
void CPodcastQueueView::UpdateListboxItemsL() |
|
146 |
{ |
|
185
92eadaba67e6
Fix so listbox position is kept when removing a show from queue
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
168
diff
changeset
|
147 |
if (iListContainer->IsVisible() && !iDontUpdateList) |
2 | 148 |
{ |
149 |
TListItemProperties itemProps; |
|
150 |
TInt len = 0; |
|
151 |
||
8 | 152 |
iPodcastModel.GetShowsDownloadingL(); |
2 | 153 |
|
154 |
RShowInfoArray &fItems = iPodcastModel.ActiveShowList(); |
|
155 |
len = fItems.Count(); |
|
156 |
||
157 |
if (iListContainer->Listbox() != NULL) |
|
158 |
{ |
|
159 |
TBool allUidsMatch = EFalse; |
|
160 |
||
161 |
if (len == iListContainer->Listbox()->Model()->NumberOfItems()) |
|
162 |
{ |
|
163 |
allUidsMatch = ETrue; |
|
164 |
TUint itemId = 0; |
|
165 |
for (TInt loop = 0; loop< len; loop++) |
|
166 |
{ |
|
167 |
itemId = iItemIdArray[loop]; |
|
168 |
if (fItems[loop]->Uid() != itemId) |
|
169 |
{ |
|
170 |
allUidsMatch = EFalse; |
|
171 |
break; |
|
172 |
} |
|
173 |
} |
|
174 |
} |
|
175 |
||
176 |
if (allUidsMatch && len > 0) |
|
177 |
{ |
|
178 |
for (TInt loop = 0; loop< len; loop++) |
|
179 |
{ |
|
180 |
UpdateShowItemDataL(fItems[loop], loop); |
|
181 |
} |
|
265
72305c65726c
Fix for bug 3853
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
182 |
iListContainer->Listbox()->DrawNow(); |
2 | 183 |
} |
184 |
else |
|
185 |
{ |
|
317
5afc95a6ad83
Stability fixes
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
316
diff
changeset
|
186 |
//iListContainer->Listbox()->ItemDrawer()->ClearAllPropertiesL(); |
2 | 187 |
iListContainer->Listbox()->Reset(); |
188 |
iItemIdArray.Reset(); |
|
189 |
iItemArray->Reset(); |
|
316 | 190 |
iItemArrayShort->Reset(); |
2 | 191 |
|
192 |
if (len > 0) |
|
193 |
{ |
|
194 |
for (TInt i=0; i<len; i++) |
|
195 |
{ |
|
196 |
CShowInfo *si = fItems[i]; |
|
197 |
FormatShowInfoListBoxItemL(*si); |
|
198 |
iItemIdArray.Append(si->Uid()); |
|
199 |
iItemArray->AppendL(iListboxFormatbuffer); |
|
316 | 200 |
iItemArrayShort->AppendL(iListboxFormatbufferShort); |
2 | 201 |
} |
202 |
} |
|
203 |
else |
|
204 |
{ |
|
205 |
iItemArray->Reset(); |
|
316 | 206 |
iItemArrayShort->Reset(); |
2 | 207 |
iItemIdArray.Reset(); |
208 |
||
209 |
itemProps.SetDimmed(ETrue); |
|
210 |
itemProps.SetHiddenSelection(ETrue); |
|
211 |
} |
|
212 |
iListContainer->Listbox()->HandleItemAdditionL(); |
|
213 |
} |
|
214 |
} |
|
215 |
} |
|
216 |
} |
|
217 |
||
218 |
/** |
|
219 |
* Command handling function intended for overriding by sub classes. |
|
220 |
* Default implementation is empty. |
|
221 |
* @param aCommand ID of the command to respond to. |
|
222 |
*/ |
|
223 |
void CPodcastQueueView::HandleCommandL(TInt aCommand) |
|
224 |
{ |
|
225 |
switch (aCommand) |
|
226 |
{ |
|
227 |
case EPodcastRemoveAllDownloads: |
|
228 |
{ |
|
229 |
TBuf<KMaxMessageLength> msg; |
|
230 |
iEikonEnv->ReadResourceL(msg, R_CLEAR_QUERY); |
|
231 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
23
diff
changeset
|
232 |
if(ShowQueryMessageL(msg)) |
2 | 233 |
{ |
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
23
diff
changeset
|
234 |
iPodcastModel.ShowEngine().RemoveAllDownloadsL(); |
2 | 235 |
UpdateListboxItemsL(); |
236 |
} |
|
237 |
} |
|
238 |
break; |
|
239 |
case EPodcastRemoveDownload: |
|
240 |
{ |
|
241 |
TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
|
242 |
if (index >= 0 && index < iPodcastModel.ActiveShowList().Count()) |
|
243 |
{ |
|
185
92eadaba67e6
Fix so listbox position is kept when removing a show from queue
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
168
diff
changeset
|
244 |
// this is an ugly hack to prevent UpdateListboxItemsL from being |
92eadaba67e6
Fix so listbox position is kept when removing a show from queue
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
168
diff
changeset
|
245 |
// triggered from the show engine, which causes focus to jump |
92eadaba67e6
Fix so listbox position is kept when removing a show from queue
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
168
diff
changeset
|
246 |
// around in an ugly fashion |
92eadaba67e6
Fix so listbox position is kept when removing a show from queue
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
168
diff
changeset
|
247 |
iDontUpdateList = ETrue; |
116 | 248 |
TRAP_IGNORE(iPodcastModel.ShowEngine().RemoveDownloadL(iPodcastModel.ActiveShowList()[index]->Uid())); |
185
92eadaba67e6
Fix so listbox position is kept when removing a show from queue
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
168
diff
changeset
|
249 |
iDontUpdateList = EFalse; |
92eadaba67e6
Fix so listbox position is kept when removing a show from queue
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
168
diff
changeset
|
250 |
} |
92eadaba67e6
Fix so listbox position is kept when removing a show from queue
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
168
diff
changeset
|
251 |
UpdateListboxItemsL(); |
92eadaba67e6
Fix so listbox position is kept when removing a show from queue
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
168
diff
changeset
|
252 |
if (index > 0) |
92eadaba67e6
Fix so listbox position is kept when removing a show from queue
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
168
diff
changeset
|
253 |
{ |
92eadaba67e6
Fix so listbox position is kept when removing a show from queue
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
168
diff
changeset
|
254 |
iListContainer->Listbox()->SetCurrentItemIndex(index - 1); |
2 | 255 |
} |
256 |
} |
|
257 |
break; |
|
151 | 258 |
case EPodcastMoveDownloadUp: |
259 |
{ |
|
260 |
TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
|
261 |
TBool resumeAfterMove = EFalse; |
|
262 |
if (index == 1 && !iPodcastModel.SettingsEngine().DownloadSuspended()) |
|
263 |
{ |
|
264 |
iPodcastModel.ShowEngine().SuspendDownloads(); |
|
265 |
resumeAfterMove = ETrue; |
|
266 |
} |
|
267 |
||
268 |
if (index >= 0 && index < iPodcastModel.ActiveShowList().Count()) |
|
269 |
{ |
|
270 |
TRAP_IGNORE(iPodcastModel.ShowEngine().MoveDownloadUpL(iPodcastModel.ActiveShowList()[index]->Uid())); |
|
271 |
} |
|
272 |
||
273 |
if(resumeAfterMove) |
|
274 |
{ |
|
275 |
iPodcastModel.ShowEngine().ResumeDownloadsL(); |
|
276 |
} |
|
277 |
||
295
67f53e831ab0
Fix for bug 3876
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
265
diff
changeset
|
278 |
UpdateListboxItemsL(); |
168
9d3b805af5ab
Improvement to queue shifting function - move the highlight too.
Brendan Donegan <brendand@symbian.org>
parents:
163
diff
changeset
|
279 |
iListContainer->Listbox()->SetCurrentItemIndex(index - 1); |
151 | 280 |
} |
281 |
break; |
|
282 |
case EPodcastMoveDownloadDown: |
|
283 |
{ |
|
284 |
TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
|
285 |
TBool resumeAfterMove = EFalse; |
|
286 |
if (index == 0 && !iPodcastModel.SettingsEngine().DownloadSuspended()) |
|
287 |
{ |
|
288 |
iPodcastModel.ShowEngine().SuspendDownloads(); |
|
289 |
resumeAfterMove = ETrue; |
|
290 |
} |
|
291 |
||
292 |
if (index >= 0 && index < iPodcastModel.ActiveShowList().Count()) |
|
293 |
{ |
|
294 |
TRAP_IGNORE(iPodcastModel.ShowEngine().MoveDownloadDownL(iPodcastModel.ActiveShowList()[index]->Uid())); |
|
295 |
} |
|
296 |
||
297 |
if(resumeAfterMove) |
|
298 |
{ |
|
299 |
iPodcastModel.ShowEngine().ResumeDownloadsL(); |
|
300 |
} |
|
301 |
||
302 |
UpdateListboxItemsL(); |
|
295
67f53e831ab0
Fix for bug 3876
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
265
diff
changeset
|
303 |
iListContainer->Listbox()->SetCurrentItemIndex(index + 1); |
151 | 304 |
} |
305 |
break; |
|
2 | 306 |
case EPodcastSuspendDownloads: |
307 |
{ |
|
265
72305c65726c
Fix for bug 3853
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
308 |
iDontUpdateList = ETrue; |
2 | 309 |
iPodcastModel.ShowEngine().SuspendDownloads(); |
265
72305c65726c
Fix for bug 3853
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
310 |
iDontUpdateList = EFalse; |
2 | 311 |
UpdateListboxItemsL(); |
312 |
} |
|
313 |
break; |
|
314 |
case EPodcastResumeDownloads: |
|
315 |
{ |
|
265
72305c65726c
Fix for bug 3853
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
316 |
iDontUpdateList = ETrue; |
2 | 317 |
iPodcastModel.ShowEngine().ResumeDownloadsL(); |
265
72305c65726c
Fix for bug 3853
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
318 |
iDontUpdateList = EFalse; |
2 | 319 |
UpdateListboxItemsL(); |
320 |
} |
|
321 |
break; |
|
301
f5af16df2425
Added Info menu option to queue view
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
295
diff
changeset
|
322 |
case EPodcastShowInfo: |
f5af16df2425
Added Info menu option to queue view
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
295
diff
changeset
|
323 |
{ |
f5af16df2425
Added Info menu option to queue view
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
295
diff
changeset
|
324 |
DisplayShowInfoDialogL(); |
f5af16df2425
Added Info menu option to queue view
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
295
diff
changeset
|
325 |
} |
f5af16df2425
Added Info menu option to queue view
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
295
diff
changeset
|
326 |
break; |
2 | 327 |
default: |
328 |
CPodcastListView::HandleCommandL(aCommand); |
|
329 |
break; |
|
330 |
} |
|
331 |
UpdateToolbar(); |
|
332 |
} |
|
333 |
||
334 |
void CPodcastQueueView::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane) |
|
163
f94dbd678dda
Fix for bug 3183; merging minor differences with symbian1 branch
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
151
diff
changeset
|
335 |
{ |
295
67f53e831ab0
Fix for bug 3876
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
265
diff
changeset
|
336 |
if(aResourceId == R_PODCAST_QUEUEVIEW_MENU) |
2 | 337 |
{ |
243
44d205147a83
Fix for bug 3730 by switching to proper S3 context menu handling
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
185
diff
changeset
|
338 |
TBool dimDown = (iListContainer->Listbox()->CurrentItemIndex() >= iPodcastModel.ActiveShowList().Count() - 1 ? |
44d205147a83
Fix for bug 3730 by switching to proper S3 context menu handling
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
185
diff
changeset
|
339 |
ETrue : EFalse); |
44d205147a83
Fix for bug 3730 by switching to proper S3 context menu handling
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
185
diff
changeset
|
340 |
TBool dimUp = (iListContainer->Listbox()->CurrentItemIndex() <= 0 ? |
44d205147a83
Fix for bug 3730 by switching to proper S3 context menu handling
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
185
diff
changeset
|
341 |
ETrue : EFalse); |
44d205147a83
Fix for bug 3730 by switching to proper S3 context menu handling
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
185
diff
changeset
|
342 |
|
44d205147a83
Fix for bug 3730 by switching to proper S3 context menu handling
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
185
diff
changeset
|
343 |
TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
44d205147a83
Fix for bug 3730 by switching to proper S3 context menu handling
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
185
diff
changeset
|
344 |
|
44d205147a83
Fix for bug 3730 by switching to proper S3 context menu handling
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
185
diff
changeset
|
345 |
if (index >= 0 && index < iPodcastModel.ActiveShowList().Count()) |
44d205147a83
Fix for bug 3730 by switching to proper S3 context menu handling
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
185
diff
changeset
|
346 |
{ |
44d205147a83
Fix for bug 3730 by switching to proper S3 context menu handling
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
185
diff
changeset
|
347 |
aMenuPane->SetItemDimmed(EPodcastMoveDownloadDown, dimDown); |
320
e3ec8e436951
Fix for Hide command in Queue view
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
318
diff
changeset
|
348 |
aMenuPane->SetItemDimmed(EPodcastMoveDownloadUp, dimUp); |
243
44d205147a83
Fix for bug 3730 by switching to proper S3 context menu handling
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
185
diff
changeset
|
349 |
} |
2 | 350 |
} |
163
f94dbd678dda
Fix for bug 3183; merging minor differences with symbian1 branch
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
151
diff
changeset
|
351 |
} |
2 | 352 |
|
13 | 353 |
void CPodcastQueueView::UpdateToolbar(TBool aVisible) |
163
f94dbd678dda
Fix for bug 3183; merging minor differences with symbian1 branch
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
151
diff
changeset
|
354 |
{ |
2 | 355 |
CAknToolbar* toolbar = Toolbar(); |
356 |
||
163
f94dbd678dda
Fix for bug 3183; merging minor differences with symbian1 branch
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
151
diff
changeset
|
357 |
if (toolbar) |
f94dbd678dda
Fix for bug 3183; merging minor differences with symbian1 branch
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
151
diff
changeset
|
358 |
{ |
13 | 359 |
RShowInfoArray &fItems = iPodcastModel.ActiveShowList(); |
360 |
TInt itemCnt = fItems.Count(); |
|
163
f94dbd678dda
Fix for bug 3183; merging minor differences with symbian1 branch
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
151
diff
changeset
|
361 |
if (iListContainer->IsVisible()) |
f94dbd678dda
Fix for bug 3183; merging minor differences with symbian1 branch
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
151
diff
changeset
|
362 |
{ |
14
4e75731546eb
Fix so toolbars only change visibility for the visible view
teknolog
parents:
13
diff
changeset
|
363 |
toolbar->SetToolbarVisibility(aVisible); |
163
f94dbd678dda
Fix for bug 3183; merging minor differences with symbian1 branch
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
151
diff
changeset
|
364 |
} |
f94dbd678dda
Fix for bug 3183; merging minor differences with symbian1 branch
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
151
diff
changeset
|
365 |
|
13 | 366 |
toolbar->HideItem(EPodcastRemoveAllDownloads, EFalse, ETrue); |
367 |
toolbar->SetItemDimmed(EPodcastRemoveAllDownloads, itemCnt == 0, ETrue); |
|
368 |
toolbar->HideItem(EPodcastSuspendDownloads,iPodcastModel.SettingsEngine().DownloadSuspended(), ETrue); |
|
369 |
toolbar->HideItem(EPodcastResumeDownloads,!iPodcastModel.SettingsEngine().DownloadSuspended(), ETrue); |
|
23
cf4b850bbffb
Added macro SYMBIAN1_UI that toggles between single and double tap UI
teknolog
parents:
14
diff
changeset
|
370 |
toolbar->SetItemDimmed(EPodcastRemoveDownload, itemCnt == 0, ETrue); |
163
f94dbd678dda
Fix for bug 3183; merging minor differences with symbian1 branch
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
151
diff
changeset
|
371 |
} |
13 | 372 |
} |