aboutsummaryrefslogtreecommitdiffstats
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 331354f..f622036 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1313,6 +1313,17 @@ void MainWindow::showTagRulesDialog()
auto *dialog = new TagRulesDialog(this);
dialog->setAttribute(Qt::WA_DeleteOnClose);
+
+ // The Folder row's dropdown. Config holds the account subdirectories and
+ // the dialog holds no Config, so they are handed over here. Account::maildir
+ // is the subtree name the Folder term compiles a path: against; the account
+ // key is a config section name and would match nothing.
+ QStringList folders;
+ for (const Account &account : m_config.accounts()) {
+ if (!account.maildir.isEmpty() && !folders.contains(account.maildir))
+ folders.append(account.maildir);
+ }
+ dialog->setFolders(folders);
m_tagRulesDialog = dialog;
connect(dialog, &TagRulesDialog::countsRequested, this, [this, dialog]() {