Skip to content

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

Merged
terryjreedy merged 3 commits into
python:masterfrom
csabella:bpo30853
Jul 28, 2017
Merged

bpo-30853: IDLE: Convert font and general vars to use VarTrace#2914
terryjreedy merged 3 commits into
python:masterfrom
csabella:bpo30853

Conversation

@csabella

@csabella csabella commented Jul 27, 2017

Copy link
Copy Markdown
Contributor

self.wm_deiconify()
self.wait_window()


Copy link
Copy Markdown
Contributor

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.

@csabella csabella left a comment

Copy link
Copy Markdown
Contributor Author

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.

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)

Copy link
Copy Markdown
Member

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.

# self.bind('<F1>', self.Help) #context help
self.load_configs()
self.attach_var_callbacks() # Avoid callbacks during load_configs.
# Avoid callbacks during load_configs.

Copy link
Copy Markdown
Member

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.

@terryjreedy terryjreedy merged commit 5b59154 into python:master Jul 28, 2017
terryjreedy pushed a commit to terryjreedy/cpython that referenced this pull request Jul 28, 2017
…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 bpo30853 branch July 28, 2017 19:33
terryjreedy added a commit that referenced this pull request Jul 28, 2017
…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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants