remove context help button
This commit is contained in:
parent
e28c67d4f6
commit
6224658c0d
@ -28,6 +28,7 @@ class ClosableQDialog(QDialog):
|
|||||||
|
|
||||||
def show(mw):
|
def show(mw):
|
||||||
dialog = ClosableQDialog(mw)
|
dialog = ClosableQDialog(mw)
|
||||||
|
dialog.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
mw.setupDialogGC(dialog)
|
mw.setupDialogGC(dialog)
|
||||||
abt = aqt.forms.about.Ui_About()
|
abt = aqt.forms.about.Ui_About()
|
||||||
abt.setupUi(dialog)
|
abt.setupUi(dialog)
|
||||||
|
@ -37,6 +37,7 @@ class AddCards(QDialog):
|
|||||||
self.form = aqt.forms.addcards.Ui_Dialog()
|
self.form = aqt.forms.addcards.Ui_Dialog()
|
||||||
self.form.setupUi(self)
|
self.form.setupUi(self)
|
||||||
self.setWindowTitle(tr(TR.ACTIONS_ADD))
|
self.setWindowTitle(tr(TR.ACTIONS_ADD))
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
self.setMinimumHeight(300)
|
self.setMinimumHeight(300)
|
||||||
self.setMinimumWidth(400)
|
self.setMinimumWidth(400)
|
||||||
self.setupChoosers()
|
self.setupChoosers()
|
||||||
|
@ -705,6 +705,7 @@ class AddonsDialog(QDialog):
|
|||||||
qconnect(self.form.addonList.itemDoubleClicked, self.onConfig)
|
qconnect(self.form.addonList.itemDoubleClicked, self.onConfig)
|
||||||
qconnect(self.form.addonList.currentRowChanged, self._onAddonItemSelected)
|
qconnect(self.form.addonList.currentRowChanged, self._onAddonItemSelected)
|
||||||
self.setWindowTitle(tr(TR.ADDONS_WINDOW_TITLE))
|
self.setWindowTitle(tr(TR.ADDONS_WINDOW_TITLE))
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
self.setAcceptDrops(True)
|
self.setAcceptDrops(True)
|
||||||
self.redrawAddons()
|
self.redrawAddons()
|
||||||
restoreGeom(self, "addons")
|
restoreGeom(self, "addons")
|
||||||
@ -917,6 +918,7 @@ class GetAddons(QDialog):
|
|||||||
tr(TR.ADDONS_BROWSE_ADDONS), QDialogButtonBox.ActionRole
|
tr(TR.ADDONS_BROWSE_ADDONS), QDialogButtonBox.ActionRole
|
||||||
)
|
)
|
||||||
qconnect(b.clicked, self.onBrowse)
|
qconnect(b.clicked, self.onBrowse)
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
restoreGeom(self, "getaddons", adjustSize=True)
|
restoreGeom(self, "getaddons", adjustSize=True)
|
||||||
self.exec_()
|
self.exec_()
|
||||||
saveGeom(self, "getaddons")
|
saveGeom(self, "getaddons")
|
||||||
@ -1294,6 +1296,7 @@ class ConfigEditor(QDialog):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
self.show()
|
self.show()
|
||||||
|
|
||||||
def onRestoreDefaults(self) -> None:
|
def onRestoreDefaults(self) -> None:
|
||||||
|
@ -1741,6 +1741,7 @@ where id in %s"""
|
|||||||
if not cids2:
|
if not cids2:
|
||||||
return showInfo(tr(TR.BROWSING_ONLY_NEW_CARDS_CAN_BE_REPOSITIONED))
|
return showInfo(tr(TR.BROWSING_ONLY_NEW_CARDS_CAN_BE_REPOSITIONED))
|
||||||
d = QDialog(self)
|
d = QDialog(self)
|
||||||
|
d.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
d.setWindowModality(Qt.WindowModal)
|
d.setWindowModality(Qt.WindowModal)
|
||||||
frm = aqt.forms.reposition.Ui_Dialog()
|
frm = aqt.forms.reposition.Ui_Dialog()
|
||||||
frm.setupUi(d)
|
frm.setupUi(d)
|
||||||
@ -1776,6 +1777,7 @@ where id in %s"""
|
|||||||
|
|
||||||
def _reschedule(self):
|
def _reschedule(self):
|
||||||
d = QDialog(self)
|
d = QDialog(self)
|
||||||
|
d.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
d.setWindowModality(Qt.WindowModal)
|
d.setWindowModality(Qt.WindowModal)
|
||||||
frm = aqt.forms.reschedule.Ui_Dialog()
|
frm = aqt.forms.reschedule.Ui_Dialog()
|
||||||
frm.setupUi(d)
|
frm.setupUi(d)
|
||||||
@ -1875,6 +1877,7 @@ where id in %s"""
|
|||||||
|
|
||||||
def _on_find_replace_diag(self, fields: List[str], nids: List[int]) -> None:
|
def _on_find_replace_diag(self, fields: List[str], nids: List[int]) -> None:
|
||||||
d = QDialog(self)
|
d = QDialog(self)
|
||||||
|
d.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
frm = aqt.forms.findreplace.Ui_Dialog()
|
frm = aqt.forms.findreplace.Ui_Dialog()
|
||||||
frm.setupUi(d)
|
frm.setupUi(d)
|
||||||
d.setWindowModality(Qt.WindowModal)
|
d.setWindowModality(Qt.WindowModal)
|
||||||
@ -1958,6 +1961,7 @@ where id in %s"""
|
|||||||
frm = aqt.forms.finddupes.Ui_Dialog()
|
frm = aqt.forms.finddupes.Ui_Dialog()
|
||||||
frm.setupUi(d)
|
frm.setupUi(d)
|
||||||
restoreGeom(d, "findDupes")
|
restoreGeom(d, "findDupes")
|
||||||
|
d.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
searchHistory = restore_combo_history(frm.search, "findDupesFind")
|
searchHistory = restore_combo_history(frm.search, "findDupesFind")
|
||||||
|
|
||||||
fields = sorted(
|
fields = sorted(
|
||||||
@ -2123,6 +2127,7 @@ class ChangeModel(QDialog):
|
|||||||
self.oldModel = browser.card.note().model()
|
self.oldModel = browser.card.note().model()
|
||||||
self.form = aqt.forms.changemodel.Ui_Dialog()
|
self.form = aqt.forms.changemodel.Ui_Dialog()
|
||||||
self.form.setupUi(self)
|
self.form.setupUi(self)
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
self.setWindowModality(Qt.WindowModal)
|
self.setWindowModality(Qt.WindowModal)
|
||||||
self.setup()
|
self.setup()
|
||||||
restoreGeom(self, "changeModel")
|
restoreGeom(self, "changeModel")
|
||||||
@ -2298,6 +2303,7 @@ class CardInfoDialog(QDialog):
|
|||||||
def __init__(self, browser: Browser, *args, **kwargs):
|
def __init__(self, browser: Browser, *args, **kwargs):
|
||||||
super().__init__(browser, *args, **kwargs)
|
super().__init__(browser, *args, **kwargs)
|
||||||
self.browser = browser
|
self.browser = browser
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
|
|
||||||
def reject(self):
|
def reject(self):
|
||||||
saveGeom(self, "revlog")
|
saveGeom(self, "revlog")
|
||||||
|
@ -71,6 +71,7 @@ class CardLayout(QDialog):
|
|||||||
tr(TR.CARD_TEMPLATES_CARD_TYPES_FOR, val=self.model["name"])
|
tr(TR.CARD_TEMPLATES_CARD_TYPES_FOR, val=self.model["name"])
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
v1 = QVBoxLayout()
|
v1 = QVBoxLayout()
|
||||||
v1.addWidget(self.topArea)
|
v1.addWidget(self.topArea)
|
||||||
v1.addWidget(self.mainArea)
|
v1.addWidget(self.mainArea)
|
||||||
@ -700,6 +701,7 @@ class CardLayout(QDialog):
|
|||||||
|
|
||||||
def onBrowserDisplay(self):
|
def onBrowserDisplay(self):
|
||||||
d = QDialog()
|
d = QDialog()
|
||||||
|
d.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
f = aqt.forms.browserdisp.Ui_Dialog()
|
f = aqt.forms.browserdisp.Ui_Dialog()
|
||||||
f.setupUi(d)
|
f.setupUi(d)
|
||||||
t = self.current_template()
|
t = self.current_template()
|
||||||
@ -731,6 +733,7 @@ class CardLayout(QDialog):
|
|||||||
t = self.current_template()
|
t = self.current_template()
|
||||||
d = QDialog(self)
|
d = QDialog(self)
|
||||||
d.setWindowTitle("Anki")
|
d.setWindowTitle("Anki")
|
||||||
|
d.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
d.setMinimumWidth(400)
|
d.setMinimumWidth(400)
|
||||||
l = QVBoxLayout()
|
l = QVBoxLayout()
|
||||||
lab = QLabel(
|
lab = QLabel(
|
||||||
@ -760,6 +763,7 @@ class CardLayout(QDialog):
|
|||||||
diag = QDialog(self)
|
diag = QDialog(self)
|
||||||
form = aqt.forms.addfield.Ui_Dialog()
|
form = aqt.forms.addfield.Ui_Dialog()
|
||||||
form.setupUi(diag)
|
form.setupUi(diag)
|
||||||
|
diag.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
fields = [f["name"] for f in self.model["flds"]]
|
fields = [f["name"] for f in self.model["flds"]]
|
||||||
form.fields.addItems(fields)
|
form.fields.addItems(fields)
|
||||||
form.fields.setCurrentRow(0)
|
form.fields.setCurrentRow(0)
|
||||||
|
@ -28,6 +28,7 @@ class CustomStudy(QDialog):
|
|||||||
self.form = f = aqt.forms.customstudy.Ui_Dialog()
|
self.form = f = aqt.forms.customstudy.Ui_Dialog()
|
||||||
self.created_custom_study = False
|
self.created_custom_study = False
|
||||||
f.setupUi(self)
|
f.setupUi(self)
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
self.setWindowModality(Qt.WindowModal)
|
self.setWindowModality(Qt.WindowModal)
|
||||||
self.setupSignals()
|
self.setupSignals()
|
||||||
f.radioNew.click()
|
f.radioNew.click()
|
||||||
|
@ -48,6 +48,7 @@ class DeckConf(QDialog):
|
|||||||
self.setWindowTitle(
|
self.setWindowTitle(
|
||||||
without_unicode_isolation(tr(TR.ACTIONS_OPTIONS_FOR, val=self.deck["name"]))
|
without_unicode_isolation(tr(TR.ACTIONS_OPTIONS_FOR, val=self.deck["name"]))
|
||||||
)
|
)
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
# qt doesn't size properly with altered fonts otherwise
|
# qt doesn't size properly with altered fonts otherwise
|
||||||
restoreGeom(self, "deckconf", adjustSize=True)
|
restoreGeom(self, "deckconf", adjustSize=True)
|
||||||
gui_hooks.deck_conf_will_show(self)
|
gui_hooks.deck_conf_will_show(self)
|
||||||
|
@ -23,6 +23,7 @@ class DeckConf(QDialog):
|
|||||||
label = tr(TR.ACTIONS_REBUILD)
|
label = tr(TR.ACTIONS_REBUILD)
|
||||||
self.ok = self.form.buttonBox.addButton(label, QDialogButtonBox.AcceptRole)
|
self.ok = self.form.buttonBox.addButton(label, QDialogButtonBox.AcceptRole)
|
||||||
self.mw.checkpoint(tr(TR.ACTIONS_OPTIONS))
|
self.mw.checkpoint(tr(TR.ACTIONS_OPTIONS))
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
self.setWindowModality(Qt.WindowModal)
|
self.setWindowModality(Qt.WindowModal)
|
||||||
qconnect(self.form.buttonBox.helpRequested, lambda: openHelp("filtered-decks"))
|
qconnect(self.form.buttonBox.helpRequested, lambda: openHelp("filtered-decks"))
|
||||||
self.setWindowTitle(
|
self.setWindowTitle(
|
||||||
|
@ -16,6 +16,7 @@ class EditCurrent(QDialog):
|
|||||||
self.form = aqt.forms.editcurrent.Ui_Dialog()
|
self.form = aqt.forms.editcurrent.Ui_Dialog()
|
||||||
self.form.setupUi(self)
|
self.form.setupUi(self)
|
||||||
self.setWindowTitle(tr(TR.EDITING_EDIT_CURRENT))
|
self.setWindowTitle(tr(TR.EDITING_EDIT_CURRENT))
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
self.setMinimumHeight(400)
|
self.setMinimumHeight(400)
|
||||||
self.setMinimumWidth(250)
|
self.setMinimumWidth(250)
|
||||||
self.form.buttonBox.button(QDialogButtonBox.Close).setShortcut(
|
self.form.buttonBox.button(QDialogButtonBox.Close).setShortcut(
|
||||||
|
@ -555,6 +555,7 @@ class Editor:
|
|||||||
form = aqt.forms.edithtml.Ui_Dialog()
|
form = aqt.forms.edithtml.Ui_Dialog()
|
||||||
form.setupUi(d)
|
form.setupUi(d)
|
||||||
restoreGeom(d, "htmlEditor")
|
restoreGeom(d, "htmlEditor")
|
||||||
|
d.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
qconnect(form.buttonBox.helpRequested, lambda: openHelp("editing?id=features"))
|
qconnect(form.buttonBox.helpRequested, lambda: openHelp("editing?id=features"))
|
||||||
form.textEdit.setPlainText(self.note.fields[field])
|
form.textEdit.setPlainText(self.note.fields[field])
|
||||||
d.show()
|
d.show()
|
||||||
|
@ -38,6 +38,7 @@ class EmptyCardsDialog(QDialog):
|
|||||||
self.form.setupUi(self)
|
self.form.setupUi(self)
|
||||||
restoreGeom(self, "emptycards")
|
restoreGeom(self, "emptycards")
|
||||||
self.setWindowTitle(tr(TR.EMPTY_CARDS_WINDOW_TITLE))
|
self.setWindowTitle(tr(TR.EMPTY_CARDS_WINDOW_TITLE))
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
self.form.keep_notes.setText(tr(TR.EMPTY_CARDS_PRESERVE_NOTES_CHECKBOX))
|
self.form.keep_notes.setText(tr(TR.EMPTY_CARDS_PRESERVE_NOTES_CHECKBOX))
|
||||||
self.form.webview.title = "empty cards"
|
self.form.webview.title = "empty cards"
|
||||||
self.form.webview.set_bridge_command(self._on_note_link_clicked, self)
|
self.form.webview.set_bridge_command(self._on_note_link_clicked, self)
|
||||||
|
@ -30,6 +30,7 @@ class ExportDialog(QDialog):
|
|||||||
self.frm.setupUi(self)
|
self.frm.setupUi(self)
|
||||||
self.exporter: Optional[Exporter] = None
|
self.exporter: Optional[Exporter] = None
|
||||||
self.cids = cids
|
self.cids = cids
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
self.setup(did)
|
self.setup(did)
|
||||||
self.exec_()
|
self.exec_()
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ class FieldDialog(QDialog):
|
|||||||
self.setWindowTitle(
|
self.setWindowTitle(
|
||||||
without_unicode_isolation(tr(TR.FIELDS_FIELDS_FOR, val=self.model["name"]))
|
without_unicode_isolation(tr(TR.FIELDS_FIELDS_FOR, val=self.model["name"]))
|
||||||
)
|
)
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
self.form.buttonBox.button(QDialogButtonBox.Help).setAutoDefault(False)
|
self.form.buttonBox.button(QDialogButtonBox.Help).setAutoDefault(False)
|
||||||
self.form.buttonBox.button(QDialogButtonBox.Cancel).setAutoDefault(False)
|
self.form.buttonBox.button(QDialogButtonBox.Cancel).setAutoDefault(False)
|
||||||
self.form.buttonBox.button(QDialogButtonBox.Save).setAutoDefault(False)
|
self.form.buttonBox.button(QDialogButtonBox.Save).setAutoDefault(False)
|
||||||
|
@ -38,6 +38,7 @@ class ChangeMap(QDialog):
|
|||||||
self.model = model
|
self.model = model
|
||||||
self.frm = aqt.forms.changemap.Ui_ChangeMap()
|
self.frm = aqt.forms.changemap.Ui_ChangeMap()
|
||||||
self.frm.setupUi(self)
|
self.frm.setupUi(self)
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
n = 0
|
n = 0
|
||||||
setCurrent = False
|
setCurrent = False
|
||||||
for field in self.model["flds"]:
|
for field in self.model["flds"]:
|
||||||
@ -85,6 +86,7 @@ class ImportDialog(QDialog):
|
|||||||
qconnect(
|
qconnect(
|
||||||
self.frm.buttonBox.button(QDialogButtonBox.Help).clicked, self.helpRequested
|
self.frm.buttonBox.button(QDialogButtonBox.Help).clicked, self.helpRequested
|
||||||
)
|
)
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
self.setupMappingFrame()
|
self.setupMappingFrame()
|
||||||
self.setupOptions()
|
self.setupOptions()
|
||||||
self.modelChanged()
|
self.modelChanged()
|
||||||
|
@ -1345,6 +1345,7 @@ title="%s" %s>%s</button>""" % (
|
|||||||
|
|
||||||
d = self.debugDiag = DebugDialog()
|
d = self.debugDiag = DebugDialog()
|
||||||
d.silentlyClose = True
|
d.silentlyClose = True
|
||||||
|
d.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
frm.setupUi(d)
|
frm.setupUi(d)
|
||||||
restoreGeom(d, "DebugConsoleWindow")
|
restoreGeom(d, "DebugConsoleWindow")
|
||||||
restoreSplitter(frm.splitter, "DebugConsoleWindow")
|
restoreSplitter(frm.splitter, "DebugConsoleWindow")
|
||||||
|
@ -84,6 +84,7 @@ class MediaChecker:
|
|||||||
# show report and offer to delete
|
# show report and offer to delete
|
||||||
diag = QDialog(self.mw)
|
diag = QDialog(self.mw)
|
||||||
diag.setWindowTitle(tr(TR.MEDIA_CHECK_WINDOW_TITLE))
|
diag.setWindowTitle(tr(TR.MEDIA_CHECK_WINDOW_TITLE))
|
||||||
|
setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
layout = QVBoxLayout(diag)
|
layout = QVBoxLayout(diag)
|
||||||
diag.setLayout(layout)
|
diag.setLayout(layout)
|
||||||
text = QTextEdit()
|
text = QTextEdit()
|
||||||
|
@ -164,6 +164,7 @@ class MediaSyncDialog(QDialog):
|
|||||||
self.form = aqt.forms.synclog.Ui_Dialog()
|
self.form = aqt.forms.synclog.Ui_Dialog()
|
||||||
self.form.setupUi(self)
|
self.form.setupUi(self)
|
||||||
self.setWindowTitle(tr(TR.SYNC_MEDIA_LOG_TITLE))
|
self.setWindowTitle(tr(TR.SYNC_MEDIA_LOG_TITLE))
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
self.abort_button = QPushButton(tr(TR.SYNC_ABORT_BUTTON))
|
self.abort_button = QPushButton(tr(TR.SYNC_ABORT_BUTTON))
|
||||||
qconnect(self.abort_button.clicked, self._on_abort)
|
qconnect(self.abort_button.clicked, self._on_abort)
|
||||||
self.abort_button.setAutoDefault(False)
|
self.abort_button.setAutoDefault(False)
|
||||||
|
@ -155,6 +155,7 @@ class Models(QDialog):
|
|||||||
def onAdvanced(self) -> None:
|
def onAdvanced(self) -> None:
|
||||||
nt = self.current_notetype()
|
nt = self.current_notetype()
|
||||||
d = QDialog(self)
|
d = QDialog(self)
|
||||||
|
d.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
frm = aqt.forms.modelopts.Ui_Dialog()
|
frm = aqt.forms.modelopts.Ui_Dialog()
|
||||||
frm.setupUi(d)
|
frm.setupUi(d)
|
||||||
frm.latexsvg.setChecked(nt.get("latexsvg", False))
|
frm.latexsvg.setChecked(nt.get("latexsvg", False))
|
||||||
@ -210,6 +211,7 @@ class AddModel(QDialog):
|
|||||||
self.model = None
|
self.model = None
|
||||||
self.dialog = aqt.forms.addmodel.Ui_Dialog()
|
self.dialog = aqt.forms.addmodel.Ui_Dialog()
|
||||||
self.dialog.setupUi(self)
|
self.dialog.setupUi(self)
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
# standard models
|
# standard models
|
||||||
self.models = []
|
self.models = []
|
||||||
for (name, func) in stdmodels.get_stock_notetypes(self.col):
|
for (name, func) in stdmodels.get_stock_notetypes(self.col):
|
||||||
|
@ -31,6 +31,7 @@ class Preferences(QDialog):
|
|||||||
self.prof = self.mw.pm.profile
|
self.prof = self.mw.pm.profile
|
||||||
self.form = aqt.forms.preferences.Ui_Preferences()
|
self.form = aqt.forms.preferences.Ui_Preferences()
|
||||||
self.form.setupUi(self)
|
self.form.setupUi(self)
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
self.form.buttonBox.button(QDialogButtonBox.Help).setAutoDefault(False)
|
self.form.buttonBox.button(QDialogButtonBox.Help).setAutoDefault(False)
|
||||||
self.form.buttonBox.button(QDialogButtonBox.Close).setAutoDefault(False)
|
self.form.buttonBox.button(QDialogButtonBox.Close).setAutoDefault(False)
|
||||||
qconnect(self.form.buttonBox.helpRequested, lambda: openHelp("preferences"))
|
qconnect(self.form.buttonBox.helpRequested, lambda: openHelp("preferences"))
|
||||||
|
@ -43,6 +43,7 @@ class Previewer(QDialog):
|
|||||||
self.mw = mw
|
self.mw = mw
|
||||||
icon = QIcon()
|
icon = QIcon()
|
||||||
icon.addPixmap(QPixmap(":/icons/anki.png"), QIcon.Normal, QIcon.Off)
|
icon.addPixmap(QPixmap(":/icons/anki.png"), QIcon.Normal, QIcon.Off)
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
self.setWindowIcon(icon)
|
self.setWindowIcon(icon)
|
||||||
|
|
||||||
def card(self) -> Optional[Card]:
|
def card(self) -> Optional[Card]:
|
||||||
|
@ -542,6 +542,7 @@ create table if not exists profiles
|
|||||||
d = self.langDiag = NoCloseDiag()
|
d = self.langDiag = NoCloseDiag()
|
||||||
f = self.langForm = aqt.forms.setlang.Ui_Dialog()
|
f = self.langForm = aqt.forms.setlang.Ui_Dialog()
|
||||||
f.setupUi(d)
|
f.setupUi(d)
|
||||||
|
d.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
qconnect(d.accepted, self._onLangSelected)
|
qconnect(d.accepted, self._onLangSelected)
|
||||||
qconnect(d.rejected, lambda: True)
|
qconnect(d.rejected, lambda: True)
|
||||||
# update list
|
# update list
|
||||||
|
@ -211,6 +211,7 @@ class ProgressManager:
|
|||||||
class ProgressDialog(QDialog):
|
class ProgressDialog(QDialog):
|
||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
QDialog.__init__(self, parent)
|
QDialog.__init__(self, parent)
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
self.form = aqt.forms.progress.Ui_Dialog()
|
self.form = aqt.forms.progress.Ui_Dialog()
|
||||||
self.form.setupUi(self)
|
self.form.setupUi(self)
|
||||||
self._closingDown = False
|
self._closingDown = False
|
||||||
|
@ -707,6 +707,7 @@ class RecordDialog(QDialog):
|
|||||||
self._parent = parent
|
self._parent = parent
|
||||||
self.mw = mw
|
self.mw = mw
|
||||||
self._on_success = on_success
|
self._on_success = on_success
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
|
|
||||||
self._start_recording()
|
self._start_recording()
|
||||||
self._setup_dialog()
|
self._setup_dialog()
|
||||||
|
@ -34,6 +34,7 @@ class NewDeckStats(QDialog):
|
|||||||
self.oldPos = None
|
self.oldPos = None
|
||||||
self.wholeCollection = False
|
self.wholeCollection = False
|
||||||
self.setMinimumWidth(700)
|
self.setMinimumWidth(700)
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
f = self.form
|
f = self.form
|
||||||
f.setupUi(self)
|
f.setupUi(self)
|
||||||
f.groupBox.setVisible(False)
|
f.groupBox.setVisible(False)
|
||||||
@ -104,6 +105,7 @@ class DeckStats(QDialog):
|
|||||||
self.oldPos = None
|
self.oldPos = None
|
||||||
self.wholeCollection = False
|
self.wholeCollection = False
|
||||||
self.setMinimumWidth(700)
|
self.setMinimumWidth(700)
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
f = self.form
|
f = self.form
|
||||||
if theme_manager.night_mode and not theme_manager.macos_dark_mode():
|
if theme_manager.night_mode and not theme_manager.macos_dark_mode():
|
||||||
# the grouping box renders incorrectly in the fusion theme. 5.9+
|
# the grouping box renders incorrectly in the fusion theme. 5.9+
|
||||||
|
@ -42,6 +42,7 @@ class StudyDeck(QDialog):
|
|||||||
gui_hooks.state_did_reset.append(self.onReset)
|
gui_hooks.state_did_reset.append(self.onReset)
|
||||||
self.geomKey = "studyDeck-" + geomKey
|
self.geomKey = "studyDeck-" + geomKey
|
||||||
restoreGeom(self, self.geomKey)
|
restoreGeom(self, self.geomKey)
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
if not cancel:
|
if not cancel:
|
||||||
self.form.buttonBox.removeButton(
|
self.form.buttonBox.removeButton(
|
||||||
self.form.buttonBox.button(QDialogButtonBox.Cancel)
|
self.form.buttonBox.button(QDialogButtonBox.Cancel)
|
||||||
|
@ -290,6 +290,7 @@ def get_id_and_pass_from_user(
|
|||||||
) -> Tuple[str, str]:
|
) -> Tuple[str, str]:
|
||||||
diag = QDialog(mw)
|
diag = QDialog(mw)
|
||||||
diag.setWindowTitle("Anki")
|
diag.setWindowTitle("Anki")
|
||||||
|
diag.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
diag.setWindowModality(Qt.WindowModal)
|
diag.setWindowModality(Qt.WindowModal)
|
||||||
vbox = QVBoxLayout()
|
vbox = QVBoxLayout()
|
||||||
info_label = QLabel(
|
info_label = QLabel(
|
||||||
|
@ -16,6 +16,7 @@ class TagLimit(QDialog):
|
|||||||
self.deck = self.parent.deck
|
self.deck = self.parent.deck
|
||||||
self.dialog = aqt.forms.taglimit.Ui_Dialog()
|
self.dialog = aqt.forms.taglimit.Ui_Dialog()
|
||||||
self.dialog.setupUi(self)
|
self.dialog.setupUi(self)
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
s = QShortcut(
|
s = QShortcut(
|
||||||
QKeySequence("ctrl+d"), self.dialog.activeList, context=Qt.WidgetShortcut
|
QKeySequence("ctrl+d"), self.dialog.activeList, context=Qt.WidgetShortcut
|
||||||
)
|
)
|
||||||
|
@ -127,6 +127,7 @@ def showText(
|
|||||||
parent = aqt.mw.app.activeWindow() or aqt.mw
|
parent = aqt.mw.app.activeWindow() or aqt.mw
|
||||||
diag = QDialog(parent)
|
diag = QDialog(parent)
|
||||||
diag.setWindowTitle(title)
|
diag.setWindowTitle(title)
|
||||||
|
diag.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
layout = QVBoxLayout(diag)
|
layout = QVBoxLayout(diag)
|
||||||
diag.setLayout(layout)
|
diag.setLayout(layout)
|
||||||
text = QTextBrowser()
|
text = QTextBrowser()
|
||||||
@ -245,6 +246,7 @@ class GetTextDialog(QDialog):
|
|||||||
):
|
):
|
||||||
QDialog.__init__(self, parent)
|
QDialog.__init__(self, parent)
|
||||||
self.setWindowTitle(title)
|
self.setWindowTitle(title)
|
||||||
|
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
self.question = question
|
self.question = question
|
||||||
self.help = help
|
self.help = help
|
||||||
self.qlabel = QLabel(question)
|
self.qlabel = QLabel(question)
|
||||||
@ -316,6 +318,7 @@ def chooseList(prompt, choices, startrow=0, parent=None):
|
|||||||
if not parent:
|
if not parent:
|
||||||
parent = aqt.mw.app.activeWindow()
|
parent = aqt.mw.app.activeWindow()
|
||||||
d = QDialog(parent)
|
d = QDialog(parent)
|
||||||
|
d.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) # type: ignore
|
||||||
d.setWindowModality(Qt.WindowModal)
|
d.setWindowModality(Qt.WindowModal)
|
||||||
l = QVBoxLayout()
|
l = QVBoxLayout()
|
||||||
d.setLayout(l)
|
d.setLayout(l)
|
||||||
|
Loading…
Reference in New Issue
Block a user