author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 13 Oct 2010 14:40:19 +0300 | |
branch | RCL_3 |
changeset 81 | 42552535c1ac |
parent 66 | 8b7f4e561641 |
permissions | -rw-r--r-- |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
66 | 2 |
* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
66 | 14 |
* Description: This module contains the implementation of CIAUpdateMainView class |
15 |
* member functions. |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
* |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
*/ |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
|
66 | 19 |
|
20 |
||
21 |
#include <eikmenup.h> |
|
22 |
#include <aknViewAppUi.h> |
|
23 |
#include <akntitle.h> |
|
24 |
#include <aknnavi.h> // CAknNavigationControlContainer |
|
25 |
#include <aknnavide.h> // CAknNavigationDecorator |
|
26 |
#include <AknUtils.h> |
|
27 |
#include <aknmessagequerydialog.h> // CAknMessageQueryDialog |
|
28 |
#include <akntoolbar.h> |
|
29 |
#include <StringLoader.h> |
|
30 |
#include <featmgr.h> |
|
31 |
#include <iaupdate.rsg> |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
32 |
|
66 | 33 |
#include "iaupdate.hrh" |
34 |
#include "iaupdatemainview.h" |
|
35 |
#include "iaupdatemaincontainer.h" |
|
36 |
#include "iaupdatenode.h" |
|
37 |
#include "iaupdatefwnode.h" |
|
38 |
#include "iaupdatebasenode.h" |
|
39 |
#include "iaupdatedialogutil.h" |
|
40 |
#include "iaupdatestatusdialog.h" |
|
41 |
#include "iaupdateappui.h" |
|
42 |
#include "iaupdateuicontroller.h" |
|
43 |
#include "iaupdatedeputils.h" |
|
44 |
#include "iaupdatedebug.h" |
|
45 |
#include "iaupdatefwupdatehandler.h" |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
46 |
|
66 | 47 |
//CONSTANTS |
48 |
const TInt KKiloByte = 1024; |
|
49 |
const TInt KMegaByte = 1024 * 1024; |
|
50 |
const TInt KMaxShownInKiloBytes = 10 * KMegaByte; |
|
51 |
const TInt KSelInfoArrayGranularity = 3; |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
52 |
|
66 | 53 |
//MACROS |
54 |
_LIT( KSpace, " " ); |
|
55 |
||
56 |
// ============================ MEMBER FUNCTIONS =============================== |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
57 |
|
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
58 |
|
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
59 |
|
66 | 60 |
// ----------------------------------------------------------------------------- |
61 |
// CIAUpdateMainView::NewL |
|
62 |
// Two-phased constructor. |
|
63 |
// ----------------------------------------------------------------------------- |
|
64 |
// |
|
65 |
CIAUpdateMainView* CIAUpdateMainView::NewL( const TRect& aRect ) |
|
66 |
{ |
|
67 |
CIAUpdateMainView* self = CIAUpdateMainView::NewLC( aRect ); |
|
68 |
CleanupStack::Pop(self); |
|
69 |
return self; |
|
70 |
} |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
71 |
|
66 | 72 |
// ----------------------------------------------------------------------------- |
73 |
// CIAUpdateMainView::NewLC |
|
74 |
// |
|
75 |
// ----------------------------------------------------------------------------- |
|
76 |
// |
|
77 |
CIAUpdateMainView* CIAUpdateMainView::NewLC( const TRect& aRect ) |
|
78 |
{ |
|
79 |
CIAUpdateMainView* self = new (ELeave) CIAUpdateMainView(); |
|
80 |
CleanupStack::PushL( self ); |
|
81 |
self->ConstructL( aRect ); |
|
82 |
return self; |
|
83 |
} |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
84 |
|
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
85 |
// ----------------------------------------------------------------------------- |
66 | 86 |
// CIAUpdateMainView::CIAUpdateMainView |
87 |
// C++ default constructor can NOT contain any code, that |
|
88 |
// might leave. |
|
89 |
// ----------------------------------------------------------------------------- |
|
90 |
// |
|
91 |
CIAUpdateMainView::CIAUpdateMainView() |
|
92 |
{ |
|
93 |
} |
|
94 |
||
95 |
// ----------------------------------------------------------------------------- |
|
96 |
// CIAUpdateMainView::~CIAUpdateMainView |
|
97 |
// Destructor |
|
98 |
// ----------------------------------------------------------------------------- |
|
99 |
// |
|
100 |
CIAUpdateMainView::~CIAUpdateMainView() |
|
101 |
{ |
|
102 |
delete iDecorator; |
|
103 |
iAllNodes.Close(); |
|
104 |
if ( iContainer ) |
|
105 |
{ |
|
106 |
AppUi()->RemoveFromStack( iContainer ); |
|
107 |
delete iContainer; |
|
108 |
} |
|
109 |
delete iFwUpdateHandler; |
|
110 |
} |
|
111 |
// ----------------------------------------------------------------------------- |
|
112 |
// CIAUpdateMainView::ConstructL |
|
113 |
// Symbian 2nd phase constructor can leave. |
|
114 |
// ----------------------------------------------------------------------------- |
|
115 |
// |
|
116 |
void CIAUpdateMainView::ConstructL( const TRect& /*aRect*/ ) |
|
117 |
{ |
|
118 |
BaseConstructL( R_IAUPDATE_MAIN_VIEW ); |
|
119 |
Toolbar()->SetItemDimmed( EIAUpdateCmdStartUpdate, ETrue, ETrue ); |
|
120 |
Toolbar()->SetItemDimmed( EIAUpdateCmdMarkedUpdateDetails, ETrue, ETrue ); |
|
121 |
Toolbar()->SetItemDimmed( EIAUpdateCmdUpdateHistory, ETrue, ETrue ); |
|
122 |
Toolbar()->SetToolbarObserver( this ); |
|
123 |
iFwUpdateHandler = CIAUpdateFWUpdateHandler::NewL(); |
|
124 |
} |
|
125 |
||
126 |
// ----------------------------------------------------------------------------- |
|
127 |
// CIAUpdateMainView::RefreshL |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
128 |
// Refreshes update list |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
129 |
// ----------------------------------------------------------------------------- |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
130 |
// |
66 | 131 |
void CIAUpdateMainView::RefreshL( const RPointerArray<MIAUpdateNode>& aNodes, |
132 |
const RPointerArray<MIAUpdateFwNode>& aFwNodes, |
|
133 |
TInt aError ) |
|
134 |
{ |
|
135 |
IAUPDATE_TRACE("[IAUPDATE] CIAUpdateMainView::RefreshL begin"); |
|
136 |
iRefreshError = aError; |
|
137 |
iAllNodes.Reset(); |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
138 |
|
66 | 139 |
if ( aFwNodes.Count() > 0 ) |
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
140 |
{ |
66 | 141 |
IAUPDATE_TRACE("[IAUPDATE] CIAUpdateMainView::RefreshL hard code importance"); |
142 |
//hardcode the importance of firmware as Critical |
|
143 |
for ( TInt i = 0; i < aFwNodes.Count(); i++ ) |
|
144 |
{ |
|
145 |
aFwNodes[i]->Base().SetImportance( MIAUpdateBaseNode::ECritical ); |
|
146 |
} |
|
147 |
||
148 |
//either NSU or FOTA available |
|
149 |
if ( aFwNodes.Count() == 1 ) |
|
150 |
{ |
|
151 |
IAUPDATE_TRACE("[IAUPDATE] CIAUpdateMainView::RefreshL either NSU or FOTA available"); |
|
152 |
MIAUpdateAnyNode* node = aFwNodes[0]; |
|
153 |
User::LeaveIfError( iAllNodes.Append( node ) ); |
|
154 |
} |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
155 |
|
66 | 156 |
//both NSU and FOTA available, show only FOTA node |
157 |
if ( aFwNodes.Count() == 2 ) |
|
158 |
{ |
|
159 |
IAUPDATE_TRACE("[IAUPDATE] CIAUpdateMainView::RefreshL both NSU and FOTA available"); |
|
160 |
MIAUpdateAnyNode* node1 = aFwNodes[0]; |
|
161 |
MIAUpdateFwNode* fwnode = static_cast<MIAUpdateFwNode*>( node1 ); |
|
162 |
if ( fwnode->FwType() == MIAUpdateFwNode::EFotaDp2 ) |
|
163 |
{ |
|
164 |
User::LeaveIfError( iAllNodes.Append( node1 ) ); |
|
165 |
} |
|
166 |
else |
|
167 |
{ |
|
168 |
MIAUpdateAnyNode* node2 = aFwNodes[1]; |
|
169 |
User::LeaveIfError( iAllNodes.Append( node2 ) ); |
|
170 |
} |
|
171 |
} |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
172 |
} |
66 | 173 |
|
174 |
||
175 |
for( TInt i = 0; i < aNodes.Count(); ++i ) |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
176 |
{ |
66 | 177 |
MIAUpdateAnyNode* node = aNodes[i]; |
178 |
User::LeaveIfError( iAllNodes.Append( node ) ); |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
179 |
} |
66 | 180 |
|
181 |
if( iContainer ) |
|
182 |
{ |
|
183 |
iContainer->RefreshL( iAllNodes, iRefreshError ); |
|
184 |
SetSelectedIndicesL(); |
|
185 |
DynInitToolbarL( R_IAUPDATE_MAIN_TOOLBAR, Toolbar() ); |
|
186 |
} |
|
187 |
Toolbar()->SetItemDimmed( EIAUpdateCmdUpdateHistory, EFalse, ETrue ); |
|
188 |
} |
|
189 |
||
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
190 |
|
66 | 191 |
// ----------------------------------------------------------------------------- |
192 |
// CIAUpdateMainView::GetCurrentNode |
|
193 |
// |
|
194 |
// ----------------------------------------------------------------------------- |
|
195 |
// |
|
196 |
MIAUpdateAnyNode* CIAUpdateMainView::GetCurrentNode() |
|
197 |
{ |
|
198 |
if ( iContainer ) |
|
199 |
{ |
|
200 |
return iContainer->GetCurrentNode( iAllNodes ); |
|
201 |
} |
|
202 |
return NULL; |
|
203 |
} |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
204 |
|
66 | 205 |
// ----------------------------------------------------------------------------- |
206 |
// CIAUpdateMainView::GetSelectedNode |
|
207 |
// |
|
208 |
// ----------------------------------------------------------------------------- |
|
209 |
// |
|
210 |
MIAUpdateAnyNode* CIAUpdateMainView::GetSelectedNode() |
|
211 |
{ |
|
212 |
MIAUpdateAnyNode* selectedNode = NULL; |
|
213 |
for( TInt i = 0; i < iAllNodes.Count() && !selectedNode ; ++i ) |
|
214 |
{ |
|
215 |
if ( iAllNodes[i]->Base().IsSelected() ) |
|
216 |
{ |
|
217 |
selectedNode = iAllNodes[i]; |
|
218 |
} |
|
219 |
} |
|
220 |
return selectedNode; |
|
221 |
} |
|
222 |
||
223 |
// ----------------------------------------------------------------------------- |
|
224 |
// CIAUpdateMainView::Id |
|
225 |
// Get Uid of this view |
|
226 |
// ----------------------------------------------------------------------------- |
|
227 |
// |
|
228 |
TUid CIAUpdateMainView::Id() const |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
229 |
{ |
66 | 230 |
return TUid::Uid( EIAUpdateMainViewId ); |
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
231 |
} |
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
232 |
|
66 | 233 |
// ----------------------------------------------------------------------------- |
234 |
// CIAUpdateMainView::HandleCommandL |
|
235 |
// |
|
236 |
// ----------------------------------------------------------------------------- |
|
237 |
// |
|
238 |
void CIAUpdateMainView::HandleCommandL( TInt aCommand ) |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
239 |
{ |
66 | 240 |
switch( aCommand ) |
241 |
{ |
|
242 |
case EIAUpdateCmdStartUpdate: |
|
243 |
{ |
|
244 |
RPointerArray<MIAUpdateAnyNode> selectedNodes; |
|
245 |
CleanupClosePushL( selectedNodes ); |
|
246 |
GetSelectedNodesL( selectedNodes ); |
|
247 |
if ( selectedNodes[0]->NodeType() == MIAUpdateAnyNode::ENodeTypeFw ) |
|
248 |
{ |
|
249 |
//the marking logic will make sure firmware won't be marked with normal sis updates |
|
250 |
//at the same time. |
|
251 |
iFwUpdateHandler->FirmWareUpdatewithFOTA(); |
|
252 |
} |
|
253 |
else |
|
254 |
{ |
|
255 |
AppUi()->HandleCommandL( aCommand ); |
|
256 |
} |
|
257 |
CleanupStack::PopAndDestroy( &selectedNodes ); |
|
258 |
break; |
|
259 |
} |
|
260 |
case EIAUpdateCmdUpdateWithPC: |
|
261 |
{ |
|
262 |
iFwUpdateHandler->FirmWareUpdatewithNSU(); |
|
263 |
break; |
|
264 |
} |
|
265 |
case EIAUpdateCmdSettings: |
|
266 |
{ |
|
267 |
Toolbar()->SetToolbarVisibility( EFalse ); |
|
268 |
AppUi()->HandleCommandL( aCommand ); |
|
269 |
Toolbar()->SetToolbarVisibility( ETrue ); |
|
270 |
break; |
|
271 |
} |
|
272 |
case EAknSoftkeyMark: |
|
273 |
{ |
|
274 |
iContainer->HandleMarkCommandL( EAknCmdMark ); |
|
275 |
break; |
|
276 |
} |
|
277 |
case EAknSoftkeyUnmark: |
|
278 |
{ |
|
279 |
iContainer->HandleMarkCommandL( EAknCmdUnmark ); |
|
280 |
break; |
|
281 |
} |
|
282 |
case EAknCmdMark: |
|
283 |
case EAknCmdUnmark: |
|
284 |
{ |
|
285 |
iContainer->HandleMarkCommandL( aCommand ); |
|
286 |
break; |
|
287 |
} |
|
288 |
default: |
|
289 |
{ |
|
290 |
AppUi()->HandleCommandL( aCommand ); |
|
291 |
break; |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
292 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
293 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
294 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
295 |
|
66 | 296 |
// ----------------------------------------------------------------------------- |
297 |
// CIAUpdateMainView::DynInitMenuPaneL |
|
298 |
// Dim options which are not availble in empty list. |
|
299 |
// Set Mark/Unmark option |
|
300 |
// ----------------------------------------------------------------------------- |
|
301 |
// |
|
302 |
void CIAUpdateMainView::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ) |
|
303 |
{ |
|
304 |
if( aResourceId == R_IAUPDATE_MAIN_MENU ) |
|
305 |
{ |
|
306 |
if ( !FeatureManager::FeatureSupported( KFeatureIdHelp ) ) |
|
307 |
{ |
|
308 |
aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue ); |
|
309 |
} |
|
310 |
RPointerArray<MIAUpdateAnyNode> selectedNodes; |
|
311 |
CleanupClosePushL( selectedNodes ); |
|
312 |
GetSelectedNodesL( selectedNodes ); |
|
81
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
313 |
|
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
314 |
|
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
315 |
MIAUpdateAnyNode* currentNode = iContainer->GetCurrentNode( iAllNodes ); |
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
316 |
if( currentNode ) |
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
317 |
{ |
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
318 |
TBool selected = EFalse; |
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
319 |
for( TInt i = 0; i < selectedNodes.Count() && !selected; ++i ) |
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
320 |
{ |
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
321 |
MIAUpdateAnyNode* node = selectedNodes[i]; |
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
322 |
if( node == currentNode ) |
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
323 |
{ |
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
324 |
selected = ETrue; |
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
325 |
} |
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
326 |
} |
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
327 |
if ( selected ) |
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
328 |
{ |
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
329 |
aMenuPane->SetItemDimmed( EAknCmdMark, ETrue ); |
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
330 |
} |
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
331 |
else |
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
332 |
{ |
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
333 |
aMenuPane->SetItemDimmed( EAknCmdUnmark, ETrue ); |
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
334 |
} |
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
335 |
} |
42552535c1ac
Revision: 201038
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
336 |
|
66 | 337 |
if ( selectedNodes.Count() ) |
338 |
{ |
|
339 |
if ( selectedNodes[0]->NodeType() == MIAUpdateAnyNode::ENodeTypeFw ) |
|
340 |
{ |
|
341 |
//firmware is selected |
|
342 |
MIAUpdateFwNode* node = static_cast<MIAUpdateFwNode*>( selectedNodes[0] ); |
|
343 |
||
344 |
if ( node->FwType() == MIAUpdateFwNode::EFotaDp2 ) |
|
345 |
{ |
|
346 |
aMenuPane->SetItemDimmed( EIAUpdateCmdUpdateWithPC, ETrue ); |
|
347 |
} |
|
348 |
||
349 |
if ( node->FwType() == MIAUpdateFwNode::EFotiNsu ) |
|
350 |
{ |
|
351 |
aMenuPane->SetItemDimmed( EIAUpdateCmdStartUpdate, ETrue ); |
|
352 |
} |
|
353 |
} |
|
354 |
else |
|
355 |
{ |
|
356 |
//firmware is not selected, only sis |
|
357 |
aMenuPane->SetItemDimmed( EIAUpdateCmdUpdateWithPC, ETrue ); |
|
358 |
} |
|
359 |
} |
|
360 |
else |
|
361 |
{ |
|
362 |
aMenuPane->SetItemDimmed( EIAUpdateCmdStartUpdate, ETrue ); |
|
363 |
aMenuPane->SetItemDimmed( EIAUpdateCmdUpdateWithPC, ETrue ); |
|
364 |
} |
|
365 |
CleanupStack::PopAndDestroy( &selectedNodes ); |
|
366 |
} |
|
367 |
} |
|
368 |
||
369 |
// ----------------------------------------------------------------------------- |
|
370 |
// CIAUpdateMainView::DoActivateL |
|
371 |
// Activate view |
|
372 |
// ----------------------------------------------------------------------------- |
|
373 |
// |
|
374 |
void CIAUpdateMainView::DoActivateL( const TVwsViewId& /*aPrevViewId*/, |
|
375 |
TUid /*aCustomMessageId*/, |
|
376 |
const TDesC8& /*aCustomMessage*/ ) |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
377 |
{ |
66 | 378 |
UpdateStatusPaneL(); |
379 |
Toolbar()->SetToolbarVisibility( ETrue ); |
|
380 |
if( !iContainer ) |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
381 |
{ |
66 | 382 |
iContainer = CIAUpdateMainContainer::NewL( ClientRect(), *this ); |
383 |
||
384 |
if( iAllNodes.Count() > 0 ) |
|
385 |
{ |
|
386 |
iContainer->RefreshL( iAllNodes, iRefreshError ); |
|
387 |
} |
|
388 |
||
389 |
SetSelectedIndicesL(); |
|
390 |
DynInitToolbarL( R_IAUPDATE_MAIN_TOOLBAR, Toolbar() ); |
|
391 |
AppUi()->AddToStackL( iContainer ); |
|
392 |
} |
|
393 |
else |
|
394 |
{ |
|
395 |
UpdateSelectionInfoInNaviPaneL(); |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
396 |
} |
66 | 397 |
} |
398 |
||
399 |
// ----------------------------------------------------------------------------- |
|
400 |
// CIAUpdateMainView::DoDeactivate() |
|
401 |
// Container is deleted in deactivation |
|
402 |
// ----------------------------------------------------------------------------- |
|
403 |
// |
|
404 |
void CIAUpdateMainView::DoDeactivate() |
|
405 |
{ |
|
406 |
RemoveSelectionInfoInNaviPane(); |
|
407 |
Toolbar()->SetToolbarVisibility( EFalse ); |
|
408 |
} |
|
409 |
||
410 |
// ----------------------------------------------------------------------------- |
|
411 |
// CIAUpdateMainView::DynInitToolbarL() |
|
412 |
// |
|
413 |
// ----------------------------------------------------------------------------- |
|
414 |
// |
|
415 |
void CIAUpdateMainView::DynInitToolbarL( TInt aResourceId, CAknToolbar* aToolbar ) |
|
416 |
{ |
|
417 |
if ( aResourceId == R_IAUPDATE_MAIN_TOOLBAR ) |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
418 |
{ |
66 | 419 |
if ( iContainer ) |
420 |
{ |
|
421 |
if ( CountOfSelectedItems() > 0 ) |
|
422 |
{ |
|
423 |
aToolbar->SetItemDimmed( EIAUpdateCmdStartUpdate, EFalse, ETrue ); |
|
424 |
} |
|
425 |
else |
|
426 |
{ |
|
427 |
aToolbar->SetItemDimmed( EIAUpdateCmdStartUpdate, ETrue, ETrue ); |
|
428 |
} |
|
429 |
if ( CountOfSelectedItems() == 1 ) |
|
430 |
{ |
|
431 |
aToolbar->SetItemDimmed( EIAUpdateCmdMarkedUpdateDetails, EFalse, ETrue ); |
|
432 |
} |
|
433 |
else |
|
434 |
{ |
|
435 |
aToolbar->SetItemDimmed( EIAUpdateCmdMarkedUpdateDetails, ETrue, ETrue ); |
|
436 |
} |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
437 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
438 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
439 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
440 |
|
66 | 441 |
// ----------------------------------------------------------------------------- |
442 |
// CIAUpdateMainView::OfferToolbarEventL() |
|
443 |
// |
|
444 |
// ----------------------------------------------------------------------------- |
|
445 |
// |
|
446 |
void CIAUpdateMainView::OfferToolbarEventL( TInt aCommand ) |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
447 |
{ |
66 | 448 |
if ( aCommand == EIAUpdateCmdStartUpdate ) |
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
449 |
{ |
66 | 450 |
RPointerArray<MIAUpdateAnyNode> selectedNodes; |
451 |
CleanupClosePushL( selectedNodes ); |
|
452 |
GetSelectedNodesL( selectedNodes ); |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
453 |
|
66 | 454 |
if ( selectedNodes.Count() ) |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
455 |
{ |
66 | 456 |
if ( selectedNodes[0]->NodeType() == MIAUpdateAnyNode::ENodeTypeFw ) |
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
457 |
{ |
66 | 458 |
//firmware is selected |
459 |
MIAUpdateFwNode* node = static_cast<MIAUpdateFwNode*>( selectedNodes[0] ); |
|
460 |
||
461 |
if ( node->FwType() == MIAUpdateFwNode::EFotaDp2 ) |
|
462 |
{ |
|
463 |
aCommand = EIAUpdateCmdStartUpdate; |
|
464 |
} |
|
465 |
||
466 |
if ( node->FwType() == MIAUpdateFwNode::EFotiNsu ) |
|
467 |
{ |
|
468 |
aCommand = EIAUpdateCmdUpdateWithPC; |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
469 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
470 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
471 |
else |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
472 |
{ |
66 | 473 |
//firmware is not selected, only sis |
474 |
aCommand = EIAUpdateCmdStartUpdate; |
|
475 |
} |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
476 |
} |
66 | 477 |
else |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
478 |
{ |
66 | 479 |
MIAUpdateAnyNode* currentNode = GetCurrentNode(); |
480 |
if ( currentNode->NodeType() == MIAUpdateAnyNode::ENodeTypeFw ) |
|
481 |
{ |
|
482 |
MIAUpdateFwNode* node = static_cast<MIAUpdateFwNode*>( currentNode ); |
|
483 |
if ( node->FwType() == MIAUpdateFwNode::EFotiNsu ) |
|
484 |
{ |
|
485 |
aCommand = EIAUpdateCmdUpdateWithPC; |
|
486 |
} |
|
487 |
} |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
488 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
489 |
|
66 | 490 |
CleanupStack::PopAndDestroy( &selectedNodes ); |
491 |
} |
|
492 |
HandleCommandL( aCommand ); |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
493 |
} |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
494 |
|
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
495 |
|
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
496 |
|
66 | 497 |
// ----------------------------------------------------------------------------- |
498 |
// CIAUpdateMainView::MarkListItemL |
|
499 |
// Mark list item |
|
500 |
// ----------------------------------------------------------------------------- |
|
501 |
// |
|
502 |
TBool CIAUpdateMainView::MarkListItemL( TBool aMark, TInt aIndex ) |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
503 |
{ |
66 | 504 |
if ( aMark ) |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
505 |
{ |
66 | 506 |
//It's Mark Command |
507 |
RPointerArray<MIAUpdateAnyNode> selectedNodes; |
|
508 |
CleanupClosePushL( selectedNodes ); |
|
509 |
GetSelectedNodesL( selectedNodes ); |
|
510 |
||
511 |
//There are selected items already and type are different with the current one |
|
512 |
if ( selectedNodes.Count() > 0 && (iAllNodes[aIndex]->NodeType() != selectedNodes[0]->NodeType() ) ) |
|
513 |
{ |
|
514 |
/*HBufC* msgText = StringLoader::LoadLC(R_IAUPDATE_FIRMWARE_WITH_OTHERS); |
|
515 |
||
516 |
CAknQueryDialog* dlg = CAknQueryDialog::NewL(); |
|
517 |
||
518 |
dlg->ExecuteLD( R_IAUPDATE_INFORMATION_QUERY, *msgText ); |
|
519 |
||
520 |
CleanupStack::PopAndDestroy( msgText );*/ |
|
521 |
||
522 |
//clean all of the current selection(s) |
|
523 |
iContainer->CleanAllSelection(); |
|
524 |
||
525 |
// firmware item and normal sis items can't be selected at the same time |
|
526 |
// unmark the selected nodes. |
|
527 |
for ( TInt i = 0; i < selectedNodes.Count(); i++ ) |
|
528 |
{ |
|
529 |
TInt index = iAllNodes.Find( selectedNodes[i]); |
|
530 |
iAllNodes[index]->Base().SetSelected( EFalse ); |
|
531 |
} |
|
532 |
} |
|
533 |
||
534 |
CleanupStack::PopAndDestroy( &selectedNodes ); |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
535 |
} |
66 | 536 |
|
537 |
//there is no selected items or the type is the same with the current one |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
538 |
|
66 | 539 |
if ( iAllNodes[aIndex]->NodeType() == MIAUpdateAnyNode::ENodeTypeFw ) |
540 |
{ |
|
541 |
iAllNodes[aIndex]->Base().SetSelected( aMark ); |
|
542 |
||
543 |
if ( aMark ) |
|
544 |
{ |
|
545 |
SetMiddleSKTextL( ETrue, ETrue ); |
|
546 |
} |
|
547 |
else |
|
548 |
{ |
|
549 |
SetMiddleSKTextL( ETrue, EFalse ); |
|
550 |
} |
|
551 |
UpdateSelectionInfoInNaviPaneL(); |
|
552 |
DynInitToolbarL( R_IAUPDATE_MAIN_TOOLBAR, Toolbar() ); |
|
553 |
return ETrue; |
|
554 |
} |
|
555 |
||
556 |
if ( iAllNodes[aIndex]->NodeType() == MIAUpdateAnyNode::ENodeTypeNormal ) |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
557 |
{ |
66 | 558 |
TBool accepted = EFalse; |
559 |
||
560 |
if( aIndex > -1 ) |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
561 |
{ |
66 | 562 |
accepted = ETrue; |
563 |
||
564 |
MIAUpdateNode* node = static_cast<MIAUpdateNode*>( iAllNodes[aIndex] ); |
|
565 |
RPointerArray<MIAUpdateAnyNode> mands; |
|
566 |
RPointerArray<MIAUpdateNode> deps; |
|
567 |
||
568 |
if ( aMark ) |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
569 |
{ |
66 | 570 |
CleanupClosePushL( mands ); |
571 |
CleanupClosePushL( deps ); |
|
572 |
IAUpdateDepUtils::GetDependenciesL( *node, iAllNodes, deps ); |
|
573 |
GetMandatoryNodesL( mands ); |
|
574 |
} |
|
575 |
else |
|
576 |
{ |
|
577 |
//mandatory item is not allowed to be unmarked |
|
578 |
if ( iAllNodes[aIndex]->Base().Importance() == MIAUpdateBaseNode::EMandatory ) |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
579 |
{ |
66 | 580 |
//show dialog |
581 |
ShowUpdateCannotOmitDialogL(); |
|
582 |
return EFalse; |
|
583 |
} |
|
584 |
||
585 |
CleanupClosePushL( deps ); |
|
586 |
IAUpdateDepUtils::GetDependantsL( *node, iAllNodes, deps ); |
|
587 |
// item is not allowed to be unmarked if its dependant is mandatory |
|
588 |
TBool mandatoryDependantFound = EFalse; |
|
589 |
for( TInt i = 0; i < deps.Count() && !mandatoryDependantFound; i++ ) |
|
590 |
{ |
|
591 |
if ( deps[i]->Base().Importance() == MIAUpdateBaseNode::EMandatory ) |
|
592 |
{ |
|
593 |
mandatoryDependantFound = ETrue; |
|
594 |
} |
|
595 |
} |
|
596 |
if ( mandatoryDependantFound ) |
|
597 |
{ |
|
598 |
ShowUpdateCannotOmitDialogL(); |
|
599 |
CleanupStack::PopAndDestroy( &deps ); |
|
600 |
return EFalse; |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
601 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
602 |
} |
66 | 603 |
|
604 |
TInt depCount = deps.Count(); |
|
605 |
||
606 |
if ( depCount > 0 ) |
|
607 |
{ |
|
608 |
HBufC* text = NULL; |
|
609 |
HBufC* names = NULL; |
|
610 |
MIAUpdateNode* depNode = NULL; |
|
611 |
HBufC* separator = NULL; |
|
612 |
||
613 |
if ( depCount > 1 ) |
|
614 |
{ |
|
615 |
separator = StringLoader::LoadLC( R_IAUPDATE_SEPARATOR ); |
|
616 |
} |
|
617 |
||
618 |
names = HBufC::NewLC( 0 ); |
|
619 |
||
620 |
for( TInt i = 0; i < depCount; i++ ) |
|
621 |
{ |
|
622 |
depNode = deps[i]; |
|
623 |
HBufC* temp = NULL; |
|
624 |
if ( separator ) |
|
625 |
{ |
|
626 |
temp = names->ReAllocL( names->Length() + |
|
627 |
depNode->Base().Name().Length() + |
|
628 |
separator->Length() + |
|
629 |
KSpace.iTypeLength ); |
|
630 |
} |
|
631 |
else |
|
632 |
{ |
|
633 |
temp = names->ReAllocL( names->Length() + |
|
634 |
depNode->Base().Name().Length() + |
|
635 |
KSpace.iTypeLength ); |
|
636 |
} |
|
637 |
||
638 |
CleanupStack::Pop( names ); |
|
639 |
names = temp; |
|
640 |
CleanupStack::PushL( names ); |
|
641 |
||
642 |
if ( i > 0 ) |
|
643 |
{ |
|
644 |
names->Des() += *separator; |
|
645 |
names->Des() += KSpace; |
|
646 |
} |
|
647 |
names->Des() += depNode->Base().Name(); |
|
648 |
} |
|
649 |
||
650 |
TInt resourceId = 0; |
|
651 |
if ( aMark ) |
|
652 |
{ |
|
653 |
if ( depCount > 1 ) |
|
654 |
{ |
|
655 |
resourceId = R_IAUPDATE_DEPENDENCY_MARK_MANY; |
|
656 |
} |
|
657 |
else |
|
658 |
{ |
|
659 |
resourceId = R_IAUPDATE_DEPENDENCY_MARK_ONE; |
|
660 |
} |
|
661 |
} |
|
662 |
else |
|
663 |
{ |
|
664 |
if ( depCount > 1 ) |
|
665 |
{ |
|
666 |
resourceId = R_IAUPDATE_DEPENDENCY_UNMARK_MANY; |
|
667 |
} |
|
668 |
else |
|
669 |
{ |
|
670 |
resourceId = R_IAUPDATE_DEPENDENCY_UNMARK_ONE; |
|
671 |
} |
|
672 |
} |
|
673 |
text = StringLoader::LoadLC( resourceId, *names ); |
|
674 |
||
675 |
if ( aMark && iAllNodes[aIndex]->Base().Importance() == MIAUpdateBaseNode::EMandatory ) |
|
676 |
{ |
|
677 |
// depencencies of mandatory update are also selected without showing dialog |
|
678 |
accepted = ETrue; |
|
679 |
} |
|
680 |
else |
|
681 |
{ |
|
682 |
accepted = ShowDependenciesFoundDialogL( *text ); |
|
683 |
} |
|
684 |
CleanupStack::PopAndDestroy( text ); |
|
685 |
CleanupStack::PopAndDestroy( names ); |
|
686 |
||
687 |
if ( separator ) |
|
688 |
{ |
|
689 |
CleanupStack::PopAndDestroy( separator ); |
|
690 |
} |
|
691 |
} |
|
692 |
||
693 |
if ( accepted ) |
|
694 |
{ |
|
695 |
for( TInt j = 0; j < depCount; j++ ) |
|
696 |
{ |
|
697 |
TInt depNodeInd = iAllNodes.Find( deps[j] ); |
|
698 |
iAllNodes[depNodeInd]->Base().SetSelected( aMark ); |
|
699 |
} |
|
700 |
CleanupStack::PopAndDestroy( &deps ); |
|
701 |
||
702 |
TInt nodeInd = iAllNodes.Find( node ); |
|
703 |
iAllNodes[nodeInd]->Base().SetSelected( aMark ); |
|
704 |
} |
|
705 |
else |
|
706 |
{ |
|
707 |
//user rejects the dependency dialog |
|
708 |
CleanupStack::PopAndDestroy( &deps ); |
|
709 |
if ( aMark ) |
|
710 |
{ |
|
711 |
CleanupStack::PopAndDestroy( &mands ); |
|
712 |
} |
|
713 |
return EFalse; |
|
714 |
} |
|
715 |
||
716 |
//mark all of the mandatory items |
|
717 |
TInt mandCount = mands.Count(); |
|
718 |
if ( mandCount > 0 && aMark ) |
|
719 |
{ |
|
720 |
for( TInt j = 0; j < mandCount; j++ ) |
|
721 |
{ |
|
722 |
TInt mandNodeInd = iAllNodes.Find( mands[j] ); |
|
723 |
iAllNodes[mandNodeInd]->Base().SetSelected( aMark ); |
|
724 |
if ( iAllNodes[mandNodeInd]->NodeType() == MIAUpdateAnyNode::ENodeTypeNormal ) |
|
725 |
{ |
|
726 |
// mark also all dependencies of a mandatory item |
|
727 |
MIAUpdateNode* dependencyNode = static_cast<MIAUpdateNode*>( iAllNodes[mandNodeInd] ); |
|
728 |
RPointerArray<MIAUpdateNode> dependencies; |
|
729 |
CleanupClosePushL( dependencies ); |
|
730 |
IAUpdateDepUtils::GetDependenciesL( *dependencyNode, iAllNodes, dependencies ); |
|
731 |
for( TInt k = 0; k < dependencies.Count(); k++ ) |
|
732 |
{ |
|
733 |
TInt depNodeInd = iAllNodes.Find( dependencies[k] ); |
|
734 |
iAllNodes[depNodeInd]->Base().SetSelected( ETrue ); |
|
735 |
} |
|
736 |
CleanupStack::PopAndDestroy( &dependencies ); |
|
737 |
} |
|
738 |
} |
|
739 |
} |
|
740 |
if ( aMark ) |
|
741 |
{ |
|
742 |
CleanupStack::PopAndDestroy( &mands ); |
|
743 |
} |
|
744 |
||
745 |
if ( depCount > 0 || mandCount > 0 ) |
|
746 |
{ |
|
747 |
SetSelectedIndicesL(); |
|
748 |
} |
|
749 |
else |
|
750 |
{ |
|
751 |
UpdateSelectionInfoInNaviPaneL(); |
|
752 |
} |
|
753 |
||
754 |
if ( aMark ) |
|
755 |
{ |
|
756 |
SetMiddleSKTextL( ETrue, ETrue ); |
|
757 |
} |
|
758 |
else |
|
759 |
{ |
|
760 |
SetMiddleSKTextL( ETrue, EFalse ); |
|
761 |
} |
|
762 |
} |
|
763 |
DynInitToolbarL( R_IAUPDATE_MAIN_TOOLBAR, Toolbar() ); |
|
764 |
return ETrue; |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
765 |
} |
66 | 766 |
return EFalse; |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
767 |
} |
66 | 768 |
|
769 |
||
770 |
||
771 |
||
772 |
// ----------------------------------------------------------------------------- |
|
773 |
// CIAUpdateMainView::SetMiddleSKTextL |
|
774 |
// Middle soft key label to be set |
|
775 |
// ----------------------------------------------------------------------------- |
|
776 |
// |
|
777 |
void CIAUpdateMainView::SetMiddleSKTextL( TBool aVisible, TBool aSelected ) |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
778 |
{ |
66 | 779 |
CEikButtonGroupContainer* cbaGroup = Cba(); |
780 |
if ( cbaGroup ) |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
781 |
{ |
66 | 782 |
cbaGroup->RemoveCommandFromStack( CEikButtonGroupContainer::EMiddleSoftkeyPosition, iLastCommandId ); |
783 |
if ( aVisible ) |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
784 |
{ |
66 | 785 |
HBufC* middleSKText = NULL; |
786 |
if ( aSelected ) |
|
787 |
{ |
|
788 |
middleSKText = StringLoader::LoadLC( R_IAUPDATE_MSK_UNMARK ); |
|
789 |
TPtr mskPtr = middleSKText->Des(); |
|
790 |
cbaGroup->AddCommandToStackL( |
|
791 |
CEikButtonGroupContainer::EMiddleSoftkeyPosition, |
|
792 |
EAknSoftkeyUnmark, |
|
793 |
mskPtr ); |
|
794 |
iLastCommandId = EAknSoftkeyUnmark; |
|
795 |
} |
|
796 |
else |
|
797 |
{ |
|
798 |
middleSKText = StringLoader::LoadLC( R_IAUPDATE_MSK_MARK ); |
|
799 |
TPtr mskPtr = middleSKText->Des(); |
|
800 |
cbaGroup->AddCommandToStackL( |
|
801 |
CEikButtonGroupContainer::EMiddleSoftkeyPosition, |
|
802 |
EAknSoftkeyMark, |
|
803 |
mskPtr ); |
|
804 |
iLastCommandId = EAknSoftkeyMark; |
|
805 |
} |
|
806 |
CleanupStack::PopAndDestroy( middleSKText ); |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
807 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
808 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
809 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
810 |
|
66 | 811 |
// ----------------------------------------------------------------------------- |
812 |
// CIAUpdateMainView::GetSelectedNodesL |
|
813 |
// Get selected (marked) nodes |
|
814 |
// ----------------------------------------------------------------------------- |
|
815 |
// |
|
816 |
void CIAUpdateMainView::GetSelectedNodesL( RPointerArray<MIAUpdateAnyNode>& aSelectedNodes ) const |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
817 |
{ |
66 | 818 |
for( TInt i = 0; i < iAllNodes.Count(); ++i ) |
819 |
{ |
|
820 |
if ( iAllNodes[i]->Base().IsSelected() ) |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
821 |
{ |
66 | 822 |
User::LeaveIfError( aSelectedNodes.Append( iAllNodes[i] ) ); |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
823 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
824 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
825 |
} |
66 | 826 |
|
827 |
// ----------------------------------------------------------------------------- |
|
828 |
// CIAUpdateMainView::GetMandatoryItemsL |
|
829 |
// Get selected (marked) nodes |
|
830 |
// ----------------------------------------------------------------------------- |
|
831 |
// |
|
832 |
void CIAUpdateMainView::GetMandatoryNodesL( RPointerArray<MIAUpdateAnyNode>& aMandNodes ) const |
|
833 |
{ |
|
834 |
for( TInt i = 0; i < iAllNodes.Count(); ++i ) |
|
835 |
{ |
|
836 |
if ( iAllNodes[i]->Base().Importance() == MIAUpdateBaseNode::EMandatory ) |
|
837 |
{ |
|
838 |
User::LeaveIfError( aMandNodes.Append( iAllNodes[i] ) ); |
|
839 |
} |
|
840 |
} |
|
841 |
} |
|
842 |
||
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
843 |
|
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
844 |
|
66 | 845 |
// ----------------------------------------------------------------------------- |
846 |
// CIAUpdateMainView::SetSelectedIndicesL |
|
847 |
// Indices of selected items are passed to container |
|
848 |
// ----------------------------------------------------------------------------- |
|
849 |
// |
|
850 |
void CIAUpdateMainView::SetSelectedIndicesL() |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
851 |
{ |
66 | 852 |
RArray<TInt> indices; |
853 |
||
854 |
CleanupClosePushL( indices ); |
|
855 |
||
856 |
for( TInt i = 0; i < iAllNodes.Count(); ++i ) |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
857 |
{ |
66 | 858 |
if ( iAllNodes[i]->Base().IsSelected() ) |
859 |
{ |
|
860 |
User::LeaveIfError( indices.Append( i ) ); |
|
861 |
} |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
862 |
} |
66 | 863 |
|
864 |
iContainer->SetSelectedIndicesL( indices ); |
|
865 |
UpdateSelectionInfoInNaviPaneL(); |
|
866 |
||
867 |
CleanupStack::PopAndDestroy( &indices ); |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
868 |
} |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
869 |
|
66 | 870 |
// ----------------------------------------------------------------------------- |
871 |
// CIAUpdateMainView::NodeIndex |
|
872 |
// Get index of node |
|
873 |
// ----------------------------------------------------------------------------- |
|
874 |
// |
|
875 |
TInt CIAUpdateMainView::NodeIndex( const MIAUpdateAnyNode& aNode ) const |
|
876 |
{ |
|
877 |
TInt result = -1; |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
878 |
|
66 | 879 |
for( TInt i = 0; i < iAllNodes.Count(); ++i ) |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
880 |
{ |
66 | 881 |
if( &aNode == iAllNodes[i] ) |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
882 |
{ |
66 | 883 |
result = i; |
884 |
break; |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
885 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
886 |
} |
66 | 887 |
return result; |
888 |
} |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
889 |
|
66 | 890 |
// ----------------------------------------------------------------------------- |
891 |
// CIAUpdateMainView::UpdateStatusPaneL |
|
892 |
// Update title in status pane |
|
893 |
// ----------------------------------------------------------------------------- |
|
894 |
// |
|
895 |
||
896 |
void CIAUpdateMainView::UpdateStatusPaneL() |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
897 |
{ |
66 | 898 |
CAknTitlePane* titlePane = |
899 |
static_cast< CAknTitlePane* >( StatusPane()->ControlL( |
|
900 |
TUid::Uid( EEikStatusPaneUidTitle ) ) ); |
|
901 |
HBufC* text = StringLoader::LoadLC( R_IAUPDATE_TEXT_TITLE_MAIN_VIEW ); |
|
902 |
titlePane->SetTextL( *text ); |
|
903 |
CleanupStack::PopAndDestroy( text ); |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
904 |
} |
66 | 905 |
|
906 |
||
907 |
// ----------------------------------------------------------------------------- |
|
908 |
// CIAUpdateMainView::UpdateSelectionInfoInNaviPaneL |
|
909 |
// Update selection information in status pane |
|
910 |
// ----------------------------------------------------------------------------- |
|
911 |
// |
|
912 |
// |
|
913 |
void CIAUpdateMainView::UpdateSelectionInfoInNaviPaneL() |
|
914 |
{ |
|
915 |
RemoveSelectionInfoInNaviPane(); |
|
916 |
||
917 |
if ( iAllNodes.Count() > 0 ) |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
918 |
{ |
66 | 919 |
//show empty navi pane when firmware is selected but no size info or it is NSU |
920 |
if ( (iAllNodes[0]->NodeType() == MIAUpdateAnyNode::ENodeTypeFw) && iAllNodes[0]->Base().IsSelected() ) |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
921 |
{ |
66 | 922 |
MIAUpdateFwNode* fwnode = static_cast<MIAUpdateFwNode*>( iAllNodes[0] ); |
923 |
if ( (iAllNodes[0]->Base().ContentSizeL() == 0) || (fwnode->FwType() == MIAUpdateFwNode::EFotiNsu) ) |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
924 |
{ |
66 | 925 |
return; |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
926 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
927 |
} |
66 | 928 |
|
929 |
if ( !iNaviPane ) |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
930 |
{ |
66 | 931 |
iNaviPane = static_cast<CAknNavigationControlContainer*> |
932 |
( StatusPane()->ControlL( TUid::Uid(EEikStatusPaneUidNavi ) ) ); |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
933 |
} |
66 | 934 |
TInt selectedSizeInBytes = 0; |
935 |
for( TInt i = 0; i < iAllNodes.Count(); ++i ) |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
936 |
{ |
66 | 937 |
if ( iAllNodes[i]->Base().IsSelected() ) |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
938 |
{ |
66 | 939 |
selectedSizeInBytes += iAllNodes[i]->Base().ContentSizeL(); |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
940 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
941 |
} |
66 | 942 |
|
943 |
||
944 |
TInt resourceId = 0; |
|
945 |
TInt selectedSize; |
|
946 |
if ( selectedSizeInBytes >= KMaxShownInKiloBytes ) |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
947 |
{ |
66 | 948 |
resourceId = R_IAUPDATE_NAVIPANE_MEGABYTE; |
949 |
selectedSize = selectedSizeInBytes / KMegaByte; |
|
950 |
if ( selectedSizeInBytes % KMegaByte != 0 ) |
|
951 |
{ |
|
952 |
selectedSize++; |
|
953 |
} |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
954 |
} |
66 | 955 |
else |
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
956 |
{ |
66 | 957 |
resourceId = R_IAUPDATE_NAVIPANE_KILOBYTE; |
958 |
selectedSize = selectedSizeInBytes / KKiloByte; |
|
959 |
if ( selectedSizeInBytes % KKiloByte != 0 ) |
|
960 |
{ |
|
961 |
selectedSize++; |
|
962 |
} |
|
963 |
} |
|
964 |
||
965 |
CArrayFix<TInt>* numberArray = |
|
966 |
new ( ELeave ) CArrayFixFlat<TInt>( KSelInfoArrayGranularity ); |
|
967 |
CleanupStack::PushL( numberArray ); |
|
968 |
numberArray->AppendL( CountOfSelectedItems() ); |
|
969 |
numberArray->AppendL( iAllNodes.Count() ); |
|
970 |
numberArray->AppendL( selectedSize ); |
|
971 |
||
972 |
HBufC* selectionInfo = StringLoader::LoadLC( resourceId, |
|
973 |
*numberArray ); |
|
974 |
TPtr ptr = selectionInfo->Des(); |
|
975 |
AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr ); |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
976 |
|
66 | 977 |
iDecorator = iNaviPane->CreateNavigationLabelL( *selectionInfo ); |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
978 |
|
66 | 979 |
iNaviPane->PushL( *iDecorator ); |
980 |
||
981 |
CleanupStack::PopAndDestroy( selectionInfo ); |
|
982 |
CleanupStack::PopAndDestroy( numberArray ); |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
983 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
984 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
985 |
|
66 | 986 |
// ----------------------------------------------------------------------------- |
987 |
// CIAUpdateMainView::RemoveSelectionInfoInNaviPane |
|
988 |
// Remove existing selection info (created by main view) from navi pane |
|
989 |
// ----------------------------------------------------------------------------- |
|
990 |
// |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
991 |
|
66 | 992 |
void CIAUpdateMainView::RemoveSelectionInfoInNaviPane() |
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
993 |
{ |
66 | 994 |
if ( iNaviPane && iDecorator ) |
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
995 |
{ |
66 | 996 |
iNaviPane->Pop( iDecorator ); |
997 |
delete iDecorator; |
|
998 |
iDecorator = NULL; |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
999 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1000 |
} |
66 | 1001 |
|
1002 |
// ----------------------------------------------------------------------------- |
|
1003 |
// CIAUpdateMainView::ShowDependenciesFoundDialogL |
|
1004 |
// |
|
1005 |
// ----------------------------------------------------------------------------- |
|
1006 |
// |
|
1007 |
TBool CIAUpdateMainView::ShowDependenciesFoundDialogL( TDesC& aText ) const |
|
1008 |
{ |
|
1009 |
CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL( aText ); |
|
1010 |
dlg->PrepareLC( R_IAUPDATE_MESSAGE_QUERY ); |
|
1011 |
CAknPopupHeadingPane* headingPane = dlg->Heading(); |
|
1012 |
HBufC* title = StringLoader::LoadLC( R_IAUPDATE_DEPENDENCY_TITLE ); |
|
1013 |
headingPane->SetTextL( *title ); |
|
1014 |
CleanupStack::PopAndDestroy( title ); |
|
1015 |
||
1016 |
dlg->ButtonGroupContainer().SetCommandSetL( |
|
1017 |
R_IAUPDATE_SOFTKEYS_CONTINUE_CANCEL__CONTINUE ); |
|
65
7333d7932ef7
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
40
diff
changeset
|
1018 |
|
66 | 1019 |
return( dlg->RunLD() == EAknSoftkeyOk ); |
1020 |
} |
|
1021 |
||
1022 |
// --------------------------------------------------------------------------- |
|
1023 |
// CIAUpdateMainView::CountOfSelectedItems |
|
1024 |
// |
|
1025 |
// --------------------------------------------------------------------------- |
|
1026 |
// |
|
1027 |
TInt CIAUpdateMainView::CountOfSelectedItems() const |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1028 |
{ |
66 | 1029 |
TInt countOfSelectedItems = 0; |
1030 |
for( TInt i = 0; i < iAllNodes.Count(); ++i ) |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1031 |
{ |
66 | 1032 |
if ( iAllNodes[i]->Base().IsSelected() ) |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1033 |
{ |
66 | 1034 |
countOfSelectedItems++; |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1035 |
} |
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1036 |
} |
66 | 1037 |
return countOfSelectedItems; |
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1038 |
} |
66 | 1039 |
|
1040 |
// --------------------------------------------------------------------------- |
|
1041 |
// CIAUpdateMainView::ShowUpdateCannotOmitDialogL |
|
1042 |
// |
|
1043 |
// --------------------------------------------------------------------------- |
|
1044 |
// |
|
1045 |
void CIAUpdateMainView::ShowUpdateCannotOmitDialogL() const |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1046 |
{ |
66 | 1047 |
HBufC* msgText = StringLoader::LoadLC( R_IAUPDATE_CANNOT_OMIT ); |
1048 |
CAknQueryDialog* dlg = CAknQueryDialog::NewL(); |
|
1049 |
dlg->ExecuteLD( R_IAUPDATE_INFORMATION_QUERY, *msgText ); |
|
1050 |
CleanupStack::PopAndDestroy( msgText ); |
|
0
ba25891c3a9e
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1051 |
} |
66 | 1052 |
|
1053 |
// End of File |
|
1054 |