[gnome-system-monitor] Start network graph data with a 0 to make the graphs start sync up
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-monitor] Start network graph data with a 0 to make the graphs start sync up
- Date: Sun, 27 Feb 2022 22:16:07 +0000 (UTC)
commit d9b89f6e71782e27795023baf74d15706484ae72
Author: ToMe25 <ToMe25 gmx de>
Date: Sun Feb 27 21:57:01 2022 +0100
Start network graph data with a 0 to make the graphs start sync up
Add a zero data point to the start of the network graph to make it start
at the same time as the other graphs.
This is a purely cosmetic change.
src/load-graph.cpp | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/load-graph.cpp b/src/load-graph.cpp
index d96d4179..377623fd 100644
--- a/src/load-graph.cpp
+++ b/src/load-graph.cpp
@@ -728,7 +728,6 @@ get_net (LoadGraph *graph)
guint64 in = 0, out = 0;
guint64 time;
guint64 din, dout;
- gboolean first = true;
ifnames = glibtop_get_netlist(&netlist);
for (i = 0; i < netlist.number; ++i)
@@ -743,7 +742,7 @@ get_net (LoadGraph *graph)
those with only a LINK ipv6 addr) However we need to
be able to exclude these while still keeping the
value so when they get online (with NetworkManager
- for example) we don't get a suddent peak. Once we're
+ for example) we don't get a sudden peak. Once we're
able to get this, ignoring down interfaces will be
possible too. */
if (not (netload.flags & (1 << GLIBTOP_NETLOAD_ADDRESS6)
@@ -774,13 +773,11 @@ get_net (LoadGraph *graph)
dout = 0;
}
- first = first && (graph->net.time==0);
graph->net.last_in = in;
graph->net.last_out = out;
graph->net.time = time;
- if (!first)
- net_scale(graph, din, dout);
+ net_scale(graph, din, dout);
gtk_label_set_text (GTK_LABEL (graph->labels.net_in), procman::format_network_rate(din).c_str());
gtk_label_set_text (GTK_LABEL (graph->labels.net_in_total), procman::format_network(in).c_str());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]