Commit 310f0806 authored by Simon Hausmann's avatar Simon Hausmann

- use KMainWindow's standard toolbar menu handler instead of the self-made

  action. Tested/Reviewed by Beineri

svn path=/trunk/kdesdk/cervisia/; revision=183465
parent 712ab2ed
......@@ -74,16 +74,11 @@ CervisiaShell::~CervisiaShell()
void CervisiaShell::setupActions()
{
KAction *action = KStdAction::showToolbar( 0, 0, actionCollection() );
QString hint = i18n("Shows or hides the toolbar");
action->setToolTip( hint );
action->setWhatsThis( hint );
connect( action, SIGNAL(toggled(bool)),
this, SLOT(slotToggleToolbar( bool )) );
setStandardToolBarMenuEnabled( true );
action = KStdAction::configureToolbars( this, SLOT(slotConfigureToolBars()),
KAction *action = KStdAction::configureToolbars( this, SLOT(slotConfigureToolBars()),
actionCollection() );
hint = i18n("Allows you to configure the toolbar");
QString hint = i18n("Allows you to configure the toolbar");
action->setToolTip( hint );
action->setWhatsThis( hint );
......@@ -132,15 +127,6 @@ void CervisiaShell::slotOpenSandbox()
part->openSandbox(dirname);
}
void CervisiaShell::slotToggleToolbar( bool visible )
{
KToolBar *tb = toolBar( "mainToolBar" );
if ( visible )
tb->show();
else
tb->hide();
}
void CervisiaShell::slotConfigureKeys()
{
KKeyDialog::configureKeys( actionCollection(), xmlFile() );
......
......@@ -37,7 +37,6 @@ public:
public slots:
void slotOpenSandbox();
void slotToggleToolbar( bool visible );
void slotConfigureKeys();
void slotConfigureToolBars();
void slotExit();
......
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