author | Sebastian Brannstrom <sebastianb@symbian.org> |
Sat, 16 Oct 2010 18:04:09 +0100 | |
branch | RCL_3 |
changeset 243 | 44d205147a83 |
parent 203 | cc2d961dbe57 |
child 272 | e6d095ba6756 |
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 "PodcastAppui.h" |
|
20 |
#include <Podcast.rsg> |
|
21 |
#include "Podcast.hrh" |
|
22 |
#include "PodcastFeedView.h" |
|
23 |
#include "PodcastShowsView.h" |
|
24 |
#include "PodcastQueueView.h" |
|
25 |
#include "PodcastSettingsView.h" |
|
26 |
#include "PodcastSearchView.h" |
|
27 |
#include "ShowEngine.h" |
|
28 |
#include "PodcastModel.h" |
|
29 |
#include "debug.h" |
|
30 |
#include "..\help\podcatcher.hlp.hrh" |
|
31 |
#include "PodcastApp.h" |
|
104
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
32 |
#include <APGWGNAM.H> |
2 | 33 |
#include <HLPLCH.H> |
34 |
#include <avkon.hrh> |
|
35 |
||
36 |
const TUint KDelayLaunch = 1000; |
|
37 |
||
38 |
CPodcastAppUi::CPodcastAppUi(CPodcastModel* aPodcastModel):iPodcastModel(aPodcastModel) |
|
39 |
{ |
|
40 |
||
41 |
} |
|
42 |
||
43 |
void CPodcastAppUi::ConstructL() |
|
44 |
{ |
|
45 |
DP("CPodcastAppUi::ConstructL() BEGIN"); |
|
243
44d205147a83
Fix for bug 3730 by switching to proper S3 context menu handling
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
203
diff
changeset
|
46 |
BaseConstructL(CAknAppUi::EAknEnableSkin | CAknAppUi::EAknEnableMSK | |
44d205147a83
Fix for bug 3730 by switching to proper S3 context menu handling
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
203
diff
changeset
|
47 |
CAknAppUi::EAknSingleClickCompatible | CAknAppUi::EAknTouchCompatible ); |
2 | 48 |
|
13 | 49 |
iPodcastModel->ConnectionEngine().AddObserver(this); |
50 |
||
2 | 51 |
DP("Constructing FeedView"); |
52 |
iFeedView = CPodcastFeedView::NewL(*iPodcastModel); |
|
53 |
this->AddViewL(iFeedView); |
|
54 |
||
55 |
DP("Constructing ShowsView"); |
|
56 |
iShowsView = CPodcastShowsView::NewL(*iPodcastModel); |
|
57 |
this->AddViewL(iShowsView); |
|
58 |
||
59 |
DP("Constructing QueueView"); |
|
60 |
iQueueView = CPodcastQueueView::NewL(*iPodcastModel); |
|
61 |
this->AddViewL(iQueueView); |
|
62 |
||
63 |
DP("Constructing SearchView"); |
|
64 |
iSearchView = CPodcastSearchView::NewL(*iPodcastModel); |
|
65 |
this->AddViewL(iSearchView); |
|
66 |
||
67 |
DP("Constructing SettingsView"); |
|
68 |
iSettingsView = CPodcastSettingsView::NewL(*iPodcastModel); |
|
69 |
this->AddViewL(iSettingsView); |
|
70 |
||
71 |
iNaviPane =( CAknNavigationControlContainer * ) StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ); |
|
72 |
NaviShowTabGroupL(); |
|
73 |
||
74 |
// start a timer to let ConstructL finish before we display any dialogs or start downloading |
|
75 |
// this provides another entry point in HandleTimeout below |
|
76 |
iStartTimer = CTimeout::NewL(*this); |
|
77 |
iStartTimer->After(KDelayLaunch); |
|
78 |
DP("CPodcastAppUi::ConstructL() END"); |
|
79 |
} |
|
80 |
||
81 |
CPodcastAppUi::~CPodcastAppUi() |
|
82 |
{ |
|
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
83 |
if (iNaviStyle != ENaviEmpty) |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
84 |
{ |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
85 |
iNaviPane->Pop(); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
86 |
} |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
87 |
|
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
88 |
if(iNaviTabGroup) |
2 | 89 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
90 |
delete iNaviTabGroup; |
2 | 91 |
} |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
92 |
|
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
93 |
if (iNaviText) |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
94 |
{ |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
95 |
delete iNaviText; |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
96 |
} |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
97 |
|
2 | 98 |
delete iStartTimer; |
99 |
} |
|
100 |
||
101 |
// ----------------------------------------------------------------------------- |
|
102 |
// CPodcastAppUi::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane) |
|
103 |
// This function is called by the EIKON framework just before it displays |
|
104 |
// a menu pane. Its default implementation is empty, and by overriding it, |
|
105 |
// the application can set the state of menu items dynamically according |
|
106 |
// to the state of application data. |
|
107 |
// ------------------------------------------------------------------------------ |
|
108 |
// |
|
109 |
void CPodcastAppUi::DynInitMenuPaneL( |
|
110 |
TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/) |
|
111 |
{ |
|
112 |
// no implementation required |
|
113 |
} |
|
114 |
||
115 |
// ----------------------------------------------------------------------------- |
|
116 |
// CPodcastAppUi::HandleCommandL(TInt aCommand) |
|
117 |
// takes care of command handling |
|
118 |
// ----------------------------------------------------------------------------- |
|
119 |
// |
|
120 |
void CPodcastAppUi::HandleCommandL( TInt aCommand ) |
|
121 |
{ |
|
122 |
switch ( aCommand ) |
|
123 |
{ |
|
124 |
case EAknSoftkeyExit: |
|
125 |
{ |
|
126 |
Exit(); |
|
127 |
break; |
|
128 |
} |
|
129 |
case EEikCmdExit: |
|
130 |
{ |
|
104
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
131 |
// we want to prevent red button from closing podcatcher, and |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
132 |
// instead we send it to background |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
133 |
// however, we want to respect the task manager (fast swap) close |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
134 |
// command, so we check if task manager is the focussed window group |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
135 |
|
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
136 |
RWsSession& ws = iEikonEnv->WsSession(); |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
137 |
TInt wgid = ws.GetFocusWindowGroup(); |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
138 |
CApaWindowGroupName* gn = CApaWindowGroupName::NewLC(ws, wgid); |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
139 |
TUid activeAppUid = gn->AppUid(); |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
140 |
CleanupStack::PopAndDestroy(gn); |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
141 |
|
203
cc2d961dbe57
S^3 has a different UID for the new task switcher
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
155
diff
changeset
|
142 |
const TUid KUidFastSwapS3 = { 0x20016BF0 }; |
cc2d961dbe57
S^3 has a different UID for the new task switcher
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
155
diff
changeset
|
143 |
if (activeAppUid == KUidFastSwapS3) |
104
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
144 |
{ |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
145 |
// closed by task manager |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
146 |
Exit(); |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
147 |
} |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
148 |
else |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
149 |
{ |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
150 |
// red button pressed |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
151 |
TApaTask task(iEikonEnv->WsSession()); |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
152 |
task.SetWgId(iEikonEnv->RootWin().Identifier()); |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
153 |
task.SendToBackground(); |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
154 |
} |
2 | 155 |
break; |
156 |
} |
|
157 |
case EPodcastHelp: |
|
48 | 158 |
{ |
159 |
HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), HelpContextL()); |
|
2 | 160 |
} |
161 |
break; |
|
162 |
default: |
|
163 |
break; |
|
164 |
} |
|
165 |
} |
|
166 |
||
167 |
CArrayFix<TCoeHelpContext>* CPodcastAppUi::HelpContextL() const |
|
168 |
{ |
|
169 |
CArrayFixFlat<TCoeHelpContext>* array = |
|
170 |
new(ELeave)CArrayFixFlat<TCoeHelpContext>(1); |
|
171 |
CleanupStack::PushL(array); |
|
48 | 172 |
|
173 |
if (iFeedView->IsVisible()) { |
|
174 |
array->AppendL(TCoeHelpContext(KUidPodcast,KContextFeedsView)); |
|
175 |
} else if (iShowsView->IsVisible()) { |
|
176 |
array->AppendL(TCoeHelpContext(KUidPodcast,KContextShowsView)); |
|
140 | 177 |
} else if (iSearchView->IsVisible()) { |
178 |
array->AppendL(TCoeHelpContext(KUidPodcast,KContextSearch)); |
|
48 | 179 |
} else if (iQueueView->IsVisible()) { |
180 |
array->AppendL(TCoeHelpContext(KUidPodcast,KContextDownloadQueue)); |
|
181 |
} else { |
|
2 | 182 |
array->AppendL(TCoeHelpContext(KUidPodcast,KContextSettings)); |
183 |
} |
|
184 |
||
185 |
CleanupStack::Pop(array); |
|
186 |
return array; |
|
187 |
} |
|
188 |
||
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
189 |
void CPodcastAppUi::NaviSetTextL(TInt aResourceId) |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
190 |
{ |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
191 |
|
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
192 |
if (iNaviStyle != ENaviEmpty) { |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
193 |
iNaviPane->Pop(); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
194 |
} |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
195 |
|
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
196 |
HBufC* naviText = iEikonEnv->AllocReadResourceLC(aResourceId); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
197 |
iNaviText = iNaviPane->CreateNavigationLabelL(*naviText); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
198 |
|
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
199 |
iNaviPane->PushL(*iNaviText); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
200 |
|
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
201 |
CleanupStack::PopAndDestroy(naviText); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
202 |
|
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
203 |
iNaviStyle = ENaviText; |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
204 |
} |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
205 |
|
2 | 206 |
void CPodcastAppUi::NaviShowTabGroupL() |
207 |
{ |
|
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
208 |
if (iNaviStyle != ENaviEmpty) { |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
209 |
iNaviPane->Pop(); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
210 |
} |
2 | 211 |
|
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
212 |
iNaviTabGroup = iNaviPane->CreateTabGroupL(); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
213 |
|
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
214 |
iTabGroup = STATIC_CAST(CAknTabGroup*, iNaviTabGroup->DecoratedControl()); |
2 | 215 |
iTabGroup->SetTabFixedWidthL(EAknTabWidthWithTwoTabs); |
216 |
||
217 |
HBufC *label1 = iEikonEnv->AllocReadResourceLC(R_TABGROUP_FEEDS); |
|
218 |
iTabGroup->AddTabL(KTabIdFeeds,*label1); |
|
219 |
||
220 |
HBufC *label3 = iEikonEnv->AllocReadResourceLC(R_TABGROUP_QUEUE); |
|
221 |
iTabGroup->AddTabL(KTabIdQueue,*label3); |
|
16 | 222 |
|
2 | 223 |
CleanupStack::PopAndDestroy(label3); |
224 |
CleanupStack::PopAndDestroy(label1); |
|
225 |
||
226 |
iTabGroup->SetActiveTabByIndex(0); |
|
227 |
iTabGroup->SetObserver(this); |
|
228 |
||
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
229 |
iNaviPane->PushL(*iNaviTabGroup); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
230 |
iNaviStyle = ENaviTabGroup; |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
231 |
|
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
232 |
UpdateQueueTabL(iPodcastModel->ShowEngine().GetNumDownloadingShows()); |
2 | 233 |
} |
234 |
||
235 |
void CPodcastAppUi::TabChangedL (TInt aIndex) |
|
236 |
{ |
|
237 |
DP("CPodcastListView::TabChangedL "); |
|
238 |
||
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
239 |
if (iNaviStyle == ENaviTabGroup) |
11 | 240 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
241 |
TUid newview = TUid::Uid(0); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
242 |
TUid messageUid = TUid::Uid(0); |
49
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
243 |
if (aIndex == KTabIdFeeds) |
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
244 |
{ |
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
245 |
if (iFeedView->ViewingShows()) |
45
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
246 |
{ |
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
247 |
newview = KUidPodcastShowsViewID; |
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
248 |
} |
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
249 |
else |
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
250 |
{ |
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
251 |
newview = KUidPodcastFeedViewID; |
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
252 |
} |
49
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
253 |
} |
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
254 |
else if (aIndex == KTabIdQueue) |
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
255 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
256 |
newview = KUidPodcastQueueViewID; |
49
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
257 |
} |
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
258 |
else |
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
259 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
260 |
User::Leave(KErrTooBig); |
49
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
261 |
} |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
262 |
|
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
263 |
if(newview.iUid != 0) |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
264 |
{ |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
265 |
ActivateLocalViewL(newview, messageUid, KNullDesC8()); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
266 |
} |
2 | 267 |
} |
268 |
} |
|
269 |
||
270 |
void CPodcastAppUi::SetActiveTab(TInt aIndex) { |
|
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
271 |
if (iNaviStyle == ENaviTabGroup) |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
272 |
{ |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
273 |
iTabGroup->SetActiveTabByIndex(aIndex); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
274 |
} |
2 | 275 |
} |
276 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
277 |
void CPodcastAppUi::HandleTimeoutL(const CTimeout& /*aId*/, TInt /*aError*/) |
2 | 278 |
{ |
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
279 |
iFeedView->CheckResumeDownloadL(); |
2 | 280 |
} |
281 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
282 |
void CPodcastAppUi::UpdateQueueTabL(TInt aQueueLength) |
2 | 283 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
284 |
if (iNaviStyle == ENaviTabGroup) |
2 | 285 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
286 |
if (aQueueLength == 0) |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
287 |
{ |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
288 |
HBufC *queue = iEikonEnv->AllocReadResourceLC(R_TABGROUP_QUEUE); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
289 |
iTabGroup->ReplaceTabL(KTabIdQueue, *queue); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
290 |
CleanupStack::PopAndDestroy(queue); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
291 |
} |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
292 |
else |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
293 |
{ |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
294 |
HBufC *queueTemplate = iEikonEnv->AllocReadResourceLC(R_TABGROUP_QUEUE_COUNTER); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
295 |
HBufC *queueCounter = HBufC::NewLC(queueTemplate->Length()+2); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
296 |
queueCounter->Des().Format(*queueTemplate, aQueueLength); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
297 |
|
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
298 |
iTabGroup->ReplaceTabL(KTabIdQueue, *queueCounter); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
299 |
CleanupStack::PopAndDestroy(queueCounter); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
300 |
CleanupStack::PopAndDestroy(queueTemplate); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
301 |
} |
2 | 302 |
} |
303 |
} |
|
304 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
305 |
void CPodcastAppUi::TabLeftL() |
2 | 306 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
307 |
if (iNaviStyle == ENaviTabGroup) |
11 | 308 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
309 |
TInt ati = iTabGroup->ActiveTabIndex(); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
310 |
if(ati > 0) |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
311 |
{ |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
312 |
SetActiveTab(ati-1); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
313 |
TabChangedL(ati-1); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
314 |
} |
11 | 315 |
} |
2 | 316 |
} |
317 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
318 |
void CPodcastAppUi::TabRightL() |
2 | 319 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
320 |
if (iNaviStyle == ENaviTabGroup) |
11 | 321 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
322 |
TInt ati = iTabGroup->ActiveTabIndex(); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
323 |
if(ati < iTabGroup->TabCount()-1) |
11 | 324 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
325 |
SetActiveTab(ati+1); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
326 |
TabChangedL(ati+1); |
11 | 327 |
} |
328 |
} |
|
329 |
} |
|
13 | 330 |
|
331 |
void CPodcastAppUi::ConnectionSelectionStart() |
|
332 |
{ |
|
155
4ec84fbc7b27
Fix for bug 2819 - Crash when updating and connection set to "Always ask"
teknolog
parents:
140
diff
changeset
|
333 |
DP("CPodcastAppUi::ConnectionSelectionStart() BEGIN"); |
13 | 334 |
iFeedView->UpdateToolbar(EFalse); |
335 |
iShowsView->UpdateToolbar(EFalse); |
|
336 |
iQueueView->UpdateToolbar(EFalse); |
|
337 |
iSearchView->UpdateToolbar(EFalse); |
|
155
4ec84fbc7b27
Fix for bug 2819 - Crash when updating and connection set to "Always ask"
teknolog
parents:
140
diff
changeset
|
338 |
DP("CPodcastAppUi::ConnectionSelectionStart() END"); |
13 | 339 |
} |
340 |
||
341 |
void CPodcastAppUi::ConnectionSelectionEnd() |
|
342 |
{ |
|
155
4ec84fbc7b27
Fix for bug 2819 - Crash when updating and connection set to "Always ask"
teknolog
parents:
140
diff
changeset
|
343 |
DP("CPodcastAppUi::ConnectionSelectionEnd() BEGIN"); |
13 | 344 |
iFeedView->UpdateToolbar(ETrue); |
345 |
iShowsView->UpdateToolbar(ETrue); |
|
346 |
iQueueView->UpdateToolbar(ETrue); |
|
347 |
iSearchView->UpdateToolbar(ETrue); |
|
155
4ec84fbc7b27
Fix for bug 2819 - Crash when updating and connection set to "Always ask"
teknolog
parents:
140
diff
changeset
|
348 |
DP("CPodcastAppUi::ConnectionSelectionEnd() END"); |
13 | 349 |
} |
115
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
350 |
|
117
3b59b88b089e
Fixed Code Scanner L-issues; Further improvements to HTTP robustness
teknolog
parents:
115
diff
changeset
|
351 |
void CPodcastAppUi::GetErrorTextL(TDes &aErrorMessage, TInt aErrorCode) |
115
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
352 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
353 |
switch (aErrorCode) |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
354 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
355 |
case KErrNotFound: |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
356 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
357 |
HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_INVALID_ADDRESS); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
358 |
aErrorMessage.Copy(*error); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
359 |
CleanupStack::PopAndDestroy(error); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
360 |
} |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
361 |
break; |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
362 |
case KErrDiskFull: |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
363 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
364 |
HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_DISK_FULL); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
365 |
aErrorMessage.Copy(*error); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
366 |
CleanupStack::PopAndDestroy(error); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
367 |
} |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
368 |
break; |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
369 |
case 404: |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
370 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
371 |
HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_NOTFOUND); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
372 |
aErrorMessage.Copy(*error); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
373 |
CleanupStack::PopAndDestroy(error); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
374 |
} |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
375 |
break; |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
376 |
default: |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
377 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
378 |
if (aErrorCode > 200) |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
379 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
380 |
HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_HTTP); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
381 |
aErrorMessage.Format(*error, aErrorCode); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
382 |
CleanupStack::PopAndDestroy(error); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
383 |
} |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
384 |
else |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
385 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
386 |
HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_GENERAL); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
387 |
aErrorMessage.Format(*error, aErrorCode); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
388 |
CleanupStack::PopAndDestroy(error); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
389 |
} |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
390 |
} |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
391 |
break; |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
392 |
} |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
393 |
} |