Commit 41a1f767 authored by Laurent Montel's avatar Laurent Montel 😁

Allow to change modified status

parent c3291ac9
cmake_minimum_required(VERSION 3.0) cmake_minimum_required(VERSION 3.0)
set(PIM_VERSION "5.6.42") set(PIM_VERSION "5.6.43")
project(libksieve VERSION ${PIM_VERSION}) project(libksieve VERSION ${PIM_VERSION})
......
...@@ -100,6 +100,11 @@ bool SieveEditor::event(QEvent *e) ...@@ -100,6 +100,11 @@ bool SieveEditor::event(QEvent *e)
return QDialog::event(e); return QDialog::event(e);
} }
void SieveEditor::setModified(bool b)
{
d->mSieveEditorWidget->setModified(b);
}
void SieveEditor::slotEnableButtonOk(bool b) void SieveEditor::slotEnableButtonOk(bool b)
{ {
d->mOkButton->setEnabled(b); d->mOkButton->setEnabled(b);
......
...@@ -47,6 +47,7 @@ public: ...@@ -47,6 +47,7 @@ public:
void setSieveImapAccountSettings(const KSieveUi::SieveImapAccountSettings &account); void setSieveImapAccountSettings(const KSieveUi::SieveImapAccountSettings &account);
void setListOfIncludeFile(const QStringList &listOfIncludeFile); void setListOfIncludeFile(const QStringList &listOfIncludeFile);
void setModified(bool b);
private Q_SLOTS: private Q_SLOTS:
void slotEnableButtonOk(bool b); void slotEnableButtonOk(bool b);
void slotAccepted(); void slotAccepted();
......
...@@ -200,6 +200,7 @@ void ManageSieveScriptsDialog::slotGetResult(KManageSieve::SieveJob *job, bool s ...@@ -200,6 +200,7 @@ void ManageSieveScriptsDialog::slotGetResult(KManageSieve::SieveJob *job, bool s
disableManagerScriptsDialog(true); disableManagerScriptsDialog(true);
d->mSieveEditor = new SieveEditor; d->mSieveEditor = new SieveEditor;
d->mSieveEditor->show();
d->mSieveEditor->setScriptName(d->mCurrentURL.fileName()); d->mSieveEditor->setScriptName(d->mCurrentURL.fileName());
d->mSieveEditor->setSieveCapabilities(d->mCurrentCapabilities); d->mSieveEditor->setSieveCapabilities(d->mCurrentCapabilities);
d->mSieveEditor->setScript(script, true); /*clear undo/redo*/ d->mSieveEditor->setScript(script, true); /*clear undo/redo*/
...@@ -209,8 +210,8 @@ void ManageSieveScriptsDialog::slotGetResult(KManageSieve::SieveJob *job, bool s ...@@ -209,8 +210,8 @@ void ManageSieveScriptsDialog::slotGetResult(KManageSieve::SieveJob *job, bool s
connect(d->mSieveEditor, &SieveEditor::okClicked, this, &ManageSieveScriptsDialog::slotSieveEditorOkClicked); connect(d->mSieveEditor, &SieveEditor::okClicked, this, &ManageSieveScriptsDialog::slotSieveEditorOkClicked);
connect(d->mSieveEditor, &SieveEditor::cancelClicked, this, &ManageSieveScriptsDialog::slotSieveEditorCancelClicked); connect(d->mSieveEditor, &SieveEditor::cancelClicked, this, &ManageSieveScriptsDialog::slotSieveEditorCancelClicked);
connect(d->mSieveEditor, &SieveEditor::checkSyntax, this, &ManageSieveScriptsDialog::slotSieveEditorCheckSyntaxClicked); connect(d->mSieveEditor, &SieveEditor::checkSyntax, this, &ManageSieveScriptsDialog::slotSieveEditorCheckSyntaxClicked);
d->mSieveEditor->show();
d->mWasActive = isActive; d->mWasActive = isActive;
d->mSieveEditor->setModified(false);
} }
void ManageSieveScriptsDialog::slotSieveEditorCheckSyntaxClicked() void ManageSieveScriptsDialog::slotSieveEditorCheckSyntaxClicked()
......
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