Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtk+/ChangeLog,v
retrieving revision 1.3678
diff -u -r1.3678 ChangeLog
--- ChangeLog	30 Sep 2002 04:13:18 -0000	1.3678
+++ ChangeLog	30 Sep 2002 16:34:57 -0000
@@ -1,3 +1,11 @@
+2002-09-30  Sebastian Rittau  <srittau@jroger.in-berlin.de>
+
+	* gtk/gtkmessagedialog.h:
+	* gtk/gtkmessagedialog.c (gtk_message_dialog_new_with_markup): New
+	method.
+	* demos/gtk-demos/dialog.c (message_dialog_clicked): Use
+	gtk_message_dialog_new_with_markup().
+
 Sun Sep 29 23:52:28 2002  Owen Taylor  <otaylor@redhat.com>
 
 	* ===== Released 2.1.0 ======
Index: gtk/gtkmessagedialog.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkmessagedialog.c,v
retrieving revision 1.12
diff -u -r1.12 gtkmessagedialog.c
--- gtk/gtkmessagedialog.c	28 Jan 2002 18:52:46 -0000	1.12
+++ gtk/gtkmessagedialog.c	30 Sep 2002 16:34:58 -0000
@@ -18,7 +18,7 @@
  */
 
 /*
- * Modified by the GTK+ Team and others 1997-1999.  See the AUTHORS
+ * Modified by the GTK+ Team and others 1997-2002.  See the AUTHORS
  * file for a list of people on the GTK+ Team.  See the ChangeLog
  * files for a list of changes.  These files are distributed with
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
@@ -337,6 +337,57 @@
 
   if (flags & GTK_DIALOG_NO_SEPARATOR)
     gtk_dialog_set_has_separator (dialog, FALSE);
+
+  return widget;
+}
+
+/**
+ * gtk_message_dialog_new_with_markup:
+ * @parent: transient parent, or NULL for none 
+ * @flags: flags
+ * @type: type of message
+ * @buttons: set of buttons to use
+ * @message_format: printf()-style format string, or NULL
+ * @Varargs: arguments for @message_format
+ * 
+ * Creates a new message dialog, which is a simple dialog with an icon
+ * indicating the dialog type (error, warning, etc.) and some text which
+ * is marked up with the <link linkend="PangoMarkupFormat">Pango text markup language</link>.
+ * When the user clicks a button a "response" signal is emitted with
+ * response IDs from #GtkResponseType. See #GtkDialog for more details.
+ *
+ * Please note that markup in strings passed as varargs is also treated
+ * as markup! This means that you should use g_markup_escape_text() on
+ * all external strings that are passed as argument to this constructor.
+ * 
+ * Return value: a new #GtkMessageDialog
+ **/
+GtkWidget*
+gtk_message_dialog_new_with_markup (GtkWindow     *parent,
+                                    GtkDialogFlags flags,
+                                    GtkMessageType type,
+                                    GtkButtonsType buttons,
+                                    const gchar   *message_format,
+                                    ...)
+{
+  GtkWidget *widget;
+  gchar* msg = 0;
+  va_list args;
+  
+  widget = gtk_message_dialog_new (parent, flags, type, buttons, "");
+
+  if (message_format)
+    {
+      va_start (args, message_format);
+      msg = g_strdup_vprintf(message_format, args);
+      va_end (args);
+      
+      
+      gtk_label_set_markup (GTK_LABEL (GTK_MESSAGE_DIALOG (widget)->label),
+                            msg);
+      
+      g_free (msg);
+    }
 
   return widget;
 }
Index: gtk/gtkmessagedialog.h
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkmessagedialog.h,v
retrieving revision 1.3
diff -u -r1.3 gtkmessagedialog.h
--- gtk/gtkmessagedialog.h	23 Feb 2002 20:22:04 -0000	1.3
+++ gtk/gtkmessagedialog.h	30 Sep 2002 16:34:58 -0000
@@ -18,7 +18,7 @@
  */
 
 /*
- * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
+ * Modified by the GTK+ Team and others 1997-2002.  See the AUTHORS
  * file for a list of people on the GTK+ Team.  See the ChangeLog
  * files for a list of changes.  These files are distributed with
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
@@ -86,6 +86,14 @@
 GtkType    gtk_message_dialog_get_type (void);
 
 GtkWidget* gtk_message_dialog_new      (GtkWindow      *parent,
+                                        GtkDialogFlags  flags,
+                                        GtkMessageType  type,
+                                        GtkButtonsType  buttons,
+                                        const gchar    *message_format,
+                                        ...) G_GNUC_PRINTF (5, 6);
+ 
+GtkWidget* gtk_message_dialog_new_with_markup
+                                       (GtkWindow      *parent,
                                         GtkDialogFlags  flags,
                                         GtkMessageType  type,
                                         GtkButtonsType  buttons,
Index: demos/gtk-demo/dialog.c
===================================================================
RCS file: /cvs/gnome/gtk+/demos/gtk-demo/dialog.c,v
retrieving revision 1.7
diff -u -r1.7 dialog.c
--- demos/gtk-demo/dialog.c	20 Oct 2001 23:39:32 -0000	1.7
+++ demos/gtk-demo/dialog.c	30 Sep 2002 16:34:58 -0000
@@ -16,13 +16,14 @@
   GtkWidget *dialog;
   static gint i = 1;
 
-  dialog = gtk_message_dialog_new (GTK_WINDOW (window),
+  dialog = gtk_message_dialog_new_with_markup
+                                  (GTK_WINDOW (window),
 				   GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
 				   GTK_MESSAGE_INFO,
 				   GTK_BUTTONS_OK,
-				   "This message box has been popped up the following\n"
+				   "This <i>message box</i> has been popped up the following\n"
 				   "number of times:\n\n"
-				   "%d", i);
+				   "<u>%d</u>", i);
   gtk_dialog_run (GTK_DIALOG (dialog));
   gtk_widget_destroy (dialog);
   i++;
