Index: data/gthumb.schemas.in
===================================================================
RCS file: /cvs/gnome/gthumb/data/gthumb.schemas.in,v
retrieving revision 1.26
diff -u -p -r1.26 gthumb.schemas.in
--- data/gthumb.schemas.in	7 Nov 2006 01:24:18 -0000	1.26
+++ data/gthumb.schemas.in	13 Nov 2006 17:45:30 -0000
@@ -322,6 +322,19 @@
       </schema>
 
       <schema>
+        <key>/schemas/apps/gthumb/viewer/mouse_wheel</key>
+        <applyto>/apps/gthumb/viewer/mouse_wheel</applyto>
+        <owner>gthumb</owner>
+        <type>string</type>
+        <default>high</default>
+        <locale name="C">
+          <short></short>
+          <long> Possible values are: navigate, scroll.
+          </long>
+        </locale>
+      </schema>
+
+      <schema>
 	<key>/schemas/apps/gthumb/viewer/zoom_change</key>
 	<applyto>/apps/gthumb/viewer/zoom_change</applyto>
 	<owner>gthumb</owner>
Index: data/glade/gthumb_preferences.glade
===================================================================
RCS file: /cvs/gnome/gthumb/data/glade/gthumb_preferences.glade,v
retrieving revision 1.7
diff -u -p -r1.7 gthumb_preferences.glade
--- data/glade/gthumb_preferences.glade	31 Oct 2006 20:29:51 -0000	1.7
+++ data/glade/gthumb_preferences.glade	13 Nov 2006 17:45:30 -0000
@@ -1822,6 +1822,147 @@
 		  <property name="fill">True</property>
 		</packing>
 	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox62">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">6</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox122">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">5</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label189">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">&lt;b&gt;Mouse wheel function&lt;/b&gt;</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">True</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox123">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label190">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">    </property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox63">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">6</property>
+
+			  <child>
+			    <widget class="GtkRadioButton" id="opt_mouse_wheel_navigate">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">_Next / Previous Image</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkRadioButton" id="opt_mouse_wheel_scroll">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">_Vertical Scroll</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			      <property name="group">opt_mouse_wheel_navigate</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 	    </widget>
 	    <packing>
 	      <property name="tab_expand">False</property>
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	13 Nov 2006 17:45:30 -0000
@@ -48,6 +48,11 @@ typedef enum { /*< skip >*/
 	GTH_ZOOM_QUALITY_LOW 
 } GthZoomQuality;
 
+typedef enum { /*< skip >*/
+        GTH_MOUSE_WHEEL_NAVIGATE = 0,
+        GTH_MOUSE_WHEEL_SCROLL
+} GthMouseWheel;
+
 
 typedef enum { /*< skip >*/
 	GTH_ZOOM_CHANGE_ACTUAL_SIZE = 0,
Index: libgthumb/preferences.c
===================================================================
RCS file: /cvs/gnome/gthumb/libgthumb/preferences.c,v
retrieving revision 1.23
diff -u -p -r1.23 preferences.c
--- libgthumb/preferences.c	7 Nov 2006 01:24:19 -0000	1.23
+++ libgthumb/preferences.c	13 Nov 2006 17:45:30 -0000
@@ -121,6 +121,12 @@ static EnumStringTable zoom_quality_tabl
 	{ 0, NULL }
 };
 
+static EnumStringTable mouse_wheel_table [] = {
+        { GTH_MOUSE_WHEEL_NAVIGATE, "navigate" },
+        { GTH_MOUSE_WHEEL_SCROLL,  "scroll" },
+        { 0, NULL }
+};
+
 static EnumStringTable zoom_change_table [] = {
 	{ GTH_ZOOM_CHANGE_FIT_IF_LARGER, "fit_if_larger" },
 	{ GTH_ZOOM_CHANGE_ACTUAL_SIZE,   "actual_size" },
@@ -460,6 +466,7 @@ GET_SET_FUNC(click_policy,           PRE
 GET_SET_FUNC(arrange_type,           PREF_ARRANGE_IMAGES,      GthSortMethod)
 GET_SET_FUNC(sort_order,             PREF_SORT_IMAGES,         GtkSortType)
 GET_SET_FUNC(zoom_quality,           PREF_ZOOM_QUALITY,        GthZoomQuality)
+GET_SET_FUNC(mouse_wheel,            PREF_MOUSE_WHEEL,         GthMouseWheel)
 GET_SET_FUNC(zoom_change,            PREF_ZOOM_CHANGE,         GthZoomChange)
 GET_SET_FUNC(transp_type,            PREF_TRANSP_TYPE,         GthTranspType)
 GET_SET_FUNC(check_type,             PREF_CHECK_TYPE,          GthCheckType)
Index: libgthumb/preferences.h
===================================================================
RCS file: /cvs/gnome/gthumb/libgthumb/preferences.h,v
retrieving revision 1.40
diff -u -p -r1.40 preferences.h
--- libgthumb/preferences.h	6 Nov 2006 17:57:10 -0000	1.40
+++ libgthumb/preferences.h	13 Nov 2006 17:45:30 -0000
@@ -62,6 +62,7 @@
 #define  PREF_SHOW_IMAGE_DATA        "/apps/gthumb/browser/show_image_data"
 
 #define  PREF_ZOOM_QUALITY           "/apps/gthumb/viewer/zoom_quality"
+#define  PREF_MOUSE_WHEEL            "/apps/gthumb/viewer/mouse_wheel"
 #define  PREF_ZOOM_CHANGE            "/apps/gthumb/viewer/zoom_change"
 #define  PREF_TRANSP_TYPE            "/apps/gthumb/viewer/transparency_type"
 #define  PREF_CHECK_TYPE             "/apps/gthumb/viewer/check_type"
@@ -260,6 +261,8 @@ GtkSortType        pref_get_sort_order  
 void               pref_set_sort_order             (GtkSortType value);
 GthZoomQuality     pref_get_zoom_quality           (void);
 void               pref_set_zoom_quality           (GthZoomQuality value);
+GthMouseWheel      pref_get_mouse_wheel            (void);
+void               pref_set_mouse_wheel            (GthMouseWheel value);
 GthZoomChange      pref_get_zoom_change            (void);
 void               pref_set_zoom_change            (GthZoomChange value);
 GthTranspType      pref_get_transp_type            (void);
Index: src/dlg-preferences.c
===================================================================
RCS file: /cvs/gnome/gthumb/src/dlg-preferences.c,v
retrieving revision 1.26
diff -u -p -r1.26 dlg-preferences.c
--- src/dlg-preferences.c	8 Nov 2006 13:30:20 -0000	1.26
+++ src/dlg-preferences.c	13 Nov 2006 17:45:30 -0000
@@ -83,6 +83,10 @@ typedef struct {
 
 	GtkWidget  *opt_zoom_quality_high;
 	GtkWidget  *opt_zoom_quality_low;
+	
+	GtkWidget  *opt_mouse_wheel_navigate;
+	GtkWidget  *opt_mouse_wheel_scroll;
+
 	GtkWidget  *opt_zoom_change;
 	GtkWidget  *opt_transparency;
 
@@ -320,6 +324,26 @@ zoom_quality_low_cb (GtkToggleButton *bu
 
 
 static void
+mouse_wheel_navigate_cb (GtkToggleButton *button,
+                      DialogData      *data)
+{
+        if (! gtk_toggle_button_get_active (button))
+                return;
+        pref_set_mouse_wheel (GTH_MOUSE_WHEEL_NAVIGATE);
+}
+
+
+static void
+mouse_wheel_scroll_cb (GtkToggleButton *button,
+                      DialogData      *data)
+{
+        if (! gtk_toggle_button_get_active (button))
+                return;
+        pref_set_mouse_wheel (GTH_MOUSE_WHEEL_SCROLL);
+}
+
+
+static void
 zoom_change_changed_cb (GtkOptionMenu *option_menu, 
 			DialogData    *data)
 {
@@ -392,6 +416,10 @@ dlg_preferences (GthBrowser *browser)
 
 	data->opt_zoom_quality_high = glade_xml_get_widget (data->gui, "opt_zoom_quality_high");
 	data->opt_zoom_quality_low = glade_xml_get_widget (data->gui, "opt_zoom_quality_low");
+
+	data->opt_mouse_wheel_navigate = glade_xml_get_widget (data->gui, "opt_mouse_wheel_navigate");
+	data->opt_mouse_wheel_scroll = glade_xml_get_widget (data->gui, "opt_mouse_wheel_scroll");
+
         data->opt_zoom_change = glade_xml_get_widget (data->gui, "opt_zoom_change");
 	data->opt_transparency = glade_xml_get_widget (data->gui, "opt_transparency");
 
@@ -473,6 +501,11 @@ dlg_preferences (GthBrowser *browser)
 	else
 		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (data->opt_zoom_quality_low), TRUE);
 
+        if (pref_get_mouse_wheel () == GTH_MOUSE_WHEEL_NAVIGATE)
+                gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (data->opt_mouse_wheel_navigate), TRUE);
+        else
+                gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (data->opt_mouse_wheel_scroll), TRUE);
+
 	gtk_option_menu_set_history (GTK_OPTION_MENU (data->opt_zoom_change), pref_get_zoom_change ());
 	gtk_option_menu_set_history (GTK_OPTION_MENU (data->opt_transparency), image_viewer_get_transp_type (gth_window_get_image_viewer (GTH_WINDOW (browser))));
 
@@ -581,6 +614,16 @@ dlg_preferences (GthBrowser *browser)
 			  "toggled",
 			  G_CALLBACK (zoom_quality_low_cb),
 			  data);
+
+        g_signal_connect (G_OBJECT (data->opt_mouse_wheel_navigate),
+                          "toggled",
+                          G_CALLBACK (mouse_wheel_navigate_cb),
+                          data);
+        g_signal_connect (G_OBJECT (data->opt_mouse_wheel_scroll),
+                          "toggled",
+                          G_CALLBACK (mouse_wheel_scroll_cb),
+                          data);
+
 	g_signal_connect (G_OBJECT (data->opt_zoom_change),
 			  "changed",
 			  G_CALLBACK (zoom_change_changed_cb),
