mirror of
https://github.com/python/cpython.git
synced 2025-10-05 22:51:56 +00:00
[3.6] bpo-31488: IDLE - update former extensions when options change. (GH-3612) (#3613)
When apply ConfigDialog changes, call .reload on each class with non-key options.
Change ParenMatch so that updates affect current instances.
(cherry picked from commit 5777ecc438
)
This commit is contained in:
parent
2c1c2ca254
commit
77b52e463a
4 changed files with 32 additions and 25 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue