bpo-31488: IDLE - update former extensions when options change. (#3612)

When apply changes, call .reload on each class with non-key options.
Change ParenMatch so that updates affect current instances.
This commit is contained in:
Terry Jan Reedy 2017-09-16 01:42:28 -04:00 committed by GitHub
parent 3f9eee6eb4
commit 5777ecc438
4 changed files with 32 additions and 25 deletions

View file

@ -27,8 +27,14 @@ from idlelib import macosx
from idlelib.query import SectionName, HelpSource
from idlelib.tabbedpages import TabbedPageSet
from idlelib.textview import view_text
from idlelib.autocomplete import AutoComplete
from idlelib.codecontext import CodeContext
from idlelib.parenmatch import ParenMatch
from idlelib.paragraph import FormatParagraph
changes = ConfigChanges()
# Reload changed options in the following classes.
reloadables = (AutoComplete, CodeContext, ParenMatch, FormatParagraph)
class ConfigDialog(Toplevel):
@ -220,6 +226,8 @@ class ConfigDialog(Toplevel):
instance.set_notabs_indentwidth()
instance.ApplyKeybindings()
instance.reset_help_menu_entries()
for klass in reloadables:
klass.reload()
def create_page_extensions(self):
"""Part of the config dialog used for configuring IDLE extensions.