Description: Make the used prefixes consistent with other GNOME applications and
 comply with https://wiki.ubuntu.com/UnitsPolicy
Author: Benjamin Drung <bdrung@ubuntu.com>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=612928
Bug-Ubuntu: https://bugs.launchpad.net/bugs/538747

--- gparted-0.5.1.orig/src/Utils.cc
+++ gparted-0.5.1/src/Utils.cc
@@ -169,34 +169,7 @@ Glib::ustring Utils::get_filesystem_soft
 
 Glib::ustring Utils::format_size( Sector size )
 {
-	std::stringstream ss ;
-	ss << std::setiosflags( std::ios::fixed ) << std::setprecision( 2 ) ;
-
-	if ( size < KIBIBYTE )
-	{
-		ss << sector_to_unit( size, UNIT_BYTE ) ;
-		return String::ucompose( _("%1 B"), ss .str() ) ;
-	}
-	else if ( size < MEBIBYTE )
-	{
-		ss << sector_to_unit( size, UNIT_KIB ) ;
-		return String::ucompose( _("%1 KiB"), ss .str() ) ;
-	}
-	else if ( size < GIBIBYTE )
-	{
-		ss << sector_to_unit( size, UNIT_MIB ) ;
-		return String::ucompose( _("%1 MiB"), ss .str() ) ;
-	}
-	else if ( size < TEBIBYTE )
-	{
-		ss << sector_to_unit( size, UNIT_GIB ) ;
-		return String::ucompose( _("%1 GiB"), ss .str() ) ;
-	}
-	else
-	{
-		ss << sector_to_unit( size, UNIT_TIB ) ;
-		return String::ucompose( _("%1 TiB"), ss .str() ) ;
-	}
+	return g_format_size_for_display( sector_to_unit( size, UNIT_BYTE ) );
 }
 
 Glib::ustring Utils::format_time( std::time_t seconds )
