author | Sebastian Brannstrom <sebastianb@symbian.org> |
Tue, 16 Nov 2010 13:05:42 +0000 | |
branch | RCL_3 |
changeset 369 | c683165bec63 |
parent 367 | 4b75876aa85a |
permissions | -rw-r--r-- |
2 | 1 |
/* |
2 |
* Copyright (c) 2007-2010 Sebastian Brannstrom, Lars Persson, EmbedDev AB |
|
3 |
* |
|
4 |
* All rights reserved. |
|
5 |
* This component and the accompanying materials are made available |
|
6 |
* under the terms of the License "Eclipse Public License v1.0" |
|
7 |
* which accompanies this distribution, and is available |
|
8 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 |
* |
|
10 |
* Initial Contributors: |
|
11 |
* EmbedDev AB - initial contribution. |
|
12 |
* |
|
13 |
* Contributors: |
|
14 |
* |
|
15 |
* Description: |
|
16 |
* |
|
17 |
*/ |
|
18 |
||
19 |
#include "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> |
|
272
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
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"); |
|
243
44d205147a83
Fix for bug 3730 by switching to proper S3 context menu handling
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
203
diff
changeset
|
47 |
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
|
48 |
CAknAppUi::EAknSingleClickCompatible | CAknAppUi::EAknTouchCompatible ); |
2 | 49 |
|
13 | 50 |
iPodcastModel->ConnectionEngine().AddObserver(this); |
51 |
||
2 | 52 |
DP("Constructing FeedView"); |
53 |
iFeedView = CPodcastFeedView::NewL(*iPodcastModel); |
|
54 |
this->AddViewL(iFeedView); |
|
55 |
||
56 |
DP("Constructing ShowsView"); |
|
57 |
iShowsView = CPodcastShowsView::NewL(*iPodcastModel); |
|
58 |
this->AddViewL(iShowsView); |
|
59 |
||
60 |
DP("Constructing QueueView"); |
|
61 |
iQueueView = CPodcastQueueView::NewL(*iPodcastModel); |
|
62 |
this->AddViewL(iQueueView); |
|
63 |
||
64 |
DP("Constructing SearchView"); |
|
65 |
iSearchView = CPodcastSearchView::NewL(*iPodcastModel); |
|
66 |
this->AddViewL(iSearchView); |
|
67 |
||
68 |
DP("Constructing SettingsView"); |
|
69 |
iSettingsView = CPodcastSettingsView::NewL(*iPodcastModel); |
|
70 |
this->AddViewL(iSettingsView); |
|
71 |
||
72 |
iNaviPane =( CAknNavigationControlContainer * ) StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ); |
|
73 |
NaviShowTabGroupL(); |
|
74 |
||
75 |
// start a timer to let ConstructL finish before we display any dialogs or start downloading |
|
76 |
// this provides another entry point in HandleTimeout below |
|
77 |
iStartTimer = CTimeout::NewL(*this); |
|
78 |
iStartTimer->After(KDelayLaunch); |
|
79 |
DP("CPodcastAppUi::ConstructL() END"); |
|
80 |
} |
|
81 |
||
82 |
CPodcastAppUi::~CPodcastAppUi() |
|
83 |
{ |
|
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
84 |
if (iNaviStyle != ENaviEmpty) |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
85 |
{ |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
86 |
iNaviPane->Pop(); |
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 |
|
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
89 |
if(iNaviTabGroup) |
2 | 90 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
91 |
delete iNaviTabGroup; |
2 | 92 |
} |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
93 |
|
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
94 |
if (iNaviText) |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
95 |
{ |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
96 |
delete iNaviText; |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
97 |
} |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
98 |
|
2 | 99 |
delete iStartTimer; |
100 |
} |
|
101 |
||
102 |
// ----------------------------------------------------------------------------- |
|
103 |
// CPodcastAppUi::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane) |
|
104 |
// This function is called by the EIKON framework just before it displays |
|
105 |
// a menu pane. Its default implementation is empty, and by overriding it, |
|
106 |
// the application can set the state of menu items dynamically according |
|
107 |
// to the state of application data. |
|
108 |
// ------------------------------------------------------------------------------ |
|
109 |
// |
|
110 |
void CPodcastAppUi::DynInitMenuPaneL( |
|
111 |
TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/) |
|
112 |
{ |
|
113 |
// no implementation required |
|
114 |
} |
|
115 |
||
116 |
// ----------------------------------------------------------------------------- |
|
117 |
// CPodcastAppUi::HandleCommandL(TInt aCommand) |
|
118 |
// takes care of command handling |
|
119 |
// ----------------------------------------------------------------------------- |
|
120 |
// |
|
121 |
void CPodcastAppUi::HandleCommandL( TInt aCommand ) |
|
122 |
{ |
|
123 |
switch ( aCommand ) |
|
124 |
{ |
|
125 |
case EAknSoftkeyExit: |
|
126 |
{ |
|
292
655dbce90b70
Added check and query when downloading is active while trying to exit
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
272
diff
changeset
|
127 |
iFeedView->CheckConfirmExit(); |
2 | 128 |
break; |
129 |
} |
|
130 |
case EEikCmdExit: |
|
131 |
{ |
|
104
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
132 |
// 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
|
133 |
// instead we send it to background |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
134 |
// 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
|
135 |
// 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
|
136 |
|
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
137 |
RWsSession& ws = iEikonEnv->WsSession(); |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
138 |
TInt wgid = ws.GetFocusWindowGroup(); |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
139 |
CApaWindowGroupName* gn = CApaWindowGroupName::NewLC(ws, wgid); |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
140 |
TUid activeAppUid = gn->AppUid(); |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
141 |
CleanupStack::PopAndDestroy(gn); |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
142 |
|
203
cc2d961dbe57
S^3 has a different UID for the new task switcher
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
155
diff
changeset
|
143 |
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
|
144 |
if (activeAppUid == KUidFastSwapS3) |
104
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
145 |
{ |
302
cf14797d0023
Fix for broken check for active downloads when exiting
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
292
diff
changeset
|
146 |
DP("Exit called by task manager"); |
104
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
147 |
// closed by task manager |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
148 |
Exit(); |
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 |
else |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
151 |
{ |
302
cf14797d0023
Fix for broken check for active downloads when exiting
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
292
diff
changeset
|
152 |
DP("Red button pressed, going into background"); |
104
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
153 |
// red button pressed |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
154 |
TApaTask task(iEikonEnv->WsSession()); |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
155 |
task.SetWgId(iEikonEnv->RootWin().Identifier()); |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
156 |
task.SendToBackground(); |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
157 |
} |
2 | 158 |
break; |
159 |
} |
|
160 |
case EPodcastHelp: |
|
48 | 161 |
{ |
162 |
HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), HelpContextL()); |
|
2 | 163 |
} |
164 |
break; |
|
165 |
default: |
|
166 |
break; |
|
167 |
} |
|
168 |
} |
|
169 |
||
170 |
CArrayFix<TCoeHelpContext>* CPodcastAppUi::HelpContextL() const |
|
171 |
{ |
|
172 |
CArrayFixFlat<TCoeHelpContext>* array = |
|
173 |
new(ELeave)CArrayFixFlat<TCoeHelpContext>(1); |
|
174 |
CleanupStack::PushL(array); |
|
48 | 175 |
|
176 |
if (iFeedView->IsVisible()) { |
|
177 |
array->AppendL(TCoeHelpContext(KUidPodcast,KContextFeedsView)); |
|
178 |
} else if (iShowsView->IsVisible()) { |
|
179 |
array->AppendL(TCoeHelpContext(KUidPodcast,KContextShowsView)); |
|
140 | 180 |
} else if (iSearchView->IsVisible()) { |
181 |
array->AppendL(TCoeHelpContext(KUidPodcast,KContextSearch)); |
|
48 | 182 |
} else if (iQueueView->IsVisible()) { |
183 |
array->AppendL(TCoeHelpContext(KUidPodcast,KContextDownloadQueue)); |
|
184 |
} else { |
|
2 | 185 |
array->AppendL(TCoeHelpContext(KUidPodcast,KContextSettings)); |
186 |
} |
|
187 |
||
188 |
CleanupStack::Pop(array); |
|
189 |
return array; |
|
190 |
} |
|
191 |
||
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
192 |
void CPodcastAppUi::NaviSetTextL(TInt aResourceId) |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
193 |
{ |
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 |
if (iNaviStyle != ENaviEmpty) { |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
196 |
iNaviPane->Pop(); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
197 |
} |
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 |
HBufC* naviText = iEikonEnv->AllocReadResourceLC(aResourceId); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
200 |
iNaviText = iNaviPane->CreateNavigationLabelL(*naviText); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
201 |
|
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
202 |
iNaviPane->PushL(*iNaviText); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
203 |
|
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
204 |
CleanupStack::PopAndDestroy(naviText); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
205 |
|
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
206 |
iNaviStyle = ENaviText; |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
207 |
} |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
208 |
|
2 | 209 |
void CPodcastAppUi::NaviShowTabGroupL() |
210 |
{ |
|
272
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
211 |
iTabGroup = STATIC_CAST(CAknTabGroup*, iNaviPane->ResourceDecorator()->DecoratedControl()); |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
212 |
iTabGroup->SetObserver(this); |
367
4b75876aa85a
Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
304
diff
changeset
|
213 |
|
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
214 |
iNaviStyle = ENaviTabGroup; |
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
215 |
UpdateQueueTabL(iPodcastModel->ShowEngine().GetNumDownloadingShows()); |
2 | 216 |
} |
217 |
||
367
4b75876aa85a
Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
304
diff
changeset
|
218 |
void CPodcastAppUi::SetTabsDimmed(TBool aDimmed) |
4b75876aa85a
Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
304
diff
changeset
|
219 |
{ |
4b75876aa85a
Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
304
diff
changeset
|
220 |
iTabGroup->SetDimmed(aDimmed); |
4b75876aa85a
Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
304
diff
changeset
|
221 |
} |
4b75876aa85a
Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
304
diff
changeset
|
222 |
|
2 | 223 |
void CPodcastAppUi::TabChangedL (TInt aIndex) |
224 |
{ |
|
225 |
DP("CPodcastListView::TabChangedL "); |
|
226 |
||
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
227 |
if (iNaviStyle == ENaviTabGroup) |
11 | 228 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
229 |
TUid newview = TUid::Uid(0); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
230 |
TUid messageUid = TUid::Uid(0); |
49
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
231 |
if (aIndex == KTabIdFeeds) |
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
232 |
{ |
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
233 |
if (iFeedView->ViewingShows()) |
45
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
234 |
{ |
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
235 |
newview = KUidPodcastShowsViewID; |
367
4b75876aa85a
Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
304
diff
changeset
|
236 |
messageUid = TUid::Uid(2); |
45
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
237 |
} |
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
238 |
else |
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
239 |
{ |
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 |
} |
367
4b75876aa85a
Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
304
diff
changeset
|
243 |
else if (aIndex == KTabIdNew) |
4b75876aa85a
Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
304
diff
changeset
|
244 |
{ |
4b75876aa85a
Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
304
diff
changeset
|
245 |
newview = KUidPodcastShowsViewID; |
4b75876aa85a
Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
304
diff
changeset
|
246 |
messageUid = KUidShowNewShows; |
4b75876aa85a
Added new shows list
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
304
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 |
{ |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
259 |
ActivateLocalViewL(newview, messageUid, KNullDesC8()); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
260 |
} |
2 | 261 |
} |
262 |
} |
|
263 |
||
264 |
void CPodcastAppUi::SetActiveTab(TInt aIndex) { |
|
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
265 |
if (iNaviStyle == ENaviTabGroup) |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
266 |
{ |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
267 |
iTabGroup->SetActiveTabByIndex(aIndex); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
268 |
} |
2 | 269 |
} |
270 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
271 |
void CPodcastAppUi::HandleTimeoutL(const CTimeout& /*aId*/, TInt /*aError*/) |
2 | 272 |
{ |
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
273 |
iFeedView->CheckResumeDownloadL(); |
2 | 274 |
} |
275 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
276 |
void CPodcastAppUi::UpdateQueueTabL(TInt aQueueLength) |
2 | 277 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
278 |
if (iNaviStyle == ENaviTabGroup) |
2 | 279 |
{ |
272
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
280 |
CFbsBitmap* bitmap; |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
281 |
CFbsBitmap* mask; |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
282 |
if (aQueueLength == 0) |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
283 |
{ |
272
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
284 |
AknIconUtils::CreateIconL(bitmap, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
285 |
mask, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
286 |
iEikonEnv->EikAppUi()->Application()->BitmapStoreName(), |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
287 |
EMbmPodcastTab_queue, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
288 |
EMbmPodcastTab_queue_mask); |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
289 |
} |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
290 |
else if (aQueueLength == 1) |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
291 |
{ |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
292 |
|
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
293 |
AknIconUtils::CreateIconL(bitmap, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
294 |
mask, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
295 |
iEikonEnv->EikAppUi()->Application()->BitmapStoreName(), |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
296 |
EMbmPodcastTab_queue1, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
297 |
EMbmPodcastTab_queue1_mask); |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
298 |
} |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
299 |
else if (aQueueLength == 2) |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
300 |
{ |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
301 |
|
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
302 |
AknIconUtils::CreateIconL(bitmap, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
303 |
mask, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
304 |
iEikonEnv->EikAppUi()->Application()->BitmapStoreName(), |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
305 |
EMbmPodcastTab_queue2, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
306 |
EMbmPodcastTab_queue2_mask); |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
307 |
} |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
308 |
else |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
309 |
{ |
272
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
310 |
|
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
311 |
AknIconUtils::CreateIconL(bitmap, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
312 |
mask, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
313 |
iEikonEnv->EikAppUi()->Application()->BitmapStoreName(), |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
314 |
EMbmPodcastTab_queue3, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
315 |
EMbmPodcastTab_queue3_mask); |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
316 |
} |
272
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
317 |
|
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
318 |
iTabGroup->ReplaceTabL(EPodcastTabQueue, bitmap, mask); |
2 | 319 |
} |
320 |
} |
|
321 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
322 |
void CPodcastAppUi::TabLeftL() |
2 | 323 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
324 |
if (iNaviStyle == ENaviTabGroup) |
11 | 325 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
326 |
TInt ati = iTabGroup->ActiveTabIndex(); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
327 |
if(ati > 0) |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
328 |
{ |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
329 |
SetActiveTab(ati-1); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
330 |
TabChangedL(ati-1); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
331 |
} |
11 | 332 |
} |
2 | 333 |
} |
334 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
335 |
void CPodcastAppUi::TabRightL() |
2 | 336 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
337 |
if (iNaviStyle == ENaviTabGroup) |
11 | 338 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
339 |
TInt ati = iTabGroup->ActiveTabIndex(); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
340 |
if(ati < iTabGroup->TabCount()-1) |
11 | 341 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
342 |
SetActiveTab(ati+1); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
343 |
TabChangedL(ati+1); |
11 | 344 |
} |
345 |
} |
|
346 |
} |
|
13 | 347 |
|
348 |
void CPodcastAppUi::ConnectionSelectionStart() |
|
349 |
{ |
|
155
4ec84fbc7b27
Fix for bug 2819 - Crash when updating and connection set to "Always ask"
teknolog
parents:
140
diff
changeset
|
350 |
DP("CPodcastAppUi::ConnectionSelectionStart() BEGIN"); |
13 | 351 |
iFeedView->UpdateToolbar(EFalse); |
352 |
iShowsView->UpdateToolbar(EFalse); |
|
353 |
iQueueView->UpdateToolbar(EFalse); |
|
354 |
iSearchView->UpdateToolbar(EFalse); |
|
155
4ec84fbc7b27
Fix for bug 2819 - Crash when updating and connection set to "Always ask"
teknolog
parents:
140
diff
changeset
|
355 |
DP("CPodcastAppUi::ConnectionSelectionStart() END"); |
13 | 356 |
} |
357 |
||
358 |
void CPodcastAppUi::ConnectionSelectionEnd() |
|
359 |
{ |
|
155
4ec84fbc7b27
Fix for bug 2819 - Crash when updating and connection set to "Always ask"
teknolog
parents:
140
diff
changeset
|
360 |
DP("CPodcastAppUi::ConnectionSelectionEnd() BEGIN"); |
13 | 361 |
iFeedView->UpdateToolbar(ETrue); |
362 |
iShowsView->UpdateToolbar(ETrue); |
|
363 |
iQueueView->UpdateToolbar(ETrue); |
|
364 |
iSearchView->UpdateToolbar(ETrue); |
|
155
4ec84fbc7b27
Fix for bug 2819 - Crash when updating and connection set to "Always ask"
teknolog
parents:
140
diff
changeset
|
365 |
DP("CPodcastAppUi::ConnectionSelectionEnd() END"); |
13 | 366 |
} |
115
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
367 |
|
117
3b59b88b089e
Fixed Code Scanner L-issues; Further improvements to HTTP robustness
teknolog
parents:
115
diff
changeset
|
368 |
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
|
369 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
370 |
switch (aErrorCode) |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
371 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
372 |
case KErrNotFound: |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
373 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
374 |
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
|
375 |
aErrorMessage.Copy(*error); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
376 |
CleanupStack::PopAndDestroy(error); |
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 |
break; |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
379 |
case KErrDiskFull: |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
380 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
381 |
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
|
382 |
aErrorMessage.Copy(*error); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
383 |
CleanupStack::PopAndDestroy(error); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
384 |
} |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
385 |
break; |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
386 |
case 404: |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
387 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
388 |
HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_NOTFOUND); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
389 |
aErrorMessage.Copy(*error); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
390 |
CleanupStack::PopAndDestroy(error); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
391 |
} |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
392 |
break; |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
393 |
default: |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
394 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
395 |
if (aErrorCode > 200) |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
396 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
397 |
HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_HTTP); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
398 |
aErrorMessage.Format(*error, aErrorCode); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
399 |
CleanupStack::PopAndDestroy(error); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
400 |
} |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
401 |
else |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
402 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
403 |
HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_GENERAL); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
404 |
aErrorMessage.Format(*error, aErrorCode); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
405 |
CleanupStack::PopAndDestroy(error); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
406 |
} |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
407 |
} |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
408 |
break; |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
409 |
} |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
410 |
} |