Commit 6382eac6 authored by Matthias Clasen's avatar Matthias Clasen

Fix an oversight in mnemonic handling

In some situations, GtkButton would ignore the use-underline
property. This was reported in bug 586330.
parent 68171b50
...@@ -997,9 +997,14 @@ gtk_button_construct_child (GtkButton *button) ...@@ -997,9 +997,14 @@ gtk_button_construct_child (GtkButton *button)
if (label_text) if (label_text)
{ {
label = gtk_label_new_with_mnemonic (label_text); if (button->use_underline)
gtk_label_set_mnemonic_widget (GTK_LABEL (label), {
GTK_WIDGET (button)); label = gtk_label_new_with_mnemonic (label_text);
gtk_label_set_mnemonic_widget (GTK_LABEL (label),
GTK_WIDGET (button));
}
else
label = gtk_label_new (label_text);
if (priv->image_position == GTK_POS_RIGHT || if (priv->image_position == GTK_POS_RIGHT ||
priv->image_position == GTK_POS_BOTTOM) priv->image_position == GTK_POS_BOTTOM)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment