I found this when I created a non stock button with a stock image (which creates a label for that button). It was not handling mnemonics properly in that case. I tested it with a variety of possible labels and buttons and it got them correct. diff -u src/writers/label.cc ~/bugfixes/label.cc --- src/writers/label.cc 2002-12-19 16:54:41.000000000 -0500 +++ /root/bugfixes/label.cc 2002-12-19 16:54:21.000000000 -0500 @@ -36,6 +36,14 @@ void Gtk_Label::ConstructionArgs(const Widget &w, CxxFile &f) const { f.FunctionArg() << Configuration.Translatable(w.getProperty("label")); + + std::string label=w.getProperty("label"); + if ( GTKMM2 && + w.getBoolProperty("use_underline") && + ( label.find('_')!=std::string::npos ) ) + { + f.FunctionArg() << "true"; + } } bool Gtk_Label::NeedExplicitCtor(const Widget &w) const Mark
Attachment:
project30.glade
Description: application/glade