aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorhwspeedy <ns@bigbear.dk>2024-02-23 23:11:47 +0100
committerhwspeedy <ns@bigbear.dk>2024-02-23 23:11:47 +0100
commit2f1f991fdf5f2d2274b883fad979fe1458639a17 (patch)
tree89426682daf138ebf8dabc5bcd4bd04147085403 /shell
parente034d35b91a0a9c84de2fd852b51b06665ebc52a (diff)
FIX UberGraph Memory 1024x
Diffstat (limited to 'shell')
-rw-r--r--shell/shell.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/shell/shell.c b/shell/shell.c
index a2773523..22b1003f 100644
--- a/shell/shell.c
+++ b/shell/shell.c
@@ -861,6 +861,7 @@ static gboolean update_field(gpointer data)
/* if the entry is still selected, update it */
if (fu->entry->selected && fu->entry->fieldfunc) {
gchar *value = fu->entry->fieldfunc(fu->field_name);
+ gdouble v;
if (item->is_iter) {
/*
@@ -872,7 +873,12 @@ static gboolean update_field(gpointer data)
item->iter)) {
load_graph_set_title(shell->loadgraph, fu->field_name);
- load_graph_update(shell->loadgraph, atof(value));
+ v=atof(value);
+ //fix KiB->Bytes for UberGraph (GTK3)
+#if GTK_CHECK_VERSION(3, 0, 0)
+ if(strstr(value,"KiB")) v*=1024;
+#endif
+ load_graph_update(shell->loadgraph, v);
}
GtkTreeStore *store = GTK_TREE_STORE(shell->info_tree->model);