Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evince/ChangeLog,v
retrieving revision 1.453
diff -u -u -r1.453 ChangeLog
--- ChangeLog	11 Jun 2005 14:15:41 -0000	1.453
+++ ChangeLog	12 Jun 2005 18:33:28 -0000
@@ -1,3 +1,8 @@
+2005-06-12  Carlos Garcia Campos <carlosgc@gnome.org>
+
+	* shell/ev-window.c: Arrow keys and mouse for page switching in
+	presentation mode. Fixes #170874
+	
 2005-06-11  Marco Pesenti Gritti <mpg@redhat.com>
 
 	* backend/ev-document-fonts.c: (ev_document_fonts_fill_model):
Index: shell/ev-window.c
===================================================================
RCS file: /cvs/gnome/evince/shell/ev-window.c,v
retrieving revision 1.159
diff -u -u -r1.159 ev-window.c
--- shell/ev-window.c	11 Jun 2005 14:15:42 -0000	1.159
+++ shell/ev-window.c	12 Jun 2005 18:33:28 -0000
@@ -180,6 +180,10 @@
 static void     ev_window_cmd_view_presentation         (GtkAction        *action,
 							 EvWindow         *window);
 static void     show_fullscreen_popup                   (EvWindow         *window);
+static void     ev_window_cmd_go_previous_page          (GtkAction        *action,
+							 EvWindow         *ev_window);
+static void     ev_window_cmd_go_next_page              (GtkAction        *action,
+							 EvWindow         *ev_window);
 							
 
 G_DEFINE_TYPE (EvWindow, ev_window, GTK_TYPE_WINDOW)
@@ -1545,7 +1549,6 @@
 	return popup;
 }
 
-
 static void
 ev_window_update_fullscreen_action (EvWindow *window)
 {
@@ -1628,6 +1631,55 @@
 	}
 }
 
+static gboolean
+presentation_button_press_cb (GtkWidget *widget,
+			      GdkEventButton *event,
+			      gpointer user_data)
+{
+	EvWindow *window = EV_WINDOW (user_data);
+	
+	switch (event->button) {
+	case 1:
+		ev_window_cmd_go_next_page (NULL, window);
+		
+		return TRUE;
+		
+	case 3:
+		ev_window_cmd_go_previous_page (NULL, window);
+		
+		return TRUE;
+	}
+	
+	return FALSE;
+}
+
+static gboolean
+presentation_key_press_cb (GtkWidget *widget,
+			   GdkEventKey *event,
+			   gpointer user_data)
+{
+	EvWindow *window = EV_WINDOW (user_data);
+	
+	switch (event->keyval) {
+	case GDK_KP_Right:
+	case GDK_Right:
+	case GDK_KP_Up:
+	case GDK_Up:
+		ev_window_cmd_go_next_page (NULL, window);
+
+		return TRUE;
+	case GDK_KP_Left:
+	case GDK_Left:
+	case GDK_KP_Down:
+	case GDK_Down:
+		ev_window_cmd_go_previous_page (NULL, window);
+
+		return TRUE;
+	}
+	
+	return FALSE;
+}
+
 static void
 ev_window_update_presentation_action (EvWindow *window)
 {
@@ -1649,6 +1701,15 @@
 		      "shadow-type", GTK_SHADOW_NONE,
 		      NULL);
 
+	g_signal_connect (window->priv->view,
+			  "button-press-event",
+			  G_CALLBACK (presentation_button_press_cb),
+			  window);
+	g_signal_connect (window->priv->view,
+			  "key-press-event",
+			  G_CALLBACK (presentation_key_press_cb),
+			  window);
+	
 	gtk_widget_grab_focus (window->priv->view);
 	ev_view_set_presentation (EV_VIEW (window->priv->view), TRUE);
 	gtk_window_fullscreen (GTK_WINDOW (window));
@@ -1665,6 +1726,14 @@
 	g_object_set (G_OBJECT (window->priv->scrolled_window),
 		      "shadow-type", GTK_SHADOW_IN,
 		      NULL);
+
+	g_signal_handlers_disconnect_by_func (window->priv->view,
+					      (gpointer) presentation_button_press_cb,
+					      window);
+	g_signal_handlers_disconnect_by_func (window->priv->view,
+					      (gpointer) presentation_key_press_cb,
+					      window);
+	
 	ev_view_set_presentation (EV_VIEW (window->priv->view), FALSE);
 	gtk_window_unfullscreen (GTK_WINDOW (window));
 	ev_window_update_presentation_action (window);
