It's much more intuitive for the user to see the memory usage values

aligning with the familiar information presented by top(1).

discussed with several
tested by aja@
This commit is contained in:
jasper 2011-05-26 07:29:34 +00:00
parent 31de6f9252
commit b6dd2489c5
2 changed files with 23 additions and 2 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.15 2011/05/24 20:49:50 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.16 2011/05/26 07:29:34 jasper Exp $
COMMENT= sytem monitor for GNOME
GNOME_PROJECT= gnome-system-monitor
GNOME_VERSION= 2.28.2
REVISION= 4
REVISION= 5
CATEGORIES= sysutils

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-src_load-graph_cpp,v 1.1 2011/05/26 07:29:34 jasper Exp $
It's much more intuitive for the user to see the memory usage values
aligning with the familiar information presented by top(1).
--- src/load-graph.cpp.orig Tue Sep 28 01:13:17 2010
+++ src/load-graph.cpp Wed May 25 12:03:52 2011
@@ -360,11 +360,11 @@ get_memory (LoadGraph *g)
/* There's no swap on LiveCD : 0.0f is better than NaN :) */
swappercent = (swap.total ? (float)swap.used / (float)swap.total : 0.0f);
- mempercent = (float)mem.user / (float)mem.total;
+ mempercent = (float)mem.used / (float)mem.total;
set_memory_label_and_picker(GTK_LABEL(g->labels.memory),
GSM_COLOR_BUTTON(g->mem_color_picker),
- mem.user, mem.total, mempercent);
+ mem.used, mem.total, mempercent);
set_memory_label_and_picker(GTK_LABEL(g->labels.swap),
GSM_COLOR_BUTTON(g->swap_color_picker),