[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdemultimedia/kmix
From:       Colin Guthrie <cguthrie () mandriva ! org>
Date:       2011-04-03 11:52:05
Message-ID: 20110403115205.13552AC8D3 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1226952 by cguthrie:

kmix: Drop the set/isEthereal() API as there is an existing method that does the same \
thing.

 M  +0 -1      backends/mixer_pulse.cpp  
 M  +3 -4      core/mixdevice.cpp  
 M  +2 -13     core/mixdevice.h  
 M  +6 -6      gui/mdwslider.cpp  


--- trunk/KDE/kdemultimedia/kmix/backends/mixer_pulse.cpp #1226951:1226952
@@ -814,7 +814,6 @@
         Volume v(dev.chanMask, PA_VOLUME_NORM, PA_VOLUME_MUTED, true, false);
         setVolumeFromPulse(v, dev);
         MixDevice* md = new MixDevice( _mixer, dev.name, dev.description, \
                dev.icon_name, ms);
-        md->setEthereal(true);
         md->addPlaybackVolume(v);
         md->setMuted(dev.mute);
         m_mixDevices.append(md);
--- trunk/KDE/kdemultimedia/kmix/core/mixdevice.cpp #1226951:1226952
@@ -23,6 +23,7 @@
 #include <klocale.h>
 
 #include "core/mixdevice.h"
+#include "core/mixer.h"
 #include "gui/guiprofile.h"
 #include "core/volume.h"
 
@@ -96,14 +97,12 @@
 
 MixDevice::MixDevice(  Mixer* mixer, const QString& id, const QString& name, const \
QString& iconName, MixSet* moveDestinationMixSet )  {
-    // doNotRestore is superseded by the more generic concepts isEthereal(), \
isArtificial()  init(mixer, id, name, iconName, moveDestinationMixSet);
 }
 
 void MixDevice::init(  Mixer* mixer, const QString& id, const QString& name, const \
QString& iconName, MixSet* moveDestinationMixSet )  {
     _artificial = false;
-    _ethereal   = false;
     _mixer = mixer;
     _id = id;
     if( name.isEmpty() )
@@ -217,7 +216,7 @@
  */
 void MixDevice::read( KConfig *config, const QString& grp )
 {
-    if ( isEthereal() || isArtificial() ) {
+    if ( _mixer->dynamic() || isArtificial() ) {
         kDebug(67100) << "MixDevice::read(): This MixDevice does not permit volume \
restoration (i.e. because it is handled lower down in the audio stack). Ignoring.";  \
} else {  QString devgrp = QString("%1.Dev%2").arg(grp).arg(_id);
@@ -264,7 +263,7 @@
  */
 void MixDevice::write( KConfig *config, const QString& grp )
 {
-    if (isEthereal() || isArtificial()) {
+    if (_mixer->dynamic() || isArtificial()) {
         kDebug(67100) << "MixDevice::write(): This MixDevice does not permit volume \
saving (i.e. because it is handled lower down in the audio stack). Ignoring.";  } \
else {  QString devgrp = QString("%1.Dev%2").arg(grp).arg(_id);
--- trunk/KDE/kdemultimedia/kmix/core/mixdevice.h #1226951:1226952
@@ -157,15 +157,6 @@
        _artificial = artificial;
    }
 
-   bool isEthereal() const
-   {
-       return _ethereal;
-   }
-   void setEthereal(bool _ethereal)
-   {
-       this->_ethereal = _ethereal;
-   }
-
    void setControlProfile(ProfControl* control);
    ProfControl* controlProfile();
    
@@ -191,14 +182,12 @@
    int _enumCurrentId;
    QList<QString> _enumValues; // A MixDevice, that is an ENUM, has these \
_enumValues  
-   //bool _doNotRestore;
    // A virtual control. It will not be saved/restored and/or doesn't get shortcuts
-   // Actually we discriminate those "virtual" controls in artificial controls and \
ethereal controls: +   // Actually we discriminate those "virtual" controls in \
artificial controls and dynamic controls:  // Type        Shortcut  Restore
    // Artificial:    yes       no    Virtual::GlobalMaster or \
Virtual::CaptureGroup_3   (controls that are constructed artificially from other \
                controls)
-   // Ethereal  :     no       no    Controls that come and go, like Pulse Stream \
controls +   // Dynamic   :     no       no    Controls that come and go, like Pulse \
Stream controls  bool _artificial;
-   bool _ethereal;
    MixSet *_moveDestinationMixSet;
    QString _iconName;
 
--- trunk/KDE/kdemultimedia/kmix/gui/mdwslider.cpp #1226951:1226952
@@ -133,8 +133,8 @@
     #ifdef __GNUC__
     #warning GLOBAL SHORTCUTS ARE NOW ASSIGNED TO ALL CONTROLS, as \
enableGlobalShortcut(), has not been committed  #endif
-    if ( ! mixDevice()->isEthereal() ) {
-        // virtual / ethereal controls won't get shortcuts
+    if ( ! mixDevice()->mixer()->dynamic() ) {
+        // virtual / dynamic controls won't get shortcuts
         b->setGlobalShortcut(dummyShortcut);  // -<- enableGlobalShortcut() is not \
there => use workaround  //   b->enableGlobalShortcut();
         connect( b, SIGNAL( triggered(bool) ), SLOT( increaseVolume() ) );
@@ -147,8 +147,8 @@
     #ifdef __GNUC__
     #warning GLOBAL SHORTCUTS ARE NOW ASSIGNED TO ALL CONTROLS, as \
enableGlobalShortcut(), has not been committed  #endif
-    if ( ! mixDevice()->isEthereal() ) {
-        // virtual / ethereal controls won't get shortcuts
+    if ( ! mixDevice()->mixer()->dynamic() ) {
+        // virtual / dynamic controls won't get shortcuts
         b->setGlobalShortcut(dummyShortcut);  // -<- enableGlobalShortcut() is not \
there => use workaround  //   b->enableGlobalShortcut();
         connect( b, SIGNAL( triggered(bool) ), SLOT( decreaseVolume() ) );
@@ -161,8 +161,8 @@
     #ifdef __GNUC__
     #warning GLOBAL SHORTCUTS ARE NOW ASSIGNED TO ALL CONTROLS, as \
enableGlobalShortcut(), has not been committed  #endif
-    if ( ! mixDevice()->isEthereal() ) {
-        // virtual / ethereal controls won't get shortcuts
+    if ( ! mixDevice()->mixer()->dynamic() ) {
+        // virtual / dynamic controls won't get shortcuts
         b->setGlobalShortcut(dummyShortcut);  // -<- enableGlobalShortcut() is not \
there => use workaround  //   b->enableGlobalShortcut();
         connect( b, SIGNAL( triggered(bool) ), SLOT( toggleMuted() ) );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic