Changeset 4271


Ignore:
Timestamp:
Dec 21, 2007, 10:43:14 PM (14 years ago)
Author:
charles
Message:

tweak the number of decimal places in the file size display a little.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/util.c

    r4210 r4271  
    6565        for( i=0; i<G_N_ELEMENTS(units) && small>=1024; ++i )
    6666            small >>= 10;
    67         if( small < 100 )
     67        if( i < 2 ) /* B & KiB */
     68            g_snprintf( buf, buflen, "%d %s", (int)small, _(units[i]) );
     69        else
    6870            g_snprintf( buf, buflen, "%.1f %s", (double)small, _(units[i]) );
    69         else
    70             g_snprintf( buf, buflen, "%d %s", (int)small, _(units[i]) );
    7171    }
    7272    return buf;
Note: See TracChangeset for help on using the changeset viewer.