From 011b562038d300c94c7252a4ebe906e2400171df Mon Sep 17 00:00:00 2001 From: RumovZ Date: Sun, 31 Jan 2021 23:16:49 +0100 Subject: [PATCH] Add current-filter-to-filtered-deck action --- ftl/core/browsing.ftl | 1 + qt/aqt/browser.py | 4 ++++ qt/aqt/forms/browser.ui | 10 ++++++++++ 3 files changed, 15 insertions(+) diff --git a/ftl/core/browsing.ftl b/ftl/core/browsing.ftl index bf408f834..54cb44fcb 100644 --- a/ftl/core/browsing.ftl +++ b/ftl/core/browsing.ftl @@ -36,6 +36,7 @@ browsing-enter-tags-to-add = Enter tags to add: browsing-enter-tags-to-delete = Enter tags to delete: browsing-filter = Filter... browsing-filtered = (filtered) +browsing-filter-to-deck = Current Filter to Filtered Deck... browsing-find = Find: browsing-find-and-replace = Find and Replace browsing-find-duplicates = Find Duplicates diff --git a/qt/aqt/browser.py b/qt/aqt/browser.py index 4554e2499..e8f421a66 100644 --- a/qt/aqt/browser.py +++ b/qt/aqt/browser.py @@ -476,6 +476,7 @@ class Browser(QMainWindow): qconnect(f.actionSelectNotes.triggered, self.selectNotes) if not isMac: f.actionClose.setVisible(False) + qconnect(f.actionFilterToDeck.triggered, self.filterToDeck) # notes qconnect(f.actionAdd.triggered, self.mw.onAddCard) qconnect(f.actionAdd_Tags.triggered, lambda: self.addTags()) @@ -1158,6 +1159,9 @@ where id in %s""" if nids: ChangeModel(self, nids) + def filterToDeck(self): + aqt.dialogs.open("DynDeckConfDialog", self.mw, self.form.searchEdit.lineEdit().text()) + # Preview ###################################################################### diff --git a/qt/aqt/forms/browser.ui b/qt/aqt/forms/browser.ui index ba6a48980..dc8a58169 100644 --- a/qt/aqt/forms/browser.ui +++ b/qt/aqt/forms/browser.ui @@ -230,6 +230,8 @@ + + @@ -583,6 +585,14 @@ Ctrl+Shift+E + + + BROWSING_FILTER_TO_DECK + + + Ctrl+Q + +