Prevent creating mnemonics in Gtk::Action label


	is there a decent way to prevent creating mnemonics under characters, 
that are preceded with underscore, in Gtk::Action label?

If I do:
	Glib::RefPtr<Gtk::Action> menuAction = Gtk::Action::create ("name", "Label_with_underscores");
I will get an action, that label has underscored "w" and "u".

Escaping underscores with backslashes "\", doesn't do anything. In fact, it does
make compiler cry about "unknown escaped sequence '\_'".

Gtk::Label has a constructor, in which user can specify, if he want to use
mnemonics or not. Gtk::Action::create() doesn't have such an argument.

As a workaround I use a home-brewed method:
  ustring::size_type pos = 0;
  while ((pos = filename.find ("_", pos)) != ustring::npos)
    filename.replace (pos, 1, " ");
but it's not very decent nor convenient.

Thanks for any replies.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]