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

List:       kde-core-devel
Subject:    Kmix shows mixer tabs for non-existant mixers [PATCH]
From:       Ilya Konstantinov <kde-core-devel () future ! galanet ! net>
Date:       2001-08-02 21:53:18
[Download RAW message or body]

Hi,

This patch makes sure Kmix wouldn't keep tabs for mixers of soundcards
which were removed from the computer.

Currently, if you install another soundcard, run kmix, then remove the
soundcard and then run kmix again, there'll be a tab with "Invalid
mixer" written inside (for the removed mixer). This patch makes sure
only existing mixer devices get a tab.

["kmix_nonexistant_mixer.patch" (text/plain)]

--- kdemultimedia/kmix/kmix.cpp	2001/07/18 10:25:27	1.111
+++ kdemultimedia/kmix/kmix.cpp	2001/08/02 21:46:37
@@ -321,10 +321,13 @@ void KMixWindow::loadConfig()
 
        }
 
-       KMixerWidget *mw = new KMixerWidget( id, mixer, mixerName, mixerNum, false, true, this );
-       mw->setName( name );
-       mw->loadConfig( config, *tab );
-       insertMixerWidget( mw );
+       // only if an actual mixer device is found for the config entry
+       if (mixer) {
+           KMixerWidget *mw = new KMixerWidget( id, mixer, mixerName, mixerNum, false, true, this );
+           mw->setName( name );
+           mw->loadConfig( config, *tab );
+           insertMixerWidget( mw );
+       }
    }
 
    // restore window size and position


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

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