Allow editing of both toolbars, part and shell

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=366245
remotes/origin/kpdf-experiments
Albert Astals Cid 22 years ago
parent e8b2647466
commit 10c4c7d5f9
  1. 13
      kpdf/kpdf_shell.cpp
  2. 1
      kpdf/kpdf_shell.h

@ -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();

Loading…
Cancel
Save