Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 04cb9dda authored by Laurent Montel's avatar Laurent Montel 😁

Populate listofinclude file in autocreatescriptdialog

parent f8b18510
......@@ -71,6 +71,11 @@ void AutoCreateScriptDialog::setSieveCapabilities(const QStringList &capabilitie
mEditor->setSieveCapabilities(capabilities);
}
void AutoCreateScriptDialog::setListOfIncludeFile(const QStringList &listOfIncludeFile)
{
mEditor->setListOfIncludeFile(listOfIncludeFile);
}
QString AutoCreateScriptDialog::script(QString &requires) const
{
return mEditor->script(requires);
......
......@@ -36,6 +36,7 @@ public:
QString script(QString &requires) const;
void setSieveCapabilities(const QStringList &capabilities);
void setListOfIncludeFile(const QStringList &listOfIncludeFile);
void loadScript(const QString &doc, QString &error);
......
......@@ -237,6 +237,7 @@ void SieveEditorTextModeWidget::createRulesGraphically()
QPointer<AutoCreateScriptDialog> dlg = new AutoCreateScriptDialog(this);
dlg->setSieveCapabilities(mSieveCapabilities);
dlg->setSieveImapAccountSettings(mSieveImapAccountSettings);
dlg->setListOfIncludeFile(mListOfIncludeFile);
if (dlg->exec()) {
QString requires;
const QString script = dlg->script(requires);
......@@ -477,6 +478,11 @@ void SieveEditorTextModeWidget::setDebugScript(const QString &debug)
mDebugTextEdit->editor()->appendHtml(debug);
}
void SieveEditorTextModeWidget::setListOfIncludeFile(const QStringList &listOfIncludeFile)
{
mListOfIncludeFile = listOfIncludeFile;
}
void SieveEditorTextModeWidget::setSieveCapabilities(const QStringList &capabilities)
{
mSieveCapabilities = capabilities;
......
......@@ -100,6 +100,7 @@ public:
bool isTextEditor() const;
SieveEditorTabWidget *tabWidget() const;
void setListOfIncludeFile(const QStringList &listOfIncludeFile);
Q_SIGNALS:
void enableButtonOk(bool);
void switchToGraphicalMode();
......@@ -121,6 +122,7 @@ private:
bool loadFromFile(const QString &filename);
QString mOriginalScript;
QStringList mSieveCapabilities;
QStringList mListOfIncludeFile;
SieveTextEdit *mTextEdit;
KPIMTextEdit::PlainTextEditorWidget *mDebugTextEdit;
KPIMTextEdit::PlainTextEditFindBar *mFindBar;
......
......@@ -523,6 +523,7 @@ void SieveEditorWidget::setSieveImapAccountSettings(const SieveImapAccountSettin
void SieveEditorWidget::setListOfIncludeFile(const QStringList &listOfIncludeFile)
{
mTextModeWidget->setListOfIncludeFile(listOfIncludeFile);
mGraphicalModeWidget->setListOfIncludeFile(listOfIncludeFile);
}
......
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