Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 1 addition & 31 deletions source/config/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: UTF-8 -*-
# A part of NonVisual Desktop Access (NVDA)
# Copyright (C) 2006-2020 NV Access Limited, Aleksey Sadovoy, Peter Vágner, Rui Batista, Zahari Yurukov,
# Joseph Lee, Babbage B.V., Łukasz Golonka, Julien Cochuyt
Expand Down Expand Up @@ -34,7 +33,7 @@
import extensionPoints
from . import profileUpgrader
from .configSpec import confspec
from typing import Optional, List
from typing import Any, Dict, List, Optional, Set

#: True if NVDA is running as a Windows Store Desktop Bridge application
isAppX=False
Expand Down Expand Up @@ -222,10 +221,6 @@ def setStartAfterLogon(enable):
except WindowsError:
pass

def canStartOnSecureScreens():
# No more need to check for the NVDA service nor presence of Ease of Access, as only Windows 7 SP1 and higher is supported.
# This function will be transformed into a flag in a future release.
return isInstalledCopy()


SLAVE_FILENAME = os.path.join(globalVars.appDir, "nvda_slave.exe")
Expand Down Expand Up @@ -310,18 +305,6 @@ def setStartOnLogonScreen(enable):
) != 0:
raise RuntimeError("Slave failed to set startOnLogonScreen")

def getConfigDirs(subpath=None):
"""Retrieve all directories that should be used when searching for configuration.
IF C{subpath} is provided, it will be added to each directory returned.
@param subpath: The path to be added to each directory, C{None} for none.
@type subpath: str
@return: The configuration directories in the order in which they should be searched.
@rtype: list of str
"""
log.warning("getConfigDirs is deprecated. Use globalVars.appArgs.configPath instead")
return [os.path.join(dir, subpath) if subpath else dir
for dir in (globalVars.appArgs.configPath,)
]

def addConfigDirsToPythonPackagePath(module, subdir=None):
"""Add the configuration directories to the module search path (__path__) of a Python package.
Expand Down Expand Up @@ -1179,16 +1162,3 @@ def exit(self):
def __exit__(self, excType, excVal, traceback):
self.exit()

# The below functions are moved to systemUtils module.
# They are kept here for backwards compatibility.
# They would be removed from the config module in NVDA 2021.1.


def execElevated(*args, **kwargs):
import systemUtils
systemUtils.execElevated(*args, **kwargs)


def hasUiAccess(*args, **kwargs):
import systemUtils
systemUtils.hasUiAccess(*args, **kwargs)
4 changes: 2 additions & 2 deletions source/gui/settingsDialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ def makeSettings(self, settingsSizer):
)
self.bindHelpEvent("GeneralSettingsStartOnLogOnScreen", self.startOnLogonScreenCheckBox)
self.startOnLogonScreenCheckBox.SetValue(config.getStartOnLogonScreen())
if globalVars.appArgs.secure or not config.canStartOnSecureScreens():
if globalVars.appArgs.secure or not config.isInstalledCopy():
self.startOnLogonScreenCheckBox.Disable()
settingsSizerHelper.addItem(self.startOnLogonScreenCheckBox)

Expand All @@ -754,7 +754,7 @@ def makeSettings(self, settingsSizer):
)
self.bindHelpEvent("GeneralSettingsCopySettings", self.copySettingsButton)
self.copySettingsButton.Bind(wx.EVT_BUTTON,self.onCopySettings)
if globalVars.appArgs.secure or not config.canStartOnSecureScreens():
if globalVars.appArgs.secure or not config.isInstalledCopy():
self.copySettingsButton.Disable()
settingsSizerHelper.addItem(self.copySettingsButton)
if updateCheck:
Expand Down
4 changes: 4 additions & 0 deletions user_docs/en/changes.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ What's New in NVDA
- `LiveText` objects can now calculate diffs by character. (#11639)
- To alter the diff behaviour for some object, override the `diffAlgo` property (see the docstring for details).
- When defining a script with the script decorator, the 'allowInSleepMode' boolean argument can be specified to control if a script is available in sleep mode or not. (#11979)
- The following functions are removed from the config module:
- canStartOnSecureScreens - use config.isInstalledCopy instead.
- hasUiAccess and execElevated - use them from the systemUtils module.
- getConfigDirs - use globalVars.appArgs.configPath instead


= 2020.4 =
Expand Down