[Xfce4-commits] <xfce4-netload-plugin:master> Bug 9089: Rectify tooltip information

Mike Massonnet noreply at xfce.org
Sat Jul 14 19:54:01 CEST 2012


Updating branch refs/heads/master
         to 0e7c2b2b11dfcee5c2c34796b7ce5a04eea2dc9c (commit)
       from 7434a7f1fbb4c35c92add675d5a0314cacda8671 (commit)

commit 0e7c2b2b11dfcee5c2c34796b7ce5a04eea2dc9c
Author: Mike Massonnet <mmassonnet at gmail.com>
Date:   Sat Jul 14 19:52:58 2012 +0200

    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 files 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)


More information about the Xfce4-commits mailing list