Changeset 3821 for trunk/gtk/util.c


Ignore:
Timestamp:
Nov 15, 2007, 4:19:53 AM (15 years ago)
Author:
charles
Message:

cruft removal: use tr_stat's ratio field instead of calculating it ourself.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/util.c

    r3648 r3821  
    122122}
    123123
    124 char *
    125 ratiostr(guint64 down, guint64 up) {
    126   double ratio;
    127 
    128   if(0 == up && 0 == down)
    129     return g_strdup(_("N/A"));
    130 
    131   if(0 == down)
    132     /* this is a UTF-8 infinity symbol */
    133     return g_strdup("\xE2\x88\x9E");
    134 
    135   ratio = (double)up / (double)down;
    136 
    137   return g_strdup_printf("%.*f", BESTDECIMAL(ratio), ratio);
    138 }
    139 
    140124gboolean
    141125mkdir_p(const char *name, mode_t mode)
Note: See TracChangeset for help on using the changeset viewer.