summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/configdialog.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2017-09-16 05:42:28 (GMT)
committerGitHub <noreply@github.com>2017-09-16 05:42:28 (GMT)
commit5777ecc438790f3d324d52f2ccdad56e667e0cb3 (patch)
treec7e9e888307837940098267e310f5e171f7c9cd2 /Lib/idlelib/configdialog.py
parent3f9eee6eb4b25fe1926eaa5f00e02344b126f54d (diff)
downloadcpython-5777ecc438790f3d324d52f2ccdad56e667e0cb3.zip
cpython-5777ecc438790f3d324d52f2ccdad56e667e0cb3.tar.gz
cpython-5777ecc438790f3d324d52f2ccdad56e667e0cb3.tar.bz2
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.
Diffstat (limited to 'Lib/idlelib/configdialog.py')
-rw-r--r--Lib/idlelib/configdialog.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/idlelib/configdialog.py b/Lib/idlelib/configdialog.py
index 683c36e..7feae5d 100644
--- a/Lib/idlelib/configdialog.py
+++ b/Lib/idlelib/configdialog.py
@@ -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.