Bug 9089: Rectify tooltip information
The exchanged data is not always per second, therefore the code now displays the interval and values in bytes.master
parent
7434a7f1fb
commit
0e7c2b2b11
|
@ -246,10 +246,12 @@ static gboolean update_monitors(t_global_monitor *global)
|
||||||
{
|
{
|
||||||
char* ip = get_ip_address(&(global->monitor->data));
|
char* ip = get_ip_address(&(global->monitor->data));
|
||||||
g_snprintf(caption, sizeof(caption),
|
g_snprintf(caption, sizeof(caption),
|
||||||
_("<< %s >> (%s)\nAverage of last %d measures:\n"
|
_("<< %s >> (%s)\nAverage of last %d measures\n"
|
||||||
"Incoming: %s/s\nOutgoing: %s/s\nTotal: %s/s"),
|
"with an interval of %.2fs:\n"
|
||||||
|
"Incoming: %s\nOutgoing: %s\nTotal: %s"),
|
||||||
get_name(&(global->monitor->data)), ip ? ip : _("no IP address"),
|
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);
|
gtk_label_set_text(GTK_LABEL(global->tooltip_text), caption);
|
||||||
|
|
||||||
if (global->monitor->options.show_values)
|
if (global->monitor->options.show_values)
|
||||||
|
|
Loading…
Reference in New Issue