Commit a54f7609 authored by Sergio Basto's avatar Sergio Basto Committed by Albert Astals Cid
Browse files

When we click on "Audio Setup", calls kcm_pulseaudio

(as the plasma audio plug-in do).

Revert 8fec379c
and replace the call of kcm_phonon, to kcm_pulseaudio, because kcm_phonon just works on KDE4

The patch was adapted for kmixwindow.cpp instead kmix.cpp
parent f770d6f3
......@@ -37,6 +37,7 @@
#include <klocalizedstring.h>
#include <kstandardaction.h>
#include <kxmlguifactory.h>
#include <KProcess>
// KMix
#include "kmix_debug.h"
......@@ -174,7 +175,11 @@ void KMixWindow::initActions()
KStandardAction::keyBindings(guiFactory(), SLOT(configureShortcuts()), actionCollection());
#endif
QAction* action = actionCollection()->addAction(QStringLiteral("hide_kmixwindow"));
QAction* action = actionCollection()->addAction(QStringLiteral("launch_kdesoundsetup"));
action->setText(i18n("Audio Setup..."));
connect(action, SIGNAL(triggered(bool)), SLOT(slotKdeAudioSetupExec()));
action = actionCollection()->addAction(QStringLiteral("hide_kmixwindow"));
action->setText(i18n("Hide Mixer Window"));
connect(action, SIGNAL(triggered(bool)), SLOT(hideOrClose()));
actionCollection()->setDefaultShortcut(action, Qt::Key_Escape);
......@@ -1156,6 +1161,21 @@ void KMixWindow::toggleMenuBar()
menuBar()->setVisible(_actionShowMenubar->isChecked());
}
void KMixWindow::slotKdeAudioSetupExec()
{
forkExec(QStringList() << "kcmshell5" << "kcm_pulseaudio");
}
void KMixWindow::forkExec(const QStringList& args)
{
int pid = KProcess::startDetached(args);
if (pid == 0)
{
KMessageBox::error(this, i18n("The helper application is either not installed or not working.\n\n%1",
args.join(QLatin1String(" "))));
}
}
void KMixWindow::slotConfigureCurrentView()
{
KMixerWidget *mw = qobject_cast<KMixerWidget *>(m_wsMixers->currentWidget());
......
......@@ -88,6 +88,7 @@ protected slots:
private:
KMixerWidget* findKMWforTab( const QString& tabId );
void forkExec(const QStringList& args);
KToggleAction* _actionShowMenubar;
bool m_startVisible;
......@@ -120,6 +121,7 @@ private:
static QString getKmixctrlRcFilename(const QString &postfix);
private slots:
void slotKdeAudioSetupExec();
void slotConfigureCurrentView();
void plugged(const char *driverName, const QString &udi, int dev);
......
......@@ -16,6 +16,7 @@
<Menu name="settings">
<Action name="toggle_channels_currentview" append="save_merge"/>
<Action name="select_master" append="save_merge"/>
<Action name="launch_kdesoundsetup" append="save_merge"/>
</Menu>
<Menu name="help" append="about_merge"><text>&amp;Help</text>
<Action name="hwinfo"/>
......
Supports Markdown
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