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

@ -40,6 +40,10 @@ class DummyEditwin:
self.top = root
self.text_frame = frame
self.text = text
self.label = ''
def update_menu_label(self, **kwargs):
self.label = kwargs['label']
class CodeContextTest(unittest.TestCase):
@ -127,10 +131,12 @@ class CodeContextTest(unittest.TestCase):
eq(cc.context['fg'], cc.colors['foreground'])
eq(cc.context['bg'], cc.colors['background'])
eq(cc.context.get('1.0', 'end-1c'), '')
eq(cc.editwin.label, 'Hide Code Context')
# Toggle off.
eq(toggle(), 'break')
self.assertIsNone(cc.context)
eq(cc.editwin.label, 'Show Code Context')
def test_get_context(self):
eq = self.assertEqual