Commit c3b8c6df authored by Laurent Montel's avatar Laurent Montel 😁

Update action when we switch tab

parent 787021a9
......@@ -120,6 +120,7 @@ void SieveEditorMainWidget::slotCreateScriptPage(const QUrl &url, const QStringL
connect(editor, &SieveEditorPageWidget::undoAvailable, this, &SieveEditorMainWidget::undoAvailable);
connect(editor, &SieveEditorPageWidget::redoAvailable, this, &SieveEditorMainWidget::redoAvailable);
connect(editor, &SieveEditorPageWidget::copyAvailable, this, &SieveEditorMainWidget::copyAvailable);
connect(editor, &SieveEditorPageWidget::sieveEditorTabCurrentChanged, this, &SieveEditorMainWidget::sieveEditorTabCurrentChanged);
editor->setIsNewScript(isNewScript);
editor->loadScript(url, capabilities);
mTabWidget->addTab(editor, url.fileName());
......
......@@ -94,6 +94,7 @@ Q_SIGNALS:
void undoAvailable(bool);
void redoAvailable(bool);
void copyAvailable(bool);
void sieveEditorTabCurrentChanged();
private Q_SLOTS:
void slotCreateScriptPage(const QUrl &url, const QStringList &capabilities, bool isNewScript);
......
......@@ -66,6 +66,7 @@ SieveEditorMainWindow::SieveEditorMainWindow()
connect(mMainWidget->sieveEditorMainWidget(), &SieveEditorMainWidget::undoAvailable, this, &SieveEditorMainWindow::slotUndoAvailable);
connect(mMainWidget->sieveEditorMainWidget(), &SieveEditorMainWidget::redoAvailable, this, &SieveEditorMainWindow::slotRedoAvailable);
connect(mMainWidget->sieveEditorMainWidget(), &SieveEditorMainWidget::copyAvailable, this, &SieveEditorMainWindow::slotCopyAvailable);
connect(mMainWidget->sieveEditorMainWidget(), &SieveEditorMainWidget::sieveEditorTabCurrentChanged, this, &SieveEditorMainWindow::slotUpdateActions);
mMainWidget->sieveEditorMainWidget()->refreshList();
}
......
......@@ -45,6 +45,7 @@ SieveEditorPageWidget::SieveEditorPageWidget(QWidget *parent)
connect(mSieveEditorWidget, &KSieveUi::SieveEditorWidget::undoAvailable, this, &SieveEditorPageWidget::undoAvailable);
connect(mSieveEditorWidget, &KSieveUi::SieveEditorWidget::redoAvailable, this, &SieveEditorPageWidget::redoAvailable);
connect(mSieveEditorWidget, &KSieveUi::SieveEditorWidget::copyAvailable, this, &SieveEditorPageWidget::copyAvailable);
connect(mSieveEditorWidget, &KSieveUi::SieveEditorWidget::sieveEditorTabCurrentChanged, this, &SieveEditorPageWidget::sieveEditorTabCurrentChanged);
}
SieveEditorPageWidget::~SieveEditorPageWidget()
......
......@@ -91,6 +91,7 @@ Q_SIGNALS:
void undoAvailable(bool);
void redoAvailable(bool);
void copyAvailable(bool);
void sieveEditorTabCurrentChanged();
private Q_SLOTS:
void slotGetResult(KManageSieve::SieveJob *, bool success, const QString &script, bool isActive);
......
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