-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-30853: IDLE: Convert font and general vars to use VarTrace #2914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
if not _utest: | ||
self.grab_set() | ||
self.wm_deiconify() | ||
self.wait_window() | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Class method only need one blank line, so this is no need to changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Global makes more sense.
self.builtin_theme = tracers.add( | ||
StringVar(parent), self.var_changed_builtin_theme) | ||
self.custom_theme = tracers.add( | ||
StringVar(parent), self.var_changed_custom_theme) | ||
self.fg_bg_toggle = BooleanVar(parent) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is now obvious that fg_bg_toggle is not traced, others are. A plus for the change.
@@ -75,13 +76,15 @@ def __init__(self, parent, title='', _htest=False, _utest=False): | |||
# self.bind('<Alt-a>', self.Apply) #apply changes, save | |||
# self.bind('<F1>', self.Help) #context help | |||
self.load_configs() | |||
self.attach_var_callbacks() # Avoid callbacks during load_configs. | |||
# Avoid callbacks during load_configs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We must remember this when reviewing and writing tests for the load functions.
…ythonGH-2914) Instance tracers manages pairs consisting of a tk variable and a callback function. When tracing is turned on, setting the variable calls the function. Test coverage for the new class is 100%. (cherry picked from commit 5b59154)
https://bugs.python.org/issue30853