11.88Class GtkMessageDialog

A convenient message window

Class GtkMessageDialog( parent, flags, type, buttons, message )
parent transient parent (GtkWindow), or nil for none.
flags flags (GtkDialogFlags)
type type of message (GtkMessageType)
buttons set of buttons to use (GtkButtonsType)
message message string, or nil.

GtkMessageDialog presents a dialog with an image representing the type of message (Error, Question, etc.) alongside some message text. It's simply a convenience widget; you could construct the equivalent of GtkMessageDialog from GtkDialog without too much effort, but GtkMessageDialog saves typing.

The easiest way to do a modal message dialog is to use gtk_dialog_run(), though you can also pass in the GTK_DIALOG_MODAL flag, gtk_dialog_run() automatically makes the dialog modal and waits for the user to respond to it. gtk_dialog_run() returns when any dialog button is clicked.

Methods
get_imageGets the dialog's image.
new_with_markupCreates a new message dialog.
set_imageSets the dialog's image to image
set_markupSets the text of the message dialog to be str, which is marked up with the Pango text markup language.
set_secondary_markupSets the secondary text of the message dialog to be message, which is marked up with the Pango text markup language.
set_secondary_textSets the secondary text of the message dialog to be message.

Methods

get_image

Gets the dialog's image.

GtkMessageDialog.get_image()
Returnthe dialog's image (GtkWidget)

new_with_markup

Creates a new message dialog.

GtkMessageDialog.new_with_markup( parent, flags, type, buttons, message )
parent transient parent (GtkWindow), or nil for none.
flags flags (GtkDialogFlags)
type type of message (GtkMessageType)
buttons set of buttons to use (GtkButtonsType)
message message string, or nil.
Returna new GtkMessageDialog.

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.

[...]

set_image

Sets the dialog's image to image

GtkMessageDialog.set_image( the )
the image (GtkWidget)

set_markup

Sets the text of the message dialog to be str, which is marked up with the Pango text markup language.

GtkMessageDialog.set_markup( markup )
markup string

set_secondary_markup

Sets the secondary text of the message dialog to be message, which is marked up with the Pango text markup language.

GtkMessageDialog.set_secondary_markup()

Note that setting a secondary text makes the primary text become bold, unless you have provided explicit markup.

Due to an oversight, this function does not escape special XML characters like gtk_message_dialog_new_with_markup() does. Thus, if the arguments may contain special XML characters, you should use g_markup_printf_escaped() to escape it.

set_secondary_text

Sets the secondary text of the message dialog to be message.

GtkMessageDialog.set_secondary_text( message )
message string or nil.

Note that setting a secondary text makes the primary text become bold, unless you have provided explicit markup.

Made with http://www.falconpl.org