Author: jannis Date: 2008-11-10 19:19:08 +0000 (Mon, 10 Nov 2008) New Revision: 28714
Modified: libexo/trunk/ChangeLog libexo/trunk/configure.in.in libexo/trunk/exo/exo-icon-view.c libexo/trunk/exo/exo-md5.c Log: * configure.in.in, exo/exo-md5.c: Get rid of external MD5 functions. $ Modified: libexo/trunk/ChangeLog =================================================================== --- libexo/trunk/ChangeLog 2008-11-10 17:00:52 UTC (rev 28713) +++ libexo/trunk/ChangeLog 2008-11-10 19:19:08 UTC (rev 28714) @@ -1,3 +1,7 @@ +2008-11-10 Jannis Pohlmann <[EMAIL PROTECTED]> + + * configure.in.in, exo/exo-md5.c: Get rid of external MD5 functions. + 2008-11-06 Brian Tarricone <[EMAIL PROTECTED]> * exo-helper/main.c: Fix compile against glib < 2.14. Modified: libexo/trunk/configure.in.in =================================================================== --- libexo/trunk/configure.in.in 2008-11-10 17:00:52 UTC (rev 28713) +++ libexo/trunk/configure.in.in 2008-11-10 19:19:08 UTC (rev 28714) @@ -106,7 +106,7 @@ dnl *************************************** AC_HEADER_STDC() AC_CHECK_HEADERS([assert.h errno.h fcntl.h fnmatch.h fstab.h libintl.h \ - locale.h math.h md5.h md5global.h mmintrin.h mntent.h \ + locale.h math.h mmintrin.h mntent.h \ paths.h regex.h signal.h stdarg.h string.h sys/mman.h \ sys/mnttab.h sys/mount.h sys/param.h sys/resource.h \ sys/statvfs.h sys/stat.h sys/time.h sys/types.h sys/ucred.h \ @@ -118,12 +118,6 @@ AC_FUNC_MMAP() AC_CHECK_FUNCS([getfsstat getmntent getvfsstat regexec setfsent setmntent]) -dnl ****************************************** -dnl *** Check for Message Digest functions *** -dnl ****************************************** -AC_SEARCH_LIBS([MD5Init], [md md5 c], \ - [AC_DEFINE([HAVE_MD5INIT], [1], [Define if MD5Init present])]) - dnl *************************************** dnl *** Check for strftime() extensions *** dnl *************************************** Modified: libexo/trunk/exo/exo-icon-view.c =================================================================== --- libexo/trunk/exo/exo-icon-view.c 2008-11-10 17:00:52 UTC (rev 28713) +++ libexo/trunk/exo/exo-icon-view.c 2008-11-10 19:19:08 UTC (rev 28714) @@ -3560,6 +3560,7 @@ GtkStateType state; GdkRectangle cell_area; gboolean rtl; + cairo_t *cr; GList *lp; if (G_UNLIKELY (icon_view->priv->model == NULL)) @@ -3573,6 +3574,31 @@ { flags = GTK_CELL_RENDERER_SELECTED; state = GTK_WIDGET_HAS_FOCUS (icon_view) ? GTK_STATE_SELECTED : GTK_STATE_ACTIVE; + + for (lp = icon_view->priv->cell_list; lp != NULL; lp = lp->next) + { + info = EXO_ICON_VIEW_CELL_INFO (lp->data); + + if (G_UNLIKELY (!info->cell->visible)) + continue; + + exo_icon_view_get_cell_area (icon_view, item, info, &cell_area); + + /* FIXME We hardwire background drawing behind text cell renderers + * here. This is ugly, but it's done to be consistent with + * GtkIconView */ + if (GTK_IS_CELL_RENDERER_TEXT (info->cell)) + { + cr = gdk_cairo_create (drawable); + gdk_cairo_set_source_color (cr, >K_WIDGET (icon_view)->style->base[state]); + cairo_rectangle (cr, + x - item->area.x + cell_area.x, + y - item->area.y + cell_area.y, + cell_area.width, cell_area.height); + cairo_fill (cr); + cairo_destroy (cr); + } + } } else { Modified: libexo/trunk/exo/exo-md5.c =================================================================== --- libexo/trunk/exo/exo-md5.c 2008-11-10 17:00:52 UTC (rev 28713) +++ libexo/trunk/exo/exo-md5.c 2008-11-10 19:19:08 UTC (rev 28714) @@ -43,8 +43,6 @@ -#if !defined(HAVE_MD5INIT) || !defined(HAVE_MD5_H) - /* * This code implements the MD5 message-digest algorithm. * The algorithm is due to Ron Rivest. The original code was @@ -64,6 +62,8 @@ guint32 in[16]; }; + + #if G_BYTE_ORDER == G_BIG_ENDIAN static void byteSwap (guint32 *buf, unsigned words) @@ -80,6 +80,8 @@ #define byteSwap(buf,words) #endif + + /* * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious * initialization constants. @@ -96,8 +98,12 @@ ctx->bytes[1] = 0; } + + /* The four core functions - F1 is optimized somewhat */ + + /* #define F1(x, y, z) (x & y | ~x & z) */ #define F1(x, y, z) (z ^ (x & (y ^ z))) #define F2(x, y, z) F1(z, x, y) @@ -108,6 +114,8 @@ #define MD5STEP(f,w,x,y,z,in,s) \ (w += f(x,y,z) + in, w = (w<<s | w>>(32-s)) + x) + + /* * The core of the MD5 algorithm, this alters an existing MD5 hash to * reflect the addition of 16 longwords of new data. MD5Update blocks @@ -197,6 +205,8 @@ buf[3] += d; } + + /* * Update context to reflect the concatenation of another buffer full * of bytes. @@ -237,6 +247,8 @@ memcpy(ctx->in, buf, len); } + + /* * Final wrapup - pad to 64-byte boundary with the bit pattern * 1 0* (64-bit count of bits processed, MSB-first) @@ -274,19 +286,8 @@ memcpy (digest, ctx->buf, 16); } -#else -/* RedHat AS, Fedora */ -#ifdef HAVE_MD5GLOBAL_H -#include <md5global.h> -#endif -#include <md5.h> - -#endif /* !defined (HAVE_MD5INIT) */ - - - static void get_md5 (const gchar *contents, guchar digest[16]) _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits