On Fri, 2004-10-01 at 15:17, Jean-Marc Lasgouttes wrote: > Can't GtkAccelLabel be used for that?
AccelLabel displays an accelerator next to the label, but the accelerator is set by associating the accellabel with a widget which uses that accelerator. That means that we're not just displaying the accelerator, we're letting GTK+ handle the key. This would be a return to the original approach of creating GTK+ accelerators, rather than just indicating the LyX accelerators in the menus. Also, we'd still need to communicate that accelerator to GTK+ somehow: an extra function for generating the Gtk::AccelKey from the LyXKeySym, so this wouldn't make the code any more concise. I don't think using the accellabel gains us much, and it introduces the potentially significant disadvantage of having GTK+ interfere with our handling of accelerator keypresses. I haven't tried it, but I fear it could break things like handling of sequences. John