Re: [gtk-list] Re: Accelerators
- From: Derek Simkowiak <dereks kd-dev com>
- To: "Timothy M. Shead" <tshead k-3d com>
- cc: gtk-list redhat com, recipient list not shown: ;
- Subject: Re: [gtk-list] Re: Accelerators
- Date: Sat, 19 Feb 2000 16:33:29 -0800 (PST)
> With Windoze, you pass in a string with an ampersand preceding the character
> that should be "accelerated" as the name of the menu ... so, if you name
> your menu "&File", the F will be underlined, and the accelerator is Alt-F.
> "F&ile" would be accessed with Alt-I, etc.
I think there may have been some miscommunication here. This
"&File" business sounds exactly like the paths used in a GtkItemFactory
(which uses underscores instead of ampersands to specify the ALT-hotkey).
Also, the GtkItemFactory lets you specify an "accelerator", which
is the shorthand way to invoke that MenuItem's callback.
So the entry:
{"_File/_Save", "<control>S", file_save_cb, 0 }
...would let you save a file by hitting ALT-F, ALT-S or else by
simply hitting CTRL-S.
Check out the GtkItemFactory. I think it may be what you're
looking for.
--Derek Simkowiak
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]