openbsd-ports/net/transmission/patches/patch-gtk_util_c
naddy faec2170d9 Update to 1.50: A bunch of bug fixes and various small improvements as well
as initial IPv6 support.
Also submitted in near-identical form by Brad.
2009-02-15 18:09:29 +00:00

86 lines
3.6 KiB
Plaintext

$OpenBSD: patch-gtk_util_c,v 1.4 2009/02/15 18:09:29 naddy Exp $
--- gtk/util.c.orig Thu Jan 22 23:05:24 2009
+++ gtk/util.c Fri Jan 23 15:42:02 2009
@@ -58,11 +58,11 @@ tr_strlratio( char * buf,
else if( (int)ratio == TR_RATIO_INF )
g_strlcpy( buf, "\xE2\x88\x9E", buflen );
else if( ratio < 10.0 )
- g_snprintf( buf, buflen, "%'.2f", ratio );
+ g_snprintf( buf, buflen, "%.2f", ratio );
else if( ratio < 100.0 )
- g_snprintf( buf, buflen, "%'.1f", ratio );
+ g_snprintf( buf, buflen, "%.1f", ratio );
else
- g_snprintf( buf, buflen, "%'.0f", ratio );
+ g_snprintf( buf, buflen, "%.0f", ratio );
return buf;
}
@@ -87,7 +87,7 @@ tr_strlsize( char * buf,
#else
else if( size < (guint64)KILOBYTE_FACTOR )
g_snprintf( buf, buflen,
- ngettext( "%'u byte", "%'u bytes",
+ ngettext( "%u byte", "%u bytes",
(guint)size ), (guint)size );
else
{
@@ -95,17 +95,17 @@ tr_strlsize( char * buf,
if( size < (guint64)MEGABYTE_FACTOR )
{
displayed_size = (gdouble) size / KILOBYTE_FACTOR;
- g_snprintf( buf, buflen, _( "%'.1f KB" ), displayed_size );
+ g_snprintf( buf, buflen, _( "%.1f KB" ), displayed_size );
}
else if( size < (guint64)GIGABYTE_FACTOR )
{
displayed_size = (gdouble) size / MEGABYTE_FACTOR;
- g_snprintf( buf, buflen, _( "%'.1f MB" ), displayed_size );
+ g_snprintf( buf, buflen, _( "%.1f MB" ), displayed_size );
}
else
{
displayed_size = (gdouble) size / GIGABYTE_FACTOR;
- g_snprintf( buf, buflen, _( "%'.1f GB" ), displayed_size );
+ g_snprintf( buf, buflen, _( "%.1f GB" ), displayed_size );
}
}
#endif
@@ -120,13 +120,13 @@ tr_strlspeed( char * buf,
const double speed = kb_sec;
if( speed < 1000.0 ) /* 0.0 KB to 999.9 KB */
- g_snprintf( buf, buflen, _( "%'.1f KB/s" ), speed );
+ g_snprintf( buf, buflen, _( "%.1f KB/s" ), speed );
else if( speed < 102400.0 ) /* 0.98 MB to 99.99 MB */
- g_snprintf( buf, buflen, _( "%'.2f MB/s" ), ( speed / 1024 ) );
+ g_snprintf( buf, buflen, _( "%.2f MB/s" ), ( speed / 1024 ) );
else if( speed < 1024000.0 ) /* 100.0 MB to 999.9 MB */
- g_snprintf( buf, buflen, _( "%'.1f MB/s" ), ( speed / 1024 ) );
+ g_snprintf( buf, buflen, _( "%.1f MB/s" ), ( speed / 1024 ) );
else /* insane speeds */
- g_snprintf( buf, buflen, _( "%'.2f GB/s" ), ( speed / 1048576 ) );
+ g_snprintf( buf, buflen, _( "%.2f GB/s" ), ( speed / 1048576 ) );
return buf;
}
@@ -147,14 +147,14 @@ tr_strltime( char * buf,
minutes = ( seconds % 3600 ) / 60;
seconds = ( seconds % 3600 ) % 60;
- g_snprintf( d, sizeof( d ), ngettext( "%'d day", "%'d days",
+ g_snprintf( d, sizeof( d ), ngettext( "%d day", "%d days",
days ), days );
- g_snprintf( h, sizeof( h ), ngettext( "%'d hour", "%'d hours",
+ g_snprintf( h, sizeof( h ), ngettext( "%d hour", "%d hours",
hours ), hours );
g_snprintf( m, sizeof( m ),
- ngettext( "%'d minute", "%'d minutes", minutes ), minutes );
+ ngettext( "%d minute", "%d minutes", minutes ), minutes );
g_snprintf( s, sizeof( s ),
- ngettext( "%'d second", "%'d seconds", seconds ), seconds );
+ ngettext( "%d second", "%d seconds", seconds ), seconds );
if( days )
{