MessageDialog.this

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 Pango text markup language. When the user clicks a button a "response" signal is emitted with response IDs from GtkResponseType. See GtkDialog for more details.

If Markup is true special XML characters in the printf() arguments passed to this function will automatically be escaped as necessary. (See g_markup_printf_escaped() for how this is implemented.) Usually this is what you want, but if you have an existing Pango markup string that you want to use literally as the label, then you need to use gtk_message_dialog_set_markup() instead, since you can't pass the markup string either as the format (it might contain '%' characters) or as a string argument. Since 2.4

  1. this(GtkMessageDialog* gtkMessageDialog, bool ownedRef)
  2. this(Window parent, GtkDialogFlags flags, GtkMessageType type, GtkButtonsType buttons, string messageFormat, string message)
  3. this(Window parent, GtkDialogFlags flags, GtkMessageType type, GtkButtonsType buttons, bool markup, string messageFormat, string message)

Parameters

parent Window

transient parent, or NULL for none

flags GtkDialogFlags

flags

type GtkMessageType

type of message

buttons GtkButtonsType

set of buttons to use

messageFormat string

printf()-style format string, or NULL

message string

the message - should be null, any formatting should be done prior to call this constructor

Throws

ConstructionException GTK+ fails to create the object.

Examples

GtkWidget *dialog;
dialog = gtk_message_dialog_new (main_application_window,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
NULL);
gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog),
markup);

Meta