summaryrefslogtreecommitdiff
path: root/baobab/src/baobab-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'baobab/src/baobab-utils.c')
-rw-r--r--baobab/src/baobab-utils.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/baobab/src/baobab-utils.c b/baobab/src/baobab-utils.c
index 12fbcbfb..5b3a0b46 100644
--- a/baobab/src/baobab-utils.c
+++ b/baobab/src/baobab-utils.c
@@ -195,8 +195,13 @@ show_bars (GtkTreeModel *mdl,
&readelements, -1);
gtk_tree_model_get (mdl, iter, size_col, &size, -1);
- sizecstr = g_format_size_for_display (size);
-
+
+ #if GLIB_CHECK_VERSION (2, 30, 0)
+ sizecstr = g_format_size (size);
+ #else
+ sizecstr = g_format_size_for_display (size);
+ #endif
+
if (readelements == -1) {
gtk_tree_store_set (GTK_TREE_STORE (mdl), iter,
COL_DIR_SIZE, sizecstr, -1);
@@ -220,8 +225,13 @@ show_bars (GtkTreeModel *mdl,
if (readelements != -1) {
gtk_tree_model_get (mdl, iter, size_col, &size,
-1);
- sizecstr = g_format_size_for_display (size);
-
+
+ #if GLIB_CHECK_VERSION (2, 30, 0)
+ sizecstr = g_format_size (size);
+ #else
+ sizecstr = g_format_size_for_display (size);
+ #endif
+
gtk_tree_store_set (GTK_TREE_STORE (mdl), iter,
COL_H_PERC, 100.0,
COL_DIR_SIZE, sizecstr, -1);