[gtk+] Fix an oversight in mnemonic handling
- From: Matthias Clasen <matthiasc src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+] Fix an oversight in mnemonic handling
- Date: Thu, 18 Jun 2009 22:13:05 -0400 (EDT)
commit 6382eac6d85409a43b9a3b96cd303338de582f65
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jun 18 22:08:31 2009 -0400
Fix an oversight in mnemonic handling
In some situations, GtkButton would ignore the use-underline
property. This was reported in bug 586330.
gtk/gtkbutton.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index d749344..43ec818 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -997,9 +997,14 @@ gtk_button_construct_child (GtkButton *button)
if (label_text)
{
- label = gtk_label_new_with_mnemonic (label_text);
- gtk_label_set_mnemonic_widget (GTK_LABEL (label),
- GTK_WIDGET (button));
+ if (button->use_underline)
+ {
+ 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 ||
priv->image_position == GTK_POS_BOTTOM)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]