Commit 60af5443 authored by David Faure's avatar David Faure

standard KEditToolbar and setAutoSaveSettings stuff

svn path=/trunk/kdesdk/cervisia/; revision=193173
parent 84429f7b
/*
/*
* Copyright (C) 1999-2002 Bernd Gehrmann
* bernd@mail.berlios.de
*
......@@ -38,7 +38,7 @@ CervisiaShell::CervisiaShell( const char *name )
setCentralWidget( part->widget() );
setupActions();
// create the active filter indicator and add it to the statusbar
filterLabel = new QLabel("UR", statusBar());
filterLabel->setFixedSize(filterLabel->sizeHint());
......@@ -65,6 +65,8 @@ CervisiaShell::CervisiaShell( const char *name )
statusBar(), SLOT( clear() ) );
createGUI( part );
setAutoSaveSettings();
}
CervisiaShell::~CervisiaShell()
......@@ -81,7 +83,7 @@ void CervisiaShell::setupActions()
QString hint = i18n("Allows you to configure the toolbar");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = KStdAction::keyBindings( this, SLOT(slotConfigureKeys()),
actionCollection() );
hint = i18n("Allows you to customize the keybindings");
......@@ -134,9 +136,15 @@ void CervisiaShell::slotConfigureKeys()
void CervisiaShell::slotConfigureToolBars()
{
KEditToolbar dlg( actionCollection() );
if ( dlg.exec() )
createGUI( part );
saveMainWindowSettings( KGlobal::config(), autoSaveGroup() );
KEditToolbar dlg( factory() );
connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(slotNewToolbarConfig()));
dlg.exec();
}
void CervisiaShell::slotNewToolbarConfig()
{
applyMainWindowSettings( KGlobal::config(), autoSaveGroup() );
}
void CervisiaShell::slotChangeFilterStatus(QString status)
......
/*
/*
* Copyright (C) 1999-2002 Bernd Gehrmann
* bernd@mail.berlios.de
*
......@@ -40,8 +40,9 @@ public slots:
void slotConfigureKeys();
void slotConfigureToolBars();
void slotExit();
protected slots:
void slotNewToolbarConfig();
void slotChangeFilterStatus(QString status);
protected:
......
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