예제 #1
0
파일: __init__.py 프로젝트: google2013/nvda
	def _handleProfileSwitch(self):
		if not self._shouldHandleProfileSwitch:
			self._pendingHandleProfileSwitch = True
			return
		init = self.rootSection is None
		# Reset the cache.
		self.rootSection = AggregatedSection(self, (), self.spec, self.profiles)
		if init:
			# We're still initialising, so don't notify anyone about this change.
			return
		import synthDriverHandler
		synthDriverHandler.handleConfigProfileSwitch()
		import braille
		braille.handler.handleConfigProfileSwitch()
		import audioDucking
		audioDucking.handleConfigProfileSwitch()
예제 #2
0
파일: __init__.py 프로젝트: RKelson93/nvda
	def _handleProfileSwitch(self):
		if not self._shouldHandleProfileSwitch:
			self._pendingHandleProfileSwitch = True
			return
		init = self.rootSection is None
		# Reset the cache.
		self.rootSection = AggregatedSection(self, (), self.spec, self.profiles)
		if init:
			# We're still initialising, so don't notify anyone about this change.
			return
		import synthDriverHandler
		synthDriverHandler.handleConfigProfileSwitch()
		import braille
		braille.handler.handleConfigProfileSwitch()
		import audioDucking
		audioDucking.handleConfigProfileSwitch()
예제 #3
0
def resetConfiguration(factoryDefaults=False):
    """Loads the configuration, installs the correct language support and initialises audio so that it will use the configured synth and speech settings.
	"""
    import config
    import braille
    import brailleInput
    import speech
    import languageHandler
    import inputCore
    log.debug("Terminating braille")
    braille.terminate()
    log.debug("Terminating brailleInput")
    brailleInput.terminate()
    log.debug("terminating speech")
    speech.terminate()
    log.debug("terminating addonHandler")
    addonHandler.terminate()
    log.debug("Reloading config")
    config.conf.reset(factoryDefaults=factoryDefaults)
    logHandler.setLogLevelFromConfig()
    #Language
    lang = config.conf["general"]["language"]
    log.debug("setting language to %s" % lang)
    languageHandler.setLanguage(lang)
    # Addons
    addonHandler.initialize()
    #Speech
    log.debug("initializing speech")
    speech.initialize()
    #braille
    log.debug("Initializing brailleInput")
    brailleInput.initialize()
    log.debug("Initializing braille")
    braille.initialize()
    log.debug("Reloading user and locale input gesture maps")
    inputCore.manager.loadUserGestureMap()
    inputCore.manager.loadLocaleGestureMap()
    import audioDucking
    if audioDucking.isAudioDuckingSupported():
        audioDucking.handleConfigProfileSwitch()
    log.info("Reverted to saved configuration")
예제 #4
0
파일: core.py 프로젝트: eklipse2009/nvda
def resetConfiguration(factoryDefaults=False):
	"""Loads the configuration, installs the correct language support and initialises audio so that it will use the configured synth and speech settings.
	"""
	import config
	import braille
	import brailleInput
	import speech
	import languageHandler
	import inputCore
	log.debug("Terminating braille")
	braille.terminate()
	log.debug("Terminating brailleInput")
	brailleInput.terminate()
	log.debug("terminating speech")
	speech.terminate()
	log.debug("terminating addonHandler")
	addonHandler.terminate()
	log.debug("Reloading config")
	config.conf.reset(factoryDefaults=factoryDefaults)
	logHandler.setLogLevelFromConfig()
	#Language
	lang = config.conf["general"]["language"]
	log.debug("setting language to %s"%lang)
	languageHandler.setLanguage(lang)
	# Addons
	addonHandler.initialize()
	#Speech
	log.debug("initializing speech")
	speech.initialize()
	#braille
	log.debug("Initializing brailleInput")
	brailleInput.initialize()
	log.debug("Initializing braille")
	braille.initialize()
	log.debug("Reloading user and locale input gesture maps")
	inputCore.manager.loadUserGestureMap()
	inputCore.manager.loadLocaleGestureMap()
	import audioDucking
	if audioDucking.isAudioDuckingSupported():
		audioDucking.handleConfigProfileSwitch()
	log.info("Reverted to saved configuration")