17 |
17 |
18 |
18 |
19 #include "appmngr2infobase.h" // CAppMngr2InfoBase |
19 #include "appmngr2infobase.h" // CAppMngr2InfoBase |
20 #include "appmngr2runtime.h" // CAppMngr2Runtime |
20 #include "appmngr2runtime.h" // CAppMngr2Runtime |
21 #include "appmngr2common.hrh" // Default icon indexes |
21 #include "appmngr2common.hrh" // Default icon indexes |
22 //#include <appmngr2.rsg> // Resource IDs |
22 #include <appmngr2.rsg> // Resource IDs |
23 #include <AknUtils.h> // DisplayTextLanguageSpecificNumberConversion |
23 #include <AknUtils.h> // DisplayTextLanguageSpecificNumberConversion |
24 #include <StringLoader.h> // StringLoader |
24 #include <StringLoader.h> // StringLoader |
25 #include <barsread.h> // TResourceReader |
25 #include <barsread.h> // TResourceReader |
26 #include <e32math.h> // Math::Round |
26 #include <e32math.h> // Math::Round |
27 |
27 |
163 { |
163 { |
164 HBufC* dispString = NULL; |
164 HBufC* dispString = NULL; |
165 if( aSizeInBytes <= KMegaByte ) |
165 if( aSizeInBytes <= KMegaByte ) |
166 { |
166 { |
167 TInt kiloBytes = DivideAndReturnRoundedInt( aSizeInBytes, KKiloByte ); |
167 TInt kiloBytes = DivideAndReturnRoundedInt( aSizeInBytes, KKiloByte ); |
168 // Temporary fix until appmngr2pluginapi is removed |
168 dispString = StringLoader::LoadLC( R_SWINS_UNIT_KILOBYTE, kiloBytes ); |
169 // dispString = StringLoader::LoadLC( R_SWINS_UNIT_KILOBYTE, kiloBytes ); |
|
170 _LIT( KKiloByte, "%N kB" ); |
|
171 dispString = KKiloByte().AllocLC(); |
|
172 } |
169 } |
173 else if( aSizeInBytes <= KGigaByte ) |
170 else if( aSizeInBytes <= KGigaByte ) |
174 { |
171 { |
175 TInt megaBytes = DivideAndReturnRoundedInt( aSizeInBytes, KMegaByte ); |
172 TInt megaBytes = DivideAndReturnRoundedInt( aSizeInBytes, KMegaByte ); |
176 // Temporary fix until appmngr2pluginapi is removed |
173 dispString = StringLoader::LoadLC( R_SWINS_UNIT_MEGABYTE, megaBytes ); |
177 // dispString = StringLoader::LoadLC( R_SWINS_UNIT_MEGABYTE, megaBytes ); |
|
178 _LIT( KMegaByte, "%N MB" ); |
|
179 dispString = KMegaByte().AllocLC(); |
|
180 } |
174 } |
181 else // aSizeInBytes > KGigaByte |
175 else // aSizeInBytes > KGigaByte |
182 { |
176 { |
183 TInt gigaBytes = DivideAndReturnRoundedInt( aSizeInBytes, KGigaByte ); |
177 TInt gigaBytes = DivideAndReturnRoundedInt( aSizeInBytes, KGigaByte ); |
184 // Temporary fix until appmngr2pluginapi is removed |
178 dispString = StringLoader::LoadLC( R_SWINS_UNIT_GIGABYTE, gigaBytes ); |
185 // dispString = StringLoader::LoadLC( R_SWINS_UNIT_GIGABYTE, gigaBytes ); |
|
186 _LIT( KGigaByte, "%N GB" ); |
|
187 dispString = KGigaByte().AllocLC(); |
|
188 } |
179 } |
189 |
180 |
190 TPtr ptr = dispString->Des(); |
181 TPtr ptr = dispString->Des(); |
191 AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr ); |
182 AknTextUtils::DisplayTextLanguageSpecificNumberConversion( ptr ); |
192 |
183 |