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