Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evince/ChangeLog,v
retrieving revision 1.571
diff -u -u -r1.571 ChangeLog
--- ChangeLog	22 Jul 2005 16:22:19 -0000	1.571
+++ ChangeLog	22 Jul 2005 18:14:57 -0000
@@ -1,3 +1,12 @@
+2005-07-22  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+	* shell/ev-application-service.xml:
+	* shell/ev-application.[ch]:
+	* shell/ev-window.[ch]:
+
+	Add ReloadURI dbus method in order to allow other applications
+	to reload a document
+	
 2005-07-22  Martin Kretzschmar  <martink@gnome.org>
 
 	* backend/ev-document-factory.c (mime_type_supported_by_gdk_pixbuf): 
Index: shell/ev-application-service.xml
===================================================================
RCS file: /cvs/gnome/evince/shell/ev-application-service.xml,v
retrieving revision 1.1
diff -u -u -r1.1 ev-application-service.xml
--- shell/ev-application-service.xml	30 Jun 2005 08:16:45 -0000	1.1
+++ shell/ev-application-service.xml	22 Jul 2005 18:14:57 -0000
@@ -15,6 +15,11 @@
       <arg type="s" name="page_label" direction="in"/>
     </method>
 
+    <method name="ReloadURI"> 
+      <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="ev_application_reload_uri"/>
+      <arg type="s" name="uri" direction="in"/>
+    </method>
+
   </interface>
 
 </node>
Index: shell/ev-application.c
===================================================================
RCS file: /cvs/gnome/evince/shell/ev-application.c,v
retrieving revision 1.20
diff -u -u -r1.20 ev-application.c
--- shell/ev-application.c	8 Jul 2005 09:21:56 -0000	1.20
+++ shell/ev-application.c	22 Jul 2005 18:14:57 -0000
@@ -213,6 +213,26 @@
 	}
 }
 
+gboolean
+ev_application_reload_uri (EvApplication  *application,
+			   const char     *uri,
+			   GError        **error)
+{
+	EvWindow *window;
+
+	g_return_val_if_fail (uri != NULL, FALSE);
+	
+	window = ev_application_get_uri_window (application, uri);
+
+	if (EV_IS_WINDOW (window)) {
+		ev_window_reload_document (window);
+
+		return TRUE;
+	}
+
+	return FALSE;
+}
+
 void
 ev_application_shutdown (EvApplication *application)
 {
Index: shell/ev-application.h
===================================================================
RCS file: /cvs/gnome/evince/shell/ev-application.h,v
retrieving revision 1.10
diff -u -u -r1.10 ev-application.h
--- shell/ev-application.h	8 Jul 2005 09:07:04 -0000	1.10
+++ shell/ev-application.h	22 Jul 2005 18:14:57 -0000
@@ -73,6 +73,9 @@
 						      GError         **error);
 void	          ev_application_open_uri_list       (EvApplication   *application,
 		  			              GSList          *uri_list);
+gboolean          ev_application_reload_uri          (EvApplication  *application,
+						      const char     *uri,
+						      GError        **error);
 
 
 EggToolbarsModel *ev_application_get_toolbars_model  (EvApplication   *application);
Index: shell/ev-window.c
===================================================================
RCS file: /cvs/gnome/evince/shell/ev-window.c,v
retrieving revision 1.197
diff -u -u -r1.197 ev-window.c
--- shell/ev-window.c	12 Jul 2005 08:45:59 -0000	1.197
+++ shell/ev-window.c	22 Jul 2005 18:14:57 -0000
@@ -2067,12 +2067,12 @@
 		ev_page_cache_set_current_page (ev_window->priv->page_cache, current_page - 10);
 }
 
-static void
-ev_window_cmd_view_reload (GtkAction *action, EvWindow *ev_window)
+void
+ev_window_reload_document (EvWindow *ev_window)
 {
-	char *uri;
-	int page;
-
+	gchar *uri;
+	gint page;
+	
 	g_return_if_fail (EV_IS_WINDOW (ev_window));
 
 	page = ev_page_cache_get_current_page (ev_window->priv->page_cache);
@@ -2087,6 +2087,15 @@
 
 	g_free (uri);
 }
+	
+
+static void
+ev_window_cmd_view_reload (GtkAction *action, EvWindow *ev_window)
+{
+	g_return_if_fail (EV_IS_WINDOW (ev_window));
+
+	ev_window_reload_document (ev_window);
+}
 
 static void
 ev_window_cmd_help_contents (GtkAction *action, EvWindow *ev_window)
@@ -2663,7 +2672,7 @@
 	if (priv->load_job || priv->xfer_job) {
 		ev_window_clear_jobs (window);
 	}
-	
+
 	if (priv->local_uri) {
 		ev_window_clear_local_uri (window);
 	}
Index: shell/ev-window.h
===================================================================
RCS file: /cvs/gnome/evince/shell/ev-window.h,v
retrieving revision 1.10
diff -u -u -r1.10 ev-window.h
--- shell/ev-window.h	30 Jun 2005 08:16:45 -0000	1.10
+++ shell/ev-window.h	22 Jul 2005 18:14:57 -0000
@@ -62,6 +62,8 @@
 void		ev_window_print_range     (EvWindow       *ev_window,
 					   int             first_page,
 					   int		   last_page);
+void            ev_window_reload_document (EvWindow       *ev_window);
+
 G_END_DECLS
 
 #endif /* !EV_WINDOW_H */
