Index: gnome-panel/panel-recent.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-recent.c,v
retrieving revision 1.35
diff -u -u -p -r1.35 panel-recent.c
--- gnome-panel/panel-recent.c	31 May 2005 21:49:21 -0000	1.35
+++ gnome-panel/panel-recent.c	23 Jul 2005 07:03:48 -0000
@@ -87,6 +87,8 @@ recent_documents_activate_cb (EggRecentV
 	mime_type = egg_recent_item_get_mime_type (item);
 
 	if (show_uri (uri, mime_type, screen, &error) != TRUE) {
+		EggRecentModel *model;
+		
 		if (error != NULL) {
 			panel_error_dialog (screen,
 					    "cannot_open_recent_doc", TRUE,
@@ -101,6 +103,16 @@ recent_documents_activate_cb (EggRecentV
 					    _("Cannot open recently used document"),
 					    _("An unknown error occurred while trying to open %s"),
 					    uri_utf8);
+
+		model = egg_recent_view_get_model (EGG_RECENT_VIEW (view));
+		
+		if (!egg_recent_model_delete (model, uri)) {
+			panel_error_dialog (screen,
+					    "cannot_remove_recent_doc", TRUE,
+					    _("Cannot remove recently used document"),
+					    _("An error occurred while trying to remove %s"),
+					    uri_utf8);
+		}
 	}
 
 	g_free (uri);
