rpms/gimp/devel gimp-2.6.2-jpeg-units.patch, NONE, 1.1 gimp.spec, 1.171, 1.172

Nils Philippsen nphilipp at fedoraproject.org
Tue Nov 11 11:44:28 UTC 2008


Author: nphilipp

Update of /cvs/pkgs/rpms/gimp/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10079

Modified Files:
	gimp.spec 
Added Files:
	gimp-2.6.2-jpeg-units.patch 
Log Message:
backport: use size units in JPEG save preview (#469551)


gimp-2.6.2-jpeg-units.patch:

--- NEW FILE gimp-2.6.2-jpeg-units.patch ---
diff -up gimp-2.6.2/plug-ins/file-jpeg/jpeg-save.c.jpeg-units gimp-2.6.2/plug-ins/file-jpeg/jpeg-save.c
--- gimp-2.6.2/plug-ins/file-jpeg/jpeg-save.c.jpeg-units	2008-10-30 10:32:32.000000000 +0100
+++ gimp-2.6.2/plug-ins/file-jpeg/jpeg-save.c	2008-11-11 12:32:18.000000000 +0100
@@ -192,14 +192,19 @@ background_jpeg_save (PreviewPersistent 
       /* display the preview stuff */
       if (!pp->abort_me)
         {
-          struct stat buf;
-          gchar       temp[128];
+          struct stat  buf;
+          gchar       *text;
+          gchar       *size_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);
+
+          size_text = g_format_size_for_display (buf.st_size);
+          text = g_strdup_printf (_("File size: %s"), size_text);
+
+          gtk_label_set_text (GTK_LABEL (preview_size), text);
+
+          g_free (text);
+          g_free (size_text);
 
           /* and load the preview */
           load_image (pp->file_name, GIMP_RUN_NONINTERACTIVE, TRUE, NULL);


Index: gimp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gimp/devel/gimp.spec,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -r1.171 -r1.172
--- gimp.spec	31 Oct 2008 15:36:20 -0000	1.171
+++ gimp.spec	11 Nov 2008 11:43:57 -0000	1.172
@@ -29,7 +29,7 @@
 %define age 0
 %define minorver 600
 %define microver %(ver=%{version}; echo ${ver##*.*.})
-Release:        1%{?dist}
+Release:        2%{?dist}
 Epoch:          2
 License:        GPLv2+
 Group:          Applications/Multimedia
@@ -101,6 +101,7 @@
 Source0:        ftp://ftp.gimp.org/pub/gimp/v%{binver}/gimp-%{version}.tar.bz2
 Source1:        gimp-plugin-mgr.in
 Patch0:         gimp-2.6.2-xdg-open.patch
+Patch1:         gimp-2.6.2-jpeg-units.patch
 
 %description
 GIMP (GNU Image Manipulation Program) is a powerful image composition and
@@ -168,6 +169,7 @@
 
 %setup -q -n gimp-%{version}
 %patch0 -p1 -b .xdg-open
+%patch1 -p1 -b .jpeg-units
 
 %build
 LIBAA="disable"; export LIBAA
@@ -443,6 +445,9 @@
 %{_libdir}/gimp/%{interfacever}/plug-ins/help-browser
 
 %changelog
+* Tue Nov 11 2008 Nils Philippsen <nils at redhat.com> - 2:2.6.2-2
+- backport: use size units in JPEG save preview (#469551)
+
 * Fri Oct 31 2008 Nils Philippsen <nils at redhat.com> - 2:2.6.2-1
 - version 2.6.2
 - update xdg-open patch




More information about the scm-commits mailing list