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

bpo-30853: IDLE: Convert font and general vars to use VarTrace #2914

Merged
merged 3 commits into from Jul 28, 2017

Conversation

Projects
None yet
4 participants
@csabella
Contributor

csabella commented Jul 27, 2017

if not _utest:
self.grab_set()
self.wm_deiconify()
self.wait_window()

This comment has been minimized.

@mlouielu

mlouielu Jul 28, 2017

Contributor

Class method only need one blank line, so this is no need to changed.

@mlouielu

mlouielu Jul 28, 2017

Contributor

Class method only need one blank line, so this is no need to changed.

@csabella

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)

This comment has been minimized.

@terryjreedy

terryjreedy Jul 28, 2017

Member

It is now obvious that fg_bg_toggle is not traced, others are. A plus for the change.

@terryjreedy

terryjreedy Jul 28, 2017

Member

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.

This comment has been minimized.

@terryjreedy

terryjreedy Jul 28, 2017

Member

We must remember this when reviewing and writing tests for the load functions.

@terryjreedy

terryjreedy Jul 28, 2017

Member

We must remember this when reviewing and writing tests for the load functions.

@terryjreedy terryjreedy merged commit 5b59154 into python:master Jul 28, 2017

3 checks passed

bedevere/issue-number Issue number 30853 found
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

terryjreedy added a commit to terryjreedy/cpython that referenced this pull request Jul 28, 2017

[3.6] bpo-30853: IDLE: Convert font and general vars to use VarTrace (p…
…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)

@csabella csabella deleted the csabella:bpo30853 branch Jul 28, 2017

terryjreedy added a commit that referenced this pull request Jul 28, 2017

[3.6] bpo-30853: IDLE: Convert font and general vars to use VarTrace (G…
…H-2914) (#2935)

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment