I'm trying to patch IDLE to work better with the Cocoa fork of Tcl/Tk. With Tk-Cocoa, in order to correctly set up the Apple/Application menu, you have to call the equivalent of 'self.configure(menu=menubar)' after everything else is set up. Otherwise the hard-coded "About Tcl/Tk" menu item remains, and the menu override is moved to the very end of the menu, after "Help." (So there are two "IDLE" menus under this scenario.)

In macosxSupport.py, in the function overrideRootMenu(), there is a call to root.configure(menu=menubar); I thought moving this to the end of the function would work. However, no matter where this line is set, it has no effect; the overridden IDLE menu still sits at the end of the menubar. My question is, where in idlelib would be the best place to call this configuration option to ensure that the entire menu is built before it is bound/set to the root menu? There are many calls to macosxSupport.py in idlelib, and that's the "root" for overriding the Tk menu, so I thought that was where it should be done...but I'm not sure.

Advice is appreciated. If I get this resolved, I'll submit a patch to support Tk 8.6, when Cocoa will move from a fork to trunk in Tk development.

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to