classification
Title: Duplicate "preferences" menu item/Tk Aqua 8.4.14
Type: Stage:
Components: IDLE Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ronaldoussoren Nosy List: gpolo, ronaldoussoren, wordtech
Priority: normal Keywords: patch

Created on 2007-03-30 16:12 by wordtech, last changed 2008-03-23 06:18 by georg.brandl. This issue is now closed.

Messages (3)
msg31682 - (view) Author: Kevin Walzer (wordtech) * Date: 2007-03-30 16:12
Version 8.4.14 of  Tcl/Tk Aqua (for OS X) hard-codes a "Preferences" item in the Apple menu. As a result, IDLE now has two "Preferences" items--the active one that is coded by default, and an inactive item that is hard-coded by Tk. 

The way to work around this is to check the version of Tk that is present, in this fashion:

tkversion=Tkinter.Tk().tk.eval('info patchlevel') 

If it is 8.4.14 or greater, then you should bind IDLE's "preferences" dialog to the hard-coded menu item in Tk (and remove the "preferences" menu entry that comes with IDLE). It can be done in this fashion:

 Tkinter.Tk().createcommand('::tk::mac::ShowPreferences', IDLEpreferencesfunction) ##substitute the correction function name here

If tkversion <= '8.4.13', leave things as they are.

I have tried to put together a patch for this, but I'm not sure where the correct place to add this code is. I've looked at Bindings.py and macosxSupport.py, but it doesn't work as expected (in macosxSupport.py, it simply ignores the code; in Bindings.py, it removes IDLE's preferences item, but doesn't activate the hard-coded one). So I'm leaving this to someone with a greater knowledge of IDLE's internal structure to apply. 
msg31683 - (view) Author: Kevin Walzer (wordtech) * Date: 2007-04-02 22:17
Patch # 1693258 submitted April 2, 2007 to address this problem.
msg64341 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2008-03-22 22:08
Someone should close this as it has been fixed already.
History
Date User Action Args
2008-03-23 06:18:43georg.brandlsetstatus: open -> closed
resolution: fixed
2008-03-22 22:08:32gpolosetnosy: + gpolo
messages: + msg64341
2007-10-10 00:44:48kbksetkeywords: + patch
2007-10-10 00:44:29kbksetassignee: ronaldoussoren
nosy: + ronaldoussoren
2007-03-30 16:12:52wordtechcreate