Skip to content

Commit 77d2f0a

Browse files
authored
Merge 0215d3f into bd45d8e
2 parents bd45d8e + 0215d3f commit 77d2f0a

8 files changed

Lines changed: 86 additions & 71 deletions

File tree

contributors.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
This is a list of people and organizations that contributed to the NVDA project in various ways since the beginning of the project. For an overview of code contributors, see also
2-
https://github.com/nvaccess/nvda/graphs/contributors
1+
This is a list of people and organizations that contributed to the NVDA project in various ways since the beginning of the project.
2+
For an overview of code contributors, see also https://github.com/nvaccess/nvda/graphs/contributors.
3+
For a list of active contributors, see the experts list https://github.com/nvaccess/nvda/blob/master/projectDocs/community/expertsList.md
4+
This list is now archived.
35

46
NV Access Limited
57
Michael Curran

copying.txt

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
NVDA is available under the GNU General Public License version 2, with two special exceptions.
44
The exceptions are outlined in the sections "Non-GPL Components in Plugins and Drivers" and "Microsoft Distributable Code".
55
NVDA also includes and uses components which are made available under different free and open source licenses.
6-
Information about how to obtain and build the code for yourself is available at http://community.nvda-project.org/wiki/AccessingAndRunningSourceCode
6+
Information about how to obtain and build the code for yourself is available at http://community.nvda-project.org/wiki/AccessingAndRunningSourceCode.
77
All applicable licenses are included below.
88

99
## GNU GENERAL PUBLIC LICENSE
@@ -306,31 +306,42 @@ DAMAGES.
306306

307307
Plugins and drivers, including those provided by third parties, are considered derivative works of NVDA and must therefore be licensed under the terms of the GNU General Public License version 2.
308308
As a special exception, an NVDA plugin or driver (as defined in the NVDA Developer Guide) may use components under other licenses provided that:
309-
a) Any such component does not prevent the NVDA plugin or driver from being licensed under the terms of the GNU General Public License version 2; and
310-
b) Any such component does not directly use and is not directly used by any portion of NVDA outside of that plugin or driver.
309+
310+
a. Any such component does not prevent the NVDA plugin or driver from being licensed under the terms of the GNU General Public License version 2; and
311+
312+
b. Any such component does not directly use and is not directly used by any portion of NVDA outside of that plugin or driver.
311313
For example, a speech synthesizer driver may use a speech synthesiser under a proprietary license.
312314
In contrast, in a plugin providing support for an application, the code which implements any interface provided by NVDA must be licensed under the GNU General Public License version 2.
313315

314316

315317
## Microsoft Distributable Code
316318

317319
This applies to the following files:
318-
- mfc*.dll
319-
- Microsoft.VC*.manifest
320-
- msvc*.dll
320+
321+
* mfc*.dll
322+
* Microsoft.VC*.manifest
323+
* msvc*.dll
321324

322325
As a special exception to the GNU General Public License version 2, these components may be included with binary distributions of NVDA without being subject to the terms of that license.
323326

324327
Microsoft Distributable Code is covered by the following terms:
325328

326329
You may not
327-
a) alter any copyright, trademark or patent notice in the Distributable Code;
328-
b) use Microsoft's trademarks in your programs' names or in a way that suggests your programs come from or are endorsed by Microsoft;
329-
c) distribute Distributable Code to run on a platform other than the Windows platform;
330-
d) include Distributable Code in malicious, deceptive or unlawful programs; or
331-
e) modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that
332-
i) the code be disclosed or distributed in source code form; or
333-
ii) others have the right to modify it.
330+
331+
a. alter any copyright, trademark or patent notice in the Distributable Code;
332+
333+
b. use Microsoft's trademarks in your programs' names or in a way that suggests your programs come from or are endorsed by Microsoft;
334+
335+
c. distribute Distributable Code to run on a platform other than the Windows platform;
336+
337+
d. include Distributable Code in malicious, deceptive or unlawful programs; or
338+
339+
e. modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License.
340+
An Excluded License is one that requires, as a condition of use, modification or distribution, that
341+
342+
i. the code be disclosed or distributed in source code form; or
343+
344+
ii. others have the right to modify it.
334345

335346
## Third-Party Dependencies
336347

source/documentationUtils.py

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@
44
# This file may be used under the terms of the GNU General Public License, version 2 or later.
55
# For more details see: https://www.gnu.org/licenses/gpl-2.0.html
66

7-
from typing import Optional
7+
from functools import lru_cache
88
import os
99

10+
import markdown
11+
import nh3
12+
1013
import globalVars
1114
import languageHandler
1215
import NVDAState
@@ -16,7 +19,7 @@
1619
import wx
1720

1821

19-
def getDocFilePath(fileName: str, localized: bool = True) -> Optional[str]:
22+
def getDocFilePath(fileName: str, localized: bool = True) -> str | None:
2023
if not getDocFilePath.rootPath:
2124
if NVDAState.isRunningAsSource():
2225
getDocFilePath.rootPath = os.path.join(globalVars.appDir, "..", "user_docs")
@@ -47,8 +50,8 @@ def getDocFilePath(fileName: str, localized: bool = True) -> Optional[str]:
4750
return None
4851
else:
4952
# Not localized.
50-
if NVDAState.isRunningAsSource() and fileName in ("copying.txt", "contributors.txt"):
51-
# If running from source, these two files are in the root dir.
53+
if NVDAState.isRunningAsSource() and fileName == "copying.txt":
54+
# If running from source, this file is in the root dir.
5255
return os.path.join(globalVars.appDir, "..", fileName)
5356
else:
5457
return os.path.join(getDocFilePath.rootPath, fileName)
@@ -75,3 +78,20 @@ def reportNoDocumentation(fileName: str, useMsgBox: bool = False) -> None:
7578
)
7679
else:
7780
queueHandler.queueFunction(queueHandler.eventQueue, ui.message, noDocMessage)
81+
82+
83+
@lru_cache(maxsize=1)
84+
def _getSanitizedHtmlLicense() -> str:
85+
licenseFilename: str = getDocFilePath("copying.txt", False)
86+
with open(licenseFilename, "r", encoding="utf-8") as licenseFile:
87+
htmlLicense = markdown.markdown(licenseFile.read())
88+
return nh3.clean(htmlLicense)
89+
90+
91+
def displayLicense():
92+
ui.browseableMessage(
93+
_getSanitizedHtmlLicense(),
94+
# Translators: The title of the dialog to show the NVDA License.
95+
_("NVDA License"),
96+
isHtml=True,
97+
)

source/gui/__init__.py

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: UTF-8 -*-
22
# A part of NonVisual Desktop Access (NVDA)
3-
# Copyright (C) 2006-2024 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Mesar Hameed, Joseph Lee,
3+
# Copyright (C) 2006-2025 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Mesar Hameed, Joseph Lee,
44
# Thomas Stivers, Babbage B.V., Accessolutions, Julien Cochuyt, Cyrille Bougot, Luke Davis
55
# This file is covered by the GNU General Public License.
66
# See the file COPYING for more details.
@@ -15,7 +15,7 @@
1515
import globalVars
1616
import tones
1717
import ui
18-
from documentationUtils import getDocFilePath, reportNoDocumentation
18+
from documentationUtils import getDocFilePath, displayLicense, reportNoDocumentation
1919
from logHandler import log
2020
import config
2121
import versionInfo
@@ -804,23 +804,6 @@ def _appendHelpSubMenu(self, frame: MainFrame) -> None:
804804

805805
self.helpMenu.AppendSeparator()
806806

807-
# Translators: The label for the menu item to view NVDA License document.
808-
item = self.helpMenu.Append(wx.ID_ANY, _("L&icense"))
809-
self.Bind(
810-
wx.EVT_MENU,
811-
lambda evt: systemUtils._displayTextFileWorkaround(getDocFilePath("copying.txt", False)),
812-
item,
813-
)
814-
# Translators: The label for the menu item to view NVDA Contributors list document.
815-
item = self.helpMenu.Append(wx.ID_ANY, _("C&ontributors"))
816-
self.Bind(
817-
wx.EVT_MENU,
818-
lambda evt: systemUtils._displayTextFileWorkaround(getDocFilePath("contributors.txt", False)),
819-
item,
820-
)
821-
822-
self.helpMenu.AppendSeparator()
823-
824807
# Translators: The label for the menu item to open NVDA Welcome Dialog.
825808
item = self.helpMenu.Append(wx.ID_ANY, _("We&lcome dialog..."))
826809
self.Bind(wx.EVT_MENU, lambda evt: WelcomeDialog.run(), item)
@@ -834,6 +817,10 @@ def _appendHelpSubMenu(self, frame: MainFrame) -> None:
834817
item = self.helpMenu.Append(wx.ID_ABOUT, _("&About..."), _("About NVDA"))
835818
self.Bind(wx.EVT_MENU, frame.onAboutCommand, item)
836819

820+
# Translators: The label for the menu item to view the NVDA License.
821+
item = self.helpMenu.Append(wx.ID_ANY, _("L&icense"))
822+
self.Bind(wx.EVT_MENU, lambda evt: displayLicense(), item)
823+
837824
# Translators: The label for the Help submenu in NVDA menu.
838825
self.menu.AppendSubMenu(self.helpMenu, _("&Help"))
839826

source/gui/startupDialogs.py

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
# -*- coding: UTF-8 -*-
22
# A part of NonVisual Desktop Access (NVDA)
3-
# Copyright (C) 2006-2023 NV Access Limited, Łukasz Golonka, Cyrille Bougot
3+
# Copyright (C) 2006-2025 NV Access Limited, Łukasz Golonka, Cyrille Bougot
44
# This file may be used under the terms of the GNU General Public License, version 2 or later.
55
# For more details see: https://www.gnu.org/licenses/gpl-2.0.html
66

77
from typing import Set
88
import weakref
99
import wx
10+
import wx.html2
1011

1112
import config
1213
from config.configFlags import NVDAKey
1314
import core
14-
from documentationUtils import getDocFilePath
15+
from documentationUtils import _getSanitizedHtmlLicense
1516
import globalVars
1617
import gui
1718
from gui.dpiScalingHelper import DpiScalingHelperMixinWithoutInit
19+
import gui.guiHelper
1820
import keyboardHandler
1921
from logHandler import log
2022
import versionInfo
@@ -173,7 +175,7 @@ class LauncherDialog(
173175

174176
helpId = "InstallingNVDA"
175177

176-
def __init__(self, parent):
178+
def __init__(self, parent: wx.Window | None):
177179
super().__init__(
178180
parent,
179181
title=f"{versionInfo.name} {_('Launcher')}",
@@ -184,12 +186,6 @@ def __init__(self, parent):
184186

185187
sHelper.addItem(self._createLicenseAgreementGroup())
186188

187-
# Translators: The label for a checkbox in NvDA installation program to agree to the license agreement.
188-
agreeText = _("I &agree")
189-
self.licenseAgreeCheckbox = sHelper.addItem(wx.CheckBox(self, label=agreeText))
190-
self.licenseAgreeCheckbox.Value = False
191-
self.licenseAgreeCheckbox.Bind(wx.EVT_CHECKBOX, self.onLicenseAgree)
192-
193189
sizer = sHelper.addItem(wx.GridSizer(2, 2, 0, 0))
194190
self.actionButtons = []
195191
# Translators: The label of the button in NVDA installation program to install NvDA on the user's computer.
@@ -221,28 +217,25 @@ def __init__(self, parent):
221217
mainSizer.Fit(self)
222218
self.CentreOnScreen()
223219

224-
def _createLicenseAgreementGroup(self) -> wx.StaticBoxSizer:
220+
def _createLicenseAgreementGroup(self) -> wx.BoxSizer:
221+
sizer = wx.BoxSizer(wx.VERTICAL)
222+
225223
# Translators: The label of the license text which will be shown when NVDA installation program starts.
226224
groupLabel = _("License Agreement")
227-
sizer = wx.StaticBoxSizer(wx.VERTICAL, self, label=groupLabel)
228-
# Create a fake text control to determine appropriate width of license text box
229-
_fakeTextCtrl = wx.StaticText(
230-
self,
231-
label="a" * 80, # The GPL2 text of copying.txt wraps sentences at 80 characters
232-
)
233-
widthOfLicenseText = _fakeTextCtrl.Size[0]
234-
_fakeTextCtrl.Destroy()
235-
licenseTextCtrl = wx.TextCtrl(
236-
self,
237-
size=(widthOfLicenseText, self.scaleSize(300)),
238-
style=wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_RICH,
239-
)
240-
licenseTextCtrl.Value = open(getDocFilePath("copying.txt", False), "r", encoding="UTF-8").read()
241-
sizer.Add(
242-
licenseTextCtrl,
243-
flag=wx.EXPAND,
244-
proportion=1,
245-
)
225+
groupText = wx.StaticText(self, label=groupLabel)
226+
sizer.Add(groupText, border=gui.guiHelper.SPACE_BETWEEN_ASSOCIATED_CONTROL_VERTICAL)
227+
228+
licenseView: wx.html2.WebView = wx.html2.WebView.New(self, size=self.scaleSize((500, 400)))
229+
sizer.Add(licenseView, border=gui.guiHelper.SPACE_BETWEEN_ASSOCIATED_CONTROL_VERTICAL)
230+
licenseView.SetPage(_getSanitizedHtmlLicense(), "")
231+
232+
# Translators: The label for a checkbox in NVDA installation process to agree to the license agreement.
233+
agreeText = _("I have read and &agree to the license agreement")
234+
self.licenseAgreeCheckbox = wx.CheckBox(self, label=agreeText)
235+
self.licenseAgreeCheckbox.SetValue(False)
236+
self.licenseAgreeCheckbox.Bind(wx.EVT_CHECKBOX, self.onLicenseAgree)
237+
sizer.Add(self.licenseAgreeCheckbox, border=gui.guiHelper.SPACE_BETWEEN_ASSOCIATED_CONTROL_VERTICAL)
238+
246239
return sizer
247240

248241
def onLicenseAgree(self, evt):

source/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def _genManifestTemplate(shouldHaveUIAccess: bool) -> tuple[int, int, bytes]:
250250
},
251251
data_files=[
252252
(".", glob("*.dll") + glob("*.manifest") + ["builtin.dic"]),
253-
("documentation", ["../copying.txt", "../contributors.txt"]),
253+
("documentation", ["../copying.txt"]),
254254
("lib/%s" % version, glob("lib/*.dll") + glob("lib/*.manifest")),
255255
("lib64/%s" % version, glob("lib64/*.dll") + glob("lib64/*.exe")),
256256
("libArm64/%s" % version, glob("libArm64/*.dll") + glob("libArm64/*.exe")),

user_docs/en/changes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ To use this feature, "allow NVDA to control the volume of other applications" mu
5050
* Updated CLDR to version 46.0. (#17484, @OzancanKaratas)
5151
* Short versions of the most commonly used command line options have been added: `-d` for `--disable-addons` and `-n` for `--lang`.
5252
Prefix matching on command line flags, e.g. using `--di` for `--disable-addons` is no longer supported. (#11644, @CyrilleB79)
53+
* The "Contributors" file was removed from the NVDA menu. (#16922)
54+
* The NVDA license is now formatted as an HTML browseable message to improve readability. (#17600)
5355

5456
### Bug Fixes
5557

user_docs/en/userGuide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ The year and version changes between updates to reflect the current release.
135135
1. Run the downloaded file.
136136
You may need to wait a few seconds while a temporary copy of NVDA loads.
137137
Once loaded, NVDA will speak throughout the rest of the process.
138-
1. The NVDA Launcher window appears with the license agreement.
139-
Press `downArrow` to read the license agreement if desired.
138+
1. The NVDA Launcher window appears with the license agreement button.
139+
Press the "View license" button and `downArrow` to read the license agreement.
140140
1. Press `tab` to move to the "I agree" checkbox, then press the `spacebar` to check it.
141141
1. Press `tab` to move through the options, then press `enter` on the desired option.
142142

@@ -5202,7 +5202,7 @@ Secure mode disables:
52025202
* The [NVDA Python console](#PythonConsole)
52035203
* The [Log Viewer](#LogViewer) and logging
52045204
* The [Braille Viewer](#BrailleViewer) and [Speech Viewer](#SpeechViewer)
5205-
* Opening external documents from the NVDA menu, such as the user guide or contributors file.
5205+
* Opening external documents from the NVDA menu, such as the user guide file.
52065206

52075207
Installed copies of NVDA store their configuration including add-ons in `%APPDATA%\nvda`.
52085208
To prevent NVDA users from modifying their configuration or add-ons directly, user access to this folder must also be restricted.

0 commit comments

Comments
 (0)