diff options
Diffstat (limited to 'src/file-manager/fm-properties-window.c')
-rw-r--r-- | src/file-manager/fm-properties-window.c | 44 |
1 files changed, 17 insertions, 27 deletions
diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c index ddec36b9..ba305015 100644 --- a/src/file-manager/fm-properties-window.c +++ b/src/file-manager/fm-properties-window.c @@ -68,8 +68,6 @@ #include <sys/mount.h> #endif -#include <src/glibcompat.h> /* for g_list_free_full */ - #define USED_FILL_R (0.988235294 * 65535) #define USED_FILL_G (0.91372549 * 65535) #define USED_FILL_B (0.309803922 * 65535) @@ -2321,14 +2319,10 @@ directory_contents_value_field_update (FMPropertiesWindow *window) } else { char *size_str; - #if GLIB_CHECK_VERSION(2, 30, 0) - if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_USE_IEC_UNITS)) - size_str = g_format_size_full (total_size, G_FORMAT_SIZE_IEC_UNITS); - else - size_str = g_format_size(total_size); - #else - size_str = g_format_size_for_display(total_size); - #endif + if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_USE_IEC_UNITS)) + size_str = g_format_size_full (total_size, G_FORMAT_SIZE_IEC_UNITS); + else + size_str = g_format_size(total_size); text = g_strdup_printf (ngettext("%'d item, with size %s", "%'d items, totalling %s", @@ -3147,22 +3141,16 @@ create_pie_widget (FMPropertiesWindow *window) GFile *location; GFileInfo *info; - #if GLIB_CHECK_VERSION(2, 30, 0) - if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_USE_IEC_UNITS)) { - capacity = g_format_size_full(window->details->volume_capacity, G_FORMAT_SIZE_IEC_UNITS); - free = g_format_size_full(window->details->volume_free, G_FORMAT_SIZE_IEC_UNITS); - used = g_format_size_full(window->details->volume_capacity - window->details->volume_free, G_FORMAT_SIZE_IEC_UNITS); - } - else { - capacity = g_format_size(window->details->volume_capacity); - free = g_format_size(window->details->volume_free); - used = g_format_size(window->details->volume_capacity - window->details->volume_free); - } - #else - capacity = g_format_size_for_display(window->details->volume_capacity); - free = g_format_size_for_display(window->details->volume_free); - used = g_format_size_for_display(window->details->volume_capacity - window->details->volume_free); - #endif + if (g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_USE_IEC_UNITS)) { + capacity = g_format_size_full(window->details->volume_capacity, G_FORMAT_SIZE_IEC_UNITS); + free = g_format_size_full(window->details->volume_free, G_FORMAT_SIZE_IEC_UNITS); + used = g_format_size_full(window->details->volume_capacity - window->details->volume_free, G_FORMAT_SIZE_IEC_UNITS); + } + else { + capacity = g_format_size(window->details->volume_capacity); + free = g_format_size(window->details->volume_free); + used = g_format_size(window->details->volume_capacity - window->details->volume_free); + } file = get_original_file (window); @@ -3209,7 +3197,9 @@ create_pie_widget (FMPropertiesWindow *window) if (info) { fs_type = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE); if (fs_type != NULL) { - gtk_label_set_text (GTK_LABEL (fstype_label), g_strconcat (_("Filesystem type:"), " ", fs_type, NULL)); + gchar *fstype_text = g_strconcat (_("Filesystem type:"), " ", fs_type, NULL); + gtk_label_set_text (GTK_LABEL (fstype_label), fstype_text); + g_free (fstype_text); } g_object_unref (info); |