Commit 78af461d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Continue to implement lock tab

parent 5080d9fd
Pipeline #48332 failed with stage
in 24 minutes and 24 seconds
......@@ -908,6 +908,11 @@ void Widget::setLockTab(bool lock)
//TODO
}
bool Widget::isLocked() const
{
return d->mLockTab;
}
void Widget::statusSelected(int index)
{
if (index == 0) {
......@@ -1071,8 +1076,10 @@ Akonadi::Collection Widget::currentFolder() const
void Widget::setCurrentFolder(const Akonadi::Collection &collection)
{
d->mCurrentFolder = collection;
d->searchCollectionIndexingWarning->setCollection(collection);
if (!d->mLockTab) {
d->mCurrentFolder = collection;
d->searchCollectionIndexingWarning->setCollection(collection);
}
}
bool Widget::searchEditHasFocus() const
......
......@@ -131,6 +131,10 @@ public Q_SLOTS:
*/
void changeQuicksearchVisibility(bool);
void setLockTab(bool lock);
Q_REQUIRED_RESULT bool isLocked() const;
protected:
/**
* Called when the "Message Status/Tag" filter menu is opened by the user.
......@@ -204,8 +208,6 @@ protected:
void tagIdSelected(const QVariant &data);
void setLockTab(bool lock);
Q_SIGNALS:
/**
* Notify the outside when updating the status bar with a message
......
......@@ -727,6 +727,8 @@ void Pane::Private::onTabContextMenuRequest(const QPoint &pos)
} else if (action == closeTabAction) {
closeTab(q->widget(indexBar));
} else if (action == lockTabAction) {
auto *tab = qobject_cast<Widget *>(q->widget(indexBar));
tab->setLockTab(true);
//TODO
}
}
......
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