Index: gtk/gtkmessagedialog.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkmessagedialog.c,v
retrieving revision 1.28
diff -u -r1.28 gtkmessagedialog.c
--- gtk/gtkmessagedialog.c	28 Oct 2004 15:00:04 -0000	1.28
+++ gtk/gtkmessagedialog.c	31 Oct 2004 18:26:23 -0000
@@ -50,8 +50,11 @@
 
 static void gtk_message_dialog_class_init (GtkMessageDialogClass *klass);
 static void gtk_message_dialog_init       (GtkMessageDialog      *dialog);
-static void gtk_message_dialog_style_set  (GtkWidget             *widget,
-                                           GtkStyle              *prev_style);
+
+static void gtk_message_dialog_style_set       (GtkWidget *widget,
+						GtkStyle  *prev_style);
+static gint gtk_message_dialog_key_press_event (GtkWidget   *widget,
+						GdkEventKey *event);
 
 static void gtk_message_dialog_set_property (GObject          *object,
 					     guint             prop_id,
@@ -115,6 +118,7 @@
   parent_class = g_type_class_peek_parent (class);
   
   widget_class->style_set = gtk_message_dialog_style_set;
+  widget_class->key_press_event = gtk_message_dialog_key_press_event;
 
   gobject_class->set_property = gtk_message_dialog_set_property;
   gobject_class->get_property = gtk_message_dialog_get_property;
@@ -724,4 +728,22 @@
 
   if (GTK_WIDGET_CLASS (parent_class)->style_set)
     (GTK_WIDGET_CLASS (parent_class)->style_set) (widget, prev_style);
+}
+
+static gint
+gtk_message_dialog_key_press_event (GtkWidget   *widget,
+				    GdkEventKey *event)
+{
+	gboolean handled = FALSE;
+
+	handled = GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event);
+
+	if (handled)
+		return TRUE;
+
+	handled = gtk_window_mnemonic_activate (GTK_WINDOW (widget),
+						event->keyval,
+						gtk_window_get_mnemonic_modifier (GTK_WINDOW (widget)));
+
+	return handled;
 }
