[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.4/kdebase/apps/konsole/src
From: Kurt Hindenburg <kurt.hindenburg () gmail ! com>
Date: 2010-05-31 22:44:17
Message-ID: 20100531224417.01679AC8C6 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1133024 by hindenburg:
Fix issue where the menu status for View menubar is not correct.
CCBUG: 181345
M +12 -1 MainWindow.cpp
M +3 -0 MainWindow.h
--- branches/KDE/4.4/kdebase/apps/konsole/src/MainWindow.cpp #1133023:1133024
@@ -267,7 +267,6 @@
_toggleMenuBarAction = new KToggleAction(this);
_toggleMenuBarAction->setText( i18n("Show Menu Bar") );
_toggleMenuBarAction->setIcon( KIcon("show-menu") );
- _toggleMenuBarAction->setChecked( !menuBar()->isHidden() );
connect( _toggleMenuBarAction , SIGNAL(toggled(bool)) , menuBar() , SLOT(setVisible(bool)) );
collection->addAction("show-menubar",_toggleMenuBarAction);
@@ -491,5 +490,17 @@
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"
--- branches/KDE/4.4/kdebase/apps/konsole/src/MainWindow.h #1133023:1133024
@@ -141,6 +141,9 @@
void closeActiveSessionRequest();
protected:
+ // Reimplemented for internal reasons.
+ virtual void showEvent(QShowEvent *event);
+
// reimplemented from KMainWindow
virtual bool queryClose();
virtual void saveProperties(KConfigGroup& group);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic