summaryrefslogtreecommitdiffstats
path: root/kmix/viewbase.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-06-03 18:49:38 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-06-03 20:27:32 +0900
commit4e1780e96fc766c35e21ca901f30b56b4b31415e (patch)
tree0b030d8fa8480e8f4069f02a1c5f2d2b7617340c /kmix/viewbase.cpp
parentbb13b926c3f9f191339b6c952c03f9206577f8b5 (diff)
downloadtdemultimedia-4e1780e96fc766c35e21ca901f30b56b4b31415e.tar.gz
tdemultimedia-4e1780e96fc766c35e21ca901f30b56b4b31415e.zip
KMix: added mixer selection entry to sound mixer applet's popup menu.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 65c258e955c049db6fb04782cc3e8aa69828daa0)
Diffstat (limited to 'kmix/viewbase.cpp')
-rw-r--r--kmix/viewbase.cpp41
1 files changed, 32 insertions, 9 deletions
diff --git a/kmix/viewbase.cpp b/kmix/viewbase.cpp
index 11bb06a8..86d1524c 100644
--- a/kmix/viewbase.cpp
+++ b/kmix/viewbase.cpp
@@ -60,6 +60,7 @@ ViewBase::ViewBase(TQWidget* parent, const char* name, const TQString & caption,
}
}
new TDEAction(i18n("&Channels"), 0, TQT_TQOBJECT(this), TQT_SLOT(configureView()), _actions, "toggle_channels");
+ new TDEAction(i18n("&Select Mixer"), 0, TQT_TQOBJECT(this), TQT_SLOT(selectMixerSlot()), _actions, "select_mixer");
connect ( _mixer, TQT_SIGNAL(newVolumeLevels()), this, TQT_SLOT(refreshVolumeLevels()) );
}
@@ -129,15 +130,28 @@ TDEPopupMenu* ViewBase::getPopup()
void ViewBase::popupReset()
{
TDEAction *a;
-
_popMenu = new TDEPopupMenu( this );
- _popMenu->insertTitle( SmallIcon( "kmix" ), i18n("Device Settings") );
+ TDEAction *smb = _actions->action( "options_show_menubar" );
+
+ if (!smb && Mixer::mixers().count() > 1)
+ {
+ _popMenu->insertTitle( SmallIcon( "kmix" ), i18n("General") );
+ a = _actions->action( "select_mixer" );
+ a->plug(_popMenu);
+ }
+
+ _popMenu->insertTitle( SmallIcon( "kmix" ), i18n("Device Settings") );
a = _actions->action( "toggle_channels" );
- if ( a ) a->plug( _popMenu );
+ if (a)
+ {
+ a->plug(_popMenu);
+ }
- a = _actions->action( "options_show_menubar" );
- if ( a ) a->plug( _popMenu );
+ if (smb)
+ {
+ smb->plug(_popMenu);
+ }
}
@@ -161,7 +175,8 @@ void ViewBase::refreshVolumeLevels()
// is virtual
}
-Mixer* ViewBase::getMixer() {
+Mixer* ViewBase::getMixer()
+{
return _mixer;
}
@@ -169,19 +184,27 @@ Mixer* ViewBase::getMixer() {
* Open the View configuration dialog. The user can select which channels he wants
* to see and which not.
*/
-void ViewBase::configureView() {
-
+void ViewBase::configureView()
+{
DialogViewConfiguration* dvc = new DialogViewConfiguration(0, *this);
dvc->show();
// !! The dialog is modal. Does it delete itself?
}
-void ViewBase::toggleMenuBarSlot() {
+void ViewBase::toggleMenuBarSlot()
+{
//kdDebug(67100) << "ViewBase::toggleMenuBarSlot() start\n";
emit toggleMenuBar();
//kdDebug(67100) << "ViewBase::toggleMenuBarSlot() done\n";
}
+void ViewBase::selectMixerSlot()
+{
+ //kdDebug(67100) << "ViewBase::selectMixerSlot() start\n";
+ emit selectMixer();
+ //kdDebug(67100) << "ViewBase::selectMixerSlot() done\n";
+}
+
// ---------- Popup stuff END ---------------------
#include "viewbase.moc"