wish.licenses¶
Help > Licenses: who drew the icons Wish ships, and under what licence.
Why this is a file and not a paragraph. The game-icons.net glyphs are
CC BY 3.0, and attribution is the whole of what that licence asks for. An
attribution list that is wrong looks discharged and is not, so nothing here is
retyped: the list is built from ui.icons.ARTISTS, the table the program
actually draws from. Add a glyph without naming its artist there and
tests/test_licenses.py goes red.
markdown() writes THIRD_PARTY_LICENSES.md through tools/genlicenses.py;
html() fills the dialog. One source, two renderings, so the file on disk and
the box on screen cannot disagree.
Font Awesome is not credited here any more. #167 finished replacing every
icon it drew – person for the Person note was the last – so nothing in
the program renders a Font Awesome glyph, and fontawesome-LICENSE.txt came
out with the credit, and ui.icons.FONT_AWESOME is empty – an
unused path is still somebody’s work distributed without attribution.
bringing that icon back onto the screen means bringing the licence file and
this credit back too.
Module Attributes
The menu entry and the dialog's title. |
|
Glyphs whose page title is not their filename. |
Functions
Every shipped game-icons.net glyph, grouped under whoever drew it. |
|
|
The dialog, built and not shown, so a test can read what it says. |
|
The same attributions as rich text, for the dialog. |
|
Add Licenses to an existing Help menu. |
|
|
|
The artist's page for one glyph on game-icons.net. |
|
|
|
|
Classes
The attributions, scrollable, with every link clickable. |
- class wish.licenses.LicensesDialog[source]¶
Bases:
PyQt6.QtWidgets.QDialogThe attributions, scrollable, with every link clickable.
Scrollable because the list grows with every glyph added: a fixed box would be a box that hides the newest attribution, which is the one most likely to be missing.
- wish.licenses.MENU_LICENSES = '&Licenses'¶
The menu entry and the dialog’s title. Donald’s words.
- wish.licenses.TITLES = {'embrassed-energy': 'Embraced Energy'}¶
Glyphs whose page title is not their filename. game-icons.net’s URL slug for Lorc’s Embraced energy misspells it, and Donald caught the credit repeating the typo: attribution names a work as its author titled it, and the author titled it “Embraced energy”. The slug stays wrong in
page(), because that is the address that resolves.
- wish.licenses.by_artist()[source]¶
Every shipped game-icons.net glyph, grouped under whoever drew it.
Artists come out in the order their first glyph was added to
ui.icons.ARTISTS, which is the order Donald listed them in, and the glyphs under each keep that order too. A dict cannot hold the same name twice, which is what stops one glyph appearing under two artists.
- wish.licenses.dialog(parent=None)[source]¶
The dialog, built and not shown, so a test can read what it says.
- Parameters:
parent (QWidget | None)
- Return type:
- wish.licenses.install(window, menu)[source]¶
Add Licenses to an existing Help menu.
- Parameters:
window (PyQt6.QtWidgets.QMainWindow)
menu (PyQt6.QtWidgets.QMenu)
- Return type:
PyQt6.QtGui.QAction