diff options
author | William Jon McCann <jmccann@redhat.com> | 2012-08-29 17:19:49 -0400 |
---|---|---|
committer | William Jon McCann <jmccann@redhat.com> | 2012-08-30 14:09:42 -0400 |
commit | 9fa1b4f65fd7c97be5122109230b757707061b19 (patch) | |
tree | 3d6cf23effa8072d2ae1e6c49c28834d661a14c3 /gtk/gtkmessagedialog.c | |
parent | b25109fbbfbabf95f081089092346a403caca034 (diff) | |
download | gtk+-9fa1b4f65fd7c97be5122109230b757707061b19.tar.gz |
Always make primary headings bold in message dialogs
Unless they have markup. But only use big text if there is
secondary text.
https://bugzilla.gnome.org/show_bug.cgi?id=683001
Diffstat (limited to 'gtk/gtkmessagedialog.c')
-rw-r--r-- | gtk/gtkmessagedialog.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/gtk/gtkmessagedialog.c b/gtk/gtkmessagedialog.c index 7934280720..9261b49980 100644 --- a/gtk/gtkmessagedialog.c +++ b/gtk/gtkmessagedialog.c @@ -392,7 +392,7 @@ setup_primary_label_font (GtkMessageDialog *dialog) { GtkMessageDialogPrivate *priv = dialog->priv; - if (priv->has_secondary_text && !priv->has_primary_markup) + if (!priv->has_primary_markup) { PangoAttrList *attributes; PangoAttribute *attr; @@ -402,8 +402,11 @@ setup_primary_label_font (GtkMessageDialog *dialog) attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD); pango_attr_list_insert (attributes, attr); - attr = pango_attr_scale_new (PANGO_SCALE_LARGE); - pango_attr_list_insert (attributes, attr); + if (priv->has_secondary_text) + { + attr = pango_attr_scale_new (PANGO_SCALE_LARGE); + pango_attr_list_insert (attributes, attr); + } gtk_label_set_attributes (GTK_LABEL (priv->label), attributes); pango_attr_list_unref (attributes); @@ -806,9 +809,6 @@ gtk_message_dialog_set_markup (GtkMessageDialog *message_dialog, * Sets the secondary text of the message dialog to be @message_format * (with printf()-style). * - * Note that setting a secondary text makes the primary text become - * bold, unless you have provided explicit markup. - * * Since: 2.6 */ void @@ -857,9 +857,6 @@ gtk_message_dialog_format_secondary_text (GtkMessageDialog *message_dialog, * printf()-style), which is marked up with the * <link linkend="PangoMarkupFormat">Pango text markup language</link>. * - * 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() |