Index: libgthumb/gthumb-marshal.list
===================================================================
RCS file: /cvs/gnome/gthumb/libgthumb/gthumb-marshal.list,v
retrieving revision 1.4
diff -u -p -r1.4 gthumb-marshal.list
--- libgthumb/gthumb-marshal.list	11 Jun 2005 22:32:10 -0000	1.4
+++ libgthumb/gthumb-marshal.list	22 Nov 2006 14:01:24 -0000
@@ -6,6 +6,7 @@ BOOL:VOID
 VOID:BOOL
 VOID:ENUM, BOOLEAN
 VOID:ENUM, ENUM
+VOID:ENUM
 VOID:FLOAT
 VOID:INT, BOXED
 VOID:POINTER, POINTER
Index: libgthumb/image-viewer.c
===================================================================
RCS file: /cvs/gnome/gthumb/libgthumb/image-viewer.c,v
retrieving revision 1.20
diff -u -p -r1.20 image-viewer.c
--- libgthumb/image-viewer.c	30 Sep 2006 23:12:59 -0000	1.20
+++ libgthumb/image-viewer.c	22 Nov 2006 14:01:24 -0000
@@ -59,6 +59,7 @@ enum {
 	IMAGE_LOADED,
 	ZOOM_CHANGED,
 	REPAINTED,
+	MOUSE_WHEEL_SCROLL,
 	SCROLL,
 	LAST_SIGNAL
 };
@@ -172,6 +173,16 @@ image_viewer_class_init (ImageViewerClas
 			      gthumb_marshal_VOID__VOID,
 			      G_TYPE_NONE, 
 			      0);
+        image_viewer_signals[MOUSE_WHEEL_SCROLL] =
+		g_signal_new ("mouse_wheel_scroll",
+			      G_TYPE_FROM_CLASS (class),
+			      G_SIGNAL_RUN_LAST,
+			      G_STRUCT_OFFSET (ImageViewerClass, mouse_wheel_scroll),
+			      NULL, NULL,
+			      gthumb_marshal_VOID__ENUM,
+			      G_TYPE_NONE, 
+			      1, GDK_TYPE_SCROLL_DIRECTION);
+
 	class->set_scroll_adjustments = set_scroll_adjustments;
         widget_class->set_scroll_adjustments_signal =
 		g_signal_new ("set_scroll_adjustments",
@@ -1416,14 +1427,18 @@ image_viewer_scroll_event (GtkWidget    
 		}
 	}
 	
-	if (event->direction == GDK_SCROLL_UP || event->direction == GDK_SCROLL_DOWN)
-		adj = viewer->vadj;
-	else
-		adj = viewer->hadj;
+	if (event->direction == GDK_SCROLL_UP || event->direction == GDK_SCROLL_DOWN) {
+		g_signal_emit (G_OBJECT (viewer), 
+			            image_viewer_signals[MOUSE_WHEEL_SCROLL],
+		 	            0, event->direction);
+		return TRUE;
+	}
+
+	adj = viewer->hadj;
 	
-	if (event->direction == GDK_SCROLL_UP || event->direction == GDK_SCROLL_LEFT)
+	if (event->direction == GDK_SCROLL_LEFT)
 		new_value = adj->value - adj->page_increment / 2;
-	else
+	else if (event->direction == GDK_SCROLL_RIGHT)
 		new_value = adj->value + adj->page_increment / 2;
 
 	new_value = CLAMP (new_value, adj->lower, adj->upper - adj->page_size);
Index: libgthumb/image-viewer.h
===================================================================
RCS file: /cvs/gnome/gthumb/libgthumb/image-viewer.h,v
retrieving revision 1.5
diff -u -p -r1.5 image-viewer.h
--- libgthumb/image-viewer.h	10 Feb 2006 22:00:40 -0000	1.5
+++ libgthumb/image-viewer.h	22 Nov 2006 14:01:24 -0000
@@ -172,6 +172,7 @@ struct _ImageViewerClass
                                          GtkAdjustment *hadj,
                                          GtkAdjustment *vadj);
 	void (* repainted)              (ImageViewer   *viewer);
+	void (* mouse_wheel_scroll)	(ImageViewer   *viewer, GdkScrollDirection direction);
 
 	/* -- Key binding signals -- */
 
Index: src/gth-browser.c
===================================================================
RCS file: /cvs/gnome/gthumb/src/gth-browser.c,v
retrieving revision 1.78
diff -u -p -r1.78 gth-browser.c
--- src/gth-browser.c	21 Nov 2006 19:39:18 -0000	1.78
+++ src/gth-browser.c	22 Nov 2006 14:01:25 -0000
@@ -3331,6 +3331,25 @@ image_clicked_cb (GtkWidget  *widget, 
 }
 
 
+static gboolean
+mouse_wheel_scrolled_cb (GtkWidget 		*widget, 
+  		   	 GdkScrollDirection 	 direction,
+			 GthBrowser		*browser)
+{
+	GthBrowserPrivateData *priv = browser->priv;
+
+	if (priv->setting_file_list || priv->changing_directory)
+		return TRUE;
+        
+	if (direction == GDK_SCROLL_UP) 
+		gth_browser_show_next_image (browser, FALSE);
+	else
+		gth_browser_show_prev_image (browser, FALSE);
+	
+	return TRUE;
+}		   
+
+
 static int
 image_button_press_cb (GtkWidget      *widget, 
 		       GdkEventButton *event,
@@ -6498,6 +6517,10 @@ gth_browser_construct (GthBrowser  *brow
 				"clicked",
 				G_CALLBACK (image_clicked_cb), 
 				browser);
+	g_signal_connect_after (G_OBJECT (priv->viewer), 
+				"mouse_wheel_scroll",
+				G_CALLBACK (mouse_wheel_scrolled_cb), 
+				browser);	
 	g_signal_connect (G_OBJECT (priv->viewer), 
 			  "focus_in_event",
 			  G_CALLBACK (image_focus_changed_cb), 
