Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evince/ChangeLog,v
retrieving revision 1.202
diff -u -5 -r1.202 ChangeLog
--- ChangeLog	21 Feb 2005 23:01:12 -0000	1.202
+++ ChangeLog	24 Feb 2005 02:15:49 -0000
@@ -1,5 +1,11 @@
+2005-02-24  Kai Willadsen  <kaiw@itee.uq.edu.au>
+
+	* data/evince-ui.xml:
+	* shell/ev-window.c: (update_action_sensitivity),
+	(ev_window_cmd_view_reload): Add a "Reload" action and menu entry
+
 Mon Feb 21 17:52:08 2005  Jonathan Blandford  <jrb@redhat.com>
 
 	* pdf/xpdf/pdf-document.cc (pdf_document_get_page_size): Patch
 	from Crispin Flowerday <gnome@flowerday.cx> to avoid rendering the
 	page when we get the page size.
Index: data/evince-ui.xml
===================================================================
RCS file: /cvs/gnome/evince/data/evince-ui.xml,v
retrieving revision 1.13
diff -u -5 -r1.13 evince-ui.xml
--- data/evince-ui.xml	18 Feb 2005 20:53:49 -0000	1.13
+++ data/evince-ui.xml	24 Feb 2005 02:15:49 -0000
@@ -28,10 +28,12 @@
       <menuitem name="ViewZoomInMenu" action="ViewZoomIn"/>
       <menuitem name="ViewZoomOutMenu" action="ViewZoomOut"/>
       <menuitem name="ViewNormalSizeMenu" action="ViewNormalSize"/>
       <menuitem name="ViewBestFitMenu" action="ViewBestFit"/>
       <menuitem name="ViewPageWidthMenu" action="ViewPageWidth"/>
+      <separator/>
+      <menuitem name="ViewReload" action="ViewReload"/>
     </menu>
 
     <menu name="GoMenu" action="Go">
       <menuitem name="GoPreviousPageMenu" action="GoPreviousPage"/>
       <menuitem name="GoNextPageMenu" action="GoNextPage"/>
Index: shell/ev-window.c
===================================================================
RCS file: /cvs/gnome/evince/shell/ev-window.c,v
retrieving revision 1.71
diff -u -5 -r1.71 ev-window.c
--- shell/ev-window.c	18 Feb 2005 21:07:58 -0000	1.71
+++ shell/ev-window.c	24 Feb 2005 02:15:52 -0000
@@ -177,10 +177,11 @@
 	set_action_sensitive (ev_window, "ViewZoomIn", document!=NULL);
 	set_action_sensitive (ev_window, "ViewZoomOut", document!=NULL);
 	set_action_sensitive (ev_window, "ViewNormalSize", document!=NULL);
 	set_action_sensitive (ev_window, "ViewBestFit", document!=NULL);
 	set_action_sensitive (ev_window, "ViewPageWidth", document!=NULL);
+	set_action_sensitive (ev_window, "ViewReload", document!=NULL);
 
         /* Go menu */
 	if (document) {
 		int n_pages;
 		int page;
@@ -1446,10 +1447,29 @@
 
 	ev_view_set_page (EV_VIEW (ev_window->priv->view), G_MAXINT);
 }
 
 static void
+ev_window_cmd_view_reload (GtkAction *action, EvWindow *ev_window)
+{
+	char *uri;
+	int page;
+
+	g_return_if_fail (EV_IS_WINDOW (ev_window));
+
+	page = ev_document_get_page (ev_window->priv->document);
+	g_object_unref (ev_window->priv->document);
+	ev_window->priv->document = NULL;
+
+	uri = g_strdup (ev_window->priv->uri);
+	ev_window_open (ev_window, uri);
+	ev_window_open_page (ev_window, page);
+
+	g_free (uri);
+}
+
+static void
 ev_window_cmd_help_contents (GtkAction *action, EvWindow *ev_window)
 {
         g_return_if_fail (EV_IS_WINDOW (ev_window));
 
         /* FIXME */
@@ -1899,10 +1919,13 @@
           N_("Shrink the document"),
           G_CALLBACK (ev_window_cmd_view_zoom_out) },
         { "ViewNormalSize", GTK_STOCK_ZOOM_100, NULL, "<control>0",
           N_("Reset the zoom level to the default value"),
           G_CALLBACK (ev_window_cmd_view_normal_size) },
+        { "ViewReload", GTK_STOCK_REFRESH, N_("_Reload"), "<control>R",
+          N_("Reload the document"),
+          G_CALLBACK (ev_window_cmd_view_reload) },
 
         /* Go menu */
         { "GoPreviousPage", GTK_STOCK_GO_BACK, N_("_Previous Page"), "Page_Up",
           N_("Go to the previous page"),
           G_CALLBACK (ev_window_cmd_go_previous_page) },
