diff options
| author | Cheryl Sabella <cheryl.sabella@gmail.com> | 2018-12-23 16:26:53 -0500 | 
|---|---|---|
| committer | Terry Jan Reedy <tjreedy@udel.edu> | 2018-12-23 16:26:53 -0500 | 
| commit | 8874f511e7473b08d6b0ccd9261dd415a072a34d (patch) | |
| tree | 47e3c13b198f208b413d17de9264e56015be7e22 /Lib/idlelib | |
| parent | 44a3ee07e30e18d83e2730c093d8b0e930f0a06c (diff) | |
| download | cpython-git-8874f511e7473b08d6b0ccd9261dd415a072a34d.tar.gz | |
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.
Diffstat (limited to 'Lib/idlelib')
| -rw-r--r-- | Lib/idlelib/NEWS.txt | 2 | ||||
| -rw-r--r-- | Lib/idlelib/outwin.py | 2 | 
2 files changed, 4 insertions, 0 deletions
| diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index f46a2d7d80..68862891f6 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 e962142498..f6361eb9ae 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("<<goto-file-line>>", self.goto_file_line)          self.text.unbind("<<toggle-code-context>>") +        self.menudict['options'].entryconfig('*Code Context', +                                             state='disabled')      # Customize EditorWindow      def ispythonsource(self, filename): | 
