dyndeckconf -> filtered_deck

This commit is contained in:
Damien Elmes 2021-03-24 13:17:12 +10:00
parent 12597e1094
commit 5a1b00b6e6
7 changed files with 12 additions and 12 deletions

View file

@ -69,7 +69,7 @@ except ImportError as e:
# - make preferences modal? cmd+q does wrong thing
from aqt import addcards, addons, browser, editcurrent, dyndeckconf # isort:skip
from aqt import addcards, addons, browser, editcurrent, filtered_deck # isort:skip
from aqt import stats, about, preferences, mediasync # isort:skip
@ -80,7 +80,7 @@ class DialogManager:
"AddonsDialog": [addons.AddonsDialog, None],
"Browser": [browser.Browser, None],
"EditCurrent": [editcurrent.EditCurrent, None],
"DynDeckConfDialog": [dyndeckconf.DeckConf, None],
"FilteredDeckConfigDialog": [filtered_deck.FilteredDeckConfigDialog, None],
"DeckStats": [stats.DeckStats, None],
"NewDeckStats": [stats.NewDeckStats, None],
"About": [about.show, None],

View file

@ -1108,9 +1108,9 @@ where id in %s"""
def createFilteredDeck(self) -> None:
search = self.form.searchEdit.lineEdit().text()
if self.mw.col.schedVer() != 1 and KeyboardModifiersPressed().alt:
aqt.dialogs.open("DynDeckConfDialog", self.mw, search_2=search)
aqt.dialogs.open("FilteredDeckConfigDialog", self.mw, search_2=search)
else:
aqt.dialogs.open("DynDeckConfDialog", self.mw, search=search)
aqt.dialogs.open("FilteredDeckConfigDialog", self.mw, search=search)
# Preview
######################################################################

View file

@ -24,7 +24,7 @@ from aqt.utils import (
)
class DeckConf(QDialog):
class FilteredDeckConfigDialog(QDialog):
"""Dialogue to modify and build a filtered deck."""
def __init__(
@ -42,7 +42,7 @@ class DeckConf(QDialog):
self.mw = mw
self.col = self.mw.col
self.did: Optional[int] = None
self.form = aqt.forms.dyndconf.Ui_Dialog()
self.form = aqt.forms.filtered_deck.Ui_Dialog()
self.form.setupUi(self)
self.mw.checkpoint(tr(TR.ACTIONS_OPTIONS))
self.initialSetup()
@ -294,7 +294,7 @@ class DeckConf(QDialog):
self.mw.reset()
saveGeom(self, "dyndeckconf")
QDialog.reject(self)
aqt.dialogs.markClosed("DynDeckConfDialog")
aqt.dialogs.markClosed("FilteredDeckConfigDialog")
def accept(self) -> None:
try:
@ -310,7 +310,7 @@ class DeckConf(QDialog):
saveGeom(self, "dyndeckconf")
self.mw.reset()
QDialog.accept(self)
aqt.dialogs.markClosed("DynDeckConfDialog")
aqt.dialogs.markClosed("FilteredDeckConfigDialog")
def closeWithCallback(self, callback: Callable) -> None:
self.reject()

View file

@ -13,7 +13,7 @@ from . import clayout_top
from . import customstudy
from . import dconf
from . import debug
from . import dyndconf
from . import filtered_deck
from . import editaddon
from . import editcurrent
from . import edithtml

View file

@ -1325,7 +1325,7 @@ title="%s" %s>%s</button>""" % (
if not deck:
deck = self.col.decks.current()
if deck["dyn"]:
aqt.dialogs.open("DynDeckConfDialog", self, deck=deck)
aqt.dialogs.open("FilteredDeckConfigDialog", self, deck=deck)
else:
aqt.deckconf.DeckConf(self, deck)
@ -1402,7 +1402,7 @@ title="%s" %s>%s</button>""" % (
##########################################################################
def onCram(self) -> None:
aqt.dialogs.open("DynDeckConfDialog", self)
aqt.dialogs.open("FilteredDeckConfigDialog", self)
# Menu, title bar & status
##########################################################################

View file

@ -87,7 +87,7 @@ class Overview:
elif url == "opts":
self.mw.onDeckConf()
elif url == "cram":
aqt.dialogs.open("DynDeckConfDialog", self.mw)
aqt.dialogs.open("FilteredDeckConfigDialog", self.mw)
elif url == "refresh":
self.rebuild_current_filtered_deck()
elif url == "empty":