[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:08
Message-ID: 20110403115208.AED01AC8D7 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1226953 by cguthrie:

kmix: Rename dynamic() to isDynamic(). Much nicer and clearer IMO

 M  +8 -8      apps/kmix.cpp  
 M  +2 -2      backends/mixer_backend.cpp  
 M  +2 -2      core/mixdevice.cpp  
 M  +1 -1      core/mixer.cpp  
 M  +1 -1      core/mixer.h  
 M  +1 -1      gui/guiprofile.cpp  
 M  +4 -4      gui/mdwslider.cpp  
 M  +6 -6      gui/viewbase.cpp  
 M  +1 -1      gui/viewdockareapopup.cpp  
 M  +1 -1      gui/viewsliders.cpp  


--- trunk/KDE/kdemultimedia/kmix/apps/kmix.cpp #1226952:1226953
@@ -189,7 +189,7 @@
     bool allDynamic = true;
     foreach( Mixer* mixer, Mixer::mixers() )
     {
-        if ( !mixer->dynamic() )
+        if ( !mixer->isDynamic() )
         {
             allDynamic = false;
             break;
@@ -339,7 +339,7 @@
     // Otherwise we would not save the Meta information (step -2- below for that \
mixer.  // We also do not save dynamic mixers (e.g. PulseAudio)
     foreach ( Mixer* mixer, Mixer::mixers() ) {
-        if ( !mixer->dynamic() )
+        if ( !mixer->isDynamic() )
             mixerViews[mixer->id()]; // just insert a map entry
     }
 
@@ -352,7 +352,7 @@
             // Otherwise the user will be confused afer re-plugging the card (as the \
config was not saved).  mw->saveConfig( KGlobal::config().data() );
             // add the view to the corresponding mixer list, so we can save a \
                views-per-mixer list below
-            if ( !mw->mixer()->dynamic() ) {
+            if ( !mw->mixer()->isDynamic() ) {
                 QStringList& qsl = mixerViews[mw->mixer()->id()];
                 qsl.append(mw->getGuiprof()->getId());
             }
@@ -546,7 +546,7 @@
         QStringList profileList;
         bool aProfileWasAddedSucesufully = false;
 
-        if ( !mixer->dynamic() ) {
+        if ( !mixer->isDynamic() ) {
             // We do not support save profiles for dynamic mixers (i.e. PulseAudio)
 
             profileListHasKey = pconfig.hasKey( mixer->id() ); // <<< SHOULD be \
before the following line @@ -578,7 +578,7 @@
 
             // Lets try a bunch of fallback strategies:
             GUIProfile* guiprof = 0;
-            if ( !mixer->dynamic() ) {
+            if ( !mixer->isDynamic() ) {
                 // We know that GUIProfile::find() will return 0 if the mixer is \
                dynamic, so don't bother checking.
                 kDebug() << "Attempting to find a card-specific GUI Profile for the \
                mixer " << mixer->id();
                 guiprof = GUIProfile::find(mixer, QString("default"), false, false); \
// ### Card specific profile ### @@ -699,7 +699,7 @@
         m_wsMixers->removeTab(idx);
         delete kmw;
 
-        m_wsMixers->setTabsClosable(!kmw->mixer()->dynamic() && m_wsMixers->count() \
> 1); +        m_wsMixers->setTabsClosable(!kmw->mixer()->isDynamic() && \
> m_wsMixers->count() > 1);
 
         saveViewConfig();
     }
@@ -900,7 +900,7 @@
             m_wsMixers->setCurrentWidget(kmw);
         }
 
-        m_wsMixers->setTabsClosable(!mixer->dynamic() && m_wsMixers->count() > 1);
+        m_wsMixers->setTabsClosable(!mixer->isDynamic() && m_wsMixers->count() > 1);
         m_dontSetDefaultCardOnStart = false;
 
 
@@ -1149,7 +1149,7 @@
         ViewBase* view = kmw->currentView();
         QAction* action = actionCollection()->action( "toggle_channels_currentview" \
);  if (view && action)
-            action->setVisible( !view->getMixer()->dynamic() );
+            action->setVisible( !view->getMixer()->isDynamic() );
     }
 }
 
--- trunk/KDE/kdemultimedia/kmix/backends/mixer_backend.cpp #1226952:1226953
@@ -48,7 +48,7 @@
 bool Mixer_Backend::openIfValid() {
     bool valid = false;
     int ret = open();
-    if ( ret == 0  && (m_mixDevices.count() > 0 || _mixer->dynamic())) {
+    if ( ret == 0  && (m_mixDevices.count() > 0 || _mixer->isDynamic())) {
         valid = true;
         // A better ID is now calculated in mixertoolbox.cpp, and set via setID(),
         // but we want a somehow usable fallback just in case.
@@ -139,7 +139,7 @@
       return m_mixDevices.at(0);  // Backend has NOT set a recommended master. Evil \
backend => lets help out.  } //first device (if exists)
    else {
-      if ( !_mixer->dynamic()) {
+      if ( !_mixer->isDynamic()) {
          // This should never ever happen, as KMix doe NOT accept soundcards without \
controls  kError(67100) << "Mixer_Backend::recommendedMaster(): returning invalid \
master. This is a bug in KMix. Please file a bug report stating how you produced \
this." << endl;  }
--- trunk/KDE/kdemultimedia/kmix/core/mixdevice.cpp #1226952:1226953
@@ -216,7 +216,7 @@
  */
 void MixDevice::read( KConfig *config, const QString& grp )
 {
-    if ( _mixer->dynamic() || isArtificial() ) {
+    if ( _mixer->isDynamic() || 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);
@@ -263,7 +263,7 @@
  */
 void MixDevice::write( KConfig *config, const QString& grp )
 {
-    if (_mixer->dynamic() || isArtificial()) {
+    if (_mixer->isDynamic() || 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/mixer.cpp #1226952:1226953
@@ -772,7 +772,7 @@
     m_dynamic = dynamic;
 }
 
-bool Mixer::dynamic()
+bool Mixer::isDynamic()
 {
     return m_dynamic;
 }
--- trunk/KDE/kdemultimedia/kmix/core/mixer.h #1226952:1226953
@@ -166,7 +166,7 @@
 
     /// Says if we are dynamic (e.g. widgets can come and go)
     virtual void setDynamic( bool dynamic = true );
-    virtual bool dynamic();
+    virtual bool isDynamic();
 
     virtual bool moveStream( const QString id, const QString& destId );
 
--- trunk/KDE/kdemultimedia/kmix/gui/guiprofile.cpp #1226952:1226953
@@ -161,7 +161,7 @@
     if ( mixer == 0 || profileName.isEmpty() )
         return 0;
 
-    if ( mixer->dynamic() ) {
+    if ( mixer->isDynamic() ) {
         kDebug(67100) << "GUIProfile::find() Not loading GUIProfile for Dynamic \
Mixer (e.g. PulseAudio)";  return 0;
     }
--- trunk/KDE/kdemultimedia/kmix/gui/mdwslider.cpp #1226952:1226953
@@ -88,7 +88,7 @@
     connect( taction, SIGNAL( triggered(bool) ), SLOT( toggleStereoLinked() ) );
 
     KAction *action;
-    if ( ! m_mixdevice->mixer()->dynamic() ) {
+    if ( ! m_mixdevice->mixer()->isDynamic() ) {
         action = _mdwActions->add<KToggleAction>( "hide" );
         action->setText( i18n("&Hide") );
         connect( action, SIGNAL( triggered(bool) ), SLOT( setDisabled() ) );
@@ -133,7 +133,7 @@
     #ifdef __GNUC__
     #warning GLOBAL SHORTCUTS ARE NOW ASSIGNED TO ALL CONTROLS, as \
enableGlobalShortcut(), has not been committed  #endif
-    if ( ! mixDevice()->mixer()->dynamic() ) {
+    if ( ! mixDevice()->mixer()->isDynamic() ) {
         // virtual / dynamic controls won't get shortcuts
         b->setGlobalShortcut(dummyShortcut);  // -<- enableGlobalShortcut() is not \
there => use workaround  //   b->enableGlobalShortcut();
@@ -147,7 +147,7 @@
     #ifdef __GNUC__
     #warning GLOBAL SHORTCUTS ARE NOW ASSIGNED TO ALL CONTROLS, as \
enableGlobalShortcut(), has not been committed  #endif
-    if ( ! mixDevice()->mixer()->dynamic() ) {
+    if ( ! mixDevice()->mixer()->isDynamic() ) {
         // virtual / dynamic controls won't get shortcuts
         b->setGlobalShortcut(dummyShortcut);  // -<- enableGlobalShortcut() is not \
there => use workaround  //   b->enableGlobalShortcut();
@@ -161,7 +161,7 @@
     #ifdef __GNUC__
     #warning GLOBAL SHORTCUTS ARE NOW ASSIGNED TO ALL CONTROLS, as \
enableGlobalShortcut(), has not been committed  #endif
-    if ( ! mixDevice()->mixer()->dynamic() ) {
+    if ( ! mixDevice()->mixer()->isDynamic() ) {
         // virtual / dynamic controls won't get shortcuts
         b->setGlobalShortcut(dummyShortcut);  // -<- enableGlobalShortcut() is not \
there => use workaround  //   b->enableGlobalShortcut();
--- trunk/KDE/kdemultimedia/kmix/gui/viewbase.cpp #1226952:1226953
@@ -74,7 +74,7 @@
          }
       }
    }
-   if ( !_mixer->dynamic() ) {
+   if ( !_mixer->isDynamic() ) {
       QAction *action = _localActionColletion->addAction("toggle_channels");
       action->setText(i18n("&Channels"));
       connect(action, SIGNAL(triggered(bool) ), SLOT(configureView()));
@@ -98,7 +98,7 @@
 
 bool ViewBase::isValid() const
 {
-   return ( _mixSet->count() > 0 || _mixer->dynamic() );
+   return ( _mixSet->count() > 0 || _mixer->isDynamic() );
 }
 
 void ViewBase::setIcons (bool on) { KMixToolBox::setIcons (_mdws, on ); }
@@ -225,7 +225,7 @@
 
 void ViewBase::setMixSet()
 {
-    if ( _mixer->dynamic() ) {
+    if ( _mixer->isDynamic() ) {
 
         // We need to delete the current MixDeviceWidgets so we can redraw them
         while (!_mdws.isEmpty()) {
@@ -247,7 +247,7 @@
  */
 void ViewBase::configureView() {
 
-    Q_ASSERT( !_mixer->dynamic() );
+    Q_ASSERT( !_mixer->isDynamic() );
     
     DialogViewConfiguration* dvc = new DialogViewConfiguration(0, *this);
     dvc->show();
@@ -273,7 +273,7 @@
    static char guiComplexity[3][20] = { "simple", "extended", "all" };
 
    // Certain bits are not saved for dynamic mixers (e.g. PulseAudio)
-   bool dynamic = _mixer->dynamic();
+   bool dynamic = _mixer->isDynamic();
 
    for ( int tries = 0; tries < 3; tries++ )
    {
@@ -358,7 +358,7 @@
    kDebug(67100) << "KMixToolBox::saveView() grp=" << grp;
 
    // Certain bits are not saved for dynamic mixers (e.g. PulseAudio)
-   bool dynamic = _mixer->dynamic();
+   bool dynamic = _mixer->isDynamic();
 
    for (int i=0; i < view->_mdws.count(); ++i ){
       QWidget *qmdw = view->_mdws[i];
--- trunk/KDE/kdemultimedia/kmix/gui/viewdockareapopup.cpp #1226952:1226953
@@ -88,7 +88,7 @@
 {
    // kDebug(67100) << "ViewDockAreaPopup::setMixSet()\n";
 
-   if ( _mixer->dynamic() ) {
+   if ( _mixer->isDynamic() ) {
       // Our _layoutMDW now should only contain spacer widgets from the \
                QSpacerItems's in add() below.
       // We need to trash those too otherwise all sliders gradually migrate away \
from the edge :p  QLayoutItem *li;
--- trunk/KDE/kdemultimedia/kmix/gui/viewsliders.cpp #1226952:1226953
@@ -148,7 +148,7 @@
 {
     const MixSet& mixset = _mixer->getMixSet();
 
-    if ( _mixer->dynamic() ) {
+    if ( _mixer->isDynamic() ) {
         // We will be recreating our sliders, so make sure we trash all the \
separators too.  qDeleteAll(_separators);
         _separators.clear();


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

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