}
else if (free_space < total_size)
{
- gchar* total_size_string = g_format_size_for_display (total_size);
- gchar* free_space_string = g_format_size_for_display (free_space);
+ gchar* total_size_string = g_format_size (total_size);
+ gchar* free_space_string = g_format_size (free_space);
message = g_strdup_printf (
_("There is not enough free space to download \"%s\"."),
&uri[7]);
minutes_str = g_strdup_printf (ngettext ("%d minute", "%d minutes", minutes_left), minutes_left);
seconds_str = g_strdup_printf (ngettext ("%d second", "%d seconds", seconds_left), seconds_left);
- current = g_format_size_for_display (current_size);
- total = g_format_size_for_display (total_size);
+ current = g_format_size (current_size);
+ total = g_format_size (total_size);
last_time = g_object_get_data (G_OBJECT (download), "last-time");
last_size = g_object_get_data (G_OBJECT (download), "last-size");
g_free (total);
if (time_elapsed != *last_time)
- download_speed = g_format_size_for_display (
+ download_speed = g_format_size (
(current_size - *last_size) / (time_elapsed - *last_time));
else
/* i18n: Unknown number of bytes, used for transfer rate like ?B/s */
#define g_content_type_from_mime_type(mtp) g_strdup (mtp)
#endif
+#if !GLIB_CHECK_VERSION (2, 30, 0)
+ #define g_format_size(sz) g_format_size_for_display ((goffset)sz)
+#endif
+
#if !GTK_CHECK_VERSION (2, 14, 0)
#define gtk_dialog_get_content_area(dlg) dlg->vbox
#define gtk_dialog_get_action_area(dlg) dlg->action_area
gtk_tree_model_get (model, iter, 1, &download, -1);
/* FIXME: Ellipsize filename */
- current = g_format_size_for_display (webkit_download_get_current_size (download));
- total = g_format_size_for_display (webkit_download_get_total_size (download));
+ current = g_format_size (webkit_download_get_current_size (download));
+ total = g_format_size (webkit_download_get_total_size (download));
size_text = g_strdup_printf (_("%s of %s"), current, total);
g_free (current);
g_free (total);