Commit 4abff56a authored by Burkhard Lück's avatar Burkhard Lück
Browse files

Enable Shortcuts + Toolbar configuration in KmPlot

REVIEW:101927
BUG:177014
BUG:268445
parent e5b435d0
......@@ -72,6 +72,7 @@ KmPlot::KmPlot( KCmdLineArgs* args)
setCentralWidget(m_part->widget());
//m_part->widget()->setFocus();
// and integrate the part's GUI with the shell's
setupGUI(Keys | ToolBar | Save);
createGUI(m_part);
}
}
......@@ -159,9 +160,6 @@ void KmPlot::setupActions()
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
KStandardAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
KStandardAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
m_fullScreen = KStandardAction::fullScreen( NULL, NULL, this, actionCollection());
actionCollection()->addAction("fullscreen", m_fullScreen);
connect( m_fullScreen, SIGNAL( toggled( bool )), this, SLOT( slotUpdateFullScreen( bool )));
......@@ -178,23 +176,6 @@ void KmPlot::fileNew()
KToolInvocation::kdeinitExec("kmplot");
}
void KmPlot::optionsConfigureKeys()
{
/// \todo check that configuring keys works
// KShortcutsDialog::configure(actionCollection(), "kmplot_shell.rc");
KShortcutsDialog::configure( actionCollection() );
}
void KmPlot::optionsConfigureToolbars()
{
saveMainWindowSettings( KGlobal::config()->group( QString() ));
// use the standard toolbar editor
KEditToolBar dlg(factory());
connect(&dlg, SIGNAL(newToolBarConfig()), this, SLOT(applyNewToolbarConfig()));
dlg.exec();
}
void KmPlot::applyNewToolbarConfig()
{
applyMainWindowSettings(KGlobal::config()->group( QString() ));
......
......@@ -72,8 +72,6 @@ private slots:
public Q_SLOTS:
// DBus interface
Q_SCRIPTABLE void fileOpen();
Q_SCRIPTABLE void optionsConfigureKeys();
Q_SCRIPTABLE void optionsConfigureToolbars();
Q_SCRIPTABLE void setStatusBarText(const QString &, int id);
Q_SCRIPTABLE void openFileInNewWindow(const KUrl &url);
/**
......
......@@ -32,10 +32,7 @@
<Action name="maximumvalue"/>
<Action name="minimumvalue"/>
</Menu>
<Menu name="settings"><text>&amp;Settings</text>
<Separator />
<Action name="options_configure_keybinding"/>
<Action name="options_configure_toolbars"/>
<Menu name="settings">
<Action name="options_configure"/>
</Menu>
<Menu name="help"><text>&amp;Help</text>
......
......@@ -29,7 +29,7 @@
<Action name="maximumvalue"/>
<Action name="minimumvalue"/>
</Menu>
<Menu name="settings"><text>&amp;Settings</text>
<Menu name="settings">
<Action name="options_configure"/>
</Menu>
<Menu name="help"><text>&amp;Help</text>
......
......@@ -10,19 +10,6 @@
<Action name="file_quit"/>
</Menu>
<Merge/>
<Menu noMerge="1" name="settings"><text>&amp;Settings</text>
<!--<Action name="options_show_toolbar"/>-->
<Merge name="StandardToolBarMenuHandler" />
<Action name="options_show_statusbar"/>
<Separator/>
<Action name="fullscreen" />
<Merge/>
<!-- <Separator/>
<Action name="options_configure_keybinding"/>
<Action name="options_configure_toolbars"/>
<Action name="options_configure"/>-->
<Separator/>
</Menu>
<Menu name="help"><text>&amp;Help</text>
<DefineGroup name="names_group" />
</Menu>
......
......@@ -240,9 +240,6 @@ void MainDlg::setupActions()
QAction *prefs = KStandardAction::preferences( this, SLOT( slotSettings() ), actionCollection());
prefs->setText( i18n( "Configure KmPlot..." ) );
KStandardAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
KStandardAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
// KmPlot specific actions
......@@ -782,16 +779,6 @@ void MainDlg::setReadOnlyStatusBarText(const QString &text)
setStatusBarText(text);
}
void MainDlg::optionsConfigureKeys()
{
// KApplication::kApplication()->dcopClient()->send(KApplication::kApplication()->dcopClient()->appId(), "KmPlotShell","optionsConfigureKeys()", QByteArray());
}
void MainDlg::optionsConfigureToolbars()
{
// KApplication::kApplication()->dcopClient()->send(KApplication::kApplication()->dcopClient()->appId(), "KmPlotShell","optionsConfigureToolbars()", QByteArray());
}
bool MainDlg::queryClose()
{
return checkModified();
......
......@@ -226,10 +226,6 @@ protected slots:
void resetUndoRedo();
void setReadOnlyStatusBarText(const QString &);
/// slots for the settings-menu
void optionsConfigureKeys();
void optionsConfigureToolbars();
};
class KmPlotPartFactory : public KParts::Factory
......
......@@ -9,8 +9,6 @@
<method name="setDrawProgress">
<arg name="progress" type="d" direction="in"/>
</method>
<method name="optionsConfigureKeys"/>
<method name="optionsConfigureToolbars"/>
<method name="openFileInNewWindow">
<arg name="url" type="s" direction="in"/>
</method>
......
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