summaryrefslogtreecommitdiff
path: root/baobab/src/baobab-utils.c
diff options
context:
space:
mode:
authorSteve Zesch <[email protected]>2012-11-15 21:41:46 -0500
committerSteve Zesch <[email protected]>2012-11-15 21:41:46 -0500
commit266894647388df80ab6bc6d3b38201db863a9488 (patch)
treeca04bb43cb782ef8ec83500b3ef91cc82981f0a5 /baobab/src/baobab-utils.c
parenta4d1cf67a9a6b841b41c5ee28809bdcbc2ff44f3 (diff)
downloadmate-utils-266894647388df80ab6bc6d3b38201db863a9488.tar.bz2
mate-utils-266894647388df80ab6bc6d3b38201db863a9488.tar.xz
Fixed g_format_size_for_display deprecations. Closes #5.
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);