author | Sebastian Brannstrom <sebastianb@symbian.org> |
Sat, 13 Nov 2010 22:05:25 +0000 | |
branch | newlist |
changeset 347 | b8d687bb7ca1 |
parent 336 | 3d6c1417e8bd |
child 348 | bd7f3de17443 |
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" |
|
60 | 32 |
#include <APGWGNAM.H> |
2 | 33 |
#include <HLPLCH.H> |
34 |
#include <avkon.hrh> |
|
268
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
35 |
#include "Podcast.mbg" |
2 | 36 |
|
37 |
const TUint KDelayLaunch = 1000; |
|
38 |
||
39 |
CPodcastAppUi::CPodcastAppUi(CPodcastModel* aPodcastModel):iPodcastModel(aPodcastModel) |
|
40 |
{ |
|
41 |
||
42 |
} |
|
43 |
||
44 |
void CPodcastAppUi::ConstructL() |
|
45 |
{ |
|
46 |
DP("CPodcastAppUi::ConstructL() BEGIN"); |
|
47 |
BaseConstructL(CAknAppUi::EAknEnableSkin); |
|
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 |
{ |
|
289
ba99740139d0
Added check and query when downloading is active while trying to exit
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
268
diff
changeset
|
126 |
iFeedView->CheckConfirmExit(); |
2 | 127 |
break; |
128 |
} |
|
129 |
case EEikCmdExit: |
|
130 |
{ |
|
60 | 131 |
// we want to prevent red button from closing podcatcher, and |
132 |
// instead we send it to background |
|
133 |
// however, we want to respect the task manager (fast swap) close |
|
134 |
// command, so we check if task manager is the focussed window group |
|
135 |
||
136 |
RWsSession& ws = iEikonEnv->WsSession(); |
|
137 |
TInt wgid = ws.GetFocusWindowGroup(); |
|
138 |
CApaWindowGroupName* gn = CApaWindowGroupName::NewLC(ws, wgid); |
|
139 |
TUid activeAppUid = gn->AppUid(); |
|
140 |
CleanupStack::PopAndDestroy(gn); |
|
141 |
||
142 |
const TUid KUidFastSwap = { 0x10207218 }; |
|
143 |
if (activeAppUid == KUidFastSwap) |
|
144 |
{ |
|
145 |
// closed by task manager |
|
146 |
Exit(); |
|
147 |
} |
|
148 |
else |
|
149 |
{ |
|
150 |
// red button pressed |
|
151 |
TApaTask task(iEikonEnv->WsSession()); |
|
152 |
task.SetWgId(iEikonEnv->RootWin().Identifier()); |
|
153 |
task.SendToBackground(); |
|
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)); |
|
138
6c8c5122867a
Removed the "Reset database" menu option; Updated help files
teknolog
parents:
65
diff
changeset
|
177 |
} else if (iSearchView->IsVisible()) { |
6c8c5122867a
Removed the "Reset database" menu option; Updated help files
teknolog
parents:
65
diff
changeset
|
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 |
{ |
|
268
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
208 |
iTabGroup = STATIC_CAST(CAknTabGroup*, iNaviPane->ResourceDecorator()->DecoratedControl()); |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
209 |
iTabGroup->SetObserver(this); |
347
b8d687bb7ca1
Experimenting with adding a new view to list all new shows
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
336
diff
changeset
|
210 |
|
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
211 |
iNaviStyle = ENaviTabGroup; |
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
212 |
UpdateQueueTabL(iPodcastModel->ShowEngine().GetNumDownloadingShows()); |
2 | 213 |
} |
214 |
||
347
b8d687bb7ca1
Experimenting with adding a new view to list all new shows
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
336
diff
changeset
|
215 |
void CPodcastAppUi::SetTabsDimmed(TBool aDimmed) |
b8d687bb7ca1
Experimenting with adding a new view to list all new shows
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
336
diff
changeset
|
216 |
{ |
b8d687bb7ca1
Experimenting with adding a new view to list all new shows
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
336
diff
changeset
|
217 |
iTabGroup->SetDimmed(aDimmed); |
b8d687bb7ca1
Experimenting with adding a new view to list all new shows
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
336
diff
changeset
|
218 |
} |
b8d687bb7ca1
Experimenting with adding a new view to list all new shows
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
336
diff
changeset
|
219 |
|
2 | 220 |
void CPodcastAppUi::TabChangedL (TInt aIndex) |
221 |
{ |
|
222 |
DP("CPodcastListView::TabChangedL "); |
|
223 |
||
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
224 |
if (iNaviStyle == ENaviTabGroup) |
11 | 225 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
226 |
TUid newview = TUid::Uid(0); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
227 |
TUid messageUid = TUid::Uid(0); |
49
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
228 |
if (aIndex == KTabIdFeeds) |
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
229 |
{ |
347
b8d687bb7ca1
Experimenting with adding a new view to list all new shows
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
336
diff
changeset
|
230 |
DP("one"); |
49
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
231 |
if (iFeedView->ViewingShows()) |
45
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
232 |
{ |
347
b8d687bb7ca1
Experimenting with adding a new view to list all new shows
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
336
diff
changeset
|
233 |
DP("two"); |
45
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
234 |
newview = KUidPodcastShowsViewID; |
347
b8d687bb7ca1
Experimenting with adding a new view to list all new shows
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
336
diff
changeset
|
235 |
messageUid = TUid::Uid(2); |
45
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
236 |
} |
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
237 |
else |
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
238 |
{ |
347
b8d687bb7ca1
Experimenting with adding a new view to list all new shows
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
336
diff
changeset
|
239 |
DP("three"); |
45
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
240 |
newview = KUidPodcastFeedViewID; |
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
241 |
} |
49
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
242 |
} |
347
b8d687bb7ca1
Experimenting with adding a new view to list all new shows
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
336
diff
changeset
|
243 |
else if (aIndex == KTabIdNew) |
b8d687bb7ca1
Experimenting with adding a new view to list all new shows
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
336
diff
changeset
|
244 |
{ |
b8d687bb7ca1
Experimenting with adding a new view to list all new shows
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
336
diff
changeset
|
245 |
newview = KUidPodcastShowsViewID; |
b8d687bb7ca1
Experimenting with adding a new view to list all new shows
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
336
diff
changeset
|
246 |
messageUid = KUidShowNewShows; |
b8d687bb7ca1
Experimenting with adding a new view to list all new shows
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
336
diff
changeset
|
247 |
} |
49
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
248 |
else if (aIndex == KTabIdQueue) |
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
249 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
250 |
newview = KUidPodcastQueueViewID; |
49
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
251 |
} |
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
252 |
else |
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
253 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
254 |
User::Leave(KErrTooBig); |
49
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 |
|
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
257 |
if(newview.iUid != 0) |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
258 |
{ |
347
b8d687bb7ca1
Experimenting with adding a new view to list all new shows
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
336
diff
changeset
|
259 |
DP("four"); |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
260 |
ActivateLocalViewL(newview, messageUid, KNullDesC8()); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
261 |
} |
2 | 262 |
} |
263 |
} |
|
264 |
||
265 |
void CPodcastAppUi::SetActiveTab(TInt aIndex) { |
|
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
266 |
if (iNaviStyle == ENaviTabGroup) |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
267 |
{ |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
268 |
iTabGroup->SetActiveTabByIndex(aIndex); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
269 |
} |
2 | 270 |
} |
271 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
272 |
void CPodcastAppUi::HandleTimeoutL(const CTimeout& /*aId*/, TInt /*aError*/) |
2 | 273 |
{ |
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
274 |
iFeedView->CheckResumeDownloadL(); |
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::UpdateQueueTabL(TInt aQueueLength) |
2 | 278 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
279 |
if (iNaviStyle == ENaviTabGroup) |
2 | 280 |
{ |
268
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
281 |
CFbsBitmap* bitmap; |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
282 |
CFbsBitmap* mask; |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
283 |
if (aQueueLength == 0) |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
284 |
{ |
268
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
285 |
AknIconUtils::CreateIconL(bitmap, |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
286 |
mask, |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
287 |
iEikonEnv->EikAppUi()->Application()->BitmapStoreName(), |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
288 |
EMbmPodcastTab_queue, |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
289 |
EMbmPodcastTab_queue_mask); |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
290 |
} |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
291 |
else if (aQueueLength == 1) |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
292 |
{ |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
293 |
|
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
294 |
AknIconUtils::CreateIconL(bitmap, |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
295 |
mask, |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
296 |
iEikonEnv->EikAppUi()->Application()->BitmapStoreName(), |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
297 |
EMbmPodcastTab_queue1, |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
298 |
EMbmPodcastTab_queue1_mask); |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
299 |
} |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
300 |
else if (aQueueLength == 2) |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
301 |
{ |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
302 |
|
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
303 |
AknIconUtils::CreateIconL(bitmap, |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
304 |
mask, |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
305 |
iEikonEnv->EikAppUi()->Application()->BitmapStoreName(), |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
306 |
EMbmPodcastTab_queue2, |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
307 |
EMbmPodcastTab_queue2_mask); |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
308 |
} |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
309 |
else |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
310 |
{ |
268
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
311 |
|
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
312 |
AknIconUtils::CreateIconL(bitmap, |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
313 |
mask, |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
314 |
iEikonEnv->EikAppUi()->Application()->BitmapStoreName(), |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
315 |
EMbmPodcastTab_queue3, |
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
316 |
EMbmPodcastTab_queue3_mask); |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
317 |
} |
268
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
318 |
|
4f37d00ca76e
Switched to icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
156
diff
changeset
|
319 |
iTabGroup->ReplaceTabL(EPodcastTabQueue, bitmap, mask); |
2 | 320 |
} |
321 |
} |
|
322 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
323 |
void CPodcastAppUi::TabLeftL() |
2 | 324 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
325 |
if (iNaviStyle == ENaviTabGroup) |
11 | 326 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
327 |
TInt ati = iTabGroup->ActiveTabIndex(); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
328 |
if(ati > 0) |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
329 |
{ |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
330 |
SetActiveTab(ati-1); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
331 |
TabChangedL(ati-1); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
332 |
} |
11 | 333 |
} |
2 | 334 |
} |
335 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
336 |
void CPodcastAppUi::TabRightL() |
2 | 337 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
338 |
if (iNaviStyle == ENaviTabGroup) |
11 | 339 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
340 |
TInt ati = iTabGroup->ActiveTabIndex(); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
341 |
if(ati < iTabGroup->TabCount()-1) |
11 | 342 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
343 |
SetActiveTab(ati+1); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
344 |
TabChangedL(ati+1); |
11 | 345 |
} |
346 |
} |
|
347 |
} |
|
13 | 348 |
|
349 |
void CPodcastAppUi::ConnectionSelectionStart() |
|
350 |
{ |
|
156
48cdb40709e7
Fix for bug 2819 - Crash when updating and connection set to "Always ask"
teknolog
parents:
138
diff
changeset
|
351 |
DP("CPodcastAppUi::ConnectionSelectionStart() BEGIN"); |
13 | 352 |
iFeedView->UpdateToolbar(EFalse); |
353 |
iShowsView->UpdateToolbar(EFalse); |
|
354 |
iQueueView->UpdateToolbar(EFalse); |
|
355 |
iSearchView->UpdateToolbar(EFalse); |
|
156
48cdb40709e7
Fix for bug 2819 - Crash when updating and connection set to "Always ask"
teknolog
parents:
138
diff
changeset
|
356 |
DP("CPodcastAppUi::ConnectionSelectionStart() END"); |
13 | 357 |
} |
358 |
||
359 |
void CPodcastAppUi::ConnectionSelectionEnd() |
|
360 |
{ |
|
156
48cdb40709e7
Fix for bug 2819 - Crash when updating and connection set to "Always ask"
teknolog
parents:
138
diff
changeset
|
361 |
DP("CPodcastAppUi::ConnectionSelectionEnd() BEGIN"); |
13 | 362 |
iFeedView->UpdateToolbar(ETrue); |
363 |
iShowsView->UpdateToolbar(ETrue); |
|
364 |
iQueueView->UpdateToolbar(ETrue); |
|
365 |
iSearchView->UpdateToolbar(ETrue); |
|
156
48cdb40709e7
Fix for bug 2819 - Crash when updating and connection set to "Always ask"
teknolog
parents:
138
diff
changeset
|
366 |
DP("CPodcastAppUi::ConnectionSelectionEnd() END"); |
13 | 367 |
} |
60 | 368 |
|
369 |
void CPodcastAppUi::GetErrorTextL(TDes &aErrorMessage, TInt aErrorCode) |
|
370 |
{ |
|
371 |
switch (aErrorCode) |
|
372 |
{ |
|
373 |
case KErrNotFound: |
|
374 |
{ |
|
375 |
HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_INVALID_ADDRESS); |
|
376 |
aErrorMessage.Copy(*error); |
|
377 |
CleanupStack::PopAndDestroy(error); |
|
378 |
} |
|
379 |
break; |
|
380 |
case KErrDiskFull: |
|
381 |
{ |
|
382 |
HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_DISK_FULL); |
|
383 |
aErrorMessage.Copy(*error); |
|
384 |
CleanupStack::PopAndDestroy(error); |
|
385 |
} |
|
386 |
break; |
|
387 |
case 404: |
|
388 |
{ |
|
389 |
HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_NOTFOUND); |
|
390 |
aErrorMessage.Copy(*error); |
|
391 |
CleanupStack::PopAndDestroy(error); |
|
392 |
} |
|
393 |
break; |
|
394 |
default: |
|
395 |
{ |
|
396 |
if (aErrorCode > 200) |
|
397 |
{ |
|
398 |
HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_HTTP); |
|
399 |
aErrorMessage.Format(*error, aErrorCode); |
|
400 |
CleanupStack::PopAndDestroy(error); |
|
401 |
} |
|
402 |
else |
|
403 |
{ |
|
404 |
HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_GENERAL); |
|
405 |
aErrorMessage.Format(*error, aErrorCode); |
|
406 |
CleanupStack::PopAndDestroy(error); |
|
407 |
} |
|
408 |
} |
|
409 |
break; |
|
410 |
} |
|
411 |
} |