Merge branch 'master' into opus-audio

This commit is contained in:
Damien Elmes 2020-10-12 12:32:43 +10:00 committed by GitHub
commit aad6785bab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 24 additions and 18 deletions

View File

@ -63,6 +63,7 @@ Jakub Kaczmarzyk <jakub.kaczmarzyk@gmail.com>
Akshara Balachandra <akshara.bala.18@gmail.com>
lukkea <github.com/lukkea/>
David Allison <davidallisongithub@gmail.com>
Tsung-Han Yu <johan456789@gmail.com>
Piotr Kubowicz <piotr.kubowicz@gmail.com>
********************

View File

@ -66,7 +66,7 @@ MODEL_CLOZE = 1
STARTING_FACTOR = 2500
HELP_SITE = "https://apps.ankiweb.net/docs/manual.html"
HELP_SITE = "https://docs.ankiweb.net/#/"
# Leech actions
LEECH_SUSPEND = 0

View File

@ -35,7 +35,6 @@ except AttributeError:
appVersion = _version
appWebsite = "https://apps.ankiweb.net/"
appChanges = "https://apps.ankiweb.net/docs/changes.html"
appDonate = "https://apps.ankiweb.net/support/"
appShared = "https://ankiweb.net/shared/"
appUpdate = "https://ankiweb.net/update/desktop"

View File

@ -61,7 +61,7 @@ class AddCards(QDialog):
self.deckChooser = aqt.deckchooser.DeckChooser(self.mw, self.form.deckArea)
def helpRequested(self):
openHelp("addingnotes")
openHelp("editing?id=adding-cards-and-notes")
def setupButtons(self) -> None:
bb = self.form.buttonBox

View File

@ -1499,7 +1499,7 @@ where id in %s"""
return sf
def onHelp(self):
openHelp("browser")
openHelp("browsing")
# Misc menu options
######################################################################
@ -1939,7 +1939,7 @@ where id in %s"""
self.mw.taskman.run_in_background(do_search, on_done)
def onFindReplaceHelp(self):
openHelp("findreplace")
openHelp("browsing?id=find-and-replace")
# Edit: finding dupes
######################################################################
@ -2282,7 +2282,7 @@ Are you sure you want to continue?"""
QDialog.accept(self)
def onHelp(self):
openHelp("browsermisc")
openHelp("browsing?id=other-menu-items")
# Card Info Dialog

View File

@ -828,4 +828,4 @@ Enter deck to place new %s cards in, or leave blank:"""
self.mw = None
def onHelp(self):
openHelp("templates")
openHelp("templates/intro")

View File

@ -38,7 +38,7 @@ class DeckConf(QDialog):
self.setupCombos()
self.setupConfs()
self.setWindowModality(Qt.WindowModal)
qconnect(self.form.buttonBox.helpRequested, lambda: openHelp("deckoptions"))
qconnect(self.form.buttonBox.helpRequested, lambda: openHelp("deck-options"))
qconnect(self.form.confOpts.clicked, self.confOpts)
qconnect(
self.form.buttonBox.button(QDialogButtonBox.RestoreDefaults).clicked,

View File

@ -24,7 +24,7 @@ class DeckConf(QDialog):
self.ok = self.form.buttonBox.addButton(label, QDialogButtonBox.AcceptRole)
self.mw.checkpoint(_("Options"))
self.setWindowModality(Qt.WindowModal)
qconnect(self.form.buttonBox.helpRequested, lambda: openHelp("filtered"))
qconnect(self.form.buttonBox.helpRequested, lambda: openHelp("filtered-decks"))
self.setWindowTitle(_("Options for %s") % self.deck["name"])
restoreGeom(self, "dyndeckconf")
self.initialSetup()

View File

@ -538,7 +538,7 @@ class Editor:
form = aqt.forms.edithtml.Ui_Dialog()
form.setupUi(d)
restoreGeom(d, "htmlEditor")
qconnect(form.buttonBox.helpRequested, lambda: openHelp("editor"))
qconnect(form.buttonBox.helpRequested, lambda: openHelp("editing?id=features"))
form.textEdit.setPlainText(self.note.fields[field])
d.show()
form.textEdit.moveCursor(QTextCursor.End)

View File

@ -221,4 +221,4 @@ class FieldDialog(QDialog):
self.mw.taskman.with_progress(save, on_done, self)
def onHelp(self):
openHelp("fields")
openHelp("editing?id=customizing-fields")

View File

@ -36,7 +36,10 @@ class Models(QDialog):
self.mw.checkpoint(_("Note Types"))
self.form = aqt.forms.models.Ui_Dialog()
self.form.setupUi(self)
qconnect(self.form.buttonBox.helpRequested, lambda: openHelp("notetypes"))
qconnect(
self.form.buttonBox.helpRequested,
lambda: openHelp("editing?id=adding-a-note-type"),
)
self.models: List[pb.NoteTypeNameIDUseCount] = []
self.setupModels()
restoreGeom(self, "models")
@ -155,7 +158,7 @@ class Models(QDialog):
frm.latexHeader.setText(nt["latexPre"])
frm.latexFooter.setText(nt["latexPost"])
d.setWindowTitle(_("Options for %s") % nt["name"])
qconnect(frm.buttonBox.helpRequested, lambda: openHelp("latex"))
qconnect(frm.buttonBox.helpRequested, lambda: openHelp("math?id=latex"))
restoreGeom(d, "modelopts")
gui_hooks.models_advanced_will_show(d)
d.exec_()
@ -239,4 +242,4 @@ class AddModel(QDialog):
QDialog.accept(self)
def onHelp(self) -> None:
openHelp("notetypes")
openHelp("editing?id=adding-a-note-type")

View File

@ -19,7 +19,7 @@ class Preferences(QDialog):
self.form.setupUi(self)
self.form.buttonBox.button(QDialogButtonBox.Help).setAutoDefault(False)
self.form.buttonBox.button(QDialogButtonBox.Close).setAutoDefault(False)
qconnect(self.form.buttonBox.helpRequested, lambda: openHelp("profileprefs"))
qconnect(self.form.buttonBox.helpRequested, lambda: openHelp("preferences"))
self.silentlyClose = True
self.prefs = self.mw.col.backend.get_preferences()
self.setupLang()

View File

@ -481,7 +481,10 @@ create table if not exists profiles
with open(p, "w", encoding="utf8") as file:
file.write(
without_unicode_isolation(
tr(TR.PROFILES_FOLDER_README, link=appHelpSite + "#startupopts")
tr(
TR.PROFILES_FOLDER_README,
link=appHelpSite + "files?id=startup-options",
)
)
)

View File

@ -16,7 +16,7 @@ class StudyDeck(QDialog):
names=None,
accept=None,
title=None,
help="studydeck",
help="studying?id=keyboard-shortcuts",
current=None,
cancel=True,
parent=None,

View File

@ -43,7 +43,7 @@ def tr(key: TRValue, **kwargs: Union[str, int, float]) -> str:
def openHelp(section):
link = aqt.appHelpSite
if section:
link += "#%s" % section
link += section
openLink(link)