Index: cut-n-paste/Makefile.am
===================================================================
--- cut-n-paste/Makefile.am	(revision 3236)
+++ cut-n-paste/Makefile.am	(working copy)
@@ -1 +1 @@
-SUBDIRS = zoom-control toolbar-editor totem-screensaver gedit-message-area evmountoperation smclient
+SUBDIRS = zoom-control toolbar-editor totem-screensaver gedit-message-area evmountoperation smclient eog
Index: cut-n-paste/eog/eog-pixbuf-cell-renderer.c
===================================================================
--- cut-n-paste/eog/eog-pixbuf-cell-renderer.c	(revision 0)
+++ cut-n-paste/eog/eog-pixbuf-cell-renderer.c	(revision 0)
@@ -0,0 +1,112 @@
+/* Eye Of Gnome - Pixbuf Cellrenderer 
+ *
+ * Copyright (C) 2007 The GNOME Foundation
+ *
+ * Author: Lucas Rocha <lucasr@gnome.org>
+ *
+ * Based on gnome-control-center code (capplets/appearance/wp-cellrenderer.c) by: 
+ *      - Denis Washington <denisw@svn.gnome.org>
+ *      - Jens Granseuer <jensgr@gmx.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "eog-pixbuf-cell-renderer.h"
+
+#include <math.h>
+
+G_DEFINE_TYPE (EogPixbufCellRenderer, eog_pixbuf_cell_renderer, GTK_TYPE_CELL_RENDERER_PIXBUF)
+
+static void eog_pixbuf_cell_renderer_render (GtkCellRenderer *cell,
+                                             GdkWindow *window,
+                                             GtkWidget *widget,
+                                             GdkRectangle *background_area,
+                                             GdkRectangle *cell_area,
+                                             GdkRectangle *expose_area,
+                                             GtkCellRendererState flags);
+
+static void
+eog_pixbuf_cell_renderer_class_init (EogPixbufCellRendererClass *klass)
+{
+	GtkCellRendererClass *renderer_class;
+	
+	renderer_class = (GtkCellRendererClass *) klass;
+	renderer_class->render = eog_pixbuf_cell_renderer_render;
+}
+
+static void
+eog_pixbuf_cell_renderer_init (EogPixbufCellRenderer *renderer)
+{
+}
+
+GtkCellRenderer *
+eog_pixbuf_cell_renderer_new (void)
+{
+	return g_object_new (eog_pixbuf_cell_renderer_get_type (), NULL);
+}
+
+static void
+eog_pixbuf_cell_renderer_render (GtkCellRenderer *cell,
+                                 GdkWindow *window,
+                                 GtkWidget *widget,
+                                 GdkRectangle *background_area,
+                                 GdkRectangle *cell_area,
+                                 GdkRectangle *expose_area,
+                                 GtkCellRendererState flags)
+{
+	if ((flags & (GTK_CELL_RENDERER_SELECTED|GTK_CELL_RENDERER_PRELIT)) != 0) {
+		cairo_t *cr;
+		gint radius = 5;
+		gint x, y, w, h;
+		GtkStateType state;
+
+		x = background_area->x;
+		y = background_area->y;
+		w = background_area->width;
+		h = background_area->height;
+		
+		/* Sometimes width is -1 - not sure what to do here */
+		if (w == -1) return;
+		
+		if ((flags & GTK_CELL_RENDERER_SELECTED) != 0) {
+			if (GTK_WIDGET_HAS_FOCUS (widget))
+				state = GTK_STATE_SELECTED;
+			else
+				state = GTK_STATE_ACTIVE;
+		} else
+			state = GTK_STATE_PRELIGHT;
+
+		/* draw the selection indicator */
+		cr = gdk_cairo_create (GDK_DRAWABLE (window));
+		gdk_cairo_set_source_color (cr, &widget->style->base[state]);
+		
+		cairo_arc (cr, x + radius, y + radius, radius, M_PI, M_PI * 1.5);
+		cairo_arc (cr, x + w - radius, y + radius, radius, M_PI * 1.5, 0);
+		cairo_arc (cr, x + w - radius, y + h - radius, radius, 0, M_PI * 0.5);
+		cairo_arc (cr, x + radius, y + h - radius, radius, M_PI * 0.5, M_PI);
+		cairo_close_path (cr);
+		
+		/*cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD);*/
+		cairo_fill (cr);
+		cairo_destroy (cr);
+	}
+
+	(* GTK_CELL_RENDERER_CLASS (eog_pixbuf_cell_renderer_parent_class)->render)
+	    (cell, window, widget, background_area, cell_area, expose_area, flags);
+}
Index: cut-n-paste/eog/Makefile.am
===================================================================
--- cut-n-paste/eog/Makefile.am	(revision 0)
+++ cut-n-paste/eog/Makefile.am	(revision 0)
@@ -0,0 +1,12 @@
+noinst_LTLIBRARIES = libeog.la
+libeog_la_SOURCES = \
+	eog-pixbuf-cell-renderer.h \
+	eog-pixbuf-cell-renderer.c
+
+libeog_la_CFLAGS = \
+	-I$(top_srcdir)/lib	\
+	$(LIB_CFLAGS)		\
+	$(DBUS_CFLAGS)		\
+	$(WARNING_CFLAGS)	\
+	$(DISABLE_DEPRECATED)
+
Index: cut-n-paste/eog/eog-pixbuf-cell-renderer.h
===================================================================
--- cut-n-paste/eog/eog-pixbuf-cell-renderer.h	(revision 0)
+++ cut-n-paste/eog/eog-pixbuf-cell-renderer.h	(revision 0)
@@ -0,0 +1,51 @@
+/* Eye Of Gnome - Pixbuf Cellrenderer 
+ *
+ * Copyright (C) 2007 The GNOME Foundation
+ *
+ * Author: Lucas Rocha <lucasr@gnome.org>
+ *
+ * Based on gnome-control-center code (capplets/appearance/wp-cellrenderer.c) by: 
+ *      - Denis Washington <denisw@svn.gnome.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __EOG_PIXBUF_CELL_RENDERER_H__
+#define __EOG_PIXBUF_CELL_RENDERER_H__
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+typedef struct _EogPixbufCellRenderer EogPixbufCellRenderer;
+typedef struct _EogPixbufCellRendererClass EogPixbufCellRendererClass;
+
+struct _EogPixbufCellRenderer
+{
+	GtkCellRendererPixbuf parent;
+};
+
+struct _EogPixbufCellRendererClass
+{
+	GtkCellRendererPixbufClass parent;
+};
+
+GType            eog_pixbuf_cell_renderer_get_type (void) G_GNUC_CONST;
+
+GtkCellRenderer *eog_pixbuf_cell_renderer_new (void);
+
+G_END_DECLS
+
+#endif /* __EOG_PIXBUF_CELL_RENDERER_H__ */
Index: cut-n-paste/eog/README
===================================================================
--- cut-n-paste/eog/README	(revision 0)
+++ cut-n-paste/eog/README	(revision 0)
@@ -0,0 +1,3 @@
+The sources in this directory have been copied from Eye Of Gnome.
+Only minor changes had to be done in the .c file.
+
Index: configure.ac
===================================================================
--- configure.ac	(revision 3236)
+++ configure.ac	(working copy)
@@ -422,6 +422,7 @@
 cut-n-paste/toolbar-editor/Makefile
 cut-n-paste/zoom-control/Makefile
 cut-n-paste/totem-screensaver/Makefile
+cut-n-paste/eog/Makefile
 data/evince.desktop.in
 data/Makefile
 data/icons/Makefile
Index: shell/ev-sidebar-thumbnails.c
===================================================================
--- shell/ev-sidebar-thumbnails.c	(revision 3236)
+++ shell/ev-sidebar-thumbnails.c	(working copy)
@@ -39,6 +39,8 @@
 #include "ev-utils.h"
 #include "ev-window.h"
 
+#include "eog-pixbuf-cell-renderer.h"
+
 #define THUMBNAIL_WIDTH 100
 
 /* The IconView doesn't scale nearly as well as the TreeView, so we arbitrarily
@@ -55,6 +57,7 @@
 	GHashTable *loading_icons;
 	EvDocument *document;
 	EvPageCache *page_cache;
+	gint thumbnails_max_height;
 
 	gint n_pages, pages_done;
 
@@ -420,6 +423,7 @@
 	int i;
 	gint prev_width = -1;
 	gint prev_height = -1;
+	gint thumbnails_max_height = priv->thumbnails_max_height;
 
 	for (i = 0; i < sidebar_thumbnails->priv->n_pages; i++) {
 		gchar     *page_label;
@@ -441,6 +445,8 @@
 		prev_width = width;
 		prev_height = height;
 		
+		thumbnails_max_height = MAX (thumbnails_max_height, height);
+		
 		gtk_list_store_append (priv->list_store, &iter);
 		gtk_list_store_set (priv->list_store, &iter,
 				    COLUMN_PAGE_STRING, page_string,
@@ -450,6 +456,8 @@
 		g_free (page_label);
 		g_free (page_string);
 	}
+	
+	priv->thumbnails_max_height = thumbnails_max_height;
 }
 
 static gboolean
@@ -558,12 +566,28 @@
 ev_sidebar_init_icon_view (EvSidebarThumbnails *ev_sidebar_thumbnails)
 {
 	EvSidebarThumbnailsPrivate *priv;
+	GtkCellRenderer *pixbuf_cell;
 
 	priv = ev_sidebar_thumbnails->priv;
 
 	priv->icon_view = gtk_icon_view_new_with_model (GTK_TREE_MODEL (priv->list_store));
 	gtk_icon_view_set_markup_column (GTK_ICON_VIEW (priv->icon_view), 0);
-	gtk_icon_view_set_pixbuf_column (GTK_ICON_VIEW (priv->icon_view), 1);
+		
+	pixbuf_cell = eog_pixbuf_cell_renderer_new ();
+	g_object_set (pixbuf_cell,
+	              "height", priv->thumbnails_max_height + 20,
+	              "width", THUMBNAIL_WIDTH + 20,
+	              NULL);
+
+	gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (priv->icon_view),
+	      	  		    pixbuf_cell,
+	      			    FALSE);
+	gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (priv->icon_view),
+						pixbuf_cell,
+						"pixbuf", 1,
+						NULL);
+	gtk_icon_view_set_spacing (GTK_ICON_VIEW (priv->icon_view), 2);
+
 	g_signal_connect (priv->icon_view, "selection-changed",
 			  G_CALLBACK (ev_sidebar_icon_selection_changed), ev_sidebar_thumbnails);
 
Index: shell/Makefile.am
===================================================================
--- shell/Makefile.am	(revision 3236)
+++ shell/Makefile.am	(working copy)
@@ -4,6 +4,7 @@
 	-I$(top_srcdir)/cut-n-paste/zoom-control/	\
 	-I$(top_srcdir)/cut-n-paste/toolbar-editor/	\
 	-I$(top_srcdir)/cut-n-paste/totem-screensaver/	\
+	-I$(top_srcdir)/cut-n-paste/eog/	\
 	-I$(top_srcdir)/cut-n-paste/gedit-message-area/	\
 	-I$(top_srcdir)/cut-n-paste/evmountoperation/	\
 	-I$(top_srcdir)/cut-n-paste/smclient/		\
@@ -101,6 +102,7 @@
 	$(top_builddir)/cut-n-paste/zoom-control/libephyzoom.la			\
 	$(top_builddir)/cut-n-paste/toolbar-editor/libtoolbareditor.la		\
 	$(top_builddir)/cut-n-paste/totem-screensaver/libtotemscrsaver.la	\
+	$(top_builddir)/cut-n-paste/eog/libeog.la	\
 	$(top_builddir)/cut-n-paste/gedit-message-area/libgeditmsgarea.la	\
 	$(top_builddir)/cut-n-paste/evmountoperation/libevmountoperation.la	\
 	$(top_builddir)/cut-n-paste/smclient/libsmclient.la			\
