Re: Stock items - first version of a patch



Martin Baulig <martin home-of-linux org> writes:
> Havoc Pennington <hp redhat com> writes:
> 
> > GTK sets up the mnemonic for toolbar buttons
> > (e.g. gtk_toolbar_insert_stock() or whatever). Is there some reason
> > not to do that?
> 
> Oh, does this mean that toolbars can now have accelerator keys as well ?
> 

Sorry for the late reply, forgot about the thread. ;-)

Remember there are two things:

 - mnemonics, i.e. the underlined char in a label, typically focuses
   an entry or presses a button, usually alt + underlined char
 - accelerators, usually Ctrl+something, mostly used for menus, though
   they can also exist outside of menus

The underlined char in your menu/toolbar labels is a mnemonic, not an
accelerator. Any widget with a label inside it or next to it can (and
should) have a mnemonic.

So e.g. gtk_button_new_with_mnemonic(), gtk_label_new_with_mnemonic(),
gtk_label_set_mnemonic_widget(), would be examples of functions you
use with mnemonics.

Havoc




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