diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-12-15 20:31:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-12-15 20:31:18 +0000 |
commit | b00800d31c59fc4dc0028143bef4392af3a7fc55 (patch) | |
tree | e72cd3c44ad259760b87350750ce4b287d465189 /kmix | |
parent | e2de64d6f1beb9e492daf5b886e19933c1fa41dd (diff) | |
download | tdemultimedia-b00800d31c59fc4dc0028143bef4392af3a7fc55.tar.gz tdemultimedia-b00800d31c59fc4dc0028143bef4392af3a7fc55.zip |
* libtunepimp updates
* kmix fixes
* noatun automake patch
* juk configuration dialog enhancements
* hide aRTS menu entries
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1062736 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmix')
-rw-r--r-- | kmix/kmix.cpp | 6 | ||||
-rw-r--r-- | kmix/kmix.h | 1 | ||||
-rw-r--r-- | kmix/kmixdockwidget.cpp | 11 | ||||
-rw-r--r-- | kmix/kmixdockwidget.h | 3 | ||||
-rw-r--r-- | kmix/kmixprefdlg.cpp | 4 | ||||
-rw-r--r-- | kmix/kmixprefdlg.h | 1 |
6 files changed, 21 insertions, 5 deletions
diff --git a/kmix/kmix.cpp b/kmix/kmix.cpp index e4cd68be..1aa97522 100644 --- a/kmix/kmix.cpp +++ b/kmix/kmix.cpp @@ -197,7 +197,7 @@ KMixWindow::updateDocking() // create dock widget // !! This should be a View in the future - m_dockWidget = new KMixDockWidget( Mixer::mixers().first(), this, "mainDockWidget", m_volumeWidget ); + m_dockWidget = new KMixDockWidget( Mixer::mixers().first(), this, "mainDockWidget", m_volumeWidget, m_dockIconMuting ); /* Belongs in KMixDockWidget // create RMB menu @@ -249,6 +249,7 @@ KMixWindow::saveConfig() config->writeEntry( "Tickmarks", m_showTicks ); config->writeEntry( "Labels", m_showLabels ); config->writeEntry( "startkdeRestore", m_onLogin ); + config->writeEntry( "DockIconMuting", m_dockIconMuting ); Mixer* mixerMasterCard = Mixer::masterCard(); if ( mixerMasterCard != 0 ) { config->writeEntry( "MasterMixer", mixerMasterCard->id() ); @@ -298,6 +299,7 @@ KMixWindow::loadConfig() m_showLabels = config->readBoolEntry("Labels", true); const QString& valueStyleString = config->readEntry("ValueStyle", "None"); m_onLogin = config->readBoolEntry("startkdeRestore", true ); + m_dockIconMuting = config->readBoolEntry( "DockIconMuting", false); m_startVisible = config->readBoolEntry("Visible", true); m_multiDriverMode = config->readBoolEntry("MultiDriver", false); m_surroundView = config->readBoolEntry("Experimental-ViewSurround", false ); @@ -428,6 +430,7 @@ KMixWindow::showSettings() m_prefDlg->m_showTicks->setChecked( m_showTicks ); m_prefDlg->m_showLabels->setChecked( m_showLabels ); m_prefDlg->m_onLogin->setChecked( m_onLogin ); + m_prefDlg->m_dockIconMuting->setChecked( m_dockIconMuting ); m_prefDlg->_rbVertical ->setChecked( m_toplevelOrientation == Qt::Vertical ); m_prefDlg->_rbHorizontal->setChecked( m_toplevelOrientation == Qt::Horizontal ); m_prefDlg->_rbNone->setChecked( m_valueStyle == MixDeviceWidget::NNONE ); @@ -497,6 +500,7 @@ KMixWindow::applyPrefs( KMixPrefDlg *prefDlg ) m_showTicks = prefDlg->m_showTicks->isChecked(); m_showLabels = prefDlg->m_showLabels->isChecked(); m_onLogin = prefDlg->m_onLogin->isChecked(); + m_dockIconMuting = prefDlg->m_dockIconMuting->isChecked(); if ( prefDlg->_rbNone->isChecked() ) { m_valueStyle = MixDeviceWidget::NNONE; diff --git a/kmix/kmix.h b/kmix/kmix.h index 4805d4d1..fcab67b4 100644 --- a/kmix/kmix.h +++ b/kmix/kmix.h @@ -100,6 +100,7 @@ KMixWindow : public KMainWindow bool m_volumeWidget; bool m_hideOnClose; bool m_showTicks; + bool m_dockIconMuting; bool m_showLabels; MixDeviceWidget::ValueStyle m_valueStyle; // No numbers by default bool m_onLogin; diff --git a/kmix/kmixdockwidget.cpp b/kmix/kmixdockwidget.cpp index 18e19af0..1a0456fe 100644 --- a/kmix/kmixdockwidget.cpp +++ b/kmix/kmixdockwidget.cpp @@ -47,7 +47,7 @@ #include "kwin.h" #include "viewdockareapopup.h" -KMixDockWidget::KMixDockWidget( Mixer *mixer, QWidget *parent, const char *name, bool volumePopup ) +KMixDockWidget::KMixDockWidget( Mixer *mixer, QWidget *parent, const char *name, bool volumePopup, bool dockIconMuting ) : KSystemTray( parent, name ), m_mixer(mixer), _dockAreaPopup(0L), @@ -55,7 +55,8 @@ KMixDockWidget::KMixDockWidget( Mixer *mixer, QWidget *parent, const char *name, _playBeepOnVolumeChange(false), // disabled due to triggering a "Bug" _oldToolTipValue(-1), _oldPixmapType('-'), - _volumePopup(volumePopup) + _volumePopup(volumePopup), + _dockIconMuting(dockIconMuting) { Mixer* preferredMasterMixer = Mixer::masterCard(); if ( preferredMasterMixer != 0 ) { @@ -294,7 +295,11 @@ KMixDockWidget::mousePressEvent(QMouseEvent *me) return; } // LeftMouseButton pressed else if ( me->button() == MidButton ) { - toggleActive(); + if ( ! _dockIconMuting ) { + toggleActive(); + } else { + dockMute(); + } return; } else { diff --git a/kmix/kmixdockwidget.h b/kmix/kmixdockwidget.h index 273e8533..c1f0d8dd 100644 --- a/kmix/kmixdockwidget.h +++ b/kmix/kmixdockwidget.h @@ -43,7 +43,7 @@ class KMixDockWidget : public KSystemTray { friend class KMixWindow; public: - KMixDockWidget(Mixer *, QWidget *parent=0, const char *name=0, bool volumePopup=true); + KMixDockWidget(Mixer *, QWidget *parent=0, const char *name=0, bool volumePopup=true, bool dockIconMuting=false); ~KMixDockWidget(); void setErrorPixmap(); @@ -73,6 +73,7 @@ class KMixDockWidget : public KSystemTray { int _oldToolTipValue; char _oldPixmapType; bool _volumePopup; + bool _dockIconMuting; private slots: void dockMute(); void selectMaster(); diff --git a/kmix/kmixprefdlg.cpp b/kmix/kmixprefdlg.cpp index e2788ceb..9c5fbd42 100644 --- a/kmix/kmixprefdlg.cpp +++ b/kmix/kmixprefdlg.cpp @@ -68,6 +68,10 @@ KMixPrefDlg::KMixPrefDlg( QWidget *parent ) m_onLogin = new QCheckBox( i18n("Restore volumes on login"), m_generalTab ); layout->addWidget( m_onLogin ); + m_dockIconMuting = new QCheckBox( + i18n("Middle click on system tray icon toggles muting"), m_generalTab ); + layout->addWidget( m_dockIconMuting ); + QBoxLayout *numbersLayout = new QHBoxLayout( layout ); QButtonGroup *numbersGroup = new QButtonGroup( 3, Qt::Horizontal, i18n("Numbers"), m_generalTab ); numbersGroup->setRadioButtonExclusive(true); diff --git a/kmix/kmixprefdlg.h b/kmix/kmixprefdlg.h index 3519d045..eb4222ed 100644 --- a/kmix/kmixprefdlg.h +++ b/kmix/kmixprefdlg.h @@ -57,6 +57,7 @@ KMixPrefDlg : public KDialogBase QCheckBox *m_showTicks; QCheckBox *m_showLabels; QCheckBox *m_onLogin; + QCheckBox *m_dockIconMuting; QRadioButton *_rbVertical; QRadioButton *_rbHorizontal; QRadioButton *_rbNone; |