Commit 8203e1ac authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

use GCheckSum instead of the MD5 routine from libgimpmath.

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.

svn path=/trunk/; revision=25287
parent 369738ea
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.
2008-03-28 Sven Neumann <sven@gimp.org>
* app/sanity.c (sanity_check_glib): bumped glib version.
......
......@@ -7,5 +7,5 @@ Name: GIMP Thumb
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@
## 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 @@ libgimpthumb_2_0_la_LDFLAGS = \
$(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
......
......@@ -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 @@ static const gchar *
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment