Index: gedit/gedit-document.c
===================================================================
RCS file: /cvs/gnome/gedit/gedit/gedit-document.c,v
retrieving revision 1.80
diff -u -p -r1.80 gedit-document.c
--- gedit/gedit-document.c	2 Jan 2004 01:20:14 -0000	1.80
+++ gedit/gedit-document.c	6 Jan 2004 13:44:07 -0000
@@ -1579,6 +1579,29 @@ gedit_document_get_modified (const Gedit
 	return gtk_text_buffer_get_modified (GTK_TEXT_BUFFER (doc));
 }
 
+gboolean
+gedit_document_get_deleted (GeditDocument *doc)
+{
+	gchar *raw_uri;
+	gboolean deleted = FALSE;
+
+	gedit_debug (DEBUG_DOCUMENT, "");
+
+	g_return_val_if_fail (doc != NULL, FALSE);
+
+	raw_uri = gedit_document_get_raw_uri (doc); 
+	if (raw_uri)
+	{
+		if (gedit_document_is_readonly (doc))
+			deleted = FALSE;
+		else
+			deleted = !gedit_utils_uri_exists (raw_uri);
+	}
+	g_free (raw_uri);
+
+	return deleted;
+}
+
 /**
  * gedit_document_get_char_count:
  * @doc: a #GeditDocument 
Index: gedit/gedit-document.h
===================================================================
RCS file: /cvs/gnome/gedit/gedit/gedit-document.h,v
retrieving revision 1.30
diff -u -p -r1.30 gedit-document.h
--- gedit/gedit-document.h	2 Jan 2004 01:20:14 -0000	1.30
+++ gedit/gedit-document.h	6 Jan 2004 13:44:08 -0000
@@ -147,6 +147,8 @@ gboolean 	gedit_document_revert 		(Gedit
 gboolean	gedit_document_is_untitled 	(const GeditDocument* doc);
 gboolean	gedit_document_get_modified 	(const GeditDocument* doc);
 
+gboolean	gedit_document_get_deleted	(GeditDocument *doc);
+
 gint		gedit_document_get_char_count	(const GeditDocument *doc);
 gint		gedit_document_get_line_count 	(const GeditDocument *doc);
 		
Index: gedit/gedit-mdi.c
===================================================================
RCS file: /cvs/gnome/gedit/gedit/gedit-mdi.c,v
retrieving revision 1.76
diff -u -p -r1.76 gedit-mdi.c
--- gedit/gedit-mdi.c	31 Dec 2003 00:44:22 -0000	1.76
+++ gedit/gedit-mdi.c	6 Jan 2004 13:44:11 -0000
@@ -949,8 +949,6 @@ gedit_mdi_remove_child_handler (BonoboMD
 {
 	GeditDocument* doc;
 	gboolean close = TRUE;
-	gchar *raw_uri;
-	gboolean deleted = FALSE;
 	
 	gedit_debug (DEBUG_MDI, "");
 
@@ -959,17 +957,7 @@ gedit_mdi_remove_child_handler (BonoboMD
 
 	doc = GEDIT_MDI_CHILD (child)->document;
 
-	raw_uri = gedit_document_get_raw_uri (doc); 
-	if (raw_uri != NULL)
-	{
-		if (gedit_document_is_readonly (doc))
-			deleted = FALSE;
-		else
-			deleted = !gedit_utils_uri_exists (raw_uri);
-	}
-	g_free (raw_uri);
-
-	if (gedit_document_get_modified (doc) || deleted)
+	if (gedit_document_get_modified (doc) || gedit_document_get_deleted (doc))
 	{
 		GtkWidget *msgbox, *w;
 		gchar *fname = NULL; 
