fix help url paths

This commit is contained in:
johan456789 2020-10-10 00:38:07 +08:00
parent 91d3ded689
commit 06f1aeb052
12 changed files with 16 additions and 16 deletions

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

@ -1494,7 +1494,7 @@ where id in %s"""
return sf
def onHelp(self):
openHelp("browser")
openHelp("browsing")
# Misc menu options
######################################################################
@ -1934,7 +1934,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
######################################################################
@ -2277,7 +2277,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,7 @@ 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 +155,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 +239,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,7 @@ 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)