Skip to content

Commit

Permalink
When disabling automatic checking for updates, NVDA no longer has to …
Browse files Browse the repository at this point in the history
…be restarted in order for the change to fully take effect.

Previously, updateCheck.terminate() tried to dispose of autoChecker, but the timer creates a circular reference, so it would still run for the next check. The timer needs to be explicitly discarded to prevent this.
  • Loading branch information
jcsteh committed Dec 10, 2012
1 parent 9f488f4 commit 30bc46e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion source/updateCheck.py
Expand Up @@ -146,6 +146,10 @@ def __init__(self):
secs = CHECK_INTERVAL - int(min(time.time() - state["lastCheck"], CHECK_INTERVAL))
self._checkTimer.Start(secs * 1000, True)

def terminate(self):
self._checkTimer.Stop()
self._checkTimer = None

def setNextCheck(self, isRetry=False):
self._checkTimer.Stop()
self._checkTimer.Start((RETRY_INTERVAL if isRetry else CHECK_INTERVAL) * 1000, True)
Expand Down Expand Up @@ -445,4 +449,6 @@ def initialize():
def terminate():
global state, autoChecker
state = None
autoChecker = None
if autoChecker:
autoChecker.terminate()
autoChecker = None
3 changes: 2 additions & 1 deletion user_docs/en/changes.t2t
Expand Up @@ -25,7 +25,8 @@
- Earlier and newer versions of SecureCRT are now supported. (#2800)
- For input methods such as Easy Dots IME under XP, the reading string is now correctly reported.
- The candidate list in the Chinese Simplified Microsoft Pinyin input method under Windows 7 is now correctly read when changing pages with left and right arrow, and when first opening it with Home.
- When custom symbol pronunciation information is saved, the advanced "preserve" field is no longer removed. (#2852)
- When custom symbol pronunciation information is saved, the advanced "preserve" field is no longer removed. (#2852)
- When disabling automatic checking for updates, NVDA no longer has to be restarted in order for the change to fully take effect.


== Changes for Developers ==
Expand Down

0 comments on commit 30bc46e

Please sign in to comment.