Eike Nicklas wrote:
Hi all,

I am currently learning Python and PyGTK by programming a simple
application and noticed a strange behaviour of accelerators in
connection with UIManager:

In my program, I use UIManager to create a toolbar, but I don't use a
menu. Everything seems to work fine except for the accelerators.
A reduced version of my code is attached.

Actions only automatically connect accelerators when connecting to a menuitem proxy. The "strange" behaviour results from the toolbar creating an overflow menu for items that can't be displayed. The action accelerators are automatically connected for proxy items in the overflow menu.


What is the reason for this strange behaviour? Is there a way to use
accelerators when creating only a toolbar but not a menu?

Try connecting the accelerators to the actions manually with something like:

   for action in action_group.list_actions():
       action.connect_accelerator()

after you create the toolbar.

John
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to