From 794670a03fd4c3aac6fe72d70ef64aaea9af45d7 Mon Sep 17 00:00:00 2001 From: marosg42 Date: Tue, 7 Nov 2017 13:17:11 +0100 Subject: Update tooltips with latest values Solving issue #283 --- multiload/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/multiload/main.c b/multiload/main.c index cd36de08..e8890f1a 100644 --- a/multiload/main.c +++ b/multiload/main.c @@ -287,8 +287,8 @@ multiload_applet_tooltip_update(LoadGraph *g) if (!strncmp(g->name, "memload", strlen("memload"))) { guint mem_user, mem_cache, user_percent, cache_percent; - mem_user = g->data[0][0]; - mem_cache = g->data[0][1] + g->data[0][2] + g->data[0][3]; + mem_user = g->data[1][0]; + mem_cache = g->data[1][1] + g->data[1][2] + g->data[1][3]; user_percent = 100.0f * mem_user / g->draw_height; cache_percent = 100.0f * mem_cache / g->draw_height; user_percent = MIN(user_percent, 100); @@ -324,7 +324,7 @@ multiload_applet_tooltip_update(LoadGraph *g) guint i, total_used, percent; for (i = 0, total_used = 0; i < (g->n - 1); i++) - total_used += g->data[0][i]; + total_used += g->data[1][i]; percent = 100.0f * total_used / g->draw_height; percent = MIN(percent, 100); -- cgit v1.2.1