The documentation doesn't mention adding underscores in the string to
get alt-letter shortcuts at all. However, neither does the gtk
documentation for UIManager, which is why I had such a hard time
finding anything. I finally found out from
that gtk distinguishes between "accelerators" and "mnemonics" and that
the alt-letter shortcuts are mnemonics bound to gui widgets rather
than accelerators bound to actions. And finally, the howto on
providing mnemonics is documented under gtklabel
[http://developer.gnome.org/gtk/2.24/GtkLabel.html]. So it's not
really clear how the gtk2hs docs should handle this.
If possible, I think the gtk2hs uimanager page should have a note
pointing towards the difference between accelerators and mnemonics in
the "accelerators" section. Also the AccelGroup documentation is
missing altogether, which is probably a bug.
I'll try to extract a few small tutorial howtos from my app once it's
in decent shape.
On Sun, Dec 4, 2011 at 11:22 PM, Axel Simon <Axel.Simon@...> wrote:
> Hi Martin,
> ok, good. Sorry for not responding, but we can often only dig into the whole
> thing just as you did.
> Is there documentation lacking?
> On 05.12.2011, at 02:53, Martin DeMello wrote:
>> Figured it out by poking around some python gtk examples Here's how:
>> - fma <- actionNew "FMA" "File" Nothing Nothing
>> - ema <- actionNew "EMA" "Edit" Nothing Nothing
>> - hma <- actionNew "HMA" "Help" Nothing Nothing
>> + fma <- actionNew "FMA" "_File" Nothing Nothing
>> + ema <- actionNew "EMA" "_Edit" Nothing Nothing
>> + hma <- actionNew "HMA" "_Help" Nothing Nothing
>> On Fri, Dec 2, 2011 at 12:25 AM, Martin DeMello <martindemello@...>
>>> Following the tutorial at
>>> [http://www.muitovar.com/gtk2hs/chap7-1.html] I have a menu and
>>> toolbar up and running. However, it only deals with shortcuts bound to
>>> menu item actions - I can't figure out how to get shortcuts for the
>>> menus themselves (e.g. Alt-F to drop down the File menu).
>> All the data continuously generated in your IT infrastructure
>> contains a definitive record of customers, application performance,
>> security threats, fraudulent activity, and more. Splunk takes this
>> data and makes sense of it. IT sense. And common sense.
>> Gtk2hs-users mailing list