GNOME Bugzilla – Bug 586330
GtkButton ignores user_underline when an image is set
Last modified: 2009-06-19 02:13:26 UTC
Please describe the problem: When an image is set on a button (using gtk_button_set_image), the button ignores the user_underline setting. Steps to reproduce: 1. gtk_button_set_image(...) 2. gtk_button_set_label(...) 3. gtk_button_set_use_underline(..., FALSE) Actual results: the _ is always treated as a mnemonic specifier Expected results: no mnemonics show up in the button label Does this happen every time? yes Other information: Here is the relevant code in gtk_button_construct_child(), with added commentary and the irrelevant bits elided: if (image) { ... if (label_text) { // doesn't check for use_underline >:( label = gtk_label_new_with_mnemonic (label_text); gtk_label_set_mnemonic_widget (GTK_LABEL (label), GTK_WIDGET (button)); ... } ... return; // <--- Early return! } if (button->use_underline) // <--- This check not reached { ... }
s/user_underline/use_underline
Thanks, fixed