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