[Goodies-commits] r4889 - xfburn/trunk/xfburn
David Mohr
squisher at xfce.org
Thu Jun 5 07:52:37 CEST 2008
Author: squisher
Date: 2008-06-05 05:52:37 +0000 (Thu, 05 Jun 2008)
New Revision: 4889
Modified:
xfburn/trunk/xfburn/xfburn-utils.c
Log:
Small bugfixes: make sure xfburn_humanreadable_filesize returns a sane string
Modified: xfburn/trunk/xfburn/xfburn-utils.c
===================================================================
--- xfburn/trunk/xfburn/xfburn-utils.c 2008-06-05 05:27:02 UTC (rev 4888)
+++ xfburn/trunk/xfburn/xfburn-utils.c 2008-06-05 05:52:37 UTC (rev 4889)
@@ -46,7 +46,7 @@
g_return_if_fail (widget != NULL);
cursor = gdk_cursor_new (GDK_WATCH);
gdk_window_set_cursor (gtk_widget_get_parent_window (widget), cursor);
- gdk_cursor_destroy (cursor);
+ gdk_cursor_unref (cursor);
gdk_flush ();
}
@@ -74,12 +74,12 @@
gint unit = 0;
gdouble human_size = (gdouble) size;
- while (human_size > 1024) {
+ while (human_size > 1024 && unit < 4) {
human_size = human_size / 1024;
unit++;
}
- if ((human_size - (gulong) human_size) > 0.1)
+ if ((human_size - (gulong) human_size) > 0.05)
ret = g_strdup_printf ("%.2f %s", human_size, unit_list[unit]);
else
ret = g_strdup_printf ("%.0f %s", human_size, unit_list[unit]);
More information about the Goodies-commits
mailing list