diff --git a/kpdf/kpdf_shell.cpp b/kpdf/kpdf_shell.cpp index fcb0cd73c..2502ddcaa 100644 --- a/kpdf/kpdf_shell.cpp +++ b/kpdf/kpdf_shell.cpp @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -61,7 +62,7 @@ Shell::Shell() // tell the KParts::MainWindow that this is indeed the main widget setCentralWidget(m_part->widget()); // and integrate the part's GUI with the shell's - setupGUI(ToolBar | Keys | Save); + setupGUI(Keys | Save); createGUI(m_part); } } @@ -123,6 +124,7 @@ Shell::setupActions() setStandardToolBarMenuEnabled(true); m_showMenuBarAction = KStdAction::showMenubar( this, SLOT( slotShowMenubar() ), actionCollection(), "options_show_menubar" ); + KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection()); m_fullScreenAction = KStdAction::fullScreen( this, SLOT( slotUpdateFullScreen() ), actionCollection(), this ); m_popup = new KPopupMenu( this, "rmb popup" ); m_popup->insertTitle( i18n( "Full Screen Options" ) ); @@ -174,6 +176,15 @@ Shell::fileOpen() openURL(url); } + void +Shell::optionsConfigureToolbars() +{ + saveMainWindowSettings(KGlobal::config(), "MainWindow"); + KEditToolbar dlg(factory()); + connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(applyNewToolbarConfig())); + dlg.exec(); +} + void Shell::applyNewToolbarConfig() { diff --git a/kpdf/kpdf_shell.h b/kpdf/kpdf_shell.h index a9dccecf8..27f3923cc 100644 --- a/kpdf/kpdf_shell.h +++ b/kpdf/kpdf_shell.h @@ -71,6 +71,7 @@ namespace KPDF void slotQuit(); + void optionsConfigureToolbars(); void applyNewToolbarConfig(); void slotUpdateFullScreen(); void slotRMBClick();