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
This commit is contained in:
Cheryl Sabella 2018-12-22 01:25:45 -05:00 committed by Miss Islington (bot)
parent 87667c54c6
commit c1b4b0f616
8 changed files with 39 additions and 11 deletions

View file

@ -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):