summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/codecontext.py
diff options
context:
space:
mode:
authorCheryl Sabella <cheryl.sabella@gmail.com>2018-12-22 06:25:45 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-12-22 06:25:45 (GMT)
commitc1b4b0f6160e1919394586f44b12538505fed300 (patch)
tree847a401a62c7dae4bb6a28eb60f66bf5a02933f1 /Lib/idlelib/codecontext.py
parent87667c54c6650751c5d7bf7b9e465c8c4af45f71 (diff)
downloadcpython-c1b4b0f6160e1919394586f44b12538505fed300.zip
cpython-c1b4b0f6160e1919394586f44b12538505fed300.tar.gz
cpython-c1b4b0f6160e1919394586f44b12538505fed300.tar.bz2
bpo-22703: IDLE: Improve Code Context and Zoom Height menu labels (GH-11214)
The Code Context menu label now toggles between Show/Hide Code Context. The Zoom Height menu now toggles between Zoom/Restore Height. Zoom Height has moved from the Window menu to the Options menu. https://bugs.python.org/issue22703
Diffstat (limited to 'Lib/idlelib/codecontext.py')
-rw-r--r--Lib/idlelib/codecontext.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/idlelib/codecontext.py b/Lib/idlelib/codecontext.py
index ef88528..2aed76d 100644
--- a/Lib/idlelib/codecontext.py
+++ b/Lib/idlelib/codecontext.py
@@ -122,9 +122,13 @@ class CodeContext:
# thus ensuring that it will appear directly above text_frame.
self.context.pack(side=TOP, fill=X, expand=False,
before=self.editwin.text_frame)
+ menu_status = 'Hide'
else:
self.context.destroy()
self.context = None
+ menu_status = 'Show'
+ self.editwin.update_menu_label(menu='options', index='* Code Context',
+ label=f'{menu_status} Code Context')
return "break"
def get_context(self, new_topvisible, stopline=1, stopindent=0):