diff --git a/ankiqt/ui/activetags.py b/ankiqt/ui/activetags.py
index 12e6a9745..85d3615e8 100644
--- a/ankiqt/ui/activetags.py
+++ b/ankiqt/ui/activetags.py
@@ -9,12 +9,11 @@ from ankiqt.ui.utils import saveGeom, restoreGeom
class ActiveTagsChooser(QDialog):
- def __init__(self, parent, active, inactive):
+ def __init__(self, parent, active):
QDialog.__init__(self, parent, Qt.Window)
self.parent = parent
self.deck = self.parent.deck
self.active = active
- self.inactive = inactive
self.dialog = ankiqt.forms.activetags.Ui_Dialog()
self.dialog.setupUi(self)
self.connect(self.dialog.buttonBox, SIGNAL("helpRequested()"),
@@ -27,13 +26,9 @@ class ActiveTagsChooser(QDialog):
self.items = []
self.suspended = {}
yes = parseTags(self.deck.getVar(self.active))
- no = parseTags(self.deck.getVar(self.inactive))
yesHash = {}
- noHash = {}
for y in yes:
yesHash[y] = True
- for n in no:
- noHash[n] = True
groupedTags = []
usertags.sort()
# render models and templates
@@ -70,16 +65,6 @@ class ActiveTagsChooser(QDialog):
mode = QItemSelectionModel.Deselect
idx = self.dialog.activeList.indexFromItem(item)
self.dialog.activeList.selectionModel().select(idx, mode)
- # inactive
- item = QListWidgetItem(icon, t.replace("_", " "))
- self.dialog.inactiveList.addItem(item)
- if t in noHash:
- mode = QItemSelectionModel.Select
- self.dialog.inactiveCheck.setChecked(True)
- else:
- mode = QItemSelectionModel.Deselect
- idx = self.dialog.inactiveList.indexFromItem(item)
- self.dialog.inactiveList.selectionModel().select(idx, mode)
def accept(self):
self.hide()
@@ -92,20 +77,10 @@ class ActiveTagsChooser(QDialog):
idx = self.dialog.activeList.indexFromItem(item)
if self.dialog.activeList.selectionModel().isSelected(idx):
yes.append(self.tags[c])
- # inactive
- item = self.dialog.inactiveList.item(c)
- idx = self.dialog.inactiveList.indexFromItem(item)
- if self.dialog.inactiveList.selectionModel().isSelected(idx):
- no.append(self.tags[c])
-
if self.dialog.activeCheck.isChecked():
self.deck.setVar(self.active, joinTags(yes))
else:
self.deck.setVar(self.active, "")
- if self.dialog.inactiveCheck.isChecked():
- self.deck.setVar(self.inactive, joinTags(no))
- else:
- self.deck.setVar(self.inactive, "")
self.parent.reset()
saveGeom(self, "activeTags")
QDialog.accept(self)
@@ -114,6 +89,6 @@ class ActiveTagsChooser(QDialog):
QDesktopServices.openUrl(QUrl(ankiqt.appWiki +
"ActiveTags"))
-def show(parent, active, inactive):
- at = ActiveTagsChooser(parent, active, inactive)
+def show(parent, active):
+ at = ActiveTagsChooser(parent, active)
at.exec_()
diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py
index 86d823d71..7d5645f23 100755
--- a/ankiqt/ui/main.py
+++ b/ankiqt/ui/main.py
@@ -1488,10 +1488,10 @@ later by using File>Close.
self.mainWin.tabWidget.setCurrentIndex(self.config['studyOptionsScreen'])
def onNewCategoriesClicked(self):
- ui.activetags.show(self, "newActive", "newInactive")
+ ui.activetags.show(self, "newActive")
def onRevCategoriesClicked(self):
- ui.activetags.show(self, "revActive", "revInactive")
+ ui.activetags.show(self, "revActive")
def onFailedMaxChanged(self):
try:
@@ -1569,12 +1569,12 @@ later by using File>Close.
u"Show All Due Cards",
u"Show Chosen Categories"
]
- if self.deck.getVar("newActive") or self.deck.getVar("newInactive"):
+ if self.deck.getVar("newActive"):
new = labels[1]
else:
new = labels[0]
self.mainWin.newCategoryLabel.setText(new)
- if self.deck.getVar("revActive") or self.deck.getVar("revInactive"):
+ if self.deck.getVar("revActive"):
rev = labels[1]
else:
rev = labels[0]
diff --git a/designer/activetags.ui b/designer/activetags.ui
index ef53e5f94..af5337f68 100644
--- a/designer/activetags.ui
+++ b/designer/activetags.ui
@@ -35,23 +35,6 @@
- -
-
-
- Hide cards with these tags:
-
-
-
- -
-
-
- false
-
-
- QAbstractItemView::MultiSelection
-
-
-
-
@@ -118,21 +101,5 @@
-
- inactiveCheck
- toggled(bool)
- inactiveList
- setEnabled(bool)
-
-
- 146
- 213
-
-
- 68
- 276
-
-
-