summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <alan@eth0.org.uk>2012-08-23 08:30:02 +0100
committerGravatar Alan Fitton <alan@eth0.org.uk>2012-08-23 08:30:02 +0100
commitfd6f3356d27d3e3b6f0506b76e0a381efed7e3ef (patch)
tree44c5d0ee9633f688f0288703dcab04af1b892671 /src/util.c
parent63b4366fc1069fad0a51ddcaa1406447055db9a1 (diff)
adapt the cell renderer from Transmission to sort of work. possibly an alternative style, but lots of work to be done here.
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 45d5181..37a0bf8 100644
--- a/src/util.c
+++ b/src/util.c
@@ -573,6 +573,17 @@ evutil_vsnprintf(char *buf, size_t buflen, const char *format, va_list ap)
#endif
}
+char*
+tr_strlsize( char * buf, guint64 bytes, size_t buflen )
+{
+ if( !bytes )
+ g_strlcpy( buf, Q_( "None" ), buflen );
+ else
+ tr_formatter_size_B( buf, bytes, buflen );
+
+ return buf;
+}
+
gboolean is_minimised_arg(const gchar * arg)
{
return !g_strcmp0(arg, "-m")