1 /* |
1 /* |
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
33 // CONSTANTS |
33 // CONSTANTS |
34 const TInt KKiloByte = 1024; |
34 const TInt KKiloByte = 1024; |
35 const TInt KMegaByte = 1024 * 1024; |
35 const TInt KMegaByte = 1024 * 1024; |
36 const TInt KMaxShownInKiloBytes = 10 * KMegaByte; |
36 const TInt KMaxShownInKiloBytes = 10 * KMegaByte; |
37 |
37 |
|
38 _LIT( KSpace, " "); |
|
39 |
38 |
40 |
39 /******************************************************************************* |
41 /******************************************************************************* |
40 * class CIAUpdateDetailsDialog |
42 * class CIAUpdateDetailsDialog |
41 *******************************************************************************/ |
43 *******************************************************************************/ |
42 |
44 |
137 |
139 |
138 TPtr ptr = iBuf->Des(); |
140 TPtr ptr = iBuf->Des(); |
139 |
141 |
140 TInt contentSize = iFwNode->Base().ContentSizeL(); |
142 TInt contentSize = iFwNode->Base().ContentSizeL(); |
141 |
143 |
142 |
144 HBufC* hBuf = StringLoader::LoadLC( R_IAUPDATE_DETAILS_DIALOG_APP_NAME ); |
143 HBufC* hBuf = StringLoader::LoadLC( R_IAUPDATE_DETAILS_DIALOG_DESCRIPTION ); |
145 ptr.Append( KOpeningBoldTag ); |
|
146 ptr.Append( *hBuf ); |
|
147 ptr.Append( KClosingBoldTag ); |
|
148 CleanupStack::PopAndDestroy( hBuf ); |
|
149 |
|
150 HBufC* firmwareHeader = StringLoader::LoadLC(R_IAUPDATE_MAIN_DEVICE_FW); |
|
151 HBufC* firmwarename = HBufC::NewLC( iFwNode->Base().Name().Length() + |
|
152 KSpace.iTypeLength + |
|
153 firmwareHeader->Length() ); |
|
154 firmwarename->Des() = iFwNode->Base().Name(); |
|
155 firmwarename->Des() += KSpace(); |
|
156 firmwarename->Des() += *firmwareHeader; |
|
157 |
|
158 ptr.Append( KNewLine ); |
|
159 ptr.Append( *firmwarename ); |
|
160 CleanupStack::PopAndDestroy( firmwarename ); |
|
161 CleanupStack::PopAndDestroy( firmwareHeader ); |
|
162 ptr.Append( KNewLine ); |
|
163 ptr.Append( KNewLine ); |
|
164 |
|
165 |
|
166 hBuf = StringLoader::LoadLC( R_IAUPDATE_DETAILS_DIALOG_DESCRIPTION ); |
144 ptr.Append( KOpeningBoldTag ); |
167 ptr.Append( KOpeningBoldTag ); |
145 ptr.Append( *hBuf ); |
168 ptr.Append( *hBuf ); |
146 ptr.Append( KClosingBoldTag ); |
169 ptr.Append( KClosingBoldTag ); |
147 CleanupStack::PopAndDestroy( hBuf ); |
170 CleanupStack::PopAndDestroy( hBuf ); |
148 |
171 |
193 // |
216 // |
194 // ----------------------------------------------------------------------------- |
217 // ----------------------------------------------------------------------------- |
195 TBool CIAUpdateFwDetailsDialog::ShowDialogL() |
218 TBool CIAUpdateFwDetailsDialog::ShowDialogL() |
196 { |
219 { |
197 ConstructTextL(); |
220 ConstructTextL(); |
198 HBufC* firmwarename = iFwNode->Base().Name().AllocLC(); |
221 HBufC* hBuf = StringLoader::LoadLC( R_IAUPDATE_DETAILS_DIALOG_TITLE ); |
199 IAUpdateDialogUtil::ShowMessageQueryL( *firmwarename, *iBuf ); |
222 IAUpdateDialogUtil::ShowMessageQueryL( *hBuf, *iBuf ); |
200 CleanupStack::PopAndDestroy( firmwarename ); |
223 CleanupStack::PopAndDestroy( hBuf ); |
201 return ETrue; |
224 return ETrue; |
202 } |
225 } |
203 |
|
204 |
226 |
205 // ----------------------------------------------------------------------------- |
227 // ----------------------------------------------------------------------------- |
206 // CIAUpdateFwDetailsDialog::FileSizeTextLC |
228 // CIAUpdateFwDetailsDialog::FileSizeTextLC |
207 // |
229 // |
208 // ----------------------------------------------------------------------------- |
230 // ----------------------------------------------------------------------------- |