[issue22707] Idle: changed options should take effect immediately

Terry J. Reedy report at bugs.python.org
Tue Aug 29 01:57:22 EDT 2017


Terry J. Reedy added the comment:

I looked at the how the num_spaces and current General options are defined, set, and updated.

editor-on-startup: local name in pyshell.main.

width, height: used in text_options, passed to MultiCallCreator(Text). (Width is EW() attribute, initialized in EW.__init__, but only used immediately in text_options.)

autosave: local name in runscript.ScriptBinding.getfilename, called each time one runs a module.  This a runscript extension option already put on General tab and saved in config-main.

num_spaces: EditorWindow() attribute, set in EW.set_notabs_indentwidth, called in EW.__init__ and ConfigDialog.activate_config_changes for each window.

help_list: local name in EW.reset_help_menu_entries, called in EW.__init__ and CD.a_c_changes, like num_spaces.


For new General options, add EW.reload_general(), which calls class reload methods.  In CD.a_c_w, add at the end, after the loop, 'win_instances.pop().reload_general()'.  This will avoid importing the feature modules into configdialog.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22707>
_______________________________________


More information about the Python-bugs-list mailing list