gimp r27532 - in trunk: . plug-ins/file-jpeg



Author: neo
Date: Mon Nov  3 16:39:20 2008
New Revision: 27532
URL: http://svn.gnome.org/viewvc/gimp?rev=27532&view=rev

Log:
2008-11-03  Sven Neumann  <sven gimp org>

	Bug 559081 â JPEG Save dialog preview should adjust size units

	* plug-ins/file-jpeg/jpeg-save.c: use 
g_format_size_for_display()
	to display the JPEG file size.



Modified:
   trunk/ChangeLog
   trunk/plug-ins/file-jpeg/jpeg-save.c

Modified: trunk/plug-ins/file-jpeg/jpeg-save.c
==============================================================================
--- trunk/plug-ins/file-jpeg/jpeg-save.c	(original)
+++ trunk/plug-ins/file-jpeg/jpeg-save.c	Mon Nov  3 16:39:20 2008
@@ -192,14 +192,14 @@
       /* display the preview stuff */
       if (!pp->abort_me)
         {
-          struct stat buf;
-          gchar       temp[128];
+          struct stat  buf;
+          gchar       *text;
 
           g_stat (pp->file_name, &buf);
-          g_snprintf (temp, sizeof (temp),
-                      _("File size: %02.01f kB"),
-                      (gdouble) (buf.st_size) / 1024.0);
-          gtk_label_set_text (GTK_LABEL (preview_size), temp);
+          text = g_strdup_printf (_("File size: %s"),
+				  g_format_size_for_display (buf.st_size));
+          gtk_label_set_text (GTK_LABEL (preview_size), text);
+	  g_free (text);
 
           /* and load the preview */
           load_image (pp->file_name, GIMP_RUN_NONINTERACTIVE, TRUE, NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]