Skip to content
Merged
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
35 changes: 17 additions & 18 deletions source/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,29 +116,28 @@ def restart(disableAddons=False, debugLogging=False):
import subprocess
import winUser
import shellapi
options=[]
try:
sys.argv.remove('--disable-addons')
except ValueError:
pass
try:
sys.argv.remove('--debug-logging')
except ValueError:
pass
for paramToRemove in ("--disable-addons", "--debug-logging", "--ease-of-access"):
try:
sys.argv.remove(paramToRemove)
except ValueError:
pass
options = []
if not hasattr(sys, "frozen"):
options.append(os.path.basename(sys.argv[0]))
if disableAddons:
options.append('--disable-addons')
if debugLogging:
options.append('--debug-logging')
try:
sys.argv.remove("--ease-of-access")
except ValueError:
pass
shellapi.ShellExecute(None, None,
sys.executable,
subprocess.list2cmdline(sys.argv + options),
None,
shellapi.ShellExecute(
hwnd=None,
operation=None,
file=sys.executable,
parameters=subprocess.list2cmdline(options + sys.argv[1:]),
directory=globalVars.appDir,
# #4475: ensure that the first window of the new process is not hidden by providing SW_SHOWNORMAL
winUser.SW_SHOWNORMAL)
showCmd=winUser.SW_SHOWNORMAL
)


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.
Expand Down