diff options
author | Cheryl Sabella <cheryl.sabella@gmail.com> | 2018-12-28 13:15:30 -0500 |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2018-12-28 13:15:30 -0500 |
commit | 804a5d94b6b7f8cb8546112aee2bc3af362f28f5 (patch) | |
tree | cbb5a9d6df5ba73c39862e1896b86fb5cef132ce /Lib/idlelib/editor.py | |
parent | 9e00d9e88fbf943987e4771c753f5ca8f794103e (diff) | |
download | cpython-git-804a5d94b6b7f8cb8546112aee2bc3af362f28f5.tar.gz |
IDLE: Create function to update menu item state. (GH-11343)
This will be needed for other menu items. Change outwin to call the function instead of updating the menu item directly.
Diffstat (limited to 'Lib/idlelib/editor.py')
-rw-r--r-- | Lib/idlelib/editor.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py index d92b32b240..f4437668a3 100644 --- a/Lib/idlelib/editor.py +++ b/Lib/idlelib/editor.py @@ -447,10 +447,15 @@ class EditorWindow(object): window.add_windows_to_menu(menu) def update_menu_label(self, menu, index, label): - "Update label for menu item at index ." + "Update label for menu item at index." menuitem = self.menudict[menu] menuitem.entryconfig(index, label=label) + def update_menu_state(self, menu, index, state): + "Update state for menu item at index." + menuitem = self.menudict[menu] + menuitem.entryconfig(index, state=state) + def handle_yview(self, event, *args): "Handle scrollbar." if event == 'moveto': |