[Nvda-dev] commit r1923 - trunk/source

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Nvda-dev] commit r1923 - trunk/source

NVDA Subversion
Author: mdcurran
Date: Sun Apr 20 01:21:04 2008
New Revision: 1923

Fixes to some problems reported by pychecker:
*globalVars needs a 'startTime' module attribute. nvda.pyw adds it dynamically, but it really should be coded in globalVars.py like all others.
*Core: don't look at the return value of wx.App.MainLoop (it doesn't return anything anyway). Plus, "is not 0" is frowned upon by pychecker.
*Core: no need to import comtypes after importing comtypes.client
*Core: winuser does not need to be imported
*Core.quit: remove this function, it is never used.
*QueueHandler: rename vars to kwargs (vars is a builtin)
*keyUtils.sendKey: don't treet the insert modifier key different to any other modifier.  Also, the 'insertDown' global variable doesn't even exist in keyUtils anyway.
*baseObject.scriptableObject.bindKey_runTime: when raising an exception because script doesn't exist, include 'self' in the log info, 'cls' doesn't exist in bindKey_runtime, only bindKey.
 *tones: no need to import os


Modified: trunk/source/baseObject.py
--- trunk/source/baseObject.py (original)
+++ trunk/source/baseObject.py Sun Apr 20 01:21:04 2008
@@ -39,7 +39,7 @@
  if func:
- raise ValueError("no script \"%s\" in %s"%(scriptName,cls))
+ raise ValueError("no script \"%s\" in %s"%(scriptName,self))
  def bindKeyToFunc_runtime(self,keyName,func):
  if not self.__dict__.has_key('_keyMap'):

Modified: trunk/source/core.py
--- trunk/source/core.py (original)
+++ trunk/source/core.py Sun Apr 20 01:21:04 2008
@@ -9,7 +9,6 @@
 #Bit of a dance to force comtypes generated interfaces in to our directory
 import comtypes.client
-import comtypes
 import sys
@@ -17,20 +16,12 @@
 import time
 import logging
 import globalVars
-import winUser
-def quit():
- """
-Instructs the GUI that you want to quit. The GUI responds by bringing up a dialog asking you if you want to exit.
- globalVars.log.debug("Calling gui.quit")
- gui.quit()
 def resetConfiguration(reportDone=False):
  """Loads the configuration, installs the correct language support and initialises audio so that it will use the configured synth and speech settings.
 @param reportDone: if true then this function will speak when done, if else it won't.
@@ -156,10 +147,7 @@
  globalVars.log.info("NVDA initialized")
  globalVars.log.debug("entering wx application main loop")
- res=app.MainLoop()
- if res is not None and res is not 0:
- globalVars.log.critical("wx application main loop stopped with errors, returned %s"%res)
+ app.MainLoop()
  globalVars.log.debug("Shutting down core")
  if globalVars.focusObject and hasattr(globalVars.focusObject,"event_looseFocus"):

Modified: trunk/source/globalVars.py
--- trunk/source/globalVars.py (original)
+++ trunk/source/globalVars.py Sun Apr 20 01:21:04 2008
@@ -26,6 +26,7 @@
 @type lastProgressValue: int

Modified: trunk/source/keyUtils.py
--- trunk/source/keyUtils.py (original)
+++ trunk/source/keyUtils.py Sun Apr 20 01:21:04 2008
@@ -64,7 +64,7 @@
  elif (modifier=="win") and ((winUser.getKeyState(winUser.VK_LWIN)&32768) or (winUser.getKeyState(winUser.VK_RWIN)&32768)):
- elif (modifier=="insert") and insertDown:
+ elif (modifier=="insert") and (winUser.getKeyState(winUser.VK_INSERT)&32768):
  if modifier[0:8]=="extended":

Modified: trunk/source/queueHandler.py
--- trunk/source/queueHandler.py (original)
+++ trunk/source/queueHandler.py Sun Apr 20 01:21:04 2008
@@ -47,9 +47,9 @@
 def flushQueue(queue):
  for count in range(queue.qsize()+1):
  if not queue.empty():
- (func,args,vars)=queue.get_nowait()
+ (func,args,kwargs)=queue.get_nowait()
- func(*args,**vars)
+ func(*args,**kwargs)
  globalVars.log.error("Error in func %s from %s"%(func.__name__,queue.__name__),exc_info=True)

Modified: trunk/source/setup.py
--- trunk/source/setup.py (original)
+++ trunk/source/setup.py Sun Apr 20 01:21:04 2008
@@ -48,7 +48,7 @@
  windows = ["nvda.pyw"],
  options = {"py2exe": {
- "bundle_files": 3,
+ "bundle_files": 1,
  "excludes": ["comInterfaces"],
  "packages": ["NVDAObjects","virtualBuffers_old","virtualBuffers"],
  # The explicit cursorManager include can be removed once the new virtualBuffers package is included.

Modified: trunk/source/tones.py
--- trunk/source/tones.py (original)
+++ trunk/source/tones.py Sun Apr 20 01:21:04 2008
@@ -5,7 +5,6 @@
 #See the file COPYING for more details.
 import nvwave
-import os
 import struct
 import math
 from glob import glob