Add context menu entry to toggle offline tabs (#5318)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
nerix
2024-04-12 23:05:47 +02:00
committed by GitHub
parent e6bf503594
commit 1ca77a1e84
4 changed files with 88 additions and 22 deletions
+1 -16
View File
@@ -659,22 +659,7 @@ void Window::addShortcuts()
}
else if (arg == "toggleLiveOnly")
{
if (!this->notebook_->getShowTabs())
{
// Tabs are currently hidden, so the intention is to show
// tabs again before enabling the live only setting
this->notebook_->setShowTabs(true);
getSettings()->tabVisibility.setValue(
NotebookTabVisibility::LiveOnly);
}
else
{
getSettings()->tabVisibility.setValue(
getSettings()->tabVisibility.getEnum() ==
NotebookTabVisibility::LiveOnly
? NotebookTabVisibility::AllTabs
: NotebookTabVisibility::LiveOnly);
}
this->notebook_->toggleOfflineTabs();
}
else
{