[Xfce4-commits] [apps/xfce4-taskmanager] 01/02: Use g_format_size_full with G_FORMAT_SIZE_IEC_UNITS for RAM
noreply at xfce.org
noreply at xfce.org
Mon Dec 8 10:39:48 CET 2014
This is an automated email from the git hooks/post-receive script.
landry pushed a commit to branch master
in repository apps/xfce4-taskmanager.
commit 134e0c278f91b47364e75ab7824e085069fee600
Author: Harald Judt <h.judt at gmx.at>
Date: Sun Dec 7 13:37:53 2014 +0100
Use g_format_size_full with G_FORMAT_SIZE_IEC_UNITS for RAM
This makes it more consistent with what other tools report.
---
src/main.c | 8 ++++----
src/task-manager.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/main.c b/src/main.c
index f9645c8..10fbe9b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -98,14 +98,14 @@ init_timeout (void)
g_object_get (settings, "show-memory-in-xbytes", &show_memory_in_xbytes, NULL);
if (show_memory_in_xbytes) {
- used = g_format_size(memory_used);
- total = g_format_size(memory_total);
+ used = g_format_size_full(memory_used, G_FORMAT_SIZE_IEC_UNITS);
+ total = g_format_size_full(memory_total, G_FORMAT_SIZE_IEC_UNITS);
g_snprintf (memory_info, 64,"%s / %s", used, total);
g_free(used);
g_free(total);
- used = g_format_size(swap_used);
- total = g_format_size(swap_total);
+ used = g_format_size_full(swap_used, G_FORMAT_SIZE_IEC_UNITS);
+ total = g_format_size_full(swap_total, G_FORMAT_SIZE_IEC_UNITS);
g_snprintf (swap_info, 64,"%s / %s", used, total);
g_free(used);
g_free(total);
diff --git a/src/task-manager.c b/src/task-manager.c
index 32fe28a..4d689df 100644
--- a/src/task-manager.c
+++ b/src/task-manager.c
@@ -234,8 +234,8 @@ model_update_tree_iter (GtkTreeModel *model, GtkTreeIter *iter, Task *task)
GdkPixbuf *icon;
#endif
- vsz = g_format_size (task->vsz);
- rss = g_format_size (task->rss);
+ vsz = g_format_size_full (task->vsz, G_FORMAT_SIZE_IEC_UNITS);
+ rss = g_format_size_full (task->rss, G_FORMAT_SIZE_IEC_UNITS);
g_snprintf (value, 14, (more_precision) ? "%.2f" : "%.0f", task->cpu_user + task->cpu_system);
g_snprintf (cpu, 16, _("%s%%"), value);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list