[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:51:59
Message-ID: 20110403115159.AC230AC8DA () svn ! kde ! org
[Download RAW message or body]

SVN commit 1226949 by cguthrie:

kmix: Generify an earlier fix to not show close/new tab buttons with PulseAudio.

This just removes the specific PulseAudio check and relies on the 'dynamic' mixers
In theory the same logic could apply to OSSv4 but I doubt anyone will bother.

Also remove the option to Launch pavucontrol. There is no check to see if it is
installed and all the functionality of pavucontrol is now available in kmix
or Speaker Setup which is already linked to in the menu.

CCBUG: 265317
CCBUG: 237239
CCBUG: 264835

 M  +9 -18     apps/kmix.cpp  
 M  +0 -1      apps/kmix.h  
 M  +0 -1      kmixui.rc  


--- trunk/KDE/kdemultimedia/kmix/apps/kmix.cpp #1226948:1226949
@@ -183,21 +183,20 @@
 
 void KMixWindow::initActionsAfterInitMixer()
 {
-    bool isPulseAudio = false;
-    // Add "launch_pavucontrol" to menu, if Pulseaudio backend is in use
+    // Only show the new tab widget if some of the mixers are not Dynamic.
+    // The GUI that then pops up could then make a new mixer from a dynamic one,
+    // if mixed dynamic and non-dynamic mixers were allowed, but this is generally \
not the case. +    bool allDynamic = true;
     foreach( Mixer* mixer, Mixer::mixers() )
     {
-        if ( mixer->getDriverName() == "PulseAudio")
+        if ( !mixer->dynamic() )
         {
-            isPulseAudio = true;
-            KAction* action = actionCollection()->addAction( "launch_pavucontrol" );
-            action->setText( i18n( "Audio setup (&Pulseaudio)" ) );
-            connect(action, SIGNAL(triggered(bool) ), SLOT( slotPavucontrolExec() \
)); +            allDynamic = false;
             break;
         }
     }
 
-    if (! isPulseAudio )
+    if (! allDynamic )
     {
        QPixmap cornerNewPM = KIconLoader::global()->loadIcon( "tab-new", \
KIconLoader::Toolbar, KIconLoader::SizeSmall );  QPushButton* _cornerLabelNew = new \
QPushButton(); @@ -700,8 +699,7 @@
         m_wsMixers->removeTab(idx);
         delete kmw;
 
-        bool isPulseAudio =  kmw->mixer()->getDriverName() == "PulseAudio";
-        m_wsMixers->setTabsClosable(!isPulseAudio && m_wsMixers->count() > 1);
+        m_wsMixers->setTabsClosable(!kmw->mixer()->dynamic() && m_wsMixers->count() \
> 1);  
         saveViewConfig();
     }
@@ -902,8 +900,7 @@
             m_wsMixers->setCurrentWidget(kmw);
         }
 
-        bool isPulseAudio =  mixer->getDriverName() == "PulseAudio";
-        m_wsMixers->setTabsClosable(!isPulseAudio && m_wsMixers->count() > 1);
+        m_wsMixers->setTabsClosable(!mixer->dynamic() && m_wsMixers->count() > 1);
         m_dontSetDefaultCardOnStart = false;
 
 
@@ -1091,12 +1088,6 @@
     KMessageBox::information( 0, m_hwInfoString, i18n("Mixer Hardware Information") \
);  }
 
-void KMixWindow::slotPavucontrolExec()
-{
-    QStringList args("pavucontrol");
-    forkExec(args);
-}
-
 void KMixWindow::slotKdeAudioSetupExec()
 {
     QStringList args;
--- trunk/KDE/kdemultimedia/kmix/apps/kmix.h #1226948:1226949
@@ -136,7 +136,6 @@
   private slots:
    void saveConfig();
    void slotHWInfo();
-   void slotPavucontrolExec();
    void slotKdeAudioSetupExec();
    void slotConfigureCurrentView();
    void slotSelectMaster();
--- trunk/KDE/kdemultimedia/kmix/kmixui.rc #1226948:1226949
@@ -17,7 +17,6 @@
      <Action name="toggle_channels_currentview" append="save_merge"/>
      <Action name="select_master" append="save_merge"/>
      <Action name="launch_kdesoundsetup" append="save_merge"/>     
-     <Action name="launch_pavucontrol" append="save_merge"/>
  </Menu>
  <Menu name="help" append="about_merge"><text>&amp;Help</text>
   <Action name="hwinfo"/>


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

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