From 0e7c2b2b11dfcee5c2c34796b7ce5a04eea2dc9c Mon Sep 17 00:00:00 2001 From: Mike Massonnet Date: Sat, 14 Jul 2012 19:52:58 +0200 Subject: [PATCH] Bug 9089: Rectify tooltip information The exchanged data is not always per second, therefore the code now displays the interval and values in bytes. --- panel-plugin/netload.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/panel-plugin/netload.c b/panel-plugin/netload.c index e85cd9f..6fd3f67 100644 --- a/panel-plugin/netload.c +++ b/panel-plugin/netload.c @@ -246,10 +246,12 @@ static gboolean update_monitors(t_global_monitor *global) { char* ip = get_ip_address(&(global->monitor->data)); g_snprintf(caption, sizeof(caption), - _("<< %s >> (%s)\nAverage of last %d measures:\n" - "Incoming: %s/s\nOutgoing: %s/s\nTotal: %s/s"), + _("<< %s >> (%s)\nAverage of last %d measures\n" + "with an interval of %.2fs:\n" + "Incoming: %s\nOutgoing: %s\nTotal: %s"), get_name(&(global->monitor->data)), ip ? ip : _("no IP address"), - HISTSIZE_CALCULATE, buffer[IN], buffer[OUT], buffer[TOT]); + HISTSIZE_CALCULATE, global->monitor->options.update_interval / 1000.0, + buffer[IN], buffer[OUT], buffer[TOT]); gtk_label_set_text(GTK_LABEL(global->tooltip_text), caption); if (global->monitor->options.show_values)