Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evince/ChangeLog,v
retrieving revision 1.331
diff -u -r1.331 ChangeLog
--- ChangeLog	23 Apr 2005 17:13:39 -0000	1.331
+++ ChangeLog	23 Apr 2005 18:24:29 -0000
@@ -1,3 +1,8 @@
+2005-04-23  James Bowes  <bowes@cs.dal.ca>
+
+	* shell/main.c: (load_files): Add --page command-line option,
+	to open to a specified page. Fixes bug #170458
+
 Sat Apr 23 13:13:04 2005  Jonathan Blandford  <jrb@redhat.com>
 
 	* TODO:
Index: shell/main.c
===================================================================
RCS file: /cvs/gnome/evince/shell/main.c,v
retrieving revision 1.11
diff -u -r1.11 main.c
--- shell/main.c	9 Apr 2005 11:26:38 -0000	1.11
+++ shell/main.c	23 Apr 2005 18:24:29 -0000
@@ -33,8 +33,11 @@
 #include "ev-debug.h"
 #include "ev-job-queue.h"
 
+gint page;
+
 static struct poptOption popt_options[] =
 {
+	{ "page", 'p', POPT_ARG_INT, &page, 0, N_("The page of the document to display."), N_("PAGE")},
 	{ NULL, 0, 0, NULL, 0, NULL, NULL }
 };
 
@@ -50,6 +53,9 @@
 		return;
 	}
 
+	/* Since non-programmers count starting at 1 */
+	page -= 1;
+
 	for (i = 0; files[i]; i++) {
 		char *uri;
 
@@ -58,6 +64,7 @@
 		window = GTK_WIDGET (ev_application_new_window (EV_APP));
 		gtk_widget_show (window);
 		ev_window_open (EV_WINDOW (window), uri);
+		ev_window_open_page (EV_WINDOW (window), page);
 
 		g_free (uri);
         }
