Index: data/evince-toolbar.xml
===================================================================
RCS file: /cvs/gnome/evince/data/evince-toolbar.xml,v
retrieving revision 1.3
diff -u -3 -p -r1.3 evince-toolbar.xml
--- data/evince-toolbar.xml	10 May 2005 17:18:46 -0000	1.3
+++ data/evince-toolbar.xml	15 Feb 2006 19:09:13 -0000
@@ -17,6 +17,7 @@
     <toolitem name="GoFirstPage"/>
     <toolitem name="GoLastPage"/>
     <toolitem name="ViewReload"/>
+    <toolitem name="HandMode"/>
 </available>
 <toolbar name="DefaultToolBar">
     <toolitem name="GoPreviousPage"/>
Index: shell/ev-view-private.h
===================================================================
RCS file: /cvs/gnome/evince/shell/ev-view-private.h,v
retrieving revision 1.5
diff -u -3 -p -r1.5 ev-view-private.h
--- shell/ev-view-private.h	7 Feb 2006 20:09:23 -0000	1.5
+++ shell/ev-view-private.h	15 Feb 2006 19:09:13 -0000
@@ -99,6 +99,10 @@ struct _EvView {
 	gboolean presentation;
 	EvSizingMode sizing_mode;
 
+	/* Hand Mode */
+	int select_button;
+	int scroll_button;
+
 	/* Common for button press handling */
 	int pressed_button;
 
Index: shell/ev-view.c
===================================================================
RCS file: /cvs/gnome/evince/shell/ev-view.c,v
retrieving revision 1.188
diff -u -3 -p -r1.188 ev-view.c
--- shell/ev-view.c	7 Feb 2006 20:09:23 -0000	1.188
+++ shell/ev-view.c	15 Feb 2006 19:09:14 -0000
@@ -310,6 +310,8 @@ static void       ev_view_primary_clear_
 							      gpointer            data);
 static void       ev_view_update_primary_selection           (EvView             *ev_view);
 
+static int        ev_view_get_select_button                  (EvView             *view);
+static int        ev_view_get_scroll_button                  (EvView             *view);
 
 G_DEFINE_TYPE (EvView, ev_view, GTK_TYPE_WIDGET)
 
@@ -1677,39 +1679,38 @@ ev_view_button_press_event (GtkWidget   
 	view->pressed_button = event->button;
 	view->selection_info.in_drag = FALSE;
 	
-	switch (event->button) {
-	        case 1:
-			if (view->selection_info.selections) {
-				if (location_in_selected_text (view,
-							       event->x + view->scroll_x,
-							       event->y + view->scroll_y)) {
-					view->selection_info.in_drag = TRUE;
-				} else {
-					clear_selection (view);
-				}
-				
-				gtk_widget_queue_draw (widget);
+	if (event->button == ev_view_get_select_button (view)) {
+		if (view->selection_info.selections) {
+			if (location_in_selected_text (view,
+						       event->x + view->scroll_x,
+						       event->y + view->scroll_y)) {
+				view->selection_info.in_drag = TRUE;
+			} else {
+				clear_selection (view);
 			}
-
-			view->selection_info.start.x = event->x + view->scroll_x;
-			view->selection_info.start.y = event->y + view->scroll_y;
 			
-			return TRUE;
-		case 2:
-			/* use root coordinates as reference point because
-			 * scrolling changes window relative coordinates */
-			view->drag_info.start.x = event->x_root;
-			view->drag_info.start.y = event->y_root;
-			view->drag_info.hadj = gtk_adjustment_get_value (view->hadjustment);
-			view->drag_info.vadj = gtk_adjustment_get_value (view->vadjustment);
+			gtk_widget_queue_draw (widget);
+		}
 
-			ev_view_set_cursor (view, EV_VIEW_CURSOR_DRAG);
+		view->selection_info.start.x = event->x + view->scroll_x;
+		view->selection_info.start.y = event->y + view->scroll_y;
+		
+		return TRUE;
+	} else if (event->button == ev_view_get_scroll_button (view)) {
+		/* use root coordinates as reference point because
+		 * scrolling changes window relative coordinates */
+		view->drag_info.start.x = event->x_root;
+		view->drag_info.start.y = event->y_root;
+		view->drag_info.hadj = gtk_adjustment_get_value (view->hadjustment);
+		view->drag_info.vadj = gtk_adjustment_get_value (view->vadjustment);
 
-			return TRUE;
-		case 3:
-			link = ev_view_get_link_at_location (view, event->x, event->y);
-			g_signal_emit (view, signals[SIGNAL_POPUP_MENU], 0, link);
-			return TRUE;
+		ev_view_set_cursor (view, EV_VIEW_CURSOR_DRAG);
+
+		return TRUE;
+	} else if (event->button == 3) {
+		link = ev_view_get_link_at_location (view, event->x, event->y);
+		g_signal_emit (view, signals[SIGNAL_POPUP_MENU], 0, link);
+		return TRUE;
 	}
 	
 	return FALSE;
@@ -1823,7 +1824,7 @@ ev_view_motion_notify_event (GtkWidget  
 	/* For the Evince 0.4.x release, we limit selection to un-rotated
 	 * documents only.
 	 */
-	if (view->pressed_button == 1 && view->rotation == 0) {
+	if ((view->pressed_button == ev_view_get_select_button (view)) && view->rotation == 0) {
 
 		/* Schedule timeout to scroll during selection and additionally 
 		 * scroll once to allow arbitrary speed. */
@@ -1845,7 +1846,7 @@ ev_view_motion_notify_event (GtkWidget  
 			view->selection_update_id = g_idle_add ((GSourceFunc)selection_update_idle_cb, view);
 
 		return TRUE;
-	} else if (view->pressed_button == 2) {
+	} else if (view->pressed_button == ev_view_get_scroll_button (view)) {
 		if (!view->drag_info.in_drag) {
 			gboolean start;
 
@@ -2591,6 +2592,8 @@ ev_view_init (EvView *view)
 	view->presentation = FALSE;
 	view->fullscreen = FALSE;
 	view->sizing_mode = EV_SIZING_FIT_WIDTH;
+	view->select_button = 1;
+	view->scroll_button = 2;
 	view->pending_scroll = SCROLL_TO_KEEP_POSITION;
 }
 
@@ -2916,6 +2919,40 @@ ev_view_get_sizing_mode (EvView *view)
 	g_return_val_if_fail (EV_IS_VIEW (view), EV_SIZING_FREE);
 
 	return view->sizing_mode;
+}
+
+static int
+ev_view_get_select_button (EvView *view)
+{
+	return view->select_button;
+}
+
+static int
+ev_view_get_scroll_button (EvView *view)
+{
+	return view->scroll_button;
+}
+
+void
+ev_view_set_hand_mode (EvView *view,
+		       gboolean hand_mode)
+{
+	if (hand_mode == TRUE) {
+		view->select_button = 2;
+		view->scroll_button = 1;
+	} else if (hand_mode == FALSE) {
+		view->select_button = 1;
+		view->scroll_button = 2;
+	}
+}
+
+gboolean
+ev_view_get_hand_mode (EvView *view)
+{
+	if (view->select_button == 2 && view->scroll_button == 1)
+		return TRUE;
+
+	return FALSE;
 }
 
 gboolean
Index: shell/ev-view.h
===================================================================
RCS file: /cvs/gnome/evince/shell/ev-view.h,v
retrieving revision 1.46
diff -u -3 -p -r1.46 ev-view.h
--- shell/ev-view.h	7 Feb 2006 20:09:23 -0000	1.46
+++ shell/ev-view.h	15 Feb 2006 19:09:14 -0000
@@ -88,6 +88,10 @@ void     	ev_view_set_sizing_mode	  (EvV
 					   EvSizingMode    mode);
 EvSizingMode	ev_view_get_sizing_mode	  (EvView         *view);
 
+/* Hand Mode */
+void		ev_view_set_hand_mode     (EvView         *view,
+					   gboolean       mode);
+gboolean	ev_view_get_hand_mode     (EvView         *view);
 
 /* Page size */
 gboolean	ev_view_can_zoom_in       (EvView         *view);
Index: shell/ev-window.c
===================================================================
RCS file: /cvs/gnome/evince/shell/ev-window.c,v
retrieving revision 1.259
diff -u -3 -p -r1.259 ev-window.c
--- shell/ev-window.c	10 Feb 2006 04:36:12 -0000	1.259
+++ shell/ev-window.c	15 Feb 2006 19:09:14 -0000
@@ -205,6 +205,8 @@ static void	ev_window_cmd_view_best_fit 
 							 EvWindow 	  *ev_window);
 static void	ev_window_cmd_view_page_width 		(GtkAction 	  *action, 
 							 EvWindow 	  *ev_window);
+static void	ev_window_cmd_hand_mode			(GtkAction        *action,
+							 EvWindow         *ev_window);
 
 G_DEFINE_TYPE (EvWindow, ev_window, GTK_TYPE_WINDOW)
 
@@ -333,6 +335,7 @@ update_action_sensitivity (EvWindow *ev_
 	/* Toolbar-specific actions: */
 	set_action_sensitive (ev_window, PAGE_SELECTOR_ACTION, has_pages);
 	set_action_sensitive (ev_window, ZOOM_CONTROL_ACTION,  has_pages);
+	set_action_sensitive (ev_window, "HandMode", has_pages);
 
 	if (has_pages &&
 	    ev_view_get_sizing_mode (view) != EV_SIZING_FIT_WIDTH &&
@@ -543,6 +546,14 @@ ev_window_cmd_view_page_width (GtkAction
 	update_action_sensitivity (ev_window);
 }
 
+static void
+ev_window_cmd_hand_mode (GtkAction *action, EvWindow *ev_window)
+{
+       if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)))
+               ev_view_set_hand_mode (EV_VIEW (ev_window->priv->view), TRUE);
+       else
+               ev_view_set_hand_mode (EV_VIEW (ev_window->priv->view), FALSE);
+}
 
 void
 ev_window_open_page_label (EvWindow   *ev_window, 
@@ -2933,6 +2944,10 @@ static const GtkToggleActionEntry toggle
         { "ViewPageWidth", EV_STOCK_ZOOM_WIDTH, N_("Fit Page _Width"), NULL,
           N_("Make the current document fill the window width"),
           G_CALLBACK (ev_window_cmd_view_page_width) },
+	{ "HandMode", GTK_STOCK_SELECT_COLOR, N_("Hand Mode"), NULL,
+          N_("Use mouse left button do scroll the document"),
+          G_CALLBACK (ev_window_cmd_hand_mode) },
+
 };
 
 /* Popups specific items */
