rpms/kdemultimedia/F-11 kmix-pulse.patch, 1.2, 1.3 kdemultimedia.spec, 1.155, 1.156 kdemultimedia-4.4.4-kmix-pulse.patch, 1.1, NONE

Rex Dieter rdieter at fedoraproject.org
Wed Jun 16 14:26:46 UTC 2010


Author: rdieter

Update of /cvs/pkgs/rpms/kdemultimedia/F-11
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv12297

Modified Files:
	kdemultimedia.spec 
Added Files:
	kmix-pulse.patch 
Removed Files:
	kdemultimedia-4.4.4-kmix-pulse.patch 
Log Message:
* Tue Jun 15 2010 Rex Dieter <rdieter at fedoraproject.org> - 6:4.4.4-2
- refresh kmix-pulse.patch, Fix UTF8 encoding issue with kmix/PulseAudio (#595247)


kmix-pulse.patch:
 CMakeLists.txt              |    1 
 KMixApp.cpp                 |   14 
 dialogviewconfiguration.cpp |    9 
 kmix-platforms.cpp          |    8 
 kmix.cpp                    |   53 +
 kmix.h                      |    1 
 kmixerwidget.cpp            |    2 
 kmixerwidget.h              |    1 
 kmixprefdlg.h               |    2 
 main.cpp                    |    1 
 mdwmoveaction.cpp           |   48 +
 mdwmoveaction.h             |   46 +
 mdwslider.cpp               |  158 ++---
 mdwslider.h                 |   14 
 mixdevice.cpp               |  105 ++-
 mixdevice.h                 |   15 
 mixdevicewidget.cpp         |    1 
 mixdevicewidget.h           |    2 
 mixer.cpp                   |   27 
 mixer.h                     |    9 
 mixer_alsa9.cpp             |    4 
 mixer_backend.cpp           |   17 
 mixer_backend.h             |    6 
 mixer_pulse.cpp             | 1337 +++++++++++++++++++++++++++++++++++++-------
 mixer_pulse.h               |   63 +-
 verticaltext.cpp            |    7 
 verticaltext.h              |    1 
 viewbase.cpp                |   72 ++
 viewbase.h                  |    7 
 viewdockareapopup.cpp       |   51 +
 viewdockareapopup.h         |    3 
 viewsliders.cpp             |   18 
 viewsliders.h               |    4 
 33 files changed, 1766 insertions(+), 341 deletions(-)

View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.2 -r 1.3 kmix-pulse.patchIndex: kmix-pulse.patch
===================================================================
RCS file: kmix-pulse.patch
diff -N kmix-pulse.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ kmix-pulse.patch	16 Jun 2010 14:26:46 -0000	1.3
@@ -0,0 +1,2986 @@
+diff --git a/kmix/CMakeLists.txt b/kmix/CMakeLists.txt
+index 4880470..6578b3a 100644
+--- a/kmix/CMakeLists.txt
++++ b/kmix/CMakeLists.txt
+@@ -18,6 +18,7 @@ set(kmix_KDEINIT_SRCS ${kmix_adaptor_SRCS}
+    viewdockareapopup.cpp 
+    viewsliders.cpp 
+    mixdevicewidget.cpp 
++   mdwmoveaction.cpp
+    mdwslider.cpp 
+    mdwenum.cpp 
+    kmixerwidget.cpp 
+diff --git a/kmix/KMixApp.cpp b/kmix/KMixApp.cpp
+index a5cf1d5..43ec696 100644
+--- a/kmix/KMixApp.cpp
++++ b/kmix/KMixApp.cpp
+@@ -51,7 +51,8 @@ KMixApp::newInstance()
+         // There are 3 cases for a new instance
+ 
+ 	//kDebug(67100) <<  "KMixApp::newInstance() isRestored()=" << isRestored() << "_keepVisibility=" << _keepVisibility;
+-	if ( m_kmix )
++	static bool first = true;
++	if ( !first )
+ 	{	// There already exists an instance/window
+  
+                 /* !!! @bug : _keepVisibilty has the wrong value here.
+@@ -74,7 +75,11 @@ KMixApp::newInstance()
+                         // starts it again, the KMix main window will be shown.
+ 			// If KMix is restored by SM or the --keepvisibilty is used, KMix will NOT
+ 			// explicitly be shown.
+-			m_kmix->show();
++			if ( !m_kmix ) {
++				m_kmix->show();
++			} else {
++				kWarning(67100) << "KMixApp::newInstance() Window has not finished constructing yet so ignoring the show() request.";
++			}
+ 		}
+ 		else {
+                         // CASE 2: If KMix is running, AND  ( session gets restored OR keepvisibilty command line switch )
+@@ -92,6 +97,11 @@ KMixApp::newInstance()
+ 	{
+                 // CASE 3: KMix was not running yet => instanciate a new one
+ 		//kDebug(67100) <<  "KMixApp::newInstance() Instanciate: _keepVisibility=" << _keepVisibility ;
++		first = false;	// NB See https://qa.mandriva.com/show_bug.cgi?id=56893#c3
++				// It is important to track this via a separate variable and not
++				// based on m_kmix to handle this race condition.
++				// Specific protection for the activation-prior-to-full-construction
++				// case exists above in the 'already running case'
+ 		m_kmix = new KMixWindow(_keepVisibility);
+ 		//connect(this, SIGNAL(stopUpdatesOnVisibility()), m_kmix, SLOT(stopVisibilityUpdates()));
+ 		if ( isSessionRestored() && KMainWindow::canBeRestored(0) )
+diff --git a/kmix/dialogviewconfiguration.cpp b/kmix/dialogviewconfiguration.cpp
+index dddf4ec..3ff40cc 100644
+--- a/kmix/dialogviewconfiguration.cpp
++++ b/kmix/dialogviewconfiguration.cpp
+@@ -264,10 +264,10 @@ void DialogViewConfiguration::createPage()
+ 
+             //qDebug()  << "add DialogViewConfigurationItem: " << mdName << " visible=" << mdw->isVisible() << "splitted=" << splitted;
+             if ( mdw->isVisible() ) {
+-              new DialogViewConfigurationItem(_qlw, md->id(), mdw->isVisible(), mdName, splitted, mdw->iconName());
++              new DialogViewConfigurationItem(_qlw, md->id(), mdw->isVisible(), mdName, splitted, mdw->mixDevice()->iconName());
+             }
+             else {
+-              new DialogViewConfigurationItem(_qlwInactive, md->id(), mdw->isVisible(), mdName, splitted, mdw->iconName());
++              new DialogViewConfigurationItem(_qlwInactive, md->id(), mdw->isVisible(), mdName, splitted, mdw->mixDevice()->iconName());
+             }
+ 
+ /*
+@@ -326,19 +326,22 @@ void DialogViewConfiguration::apply()
+    prepareControls(model, false, oldControlset, newControlset);
+ 
+ 	// --- Step 2: Copy controls
++	QString tabName = "Base";
+ 	oldControlset.clear();
+ 	std::vector<ProfControl*>::const_iterator itEnd = newControlset.end();
+ 	for ( std::vector<ProfControl*>::const_iterator it = newControlset.begin(); it != itEnd; ++it)
+ 	{
+ 	  ProfControl* control = *it;
+ 	  control->id = "^" + control->id + "$";   // Create a regexp from the control name
++	  if ( ! control->tab.isEmpty() )
++	      tabName = control->tab;
+ 	  kDebug() << "Add control " << control->id;
+           oldControlset.push_back(control);
+ 	}
+ 	ProfControl* fallbackMatchAllControl = new ProfControl;
+ 	fallbackMatchAllControl->id   = "^.*$";
+ 	fallbackMatchAllControl->subcontrols  = ".*";
+-	fallbackMatchAllControl->tab  = "Base";
++	fallbackMatchAllControl->tab  = tabName;
+ 	fallbackMatchAllControl->show = "extended";
+ 	oldControlset.push_back(fallbackMatchAllControl);
+ 	
+diff --git a/kmix/kmix-platforms.cpp b/kmix/kmix-platforms.cpp
+index f7b8c9a..5f61989 100644
+--- a/kmix/kmix-platforms.cpp
++++ b/kmix/kmix-platforms.cpp
+@@ -129,6 +129,10 @@ MixerFactory g_mixerFactories[] = {
+     { IRIX_getMixer, IRIX_getDriverName },
+ #endif
+ 
++#if defined(PULSE_MIXER)
++    { PULSE_getMixer, PULSE_getDriverName },
++#endif
++
+ #if defined(ALSA_MIXER)
+     { ALSA_getMixer, ALSA_getDriverName },
+ #endif
+@@ -145,10 +149,6 @@ MixerFactory g_mixerFactories[] = {
+     { HPUX_getMixer, HPUX_getDriverName },
+ #endif
+ 
+-#if defined(PULSE_MIXER)
+-    { PULSE_getMixer, PULSE_getDriverName },
+-#endif
+-
+     { 0, 0 }
+ };
+ 
+diff --git a/kmix/kmix.cpp b/kmix/kmix.cpp
+index 30cc5d4..37a9066 100644
+--- a/kmix/kmix.cpp
++++ b/kmix/kmix.cpp
+@@ -49,6 +49,7 @@
+ #include <ktoggleaction.h>
+ 
+ // KMix
++#include "guiprofile.h"
+ #include "mixertoolbox.h"
+ #include "kmix.h"
+ #include "kmixdevicemanager.h"
+@@ -399,11 +400,30 @@ void KMixWindow::recreateGUIwithoutSavingView()
+  */
+ void KMixWindow::recreateGUI(bool saveConfig)
+ {
++   // Find out which of the tabs is currently selected for restoration
++   int current_tab = -1;
++   if (m_wsMixers)
++      current_tab = m_wsMixers->currentIndex();
++
++   // NOTE (coling) This is a bug but I don't have time to find the source.
++   // When returning from "Configure Mixers..." we MUST save, but the
++   // flag comes through as false, presumably due to the rebuildGUI() signal
++   // being tied to the recreateGUIwithoutSavingView() slot.
++   // This should really be fixed :s
++   Q_UNUSED(saveConfig);
+    saveViewConfig();  // save the state before recreating
++
++   // Before clearing the mixer widgets, we must increase the refcount on the guiprof to save it deleting the ViewBase object.
++   if ( Mixer::mixers().count() > 0 )
++      for (int i=0; i<Mixer::mixers().count(); ++i)
++         MixerToolBox::instance()->selectProfile((Mixer::mixers())[i])->increaseRefcount();
+    clearMixerWidgets();
++
+    if ( Mixer::mixers().count() > 0 ) {
+       for (int i=0; i<Mixer::mixers().count(); ++i) {
+          Mixer *mixer = (Mixer::mixers())[i];
++         // We've increased the refcount before clearing, so remember and decrease it again.
++         MixerToolBox::instance()->selectProfile(mixer)->decreaseRefcount();
+          addMixerWidget(mixer->id());
+       }
+       bool dockingSucceded = updateDocking();
+@@ -415,6 +435,39 @@ void KMixWindow::recreateGUI(bool saveConfig)
+        updateDocking();  // -<- removes the DockIcon
+        hide();
+    }
++
++   if (current_tab >= 0) {
++      m_wsMixers->setCurrentIndex(current_tab);
++   }
++}
++
++
++/**
++* Create or recreate the Mixer GUI elements
++*/
++void KMixWindow::redrawMixer( const QString& mixer_ID )
++{
++    for ( int i=0; i<m_wsMixers->count() ; ++i )
++    {
++        QWidget *w = m_wsMixers->widget(i);
++        if ( w->inherits("KMixerWidget") )
++        {
++            KMixerWidget* kmw = (KMixerWidget*)w;
++            if ( kmw->mixer()->id() == mixer_ID )
++            {
++                kDebug(67100) << "KMixWindow::redrawMixer() " << mixer_ID << " is being redrawn";
++                kmw->loadConfig( KGlobal::config().data() );
++
++                // Is the below needed? It is done on startup so copied it here...
++                kmw->setTicks( m_showTicks );
++                kmw->setLabels( m_showLabels );
++
++                return;
[...2593 lines suppressed...]
+    virtual void configureView(); 
+    void toggleMenuBarSlot();
+diff --git a/kmix/viewdockareapopup.cpp b/kmix/viewdockareapopup.cpp
+index 57ac597..f050800 100644
+--- a/kmix/viewdockareapopup.cpp
++++ b/kmix/viewdockareapopup.cpp
+@@ -46,7 +46,7 @@
+ //    Users will not be able to close the Popup without opening the KMix main window then.
+ //    See Bug #93443, #96332 and #96404 for further details. -- esken
+ ViewDockAreaPopup::ViewDockAreaPopup(QWidget* parent, const char* name, Mixer* mixer, ViewBase::ViewFlags vflags, GUIProfile *guiprof, KMixWindow *dockW )
+-    : ViewBase(parent, name, mixer, /*Qt::FramelessWindowHint | Qt::MSWindowsFixedSizeDialogHint*/0, vflags, guiprof), _mdw(0), _dock(dockW)
++    : ViewBase(parent, name, mixer, /*Qt::FramelessWindowHint | Qt::MSWindowsFixedSizeDialogHint*/0, vflags, guiprof), _dock(dockW)
+ {
+     _layoutMDW = new QGridLayout( this );
+     _layoutMDW->setSpacing( KDialog::spacingHint() );
+@@ -63,14 +63,23 @@ ViewDockAreaPopup::~ViewDockAreaPopup() {
+ 
+ void ViewDockAreaPopup::wheelEvent ( QWheelEvent * e ) {
+    // Pass wheel event from "border widget" to child
+-   if ( _mdw != 0 ) {
+-      QApplication::sendEvent( _mdw, e);
+-   }
++   QWidget* mdw = 0;
++   if ( !_mdws.isEmpty() )
++      mdw = _mdws.first();
++
++   if ( mdw != 0 )
++      QApplication::sendEvent( mdw, e);
+ }
+ 
+ MixDevice* ViewDockAreaPopup::dockDevice()
+ {
+-    return _mdw->mixDevice();
++   MixDeviceWidget* mdw = 0;
++   if ( !_mdws.isEmpty() )
++      mdw = (MixDeviceWidget*)_mdws.first();
++
++   if ( mdw != 0 )
++      return mdw->mixDevice();
++   return (MixDevice*)(0);
+ }
+ 
+ 
+@@ -81,9 +90,18 @@ void ViewDockAreaPopup::showContextMenu()
+ }
+ 
+ 
+-void ViewDockAreaPopup::setMixSet()
++void ViewDockAreaPopup::_setMixSet()
+ {
+    // kDebug(67100) << "ViewDockAreaPopup::setMixSet()\n";
++
++   if ( _mixer->dynamic() ) {
++      // 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;
++      while ( ( li = _layoutMDW->takeAt(0) ) )
++         delete li;
++   }
++
+    MixDevice *dockMD = Mixer::getGlobalMasterMD();
+    if ( dockMD == 0 ) {
+       // If we have no dock device yet, we will take the first available mixer device
+@@ -98,7 +116,7 @@ void ViewDockAreaPopup::setMixSet()
+ 
+ QWidget* ViewDockAreaPopup::add(MixDevice *md)
+ {
+-   _mdw = new MDWSlider(
++    MixDeviceWidget *mdw = new MDWSlider(
+       md,		  // only 1 device. This is actually _dockDevice
+       true,         // Show Mute LED
+       false,        // Show Record LED
+@@ -109,7 +127,7 @@ QWidget* ViewDockAreaPopup::add(MixDevice *md)
+    );
+    _layoutMDW->addItem( new QSpacerItem( 5, 20 ), 0, 2 );
+    _layoutMDW->addItem( new QSpacerItem( 5, 20 ), 0, 0 );
+-   _layoutMDW->addWidget( _mdw, 0, 1 );
++   _layoutMDW->addWidget( mdw, 0, 1 );
+ 
+    // Add button to show main panel
+    _showPanelBox = new QPushButton( i18n("Mixer"), this );
+@@ -117,21 +135,28 @@ QWidget* ViewDockAreaPopup::add(MixDevice *md)
+    connect ( _showPanelBox, SIGNAL( clicked() ), SLOT( showPanelSlot() ) );
+    _layoutMDW->addWidget( _showPanelBox, 1, 0, 1, 3 );
+ 
+-   return _mdw;
++   return mdw;
+ }
+ 
+ void ViewDockAreaPopup::constructionFinished() {
+    //    kDebug(67100) << "ViewDockAreaPopup::constructionFinished()\n";
+-   if (_mdw != 0) {
+-      _mdw->move(0,0);
+-      _mdw->show();
++   QWidget* mdw = 0;
++   if ( !_mdws.isEmpty() )
++      mdw = _mdws.first();
++
++   if ( mdw != 0 ) {
++      mdw->move(0,0);
++      mdw->show();
+    }
+ }
+ 
+ 
+ void ViewDockAreaPopup::refreshVolumeLevels() {
+    //    kDebug(67100) << "ViewDockAreaPopup::refreshVolumeLevels()\n";
+-   QWidget* mdw = _mdws.first();
++   QWidget* mdw = 0;
++   if ( !_mdws.isEmpty() )
++      mdw = _mdws.first();
++
+    if ( mdw == 0 ) {
+       kError(67100) << "ViewDockAreaPopup::refreshVolumeLevels(): mdw == 0\n";
+       // sanity check (normally the lists are set up correctly)
+diff --git a/kmix/viewdockareapopup.h b/kmix/viewdockareapopup.h
+index f289dd6..68f1b22 100644
+--- a/kmix/viewdockareapopup.h
++++ b/kmix/viewdockareapopup.h
+@@ -43,7 +43,6 @@ public:
+     ~ViewDockAreaPopup();
+     MixDevice* dockDevice();
+ 
+-    virtual void setMixSet();
+     virtual QWidget* add(MixDevice *mdw);
+     virtual void constructionFinished();
+     virtual void refreshVolumeLevels();
+@@ -52,12 +51,12 @@ public:
+     //QSize sizeHint() const;
+ 
+ protected:
+-    MixDeviceWidget *_mdw;
+     KMixWindow  *_dock;
+     //MixDevice       *_dockDevice;
+     QPushButton     *_showPanelBox;
+ 
+     void wheelEvent ( QWheelEvent * e );
++    virtual void _setMixSet();
+ 
+ private:
+     QGridLayout* _layoutMDW;
+diff --git a/kmix/viewsliders.cpp b/kmix/viewsliders.cpp
+index fa2246c..a43ceef 100644
+--- a/kmix/viewsliders.cpp
++++ b/kmix/viewsliders.cpp
+@@ -119,10 +119,20 @@ QWidget* ViewSliders::add(MixDevice *md)
+ }
+ 
+ 
+-void ViewSliders::setMixSet()
++void ViewSliders::_setMixSet()
+ {
+-    const MixSet& mixset = _mixer->getMixSet();
+-
++   const MixSet& mixset = _mixer->getMixSet();
++
++   if ( _mixer->dynamic() ) {
++      // We will be recreating our sliders, so make sure we trash all the separators too.
++      qDeleteAll(_separators);
++      _separators.clear();
++      // Our _layoutSliders now should only contain spacer widgets from the addSpacing() calls in add() above.
++      // We need to trash those too otherwise all sliders gradually migrate away from the edge :p
++      QLayoutItem *li;
++      while ( ( li = _layoutSliders->takeAt(0) ) )
++         delete li;
++   }
+ 
+    // This method iterates the controls from the Profile
+    // Each control is checked, whether it is also contained in the mixset, and
+@@ -135,7 +145,7 @@ void ViewSliders::setMixSet()
+       if ( control->tab == id() ) {
+          // The TabName of the control matches this View name (!! attention: Better use some ID, due to i18n() )
+          bool isUsed = false;
+-   
++
+          QRegExp idRegexp(control->id);
+          //kDebug(67100) << "ViewSliders::setMixSet(): Check GUIProfile id==" << control->id << "\n";
+          // The following for-loop could be simplified by using a std::find_if
+diff --git a/kmix/viewsliders.h b/kmix/viewsliders.h
+index 1695595..9f7ce32 100644
+--- a/kmix/viewsliders.h
++++ b/kmix/viewsliders.h
+@@ -36,7 +36,6 @@ public:
+     ViewSliders(QWidget* parent, const char* name, Mixer* mixer, ViewBase::ViewFlags vflags, GUIProfile *guiprof, KActionCollection *actColl);
+     ~ViewSliders();
+ 
+-    virtual void setMixSet();
+     virtual QWidget* add(MixDevice *mdw);
+     virtual void constructionFinished();
+     virtual void configurationUpdate();
+@@ -44,6 +43,9 @@ public:
+ public slots:
+     virtual void refreshVolumeLevels();
+ 
++protected:
++    virtual void _setMixSet();
++
+ private:
+     QBoxLayout* _layoutMDW;
+     QLayout* _layoutSliders;


Index: kdemultimedia.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kdemultimedia/F-11/kdemultimedia.spec,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -p -r1.155 -r1.156
--- kdemultimedia.spec	10 Jun 2010 00:00:43 -0000	1.155
+++ kdemultimedia.spec	16 Jun 2010 14:26:46 -0000	1.156
@@ -2,7 +2,7 @@
 Name:    kdemultimedia
 Epoch:   6
 Version: 4.4.4
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: KDE Multimedia applications
 
 Group:   Applications/Multimedia
@@ -19,7 +19,7 @@ Patch2: kdemultimedia-4.3.75-kscd_doc.pa
 # git checkout -t origin/pulse
 # git diff master..pulse > kmix_pa-<date>.patch
 # See also, http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/kdemultimedia4/current/SOURCES/kmix-pulse.patch
-Patch3: kdemultimedia-4.4.4-kmix-pulse.patch
+Patch3: kmix-pulse.patch
 
 ## upstream patches
 
@@ -189,6 +189,9 @@ fi
 
 
 %changelog
+* Tue Jun 15 2010 Rex Dieter <rdieter at fedoraproject.org> - 6:4.4.4-2
+- refresh kmix-pulse.patch, Fix UTF8 encoding issue with kmix/PulseAudio (#595247)
+
 * Sun May 30 2010 Than Ngo <than at redhat.com> - 6:4.4.4-1
 - 4.4.4
 


--- kdemultimedia-4.4.4-kmix-pulse.patch DELETED ---



More information about the scm-commits mailing list