mirror of
https://github.com/KDE/konsole.git
synced 2026-05-05 13:14:22 -04:00
Fix issue where the menu status for View menubar is not correct.
BUG: 181345 svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1133041
This commit is contained in:
@@ -267,7 +267,6 @@ void MainWindow::setupActions()
|
||||
// View Menu
|
||||
_toggleMenuBarAction = KStandardAction::showMenubar(menuBar(), SLOT(setVisible(bool)), collection);
|
||||
_toggleMenuBarAction->setShortcut( QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_M) );
|
||||
_toggleMenuBarAction->setChecked( !menuBar()->isHidden() );
|
||||
|
||||
// Hide the Show/Hide menubar item if the menu bar is a MacOS-style menu bar
|
||||
if ( menuBar()->isTopLevelMenu() )
|
||||
@@ -504,5 +503,17 @@ void MainWindow::configureNotifications()
|
||||
KNotifyConfigWidget::configure( this );
|
||||
}
|
||||
|
||||
void MainWindow::showEvent(QShowEvent *event)
|
||||
{
|
||||
// This code from Konqueror.
|
||||
// We need to check if our toolbars are shown/hidden here, and set
|
||||
// our menu items accordingly. We can't do it in the constructor because
|
||||
// view profiles store toolbar info, and that info is read after
|
||||
// construct time.
|
||||
_toggleMenuBarAction->setChecked( !menuBar()->isHidden() );
|
||||
// Call parent method
|
||||
KXmlGuiWindow::showEvent(event);
|
||||
}
|
||||
|
||||
#include "MainWindow.moc"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user