[pygtk] problems with accelerators and UIManager
Eike Nicklas
lists at ephys.de
Fri Dec 14 08:53:44 WST 2007
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.
Here are some observations I made (on Debian Lenny, PyGTK 2.12):
* In the attached program, the accelerators <Control>a and <Control>r
do not work.
* When commenting out the size request in line9, <Control>a works but
<Control>r still doesn't initially. However, after clicking on the
arrow to expand the toolbar, <Control>r works as well.
* Similarly in the example program from
http://www.pygtk.org/pygtk2tutorial/examples/uimanager.py
All accelerators work fine, but if the menu is not created (comment
out lines 82 and 83), they don't work at all.
What is the reason for this strange behaviour? Is there a way to use
accelerators when creating only a toolbar but not a menu?
Thanks a lot for your help and your great work on PyGTK,
Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simple.py
Type: text/x-python
Size: 1335 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20071214/c1fb173d/simple.py
More information about the pygtk
mailing list