Author: aschnell Date: Thu Mar 20 14:54:35 2008 New Revision: 45654 URL: http://svn.opensuse.org/viewcvs/yast?rev=45654&view=rev Log: - use String::FormatSizeWithPrecision Modified: branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp Modified: branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp?rev=45654&r1=45653&r2=45654&view=diff ============================================================================== --- branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp (original) +++ branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp Thu Mar 20 14:54:35 2008 @@ -15,6 +15,7 @@ import "Storage"; import "FileSystems"; import "Partitions"; + import "String"; import "Arch"; import "Mode"; @@ -203,7 +204,7 @@ case `size: { - string value = Partitions::ByteToHumanStringWithZero(data["size_k"]:0*1024); + string value = String::FormatSizeWithPrecision(data["size_k"]:0*1024, 2, false); if (style == `table) return value; else @@ -429,7 +430,7 @@ { string value = ""; if (disk["type"]:`CT_UNKNOWN == `CT_LVM && part == nil) - value = Partitions::ByteToHumanString(disk["pesize"]:0); + value = String::FormatSizeWithPrecision(disk["pesize"]:0, 2, true); if (style == `table) return value; else @@ -446,7 +447,7 @@ if (stripes == 1) value = sformat("%1", stripes); else - value = sformat("%1 (%2)", stripes, Partitions::ByteToHumanStringWithZero(stripesize*1024)); + value = sformat("%1 (%2)", stripes, String::FormatSizeWithPrecision(stripesize*1024, 2, true)); } if (style == `table) return value; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org