=== modified file 'src/load-graph.cpp'
--- src/load-graph.cpp	2007-12-12 15:20:25 +0000
+++ src/load-graph.cpp	2007-12-13 09:04:25 +0000
@@ -82,17 +82,79 @@
 };
 
 
+#define KILO_FACTOR 1000
+#define MEGA_FACTOR 1000000L
+#define GIGA_FACTOR 1000000000L
+
+static unsigned
+get_factor (unsigned val)
+{
+	if (val < KILO_FACTOR)
+	{
+		return 1;
+	}
+	else if (val < MEGA_FACTOR)
+	{
+		return KILO_FACTOR;
+	}
+	else if (val < GIGA_FACTOR)
+	{
+		return MEGA_FACTOR;
+	}
+	else
+	{
+		return GIGA_FACTOR;
+	}
+}
+
+gchar *
+format_network_speed (unsigned val, unsigned factor)
+{
+	const char *format;
+	if (val == 0)
+	{
+		return g_strdup_printf ("0");
+	}
+
+	if (val == 1 && factor == 1)
+	{
+		return g_strdup_printf ("");
+	}
+
+	if (factor == 1)
+	{
+		format = N_("%d B/s");
+	}
+	else if (factor == KILO_FACTOR)
+	{
+		format = N_("%d kB/s");
+	}
+	else if (factor == MEGA_FACTOR)
+	{
+		format = N_("%d MB/s");
+	}
+	else if (factor == GIGA_FACTOR)
+	{
+		format = N_("%d GB/s");
+	}
+	else
+	{
+		g_return_val_if_reached (g_strdup (""));
+	}
+
+	return g_strdup_printf(_(format), val / factor);
+}
+
 
 #define FRAME_WIDTH 4
 
-
 /* Redraws the backing buffer for the load graph and updates the window */
 void
 load_graph_draw (LoadGraph *g)
 {
 	const double fontsize = 8.0;
 	const double rmargin = 3.5 * fontsize;
-	const double indent = 8.0;
+	const double indent = 14.0;
 	double dash[2] = { 1.0, 2.0 };
 	cairo_t *cr;
 	int dely;
@@ -101,6 +163,7 @@
 	guint i, j;
 	unsigned num_bars;
 	GtkWidget *notebook;
+	unsigned factor;
 
 	// keep 100 % num_bars == 0
 	switch (static_cast<int>(g->draw_height / (fontsize + 14)))
@@ -161,6 +224,11 @@
 	cairo_set_dash(cr, dash, 2, 0);
 	cairo_set_font_size(cr, fontsize);
 
+	if (g->type == LOAD_GRAPH_NET)
+	{
+		factor = get_factor(g->net.max);
+	}
+
 	for (i = 0; i <= num_bars; ++i) {
 		char *caption;
 		double y;
@@ -173,7 +241,16 @@
 		else
 		  y = i * dely + fontsize / 2.0;
 
-		caption = g_strdup_printf("%3d %%", 100 - i * (100 / num_bars));
+		if (g->type == LOAD_GRAPH_NET)
+		{
+			caption = format_network_speed ( 
+				(unsigned) (1.0f * g->net.max - i * (g->net.max / num_bars)),
+				factor);
+		}
+		else
+		{
+			caption = g_strdup_printf("%3d %%", 100 - i * (100 / num_bars));
+		}
 		cairo_text_extents (cr, caption, &extents);
 		cairo_move_to(cr, indent - extents.width / 2, y);
 		cairo_show_text(cr, caption);
@@ -379,6 +456,24 @@
 	g->data[0][1] = swappercent;
 }
 
+/* Round up so that the value has only 1 significant digit */
+static unsigned
+round_up (unsigned val)
+{
+	int i = 0;
+	for (i = 0; val > 10; i++)
+	{
+		val /= 10;
+	}
+	val += 1;
+	for (; i > 0; i--)
+	{
+		val *= 10;
+	}
+	return val;
+}
+
+
 static void
 net_scale (LoadGraph *g, unsigned din, unsigned dout)
 {
@@ -398,7 +493,7 @@
 					    &g->net.values[NUM_POINTS]);
 
 	// round up
-	new_max = 11U * new_max / 10U;
+	new_max = round_up(new_max);
 	// make sure max is not 0 to avoid / 0
 	new_max = std::max(new_max, 1U);
 

