author | Sebastian Brannstrom <sebastianb@symbian.org> |
Sat, 23 Oct 2010 16:38:32 +0100 | |
branch | RCL_3 |
changeset 274 | 03285b1fc18d |
parent 272 | e6d095ba6756 |
child 292 | 655dbce90b70 |
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 |
{ |
|
127 |
Exit(); |
|
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 |
{ |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
146 |
// closed by task manager |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
147 |
Exit(); |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
148 |
} |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
149 |
else |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
150 |
{ |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
151 |
// red button pressed |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
152 |
TApaTask task(iEikonEnv->WsSession()); |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
153 |
task.SetWgId(iEikonEnv->RootWin().Identifier()); |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
154 |
task.SendToBackground(); |
4d1286f7f982
Fix for bug 2114 - Podcatcher wont close from the "open apps" menu
teknolog
parents:
99
diff
changeset
|
155 |
} |
2 | 156 |
break; |
157 |
} |
|
158 |
case EPodcastHelp: |
|
48 | 159 |
{ |
160 |
HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), HelpContextL()); |
|
2 | 161 |
} |
162 |
break; |
|
163 |
default: |
|
164 |
break; |
|
165 |
} |
|
166 |
} |
|
167 |
||
168 |
CArrayFix<TCoeHelpContext>* CPodcastAppUi::HelpContextL() const |
|
169 |
{ |
|
170 |
CArrayFixFlat<TCoeHelpContext>* array = |
|
171 |
new(ELeave)CArrayFixFlat<TCoeHelpContext>(1); |
|
172 |
CleanupStack::PushL(array); |
|
48 | 173 |
|
174 |
if (iFeedView->IsVisible()) { |
|
175 |
array->AppendL(TCoeHelpContext(KUidPodcast,KContextFeedsView)); |
|
176 |
} else if (iShowsView->IsVisible()) { |
|
177 |
array->AppendL(TCoeHelpContext(KUidPodcast,KContextShowsView)); |
|
140 | 178 |
} else if (iSearchView->IsVisible()) { |
179 |
array->AppendL(TCoeHelpContext(KUidPodcast,KContextSearch)); |
|
48 | 180 |
} else if (iQueueView->IsVisible()) { |
181 |
array->AppendL(TCoeHelpContext(KUidPodcast,KContextDownloadQueue)); |
|
182 |
} else { |
|
2 | 183 |
array->AppendL(TCoeHelpContext(KUidPodcast,KContextSettings)); |
184 |
} |
|
185 |
||
186 |
CleanupStack::Pop(array); |
|
187 |
return array; |
|
188 |
} |
|
189 |
||
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
190 |
void CPodcastAppUi::NaviSetTextL(TInt aResourceId) |
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 |
|
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
193 |
if (iNaviStyle != ENaviEmpty) { |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
194 |
iNaviPane->Pop(); |
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 |
|
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
197 |
HBufC* naviText = iEikonEnv->AllocReadResourceLC(aResourceId); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
198 |
iNaviText = iNaviPane->CreateNavigationLabelL(*naviText); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
199 |
|
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
200 |
iNaviPane->PushL(*iNaviText); |
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 |
CleanupStack::PopAndDestroy(naviText); |
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 |
iNaviStyle = ENaviText; |
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 |
|
2 | 207 |
void CPodcastAppUi::NaviShowTabGroupL() |
208 |
{ |
|
272
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
209 |
// if (iNaviStyle != ENaviEmpty) { |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
210 |
// iNaviPane->Pop(); |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
211 |
// } |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
212 |
// |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
213 |
// iNaviTabGroup = iNaviPane->CreateTabGroupL(); |
2 | 214 |
|
272
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
215 |
iTabGroup = STATIC_CAST(CAknTabGroup*, iNaviPane->ResourceDecorator()->DecoratedControl()); |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
216 |
iTabGroup->SetObserver(this); |
2 | 217 |
|
272
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
218 |
// iTabGroup->SetTabFixedWidthL(EAknTabWidthWithTwoTabs); |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
219 |
// |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
220 |
// HBufC *label1 = iEikonEnv->AllocReadResourceLC(R_TABGROUP_FEEDS); |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
221 |
// iTabGroup->AddTabL(KTabIdFeeds,*label1); |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
222 |
// |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
223 |
// HBufC *label3 = iEikonEnv->AllocReadResourceLC(R_TABGROUP_QUEUE); |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
224 |
// iTabGroup->AddTabL(KTabIdQueue,*label3); |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
225 |
// |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
226 |
// CleanupStack::PopAndDestroy(label3); |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
227 |
// CleanupStack::PopAndDestroy(label1); |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
228 |
// |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
229 |
// iTabGroup->SetActiveTabByIndex(0); |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
230 |
// |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
231 |
// iNaviPane->PushL(*iNaviTabGroup); |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
232 |
iNaviStyle = ENaviTabGroup; |
272
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
233 |
// |
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
234 |
UpdateQueueTabL(iPodcastModel->ShowEngine().GetNumDownloadingShows()); |
2 | 235 |
} |
236 |
||
237 |
void CPodcastAppUi::TabChangedL (TInt aIndex) |
|
238 |
{ |
|
239 |
DP("CPodcastListView::TabChangedL "); |
|
240 |
||
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
241 |
if (iNaviStyle == ENaviTabGroup) |
11 | 242 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
243 |
TUid newview = TUid::Uid(0); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
244 |
TUid messageUid = TUid::Uid(0); |
49
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
245 |
if (aIndex == KTabIdFeeds) |
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
246 |
{ |
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
247 |
if (iFeedView->ViewingShows()) |
45
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 |
newview = KUidPodcastShowsViewID; |
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 |
else |
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
252 |
{ |
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
253 |
newview = KUidPodcastFeedViewID; |
56d4e0784e5d
Nicer way to handle back from queue view to feed/show view
teknolog
parents:
35
diff
changeset
|
254 |
} |
49
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
255 |
} |
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
256 |
else if (aIndex == KTabIdQueue) |
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
257 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
258 |
newview = KUidPodcastQueueViewID; |
49
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
259 |
} |
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
260 |
else |
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 |
User::Leave(KErrTooBig); |
49
43e204e6ae2e
Fix for accidental merge regressions. Text fixes for tool tip and settings.
teknolog
parents:
48
diff
changeset
|
263 |
} |
24
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 |
if(newview.iUid != 0) |
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 |
ActivateLocalViewL(newview, messageUid, KNullDesC8()); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
268 |
} |
2 | 269 |
} |
270 |
} |
|
271 |
||
272 |
void CPodcastAppUi::SetActiveTab(TInt aIndex) { |
|
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
273 |
if (iNaviStyle == ENaviTabGroup) |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
274 |
{ |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
275 |
iTabGroup->SetActiveTabByIndex(aIndex); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
276 |
} |
2 | 277 |
} |
278 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
279 |
void CPodcastAppUi::HandleTimeoutL(const CTimeout& /*aId*/, TInt /*aError*/) |
2 | 280 |
{ |
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
281 |
iFeedView->CheckResumeDownloadL(); |
2 | 282 |
} |
283 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
284 |
void CPodcastAppUi::UpdateQueueTabL(TInt aQueueLength) |
2 | 285 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
286 |
if (iNaviStyle == ENaviTabGroup) |
2 | 287 |
{ |
272
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
288 |
CFbsBitmap* bitmap; |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
289 |
CFbsBitmap* mask; |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
290 |
if (aQueueLength == 0) |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
291 |
{ |
272
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
292 |
AknIconUtils::CreateIconL(bitmap, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
293 |
mask, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
294 |
iEikonEnv->EikAppUi()->Application()->BitmapStoreName(), |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
295 |
EMbmPodcastTab_queue, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
296 |
EMbmPodcastTab_queue_mask); |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
297 |
} |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
298 |
else if (aQueueLength == 1) |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
299 |
{ |
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 |
AknIconUtils::CreateIconL(bitmap, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
302 |
mask, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
303 |
iEikonEnv->EikAppUi()->Application()->BitmapStoreName(), |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
304 |
EMbmPodcastTab_queue1, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
305 |
EMbmPodcastTab_queue1_mask); |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
306 |
} |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
307 |
else if (aQueueLength == 2) |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
308 |
{ |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
309 |
|
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
310 |
AknIconUtils::CreateIconL(bitmap, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
311 |
mask, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
312 |
iEikonEnv->EikAppUi()->Application()->BitmapStoreName(), |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
313 |
EMbmPodcastTab_queue2, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
314 |
EMbmPodcastTab_queue2_mask); |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
315 |
} |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
316 |
else |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
317 |
{ |
272
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
318 |
|
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
319 |
AknIconUtils::CreateIconL(bitmap, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
320 |
mask, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
321 |
iEikonEnv->EikAppUi()->Application()->BitmapStoreName(), |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
322 |
EMbmPodcastTab_queue3, |
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
323 |
EMbmPodcastTab_queue3_mask); |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
324 |
} |
272
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
325 |
|
e6d095ba6756
Icons in tabs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
243
diff
changeset
|
326 |
iTabGroup->ReplaceTabL(EPodcastTabQueue, bitmap, mask); |
2 | 327 |
} |
328 |
} |
|
329 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
330 |
void CPodcastAppUi::TabLeftL() |
2 | 331 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
332 |
if (iNaviStyle == ENaviTabGroup) |
11 | 333 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
334 |
TInt ati = iTabGroup->ActiveTabIndex(); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
335 |
if(ati > 0) |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
336 |
{ |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
337 |
SetActiveTab(ati-1); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
338 |
TabChangedL(ati-1); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
339 |
} |
11 | 340 |
} |
2 | 341 |
} |
342 |
||
35
66c5303f3610
A ton of CodeScanner fixes (high issues) - but not all
Brendan Donegan <brendand@symbian.org>
parents:
24
diff
changeset
|
343 |
void CPodcastAppUi::TabRightL() |
2 | 344 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
345 |
if (iNaviStyle == ENaviTabGroup) |
11 | 346 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
347 |
TInt ati = iTabGroup->ActiveTabIndex(); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
348 |
if(ati < iTabGroup->TabCount()-1) |
11 | 349 |
{ |
24
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
350 |
SetActiveTab(ati+1); |
ca50ea154990
Moved search result title to navipane. Fixed but 1832
teknolog
parents:
16
diff
changeset
|
351 |
TabChangedL(ati+1); |
11 | 352 |
} |
353 |
} |
|
354 |
} |
|
13 | 355 |
|
356 |
void CPodcastAppUi::ConnectionSelectionStart() |
|
357 |
{ |
|
155
4ec84fbc7b27
Fix for bug 2819 - Crash when updating and connection set to "Always ask"
teknolog
parents:
140
diff
changeset
|
358 |
DP("CPodcastAppUi::ConnectionSelectionStart() BEGIN"); |
13 | 359 |
iFeedView->UpdateToolbar(EFalse); |
360 |
iShowsView->UpdateToolbar(EFalse); |
|
361 |
iQueueView->UpdateToolbar(EFalse); |
|
362 |
iSearchView->UpdateToolbar(EFalse); |
|
155
4ec84fbc7b27
Fix for bug 2819 - Crash when updating and connection set to "Always ask"
teknolog
parents:
140
diff
changeset
|
363 |
DP("CPodcastAppUi::ConnectionSelectionStart() END"); |
13 | 364 |
} |
365 |
||
366 |
void CPodcastAppUi::ConnectionSelectionEnd() |
|
367 |
{ |
|
155
4ec84fbc7b27
Fix for bug 2819 - Crash when updating and connection set to "Always ask"
teknolog
parents:
140
diff
changeset
|
368 |
DP("CPodcastAppUi::ConnectionSelectionEnd() BEGIN"); |
13 | 369 |
iFeedView->UpdateToolbar(ETrue); |
370 |
iShowsView->UpdateToolbar(ETrue); |
|
371 |
iQueueView->UpdateToolbar(ETrue); |
|
372 |
iSearchView->UpdateToolbar(ETrue); |
|
155
4ec84fbc7b27
Fix for bug 2819 - Crash when updating and connection set to "Always ask"
teknolog
parents:
140
diff
changeset
|
373 |
DP("CPodcastAppUi::ConnectionSelectionEnd() END"); |
13 | 374 |
} |
115
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
375 |
|
117
3b59b88b089e
Fixed Code Scanner L-issues; Further improvements to HTTP robustness
teknolog
parents:
115
diff
changeset
|
376 |
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
|
377 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
378 |
switch (aErrorCode) |
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 |
case KErrNotFound: |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
381 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
382 |
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
|
383 |
aErrorMessage.Copy(*error); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
384 |
CleanupStack::PopAndDestroy(error); |
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 |
break; |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
387 |
case KErrDiskFull: |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
388 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
389 |
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
|
390 |
aErrorMessage.Copy(*error); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
391 |
CleanupStack::PopAndDestroy(error); |
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 |
break; |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
394 |
case 404: |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
395 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
396 |
HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_NOTFOUND); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
397 |
aErrorMessage.Copy(*error); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
398 |
CleanupStack::PopAndDestroy(error); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
399 |
} |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
400 |
break; |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
401 |
default: |
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 |
if (aErrorCode > 200) |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
404 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
405 |
HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_HTTP); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
406 |
aErrorMessage.Format(*error, aErrorCode); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
407 |
CleanupStack::PopAndDestroy(error); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
408 |
} |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
409 |
else |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
410 |
{ |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
411 |
HBufC* error = iCoeEnv->AllocReadResourceLC(R_ERROR_GENERAL); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
412 |
aErrorMessage.Format(*error, aErrorCode); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
413 |
CleanupStack::PopAndDestroy(error); |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
414 |
} |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
415 |
} |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
416 |
break; |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
417 |
} |
d87e984bd8b8
Even more robustness improvements for HTTP client - specifically disk full problems
teknolog
parents:
104
diff
changeset
|
418 |
} |