commit
33319e1691
@ -24,8 +24,6 @@ browsing-change-to = Change { $val } to:
|
|||||||
browsing-clear-unused = Clear Unused
|
browsing-clear-unused = Clear Unused
|
||||||
browsing-clear-unused-tags = Clear Unused Tags
|
browsing-clear-unused-tags = Clear Unused Tags
|
||||||
browsing-created = Created
|
browsing-created = Created
|
||||||
browsing-create-filtered-deck = Create Filtered Deck...
|
|
||||||
browsing-create-filtered-deck_2 = Create Filtered Deck (2nd Filter)...
|
|
||||||
browsing-ctrlandshiftande = Ctrl+Shift+E
|
browsing-ctrlandshiftande = Ctrl+Shift+E
|
||||||
browsing-current-deck = Current Deck
|
browsing-current-deck = Current Deck
|
||||||
browsing-current-note-type = Current note type:
|
browsing-current-note-type = Current note type:
|
||||||
|
@ -450,6 +450,11 @@ class Browser(QMainWindow):
|
|||||||
card: Optional[Card] = None,
|
card: Optional[Card] = None,
|
||||||
search: Optional[Tuple[Union[str, SearchTerm]]] = None,
|
search: Optional[Tuple[Union[str, SearchTerm]]] = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
"""
|
||||||
|
card : try to search for its note and select it
|
||||||
|
search: set and perform search; caller must ensure validity
|
||||||
|
"""
|
||||||
|
|
||||||
QMainWindow.__init__(self, None, Qt.Window)
|
QMainWindow.__init__(self, None, Qt.Window)
|
||||||
self.mw = mw
|
self.mw = mw
|
||||||
self.col = self.mw.col
|
self.col = self.mw.col
|
||||||
@ -489,9 +494,7 @@ class Browser(QMainWindow):
|
|||||||
if not isMac:
|
if not isMac:
|
||||||
f.actionClose.setVisible(False)
|
f.actionClose.setVisible(False)
|
||||||
qconnect(f.actionCreateFilteredDeck.triggered, self.createFilteredDeck)
|
qconnect(f.actionCreateFilteredDeck.triggered, self.createFilteredDeck)
|
||||||
qconnect(f.actionCreateFilteredDeck2.triggered, self.createFilteredDeck2)
|
f.actionCreateFilteredDeck.setShortcuts(["Ctrl+G", "Ctrl+Alt+G"])
|
||||||
if self.mw.col.schedVer() == 1:
|
|
||||||
f.menuEdit.removeAction(f.actionCreateFilteredDeck2)
|
|
||||||
# notes
|
# notes
|
||||||
qconnect(f.actionAdd.triggered, self.mw.onAddCard)
|
qconnect(f.actionAdd.triggered, self.mw.onAddCard)
|
||||||
qconnect(f.actionAdd_Tags.triggered, lambda: self.addTags())
|
qconnect(f.actionAdd_Tags.triggered, lambda: self.addTags())
|
||||||
@ -1201,11 +1204,13 @@ where id in %s"""
|
|||||||
|
|
||||||
def createFilteredDeck(self) -> None:
|
def createFilteredDeck(self) -> None:
|
||||||
search = self.form.searchEdit.lineEdit().text()
|
search = self.form.searchEdit.lineEdit().text()
|
||||||
aqt.dialogs.open("DynDeckConfDialog", self.mw, search=search)
|
if (
|
||||||
|
self.mw.col.schedVer() != 1
|
||||||
def createFilteredDeck2(self) -> None:
|
and self.mw.app.keyboardModifiers() & Qt.AltModifier
|
||||||
search = self.form.searchEdit.lineEdit().text()
|
):
|
||||||
aqt.dialogs.open("DynDeckConfDialog", self.mw, search_2=search)
|
aqt.dialogs.open("DynDeckConfDialog", self.mw, search_2=search)
|
||||||
|
else:
|
||||||
|
aqt.dialogs.open("DynDeckConfDialog", self.mw, search=search)
|
||||||
|
|
||||||
# Preview
|
# Preview
|
||||||
######################################################################
|
######################################################################
|
||||||
|
@ -84,10 +84,6 @@ class DeckConf(QDialog):
|
|||||||
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.form.buttonBox.button(QDialogButtonBox.Ok).setText(label)
|
self.form.buttonBox.button(QDialogButtonBox.Ok).setText(label)
|
||||||
self.form.buttonBox.button(QDialogButtonBox.Cancel).setText(
|
|
||||||
tr(TR.ACTIONS_CANCEL)
|
|
||||||
)
|
|
||||||
self.form.buttonBox.button(QDialogButtonBox.Help).setText(tr(TR.ACTIONS_HELP))
|
|
||||||
if self.mw.col.schedVer() == 1:
|
if self.mw.col.schedVer() == 1:
|
||||||
self.form.secondFilter.setVisible(False)
|
self.form.secondFilter.setVisible(False)
|
||||||
restoreGeom(self, "dyndeckconf")
|
restoreGeom(self, "dyndeckconf")
|
||||||
|
@ -232,7 +232,6 @@
|
|||||||
<addaction name="actionClose"/>
|
<addaction name="actionClose"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionCreateFilteredDeck"/>
|
<addaction name="actionCreateFilteredDeck"/>
|
||||||
<addaction name="actionCreateFilteredDeck2"/>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menuJump">
|
<widget class="QMenu" name="menuJump">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -588,20 +587,12 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="actionCreateFilteredDeck">
|
<action name="actionCreateFilteredDeck">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>BROWSING_CREATE_FILTERED_DECK</string>
|
<string>QT_MISC_CREATE_FILTERED_DECK</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string notr="true">Ctrl+G</string>
|
<string notr="true">Ctrl+G</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionCreateFilteredDeck2">
|
|
||||||
<property name="text">
|
|
||||||
<string>BROWSING_CREATE_FILTERED_DECK_2</string>
|
|
||||||
</property>
|
|
||||||
<property name="shortcut">
|
|
||||||
<string notr="true">Ctrl+Shift+G</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="icons.qrc"/>
|
<include location="icons.qrc"/>
|
||||||
|
@ -16,6 +16,8 @@ disallow_untyped_defs=true
|
|||||||
disallow_untyped_defs=true
|
disallow_untyped_defs=true
|
||||||
[mypy-aqt.utils]
|
[mypy-aqt.utils]
|
||||||
disallow_untyped_defs=true
|
disallow_untyped_defs=true
|
||||||
|
[mypy-aqt.dyndeckconf]
|
||||||
|
disallow_untyped_defs=true
|
||||||
|
|
||||||
|
|
||||||
[mypy-aqt.mpv]
|
[mypy-aqt.mpv]
|
||||||
|
Loading…
Reference in New Issue
Block a user