fileitemaction: friendly format names in dropdown
This commit is contained in:
parent
a884c40361
commit
1a34435ed8
|
|
@ -193,9 +193,9 @@ void DenoteFileItemAction::createDenoteFile(const QString &dirPath, QWidget *par
|
||||||
form->addRow(QStringLiteral("Signature:"), sigEdit);
|
form->addRow(QStringLiteral("Signature:"), sigEdit);
|
||||||
|
|
||||||
auto *extCombo = new QComboBox();
|
auto *extCombo = new QComboBox();
|
||||||
extCombo->addItem(QStringLiteral(".md"));
|
extCombo->addItem(QStringLiteral("Markdown"), QStringLiteral(".md"));
|
||||||
extCombo->addItem(QStringLiteral(".org"));
|
extCombo->addItem(QStringLiteral("Emacs org-mode"), QStringLiteral(".org"));
|
||||||
extCombo->addItem(QStringLiteral(".txt"));
|
extCombo->addItem(QStringLiteral("Plain Text"), QStringLiteral(".txt"));
|
||||||
form->addRow(QStringLiteral("Format:"), extCombo);
|
form->addRow(QStringLiteral("Format:"), extCombo);
|
||||||
|
|
||||||
layout->addLayout(form);
|
layout->addLayout(form);
|
||||||
|
|
@ -221,7 +221,7 @@ void DenoteFileItemAction::createDenoteFile(const QString &dirPath, QWidget *par
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString signature = sigEdit->text().trimmed();
|
const QString signature = sigEdit->text().trimmed();
|
||||||
const QString ext = extCombo->currentText();
|
const QString ext = extCombo->currentData().toString();
|
||||||
|
|
||||||
// Build filename and full path
|
// Build filename and full path
|
||||||
const QString filename = Denote::buildFilename(title, tags, signature, ext);
|
const QString filename = Denote::buildFilename(title, tags, signature, ext);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue