<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
<!--ENTITY index-Objects-Grouped SYSTEM "objects_grouped.sgml"-->
<refentry id="GtkMessageDialog">
<refmeta>
<refentrytitle role="top_of_page" id="GtkMessageDialog.top_of_page">GtkMessageDialog</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GtkMessageDialog</refname>
<refpurpose>A convenient message window</refpurpose>
</refnamediv>

<refsynopsisdiv id="GtkMessageDialog.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>

#include &lt;gtk/gtk.h&gt;

                    <link linkend="GtkMessageDialog-struct">GtkMessageDialog</link>;
enum                <link linkend="GtkMessageType">GtkMessageType</link>;
enum                <link linkend="GtkButtonsType">GtkButtonsType</link>;
<link linkend="GtkWidget">GtkWidget</link>*          <link linkend="gtk-message-dialog-new">gtk_message_dialog_new</link>              (<link linkend="GtkWindow">GtkWindow</link> *parent,
                                                         <link linkend="GtkDialogFlags">GtkDialogFlags</link> flags,
                                                         <link linkend="GtkMessageType">GtkMessageType</link> type,
                                                         <link linkend="GtkButtonsType">GtkButtonsType</link> buttons,
                                                         const <link linkend="gchar">gchar</link> *message_format,
                                                         ...);
<link linkend="GtkWidget">GtkWidget</link>*          <link linkend="gtk-message-dialog-new-with-markup">gtk_message_dialog_new_with_markup</link>  (<link linkend="GtkWindow">GtkWindow</link> *parent,
                                                         <link linkend="GtkDialogFlags">GtkDialogFlags</link> flags,
                                                         <link linkend="GtkMessageType">GtkMessageType</link> type,
                                                         <link linkend="GtkButtonsType">GtkButtonsType</link> buttons,
                                                         const <link linkend="gchar">gchar</link> *message_format,
                                                         ...);
<link linkend="void">void</link>                <link linkend="gtk-message-dialog-set-markup">gtk_message_dialog_set_markup</link>       (<link linkend="GtkMessageDialog">GtkMessageDialog</link> *message_dialog,
                                                         const <link linkend="gchar">gchar</link> *str);
<link linkend="void">void</link>                <link linkend="gtk-message-dialog-set-image">gtk_message_dialog_set_image</link>        (<link linkend="GtkMessageDialog">GtkMessageDialog</link> *dialog,
                                                         <link linkend="GtkWidget">GtkWidget</link> *image);
<link linkend="GtkWidget">GtkWidget</link> *         <link linkend="gtk-message-dialog-get-image">gtk_message_dialog_get_image</link>        (<link linkend="GtkMessageDialog">GtkMessageDialog</link> *dialog);
<link linkend="void">void</link>                <link linkend="gtk-message-dialog-format-secondary-text">gtk_message_dialog_format_secondary_text</link>
                                                        (<link linkend="GtkMessageDialog">GtkMessageDialog</link> *message_dialog,
                                                         const <link linkend="gchar">gchar</link> *message_format,
                                                         ...);
<link linkend="void">void</link>                <link linkend="gtk-message-dialog-format-secondary-markup">gtk_message_dialog_format_secondary_markup</link>
                                                        (<link linkend="GtkMessageDialog">GtkMessageDialog</link> *message_dialog,
                                                         const <link linkend="gchar">gchar</link> *message_format,
                                                         ...);
</synopsis>
</refsynopsisdiv>

<refsect1 id="GtkMessageDialog.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----<link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
         +----<link linkend="GtkObject">GtkObject</link>
               +----<link linkend="GtkWidget">GtkWidget</link>
                     +----<link linkend="GtkContainer">GtkContainer</link>
                           +----<link linkend="GtkBin">GtkBin</link>
                                 +----<link linkend="GtkWindow">GtkWindow</link>
                                       +----<link linkend="GtkDialog">GtkDialog</link>
                                             +----GtkMessageDialog
</synopsis>
</refsect1>



<refsect1 id="GtkMessageDialog.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkMessageDialog implements
 <link linkend="AtkImplementorIface">AtkImplementorIface</link> and  <link linkend="GtkBuildable">GtkBuildable</link>.</para>
</refsect1>


<refsect1 id="GtkMessageDialog.properties" role="properties">
<title role="properties.title">Properties</title>
<synopsis>
  &quot;<link linkend="GtkMessageDialog--buttons">buttons</link>&quot;                  <link linkend="GtkButtonsType">GtkButtonsType</link>        : Write / Construct Only
  &quot;<link linkend="GtkMessageDialog--image">image</link>&quot;                    <link linkend="GtkWidget">GtkWidget</link>*            : Read / Write
  &quot;<link linkend="GtkMessageDialog--message-type">message-type</link>&quot;             <link linkend="GtkMessageType">GtkMessageType</link>        : Read / Write / Construct
  &quot;<link linkend="GtkMessageDialog--secondary-text">secondary-text</link>&quot;           <link linkend="gchar">gchar</link>*                : Read / Write
  &quot;<link linkend="GtkMessageDialog--secondary-use-markup">secondary-use-markup</link>&quot;     <link linkend="gboolean">gboolean</link>              : Read / Write
  &quot;<link linkend="GtkMessageDialog--text">text</link>&quot;                     <link linkend="gchar">gchar</link>*                : Read / Write
  &quot;<link linkend="GtkMessageDialog--use-markup">use-markup</link>&quot;               <link linkend="gboolean">gboolean</link>              : Read / Write
</synopsis>
</refsect1>
<refsect1 id="GtkMessageDialog.style-properties" role="style_properties">
<title role="style_properties.title">Style Properties</title>
<synopsis>
  &quot;<link linkend="GtkMessageDialog--s-message-border">message-border</link>&quot;           <link linkend="gint">gint</link>                  : Read
  &quot;<link linkend="GtkMessageDialog--s-use-separator">use-separator</link>&quot;            <link linkend="gboolean">gboolean</link>              : Read
</synopsis>
</refsect1>



<refsect1 id="GtkMessageDialog.description" role="desc">
<title role="desc.title">Description</title>
<para>
<link linkend="GtkMessageDialog"><type>GtkMessageDialog</type></link> 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 <link linkend="GtkMessageDialog"><type>GtkMessageDialog</type></link>
from <link linkend="GtkDialog"><type>GtkDialog</type></link> without too much effort, but <link linkend="GtkMessageDialog"><type>GtkMessageDialog</type></link> saves typing.
</para>
<para>
The easiest way to do a modal message dialog is to use <link linkend="gtk-dialog-run"><function>gtk_dialog_run()</function></link>, though
you can also pass in the <link linkend="GTK-DIALOG-MODAL--CAPS"><literal>GTK_DIALOG_MODAL</literal></link> flag, <link linkend="gtk-dialog-run"><function>gtk_dialog_run()</function></link> automatically
makes the dialog modal and waits for the user to respond to it. <link linkend="gtk-dialog-run"><function>gtk_dialog_run()</function></link>
returns when any dialog button is clicked.
<example>
<title>A modal dialog.</title>
<programlisting>
 dialog = gtk_message_dialog_new (main_application_window,
                                  GTK_DIALOG_DESTROY_WITH_PARENT,
                                  GTK_MESSAGE_ERROR,
                                  GTK_BUTTONS_CLOSE,
                                  "Error loading file '&percnt;s': &percnt;s",
                                  filename, g_strerror (errno));
 gtk_dialog_run (GTK_DIALOG (dialog));
 gtk_widget_destroy (dialog);
</programlisting>
</example>
</para>
<para>
You might do a non-modal <link linkend="GtkMessageDialog"><type>GtkMessageDialog</type></link> as follows:
<example>
<title>A non-modal dialog.</title>
<programlisting>
 dialog = gtk_message_dialog_new (main_application_window,
                                  GTK_DIALOG_DESTROY_WITH_PARENT,
                                  GTK_MESSAGE_ERROR,
                                  GTK_BUTTONS_CLOSE,
                                  "Error loading file '&percnt;s': &percnt;s",
                                  filename, g_strerror (errno));
 /* Destroy the dialog when the user responds to it (e.g. clicks a button) */
 g_signal_connect_swapped (dialog, "response",
                           G_CALLBACK (gtk_widget_destroy),
                           dialog);
</programlisting>
</example>
</para>
</refsect1>

<refsect1 id="GtkMessageDialog.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GtkMessageDialog-struct" role="struct">
<title>GtkMessageDialog</title>
<indexterm zone="GtkMessageDialog-struct"><primary sortas="MessageDialog">GtkMessageDialog</primary></indexterm><programlisting>typedef struct _GtkMessageDialog GtkMessageDialog;</programlisting>
<para>
</para></refsect2>
<refsect2 id="GtkMessageType" role="enum">
<title>enum GtkMessageType</title>
<indexterm zone="GtkMessageType"><primary sortas="MessageType">GtkMessageType</primary></indexterm><programlisting>typedef enum
{
  GTK_MESSAGE_INFO,
  GTK_MESSAGE_WARNING,
  GTK_MESSAGE_QUESTION,
  GTK_MESSAGE_ERROR,
  GTK_MESSAGE_OTHER
} GtkMessageType;
</programlisting>
<para>
The type of message being displayed in the dialog.
</para><variablelist role="enum">
<varlistentry id="GTK-MESSAGE-INFO--CAPS" role="constant">
<term><literal>GTK_MESSAGE_INFO</literal></term>
<listitem><simpara>Informational message
</simpara></listitem>
</varlistentry>
<varlistentry id="GTK-MESSAGE-WARNING--CAPS" role="constant">
<term><literal>GTK_MESSAGE_WARNING</literal></term>
<listitem><simpara>Nonfatal warning message
</simpara></listitem>
</varlistentry>
<varlistentry id="GTK-MESSAGE-QUESTION--CAPS" role="constant">
<term><literal>GTK_MESSAGE_QUESTION</literal></term>
<listitem><simpara>Question requiring a choice
</simpara></listitem>
</varlistentry>
<varlistentry id="GTK-MESSAGE-ERROR--CAPS" role="constant">
<term><literal>GTK_MESSAGE_ERROR</literal></term>
<listitem><simpara>Fatal error message
</simpara></listitem>
</varlistentry>
<varlistentry id="GTK-MESSAGE-OTHER--CAPS" role="constant">
<term><literal>GTK_MESSAGE_OTHER</literal></term>
<listitem><simpara>None of the above, doesn't get an icon
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="GtkButtonsType" role="enum">
<title>enum GtkButtonsType</title>
<indexterm zone="GtkButtonsType"><primary sortas="ButtonsType">GtkButtonsType</primary></indexterm><programlisting>typedef enum
{
  GTK_BUTTONS_NONE,
  GTK_BUTTONS_OK,
  GTK_BUTTONS_CLOSE,
  GTK_BUTTONS_CANCEL,
  GTK_BUTTONS_YES_NO,
  GTK_BUTTONS_OK_CANCEL
} GtkButtonsType;
</programlisting>
<para>
Prebuilt sets of buttons for the dialog. If
none of these choices are appropriate, simply use <link linkend="GTK-BUTTONS-NONE--CAPS"><literal>GTK_BUTTONS_NONE</literal></link>
then call <link linkend="gtk-dialog-add-buttons"><function>gtk_dialog_add_buttons()</function></link>.
</para><variablelist role="enum">
<varlistentry id="GTK-BUTTONS-NONE--CAPS" role="constant">
<term><literal>GTK_BUTTONS_NONE</literal></term>
<listitem><simpara>no buttons at all
</simpara></listitem>
</varlistentry>
<varlistentry id="GTK-BUTTONS-OK--CAPS" role="constant">
<term><literal>GTK_BUTTONS_OK</literal></term>
<listitem><simpara>an OK button
</simpara></listitem>
</varlistentry>
<varlistentry id="GTK-BUTTONS-CLOSE--CAPS" role="constant">
<term><literal>GTK_BUTTONS_CLOSE</literal></term>
<listitem><simpara>a Close button
</simpara></listitem>
</varlistentry>
<varlistentry id="GTK-BUTTONS-CANCEL--CAPS" role="constant">
<term><literal>GTK_BUTTONS_CANCEL</literal></term>
<listitem><simpara>a Cancel button
</simpara></listitem>
</varlistentry>
<varlistentry id="GTK-BUTTONS-YES-NO--CAPS" role="constant">
<term><literal>GTK_BUTTONS_YES_NO</literal></term>
<listitem><simpara>Yes and No buttons
</simpara></listitem>
</varlistentry>
<varlistentry id="GTK-BUTTONS-OK-CANCEL--CAPS" role="constant">
<term><literal>GTK_BUTTONS_OK_CANCEL</literal></term>
<listitem><simpara>OK and Cancel buttons
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-message-dialog-new" role="function">
<title>gtk_message_dialog_new ()</title>
<indexterm zone="gtk-message-dialog-new"><primary sortas="message_dialog_new">gtk_message_dialog_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>*          gtk_message_dialog_new              (<link linkend="GtkWindow">GtkWindow</link> *parent,
                                                         <link linkend="GtkDialogFlags">GtkDialogFlags</link> flags,
                                                         <link linkend="GtkMessageType">GtkMessageType</link> type,
                                                         <link linkend="GtkButtonsType">GtkButtonsType</link> buttons,
                                                         const <link linkend="gchar">gchar</link> *message_format,
                                                         ...);</programlisting>
<para>
Creates a new message dialog, which is a simple dialog with an icon
indicating the dialog type (error, warning, etc.) and some text the
user may want to see. When the user clicks a button a "response"
signal is emitted with response IDs from <link linkend="GtkResponseType"><type>GtkResponseType</type></link>. See
<link linkend="GtkDialog"><type>GtkDialog</type></link> for more details.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>parent</parameter>&#160;:</term>
<listitem><simpara> transient parent, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> for none 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> flags
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type</parameter>&#160;:</term>
<listitem><simpara> type of message
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>buttons</parameter>&#160;:</term>
<listitem><simpara> set of buttons to use
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>message_format</parameter>&#160;:</term>
<listitem><simpara> <link linkend="printf"><function>printf()</function></link>-style format string, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>...</parameter>&#160;:</term>
<listitem><simpara> arguments for <parameter>message_format</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GtkMessageDialog"><type>GtkMessageDialog</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-message-dialog-new-with-markup" role="function" condition="since:2.4">
<title>gtk_message_dialog_new_with_markup ()</title>
<indexterm zone="gtk-message-dialog-new-with-markup" role="2.4"><primary sortas="message_dialog_new_with_markup">gtk_message_dialog_new_with_markup</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>*          gtk_message_dialog_new_with_markup  (<link linkend="GtkWindow">GtkWindow</link> *parent,
                                                         <link linkend="GtkDialogFlags">GtkDialogFlags</link> flags,
                                                         <link linkend="GtkMessageType">GtkMessageType</link> type,
                                                         <link linkend="GtkButtonsType">GtkButtonsType</link> buttons,
                                                         const <link linkend="gchar">gchar</link> *message_format,
                                                         ...);</programlisting>
<para>
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 <link linkend="GtkResponseType"><type>GtkResponseType</type></link>. See <link linkend="GtkDialog"><type>GtkDialog</type></link> for more details.
</para>
<para>
Special XML characters in the <link linkend="printf"><function>printf()</function></link> arguments passed to this
function will automatically be escaped as necessary.
(See <link linkend="g-markup-printf-escaped"><function>g_markup_printf_escaped()</function></link> 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 <link linkend="gtk-message-dialog-set-markup"><function>gtk_message_dialog_set_markup()</function></link>
instead, since you can't pass the markup string either
as the format (it might contain '%' characters) or as a string
argument.
<informalexample><programlisting>
 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);
</programlisting></informalexample></para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>parent</parameter>&#160;:</term>
<listitem><simpara> transient parent, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> for none 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara> flags
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type</parameter>&#160;:</term>
<listitem><simpara> type of message
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>buttons</parameter>&#160;:</term>
<listitem><simpara> set of buttons to use
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>message_format</parameter>&#160;:</term>
<listitem><simpara> <link linkend="printf"><function>printf()</function></link>-style format string, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>...</parameter>&#160;:</term>
<listitem><simpara> arguments for <parameter>message_format</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GtkMessageDialog"><type>GtkMessageDialog</type></link>

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-message-dialog-set-markup" role="function" condition="since:2.4">
<title>gtk_message_dialog_set_markup ()</title>
<indexterm zone="gtk-message-dialog-set-markup" role="2.4"><primary sortas="message_dialog_set_markup">gtk_message_dialog_set_markup</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_message_dialog_set_markup       (<link linkend="GtkMessageDialog">GtkMessageDialog</link> *message_dialog,
                                                         const <link linkend="gchar">gchar</link> *str);</programlisting>
<para>
Sets the text of the message dialog to be <parameter>str</parameter>, which is marked
up with the <link linkend="PangoMarkupFormat">Pango text markup
language</link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>message_dialog</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkMessageDialog"><type>GtkMessageDialog</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>str</parameter>&#160;:</term>
<listitem><simpara> markup string (see <link linkend="PangoMarkupFormat">Pango markup format</link>)
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.4</para></refsect2>
<refsect2 id="gtk-message-dialog-set-image" role="function" condition="since:2.10">
<title>gtk_message_dialog_set_image ()</title>
<indexterm zone="gtk-message-dialog-set-image" role="2.10"><primary sortas="message_dialog_set_image">gtk_message_dialog_set_image</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_message_dialog_set_image        (<link linkend="GtkMessageDialog">GtkMessageDialog</link> *dialog,
                                                         <link linkend="GtkWidget">GtkWidget</link> *image);</programlisting>
<para>
Sets the dialog's image to <parameter>image</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>dialog</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkMessageDialog"><type>GtkMessageDialog</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>image</parameter>&#160;:</term>
<listitem><simpara> the image
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.10</para></refsect2>
<refsect2 id="gtk-message-dialog-get-image" role="function" condition="since:2.14">
<title>gtk_message_dialog_get_image ()</title>
<indexterm zone="gtk-message-dialog-get-image" role="2.14"><primary sortas="message_dialog_get_image">gtk_message_dialog_get_image</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link> *         gtk_message_dialog_get_image        (<link linkend="GtkMessageDialog">GtkMessageDialog</link> *dialog);</programlisting>
<para>
Gets the dialog's image.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>dialog</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkMessageDialog"><type>GtkMessageDialog</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the dialog's image

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.14</para></refsect2>
<refsect2 id="gtk-message-dialog-format-secondary-text" role="function" condition="since:2.6">
<title>gtk_message_dialog_format_secondary_text ()</title>
<indexterm zone="gtk-message-dialog-format-secondary-text" role="2.6"><primary sortas="message_dialog_format_secondary_text">gtk_message_dialog_format_secondary_text</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_message_dialog_format_secondary_text
                                                        (<link linkend="GtkMessageDialog">GtkMessageDialog</link> *message_dialog,
                                                         const <link linkend="gchar">gchar</link> *message_format,
                                                         ...);</programlisting>
<para>
Sets the secondary text of the message dialog to be <parameter>message_format</parameter> 
(with <link linkend="printf"><function>printf()</function></link>-style).
</para>
<para>
Note that setting a secondary text makes the primary text become
bold, unless you have provided explicit markup.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>message_dialog</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkMessageDialog"><type>GtkMessageDialog</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>message_format</parameter>&#160;:</term>
<listitem><simpara> <link linkend="printf"><function>printf()</function></link>-style format string, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>...</parameter>&#160;:</term>
<listitem><simpara> arguments for <parameter>message_format</parameter>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-message-dialog-format-secondary-markup" role="function" condition="since:2.6">
<title>gtk_message_dialog_format_secondary_markup ()</title>
<indexterm zone="gtk-message-dialog-format-secondary-markup" role="2.6"><primary sortas="message_dialog_format_secondary_markup">gtk_message_dialog_format_secondary_markup</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_message_dialog_format_secondary_markup
                                                        (<link linkend="GtkMessageDialog">GtkMessageDialog</link> *message_dialog,
                                                         const <link linkend="gchar">gchar</link> *message_format,
                                                         ...);</programlisting>
<para>
Sets the secondary text of the message dialog to be <parameter>message_format</parameter> (with 
<link linkend="printf"><function>printf()</function></link>-style), which is marked up with the 
<link linkend="PangoMarkupFormat">Pango text markup language</link>.
</para>
<para>
Note that setting a secondary text makes the primary text become
bold, unless you have provided explicit markup.
</para>
<para>
Due to an oversight, this function does not escape special XML characters
like <link linkend="gtk-message-dialog-new-with-markup"><function>gtk_message_dialog_new_with_markup()</function></link> does. Thus, if the arguments 
may contain special XML characters, you should use <link linkend="g-markup-printf-escaped"><function>g_markup_printf_escaped()</function></link>
to escape it.
</para>
<para>
<informalexample><programlisting>
gchar *msg;
 
msg = g_markup_printf_escaped (message_format, ...);
gtk_message_dialog_format_secondary_markup (message_dialog, "&percnt;s", msg);
g_free (msg);
</programlisting></informalexample></para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>message_dialog</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkMessageDialog"><type>GtkMessageDialog</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>message_format</parameter>&#160;:</term>
<listitem><simpara> <link linkend="printf"><function>printf()</function></link>-style markup string (see 
     <link linkend="PangoMarkupFormat">Pango markup format</link>), or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>...</parameter>&#160;:</term>
<listitem><simpara> arguments for <parameter>message_format</parameter>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>

</refsect1>
<refsect1 id="GtkMessageDialog.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkMessageDialog--buttons" role="property"><title>The <literal>&quot;buttons&quot;</literal> property</title>
<indexterm zone="GtkMessageDialog--buttons"><primary sortas="MessageDialog:buttons">GtkMessageDialog:buttons</primary></indexterm><programlisting>  &quot;buttons&quot;                  <link linkend="GtkButtonsType">GtkButtonsType</link>        : Write / Construct Only</programlisting>
<para>The buttons shown in the message dialog.</para><para>Default value: GTK_BUTTONS_NONE</para>
</refsect2>
<refsect2 id="GtkMessageDialog--image" role="property"><title>The <literal>&quot;image&quot;</literal> property</title>
<indexterm zone="GtkMessageDialog--image" role="2.10"><primary sortas="MessageDialog:image">GtkMessageDialog:image</primary></indexterm><programlisting>  &quot;image&quot;                    <link linkend="GtkWidget">GtkWidget</link>*            : Read / Write</programlisting>
<para>
The image for this dialog.</para>
<para>
</para><para>Since 2.10</para>
</refsect2>
<refsect2 id="GtkMessageDialog--message-type" role="property"><title>The <literal>&quot;message-type&quot;</literal> property</title>
<indexterm zone="GtkMessageDialog--message-type"><primary sortas="MessageDialog:message-type">GtkMessageDialog:message-type</primary></indexterm><programlisting>  &quot;message-type&quot;             <link linkend="GtkMessageType">GtkMessageType</link>        : Read / Write / Construct</programlisting>
<para>
The type of the message. The type is used to determine
the image that is shown in the dialog, unless the image is
explicitly set by the ::image property.</para>
<para>
</para><para>Default value: GTK_MESSAGE_INFO</para>
</refsect2>
<refsect2 id="GtkMessageDialog--secondary-text" role="property"><title>The <literal>&quot;secondary-text&quot;</literal> property</title>
<indexterm zone="GtkMessageDialog--secondary-text" role="2.10"><primary sortas="MessageDialog:secondary-text">GtkMessageDialog:secondary-text</primary></indexterm><programlisting>  &quot;secondary-text&quot;           <link linkend="gchar">gchar</link>*                : Read / Write</programlisting>
<para>
The secondary text of the message dialog.</para>
<para>
</para><para>Default value: NULL</para>
<para>Since 2.10</para>
</refsect2>
<refsect2 id="GtkMessageDialog--secondary-use-markup" role="property"><title>The <literal>&quot;secondary-use-markup&quot;</literal> property</title>
<indexterm zone="GtkMessageDialog--secondary-use-markup" role="2.10"><primary sortas="MessageDialog:secondary-use-markup">GtkMessageDialog:secondary-use-markup</primary></indexterm><programlisting>  &quot;secondary-use-markup&quot;     <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
<para>
<link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the secondary text of the dialog includes Pango markup. 
See <link linkend="pango-parse-markup"><function>pango_parse_markup()</function></link>.</para>
<para>
</para><para>Default value: FALSE</para>
<para>Since 2.10</para>
</refsect2>
<refsect2 id="GtkMessageDialog--text" role="property"><title>The <literal>&quot;text&quot;</literal> property</title>
<indexterm zone="GtkMessageDialog--text" role="2.10"><primary sortas="MessageDialog:text">GtkMessageDialog:text</primary></indexterm><programlisting>  &quot;text&quot;                     <link linkend="gchar">gchar</link>*                : Read / Write</programlisting>
<para>
The primary text of the message dialog. If the dialog has 
a secondary text, this will appear as the title.</para>
<para>
</para><para>Default value: ""</para>
<para>Since 2.10</para>
</refsect2>
<refsect2 id="GtkMessageDialog--use-markup" role="property"><title>The <literal>&quot;use-markup&quot;</literal> property</title>
<indexterm zone="GtkMessageDialog--use-markup" role="2.10"><primary sortas="MessageDialog:use-markup">GtkMessageDialog:use-markup</primary></indexterm><programlisting>  &quot;use-markup&quot;               <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
<para>
<link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the primary text of the dialog includes Pango markup. 
See <link linkend="pango-parse-markup"><function>pango_parse_markup()</function></link>.</para>
<para>
</para><para>Default value: FALSE</para>
<para>Since 2.10</para>
</refsect2>

</refsect1>
<refsect1 id="GtkMessageDialog.style-property-details" role="style_properties_details">
<title role="style_properties_details.title">Style Property Details</title>
<refsect2 id="GtkMessageDialog--s-message-border" role="property"><title>The <literal>&quot;message-border&quot;</literal> style property</title>
<indexterm zone="GtkMessageDialog--s-message-border"><primary sortas="MessageDialog:message-border">GtkMessageDialog:message-border</primary></indexterm><programlisting>  &quot;message-border&quot;           <link linkend="gint">gint</link>                  : Read</programlisting>
<para>Width of border around the label and image in the message dialog.</para><para>Allowed values: &gt;= 0</para>
<para>Default value: 12</para>
</refsect2>
<refsect2 id="GtkMessageDialog--s-use-separator" role="property"><title>The <literal>&quot;use-separator&quot;</literal> style property</title>
<indexterm zone="GtkMessageDialog--s-use-separator" role="2.4"><primary sortas="MessageDialog:use-separator">GtkMessageDialog:use-separator</primary></indexterm><programlisting>  &quot;use-separator&quot;            <link linkend="gboolean">gboolean</link>              : Read</programlisting>
<para>
Whether to draw a separator line between the message label and the buttons
in the dialog.</para>
<para>
</para><para>Default value: FALSE</para>
<para>Since 2.4</para>
</refsect2>
</refsect1>



<refsect1 id="GtkMessageDialog.see-also">
<title>See Also</title>
<para>
<link linkend="GtkDialog"><type>GtkDialog</type></link>
</para>
</refsect1>

</refentry>
