Commit 10c4c7d5 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Allow editing of both toolbars, part and shell

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=366245
parent e8b26474
......@@ -22,6 +22,7 @@
#include <kaction.h>
#include <kapplication.h>
#include <kedittoolbar.h>
#include <kfiledialog.h>
#include <klibloader.h>
#include <kmessagebox.h>
......@@ -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()
{
......
......@@ -71,6 +71,7 @@ namespace KPDF
void slotQuit();
void optionsConfigureToolbars();
void applyNewToolbarConfig();
void slotUpdateFullScreen();
void slotRMBClick();
......
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