Only round to 0 digits for KiB/s values (bug #11152)
parent
23ec87473e
commit
c7b9a893a3
|
@ -241,7 +241,7 @@ static gboolean update_monitors(t_global_monitor *global)
|
||||||
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(global->monitor->status[i]), temp);
|
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(global->monitor->status[i]), temp);
|
||||||
|
|
||||||
format_byte_humanreadable( buffer[i], BUFSIZ - 1, display[i], 2 );
|
format_byte_humanreadable( buffer[i], BUFSIZ - 1, display[i], 2 );
|
||||||
format_byte_humanreadable( buffer_panel[i], BUFSIZ - 1, display[i], 0 );
|
format_byte_humanreadable( buffer_panel[i], BUFSIZ - 1, display[i], 2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
format_byte_humanreadable( buffer[TOT], BUFSIZ - 1, (display[IN]+display[OUT]), 2 );
|
format_byte_humanreadable( buffer[TOT], BUFSIZ - 1, (display[IN]+display[OUT]), 2 );
|
||||||
|
|
|
@ -90,8 +90,8 @@ char* format_byte_humanreadable(char* string, int stringsize, double number, int
|
||||||
digits = 2;
|
digits = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* no digits for smallest unit size */
|
/* no digits for values under MiB/s unit size */
|
||||||
if (number <= 1024.0)
|
if (number < 1024.0 * 1024.0)
|
||||||
{
|
{
|
||||||
digits = 0;
|
digits = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue