diff --git a/app/actions/edit-commands.c b/app/actions/edit-commands.c index 31fac96666..c34d72865a 100644 --- a/app/actions/edit-commands.c +++ b/app/actions/edit-commands.c @@ -169,7 +169,7 @@ edit_undo_clear_cmd_callback (GtkAction *action, memsize += gimp_object_get_memsize (GIMP_OBJECT (redo_stack), &guisize); memsize += guisize; - size = g_format_size_for_display (memsize); + size = g_format_size (memsize); gimp_message_box_set_text (GIMP_MESSAGE_DIALOG (dialog)->box, _("Clearing the undo history of this " diff --git a/app/core/gimpimagefile.c b/app/core/gimpimagefile.c index aa2aa37e7d..5f80aaeb14 100644 --- a/app/core/gimpimagefile.c +++ b/app/core/gimpimagefile.c @@ -720,7 +720,7 @@ gimp_imagefile_get_desc_string (GimpImagefile *imagefile) if (thumbnail->image_filesize > 0) { - gchar *size = g_format_size_for_display (thumbnail->image_filesize); + gchar *size = g_format_size (thumbnail->image_filesize); if (str->len > 0) g_string_append_c (str, '\n'); diff --git a/app/dialogs/image-new-dialog.c b/app/dialogs/image-new-dialog.c index fffcdd197a..74caf052ce 100644 --- a/app/dialogs/image-new-dialog.c +++ b/app/dialogs/image-new-dialog.c @@ -320,14 +320,14 @@ image_new_confirm_dialog (ImageNewDialog *data) G_CALLBACK (image_new_confirm_response), data); - size = g_format_size_for_display (gimp_template_get_initial_size (data->template)); + size = g_format_size (gimp_template_get_initial_size (data->template)); gimp_message_box_set_primary_text (GIMP_MESSAGE_DIALOG (dialog)->box, _("You are trying to create an image " "with a size of %s."), size); g_free (size); config = GIMP_GUI_CONFIG (data->context->gimp->config); - size = g_format_size_for_display (config->max_new_image_size); + size = g_format_size (config->max_new_image_size); gimp_message_box_set_text (GIMP_MESSAGE_DIALOG (dialog)->box, _("An image of the chosen size will use more " "memory than what is configured as " diff --git a/app/dialogs/image-scale-dialog.c b/app/dialogs/image-scale-dialog.c index e1dabbd321..ba86d2514c 100644 --- a/app/dialogs/image-scale-dialog.c +++ b/app/dialogs/image-scale-dialog.c @@ -234,13 +234,13 @@ image_scale_confirm_large (ImageScaleDialog *dialog, GtkWidget *widget = image_scale_confirm_dialog (dialog); gchar *size; - size = g_format_size_for_display (new_memsize); + size = g_format_size (new_memsize); gimp_message_box_set_primary_text (GIMP_MESSAGE_DIALOG (widget)->box, _("You are trying to create an image " "with a size of %s."), size); g_free (size); - size = g_format_size_for_display (max_memsize); + size = g_format_size (max_memsize); gimp_message_box_set_text (GIMP_MESSAGE_DIALOG (widget)->box, _("Scaling the image to the chosen size will " "make it use more memory than what is " diff --git a/app/display/gimpdisplayshell-title.c b/app/display/gimpdisplayshell-title.c index 7614968e77..2cc4c28711 100644 --- a/app/display/gimpdisplayshell-title.c +++ b/app/display/gimpdisplayshell-title.c @@ -311,11 +311,8 @@ gimp_display_shell_format_title (GimpDisplayShell *shell, GimpObject *object = GIMP_OBJECT (image); gchar *str; - str = g_format_size_for_display (gimp_object_get_memsize (object, - NULL)); - + str = g_format_size (gimp_object_get_memsize (object, NULL)); i += print (title, title_len, i, "%s", str); - g_free (str); } break; diff --git a/app/widgets/gimpimagepropview.c b/app/widgets/gimpimagepropview.c index f6fe1f839f..591ed42201 100644 --- a/app/widgets/gimpimagepropview.c +++ b/app/widgets/gimpimagepropview.c @@ -301,8 +301,7 @@ static void gimp_image_prop_view_label_set_memsize (GtkWidget *label, GimpObject *object) { - gchar *str = g_format_size_for_display (gimp_object_get_memsize (object, - NULL)); + gchar *str = g_format_size (gimp_object_get_memsize (object, NULL)); gtk_label_set_text (GTK_LABEL (label), str); g_free (str); } @@ -339,7 +338,7 @@ gimp_image_prop_view_label_set_filesize (GtkWidget *label, if (g_stat (filename, &buf) == 0) { - gchar *str = g_format_size_for_display (buf.st_size); + gchar *str = g_format_size (buf.st_size); gtk_label_set_text (GTK_LABEL (label), str); g_free (str); @@ -396,7 +395,7 @@ gimp_image_prop_view_label_set_undo (GtkWidget *label, gchar *str; gchar buf[256]; - str = g_format_size_for_display (gimp_object_get_memsize (object, NULL)); + str = g_format_size (gimp_object_get_memsize (object, NULL)); g_snprintf (buf, sizeof (buf), "%d (%s)", steps, str); g_free (str); diff --git a/app/widgets/gimptemplateeditor.c b/app/widgets/gimptemplateeditor.c index 70b49608cb..6c6dfbd9db 100644 --- a/app/widgets/gimptemplateeditor.c +++ b/app/widgets/gimptemplateeditor.c @@ -650,7 +650,7 @@ gimp_template_editor_template_notify (GimpTemplate *template, } #ifdef ENABLE_MEMSIZE_LABEL - text = g_format_size_for_display (gimp_template_get_initial_size (template)); + text = g_format_size (gimp_template_get_initial_size (template)); gtk_label_set_text (GTK_LABEL (private->memsize_label), text); g_free (text); #endif diff --git a/app/widgets/gimpthumbbox.c b/app/widgets/gimpthumbbox.c index f5ece6e964..04b005f987 100644 --- a/app/widgets/gimpthumbbox.c +++ b/app/widgets/gimpthumbbox.c @@ -725,7 +725,7 @@ gimp_thumb_box_auto_thumbnail (GimpThumbBox *box) gchar *size; gchar *text; - size = g_format_size_for_display (thumb->image_filesize); + size = g_format_size (thumb->image_filesize); text = g_strdup_printf ("%s\n%s", size, _("Creating preview...")); diff --git a/libgimpbase/gimpmemsize.c b/libgimpbase/gimpmemsize.c index 2c8118b0af..92f6dd0738 100644 --- a/libgimpbase/gimpmemsize.c +++ b/libgimpbase/gimpmemsize.c @@ -71,7 +71,7 @@ gimp_memsize_get_type (void) * Creates a string representation of a given memory size. This string * can be parsed by gimp_memsize_deserialize() and can thus be used in * config files. It should not be displayed to the user. If you need a - * nice human-readable string please use g_format_size_for_display(). + * nice human-readable string please use g_format_size(). * * Return value: A newly allocated string representation of @memsize. * @@ -162,14 +162,14 @@ gimp_memsize_deserialize (const gchar *string, * gimp_memsize_to_string: * @memsize: A memory size in bytes. * - * This function is deprecated! Use g_format_size_for_display() instead. + * This function is deprecated! Use g_format_size() instead. * * Return value: A newly allocated human-readable, translated string. **/ gchar * gimp_memsize_to_string (guint64 memsize) { - return g_format_size_for_display (memsize); + return g_format_size (memsize); } diff --git a/plug-ins/file-jpeg/jpeg-save.c b/plug-ins/file-jpeg/jpeg-save.c index a1e7c38089..cebfbce6dd 100644 --- a/plug-ins/file-jpeg/jpeg-save.c +++ b/plug-ins/file-jpeg/jpeg-save.c @@ -202,7 +202,7 @@ background_jpeg_save (PreviewPersistent *pp) g_stat (pp->file_name, &buf); - size_text = g_format_size_for_display (buf.st_size); + size_text = g_format_size (buf.st_size); text = g_strdup_printf (_("File size: %s"), size_text); gtk_label_set_text (GTK_LABEL (preview_size), text); diff --git a/plug-ins/file-uri/uri-backend-gvfs.c b/plug-ins/file-uri/uri-backend-gvfs.c index d9112e69b5..3fb2f278c9 100644 --- a/plug-ins/file-uri/uri-backend-gvfs.c +++ b/plug-ins/file-uri/uri-backend-gvfs.c @@ -224,8 +224,8 @@ uri_progress_callback (goffset current_num_bytes, if (total_num_bytes > 0) { const gchar *format; - gchar *done = g_format_size_for_display (current_num_bytes); - gchar *total = g_format_size_for_display (total_num_bytes); + gchar *done = g_format_size (current_num_bytes); + gchar *total = g_format_size (total_num_bytes); switch (progress->mode) { @@ -251,7 +251,7 @@ uri_progress_callback (goffset current_num_bytes, else { const gchar *format; - gchar *done = g_format_size_for_display (current_num_bytes); + gchar *done = g_format_size (current_num_bytes); switch (progress->mode) { diff --git a/plug-ins/file-uri/uri-backend-libcurl.c b/plug-ins/file-uri/uri-backend-libcurl.c index adf87f7c39..07d5b15338 100644 --- a/plug-ins/file-uri/uri-backend-libcurl.c +++ b/plug-ins/file-uri/uri-backend-libcurl.c @@ -123,14 +123,14 @@ progress_callback (void *clientp, if (dltotal > 0.0) { - memsize = g_format_size_for_display (dltotal); + memsize = g_format_size (dltotal); gimp_progress_set_text_printf (_("Downloading %s of image data"), memsize); gimp_progress_update (dlnow / dltotal); } else { - memsize = g_format_size_for_display (dlnow); + memsize = g_format_size (dlnow); gimp_progress_set_text_printf (_("Downloaded %s of image data"), memsize); gimp_progress_pulse (); diff --git a/plug-ins/file-uri/uri-backend-wget.c b/plug-ins/file-uri/uri-backend-wget.c index 20c2e4621d..c052f7ef30 100644 --- a/plug-ins/file-uri/uri-backend-wget.c +++ b/plug-ins/file-uri/uri-backend-wget.c @@ -357,7 +357,7 @@ uri_backend_load_image (const gchar *uri, /* Start the actual download... */ if (size > 0) { - memsize = g_format_size_for_display (size); + memsize = g_format_size (size); message = g_strdup_printf (_("Downloading %s of image data"), memsize); } @@ -398,7 +398,7 @@ uri_backend_load_image (const gchar *uri, } else { - memsize = g_format_size_for_display (kilobytes * 1024); + memsize = g_format_size (kilobytes * 1024); gimp_progress_set_text_printf (_("Downloaded %s of image data"), memsize);