Commit 0fda8b2c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

It uses interface for the moment

parent d18c958e
...@@ -104,6 +104,7 @@ void ConvertSnippetVariableMenu::initializeMenu(bool onlyMenuForCustomizeAttachm ...@@ -104,6 +104,7 @@ void ConvertSnippetVariableMenu::initializeMenu(bool onlyMenuForCustomizeAttachm
mMenu->addMenu(attachmentMenuVariable); mMenu->addMenu(attachmentMenuVariable);
} }
QMenu *dateTimeMenuVariable = new QMenu(i18n("Date/Time"), mMenu); QMenu *dateTimeMenuVariable = new QMenu(i18n("Date/Time"), mMenu);
if (!onlyMenuForCustomizeAttachmentFileName) {
dateTimeMenuVariable->addAction(i18n("Day Of Week"), this, [this]() { dateTimeMenuVariable->addAction(i18n("Day Of Week"), this, [this]() {
Q_EMIT insertVariable(MessageComposer::ConvertSnippetVariablesUtil::Dow); Q_EMIT insertVariable(MessageComposer::ConvertSnippetVariablesUtil::Dow);
}); });
...@@ -122,6 +123,7 @@ void ConvertSnippetVariableMenu::initializeMenu(bool onlyMenuForCustomizeAttachm ...@@ -122,6 +123,7 @@ void ConvertSnippetVariableMenu::initializeMenu(bool onlyMenuForCustomizeAttachm
dateTimeMenuVariable->addAction(i18n("Year"), this, [this]() { dateTimeMenuVariable->addAction(i18n("Year"), this, [this]() {
Q_EMIT insertVariable(MessageComposer::ConvertSnippetVariablesUtil::Year); Q_EMIT insertVariable(MessageComposer::ConvertSnippetVariablesUtil::Year);
}); });
}
dateTimeMenuVariable->addAction(i18n("Last Year"), this, [this]() { dateTimeMenuVariable->addAction(i18n("Last Year"), this, [this]() {
Q_EMIT insertVariable(MessageComposer::ConvertSnippetVariablesUtil::LastYear); Q_EMIT insertVariable(MessageComposer::ConvertSnippetVariablesUtil::LastYear);
}); });
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment