From: Cheryl Sabella Date: Sun, 23 Dec 2018 21:26:53 +0000 (-0500) Subject: bpo-35555: IDLE: Gray out Code Context menu item on non-editors (#11282) X-Git-Tag: v3.8.0a1~213 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8874f511e7473b08d6b0ccd9261dd415a072a34d;p=thirdparty%2FPython%2Fcpython.git bpo-35555: IDLE: Gray out Code Context menu item on non-editors (#11282) The Code Context menu item only works on Editor windows so disable it for others. --- diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index f46a2d7d8028..68862891f6af 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,8 @@ Released on 2019-10-20? ====================================== +bpo-35555: Gray out Code Context menu entry when it's not applicable. + bpo-22703: Improve the Code Context and Zoom Height menu labels. The Code Context menu label now toggles between Show/Hide Code Context. The Zoom Height menu now toggles between Zoom/Restore Height. diff --git a/Lib/idlelib/outwin.py b/Lib/idlelib/outwin.py index e962142498df..f6361eb9aef1 100644 --- a/Lib/idlelib/outwin.py +++ b/Lib/idlelib/outwin.py @@ -78,6 +78,8 @@ class OutputWindow(EditorWindow): EditorWindow.__init__(self, *args) self.text.bind("<>", self.goto_file_line) self.text.unbind("<>") + self.menudict['options'].entryconfig('*Code Context', + state='disabled') # Customize EditorWindow def ispythonsource(self, filename): diff --git a/Misc/NEWS.d/next/macOS/2018-12-21-18-44-30.bpo-35555.M58_K3.rst b/Misc/NEWS.d/next/macOS/2018-12-21-18-44-30.bpo-35555.M58_K3.rst new file mode 100644 index 000000000000..0939195cadd3 --- /dev/null +++ b/Misc/NEWS.d/next/macOS/2018-12-21-18-44-30.bpo-35555.M58_K3.rst @@ -0,0 +1 @@ +Gray out Code Context menu entry when it's not applicable.