Index: gedit/gedit-file.c
===================================================================
RCS file: /cvs/gnome/gedit/gedit/gedit-file.c,v
retrieving revision 1.59
diff -u -p -r1.59 gedit-file.c
--- gedit/gedit-file.c	31 Dec 2003 00:44:22 -0000	1.59
+++ gedit/gedit-file.c	5 Jan 2004 18:02:11 -0000
@@ -37,11 +37,13 @@
 #include <libgnomevfs/gnome-vfs.h>
 
 #include <eel/eel-vfs-extensions.h>
+#include <eel/eel-alert-dialog.h>
 #include <eel/eel-string.h>
 
 #include "gedit2.h"
 #include "gedit-file.h"
 #include "gedit-debug.h"
+#include "gedit-document.h"
 #include "gedit-utils.h"
 #include "gedit-mdi.h"
 #include "gedit-recent.h" 
@@ -80,7 +82,6 @@ get_dirname_from_uri (const char *uri)
 	return name;
 }
 
-
 void 
 gedit_file_new (void)
 {
@@ -549,7 +550,6 @@ gedit_file_save_as_real (const gchar* fi
 	}
 }
 
-
 gboolean
 gedit_file_close_all (void)
 {
@@ -630,23 +630,43 @@ gedit_file_save_all (void)
 
 /* Displays a confirmation dialog for whether to revert a file. */
 static gboolean
-gedit_file_revert_dialog (const GeditDocument *doc)
+gedit_file_revert_dialog (GeditDocument *doc)
 {
 	GtkWidget *msgbox;
 	gint ret;
 	gchar *name;
+	gchar *primary_msg;
+	gchar *secondary_msg;
+	glong seconds;
 
 	name = gedit_document_get_short_name (doc);
-
-	msgbox = gtk_message_dialog_new (GTK_WINDOW (gedit_get_active_window ()),
-					 GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
-					 GTK_MESSAGE_QUESTION,
-					 GTK_BUTTONS_NONE,
-					 _("Do you want to revert to saved the document '%s'?\n\n"
-					   "You will not be able to undo this operation."), 
-					 name);
+	primary_msg = g_strdup_printf (_("Revert unsaved changes to document \"%s\"?\n\n"),
+	                               name);
 	g_free (name);
 
+	seconds = gedit_document_get_seconds_since_last_save_or_load (doc);
+
+	if (seconds < 1)
+		seconds = 1;
+
+	if (seconds < 60)
+		secondary_msg = g_strdup_printf (ngettext ("Changes made in the last second will be definitively lost",
+							   "Changes made in the last %li seconds will be definitively lost",
+							   seconds), seconds);
+	else
+		secondary_msg = g_strdup_printf (_("Changes made in the last %li minutes will be definitively lost"),
+						 seconds/60 + 1);
+
+	msgbox = eel_alert_dialog_new (GTK_WINDOW (gedit_get_active_window ()),
+				       GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+				       GTK_MESSAGE_QUESTION,
+				       GTK_BUTTONS_NONE,
+				       primary_msg,
+				       secondary_msg, 
+				       NULL);
+	g_free (primary_msg);
+	g_free (secondary_msg);
+
 	/* Add Cancel button */
 	gtk_dialog_add_button (GTK_DIALOG (msgbox), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
 
