Commit b7a2afb7 authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

ensure view has always the statusbar

it is a lot easier if we can rely on this

the default (and most used case) is anyways status bar on

we don't need to optimize for the other variant
parent 0365d54b
......@@ -720,7 +720,6 @@ void KateMainWindow::toggleShowMenuBar(bool showMessage)
void KateMainWindow::toggleShowStatusBar()
{
Q_EMIT statusBarToggled();
}
bool KateMainWindow::showStatusBar()
......
......@@ -219,7 +219,6 @@ public:
bool showTabBar();
Q_SIGNALS:
void statusBarToggled();
void tabBarToggled();
void unhandledShortcutOverride(QEvent *e);
......
......@@ -150,7 +150,6 @@ KateViewSpace::KateViewSpace(KateViewManager *viewManager, QWidget *parent, cons
m_group.clear();
// connect signal to hide/show statusbar
connect(m_viewManager->mainWindow(), &KateMainWindow::statusBarToggled, this, &KateViewSpace::statusBarToggled);
connect(m_viewManager->mainWindow(), &KateMainWindow::tabBarToggled, this, &KateViewSpace::tabBarToggled);
connect(m_viewManager, &KateViewManager::showUrlNavBarChanged, this, &KateViewSpace::urlBarToggled);
......@@ -162,8 +161,7 @@ KateViewSpace::KateViewSpace(KateViewManager *viewManager, QWidget *parent, cons
m_layout.tabBarLayout = hLayout;
m_layout.mainLayout = layout;
// init the bars...
statusBarToggled();
// init tab bar
tabBarToggled();
}
......@@ -205,15 +203,6 @@ bool KateViewSpace::eventFilter(QObject *obj, QEvent *event)
return false;
}
void KateViewSpace::statusBarToggled()
{
KateUpdateDisabler updatesDisabled(m_viewManager->mainWindow());
for (const auto &[_, view] : m_docToView) {
Q_UNUSED(_)
view->setStatusBarEnabled(m_viewManager->mainWindow()->showStatusBar());
}
}
void KateViewSpace::tabBarToggled()
{
KateUpdateDisabler updatesDisabled(m_viewManager->mainWindow());
......@@ -278,8 +267,8 @@ KTextEditor::View *KateViewSpace::createView(KTextEditor::Document *doc)
*/
KTextEditor::View *v = doc->createView(stack, m_viewManager->mainWindow()->wrapper());
// set status bar to right state
v->setStatusBarEnabled(m_viewManager->mainWindow()->showStatusBar());
// our framework relies on the existence of the status bar
v->setStatusBarEnabled(true);
// restore the config of this view if possible
if (!m_group.isEmpty()) {
......
......@@ -193,7 +193,6 @@ public Q_SLOTS:
void updateDocumentState(KTextEditor::Document *doc);
private Q_SLOTS:
void statusBarToggled();
void tabBarToggled();
void urlBarToggled(bool);
void changeView(int buttonId);
......
Supports Markdown
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