gimp r25287 - in trunk: . libgimpthumb



Author: neo
Date: Fri Mar 28 16:47:38 2008
New Revision: 25287
URL: http://svn.gnome.org/viewvc/gimp?rev=25287&view=rev

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

	* libgimpthumb/gimpthumb-utils.c (gimp_thumb_png_name): use
	GCheckSum instead of the MD5 routine from libgimpmath.

	* gimpthumb.pc.in
	* libgimpthumb/Makefile.am: removed libgimpmath dependency from
	libgimpthumb.


Modified:
   trunk/ChangeLog
   trunk/gimpthumb.pc.in
   trunk/libgimpthumb/Makefile.am
   trunk/libgimpthumb/gimpthumb-utils.c

Modified: trunk/gimpthumb.pc.in
==============================================================================
--- trunk/gimpthumb.pc.in	(original)
+++ trunk/gimpthumb.pc.in	Fri Mar 28 16:47:38 2008
@@ -7,5 +7,5 @@
 Description: GIMP Thumbnail Library
 Version: @GIMP_REAL_VERSION@
 Requires: gdk-pixbuf-2.0
-Libs: -L${libdir} -lgimpthumb- GIMP_API_VERSION@ -lgimpmath- GIMP_API_VERSION@
+Libs: -L${libdir} -lgimpthumb- GIMP_API_VERSION@
 Cflags: -I${includedir}/gimp- GIMP_API_VERSION@

Modified: trunk/libgimpthumb/Makefile.am
==============================================================================
--- trunk/libgimpthumb/Makefile.am	(original)
+++ trunk/libgimpthumb/Makefile.am	Fri Mar 28 16:47:38 2008
@@ -1,7 +1,5 @@
 ## Process this file with automake to produce Makefile.in
 
-libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la
-
 if PLATFORM_WIN32
 no_undefined = -no-undefined
 endif
@@ -81,7 +79,7 @@
 	$(no_undefined)				\
 	$(libgimpthumb_export_symbols)
 
-libgimpthumb_2_0_la_LIBADD = $(libgimpmath) $(GDK_PIXBUF_LIBS) $(GLIB_LIBS) 
+libgimpthumb_2_0_la_LIBADD = $(GDK_PIXBUF_LIBS) $(GLIB_LIBS) 
 
 
 noinst_PROGRAMS = gimp-thumbnail-list

Modified: trunk/libgimpthumb/gimpthumb-utils.c
==============================================================================
--- trunk/libgimpthumb/gimpthumb-utils.c	(original)
+++ trunk/libgimpthumb/gimpthumb-utils.c	Fri Mar 28 16:47:38 2008
@@ -40,8 +40,6 @@
 #include "libgimpbase/gimpwin32-io.h"
 #endif
 
-#include "libgimpmath/gimpmath.h"
-
 #include "gimpthumb-error.h"
 #include "gimpthumb-types.h"
 #include "gimpthumb-utils.h"
@@ -763,14 +761,21 @@
 gimp_thumb_png_name (const gchar *uri)
 {
   static gchar name[40];
-  guchar       digest[16];
-  guchar       n;
-  gint         i;
 
-  gimp_md5_get_digest (uri, -1, digest);
+  GChecksum *checksum;
+  guchar     digest[16];
+  gsize      len = sizeof (digest);
+  gsize      i;
+
+  checksum = g_checksum_new (G_CHECKSUM_MD5);
+  g_checksum_update (checksum, (const guchar *) uri, -1);
+  g_checksum_get_digest (checksum, digest, &len);
+  g_checksum_free (checksum);
 
-  for (i = 0; i < 16; i++)
+  for (i = 0; i < len; i++)
     {
+      guchar n;
+
       n = (digest[i] >> 4) & 0xF;
       name[i * 2]     = (n > 9) ? 'a' + n - 10 : '0' + n;
 



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