diff options
author | root <root@rshg054.dnsready.net> | 2012-01-03 23:14:43 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-01-03 23:14:43 +0000 |
commit | d1d68784dc66793601c239fa64cc0e02ebd9444e (patch) | |
tree | 15179b96ec3e632fad3cc528115d83c0fe47e5bd /kde-unstable | |
parent | 48c96871761a4aad193d814e87ddb87c322e17d2 (diff) |
Tue Jan 3 23:14:42 UTC 2012
Diffstat (limited to 'kde-unstable')
-rw-r--r-- | kde-unstable/kdemultimedia/PKGBUILD | 13 | ||||
-rw-r--r-- | kde-unstable/kdemultimedia/fix-kmix-high-cpu.patch | 195 |
2 files changed, 204 insertions, 4 deletions
diff --git a/kde-unstable/kdemultimedia/PKGBUILD b/kde-unstable/kdemultimedia/PKGBUILD index 579464504..bfa567b89 100644 --- a/kde-unstable/kdemultimedia/PKGBUILD +++ b/kde-unstable/kdemultimedia/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 145540 2011-12-22 23:11:51Z andrea $ +# $Id: PKGBUILD 145819 2012-01-02 11:17:44Z andrea $ # Maintainer: Andrea Scarpino <andrea@archlinux.org> # Contributor: Pierre Schmitz <pierre@archlinux.de> @@ -11,7 +11,7 @@ pkgname=('kdemultimedia-dragonplayer' 'kdemultimedia-kscd' 'kdemultimedia-mplayerthumbs') pkgver=4.7.95 -pkgrel=1 +pkgrel=2 arch=('i686' 'x86_64') url='http://www.kde.org' license=('GPL' 'LGPL' 'FDL') @@ -19,11 +19,16 @@ groups=('kde' 'kdemultimedia') makedepends=('cmake' 'automoc4' 'kdelibs' 'tunepimp' 'ffmpeg' 'mplayer' 'pulseaudio' 'libmusicbrainz3') source=("http://download.kde.org/unstable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2" - 'mplayerthumbs.config') + 'mplayerthumbs.config' + 'fix-kmix-high-cpu.patch') sha1sums=('8c56f7bcbfd012492f97a3a827f97d07b7b6b390' - 'ba016fa2563c14ffcba852c62506b66bfc6ee683') + 'ba016fa2563c14ffcba852c62506b66bfc6ee683' + 'd993b72004378aee84de3d410e9b25f91aa88138') build() { + cd "${srcdir}"/${pkgbase}-${pkgver} + patch -p0 -i "${srcdir}"/fix-kmix-high-cpu.patch + cd ${srcdir} mkdir build cd build diff --git a/kde-unstable/kdemultimedia/fix-kmix-high-cpu.patch b/kde-unstable/kdemultimedia/fix-kmix-high-cpu.patch new file mode 100644 index 000000000..8ff32e866 --- /dev/null +++ b/kde-unstable/kdemultimedia/fix-kmix-high-cpu.patch @@ -0,0 +1,195 @@ +Index: kmix/gui/mdwslider.h +=================================================================== +--- kmix/gui/mdwslider.h (revision 1270927) ++++ kmix/gui/mdwslider.h (revision 1270928) +@@ -56,7 +56,7 @@ + bool includePlayback, bool includeCapture, + bool small, Qt::Orientation, + QWidget* parent, ViewBase* view, ProfControl *pctl); +- ~MDWSlider() { } ++ virtual ~MDWSlider(); + + enum LabelType { LT_ALL, LT_FIRST_CAPTURE, LT_NONE }; + void addActionToPopup( KAction *action ); +Index: kmix/gui/viewbase.cpp +=================================================================== +--- kmix/gui/viewbase.cpp (revision 1270927) ++++ kmix/gui/viewbase.cpp (revision 1270928) +@@ -128,13 +128,14 @@ + // allow view to "polish" itself + constructionFinished(); + +- kDebug() << "CONNECT ViewBase count " << _mixers.size(); +- foreach ( Mixer* mixer, _mixers ) +- { +- kDebug(67100) << "CONNECT ViewBase controlschanged" << mixer->id(); +- connect ( mixer, SIGNAL(controlChanged()), this, SLOT(refreshVolumeLevels()) ); +- connect ( mixer, SIGNAL(controlsReconfigured(QString)), this, SLOT(controlsReconfigured(QString)) ); +- } ++// Moved the following up one Level to KMixerWidget ++// kDebug() << "CONNECT ViewBase count " << _mixers.size(); ++// foreach ( Mixer* mixer, _mixers ) ++// { ++// kDebug(67100) << "CONNECT ViewBase controlschanged" << mixer->id(); ++// connect ( mixer, SIGNAL(controlChanged()), this, SLOT(refreshVolumeLevels()) ); ++// connect ( mixer, SIGNAL(controlsReconfigured(QString)), this, SLOT(controlsReconfigured(QString)) ); ++// } + + + } +@@ -217,10 +218,6 @@ + setMixSet(); + kDebug(67100) << "ViewBase::controlsReconfigured() " << mixer_ID << ": Recreating widgets (mixset contains: " << _mixSet->count() << ")"; + createDeviceWidgets(); +- +- // We've done the low level stuff our selves but let elements +- // above know what has happened so they can reload config etc. +- emit redrawMixer(mixer_ID); + } + } + +Index: kmix/gui/kmixerwidget.h +=================================================================== +--- kmix/gui/kmixerwidget.h (revision 1270927) ++++ kmix/gui/kmixerwidget.h (revision 1270928) +@@ -75,6 +75,10 @@ + void saveConfig( KConfig *config ); + void loadConfig( KConfig *config ); + ++ private slots: ++ void controlsReconfiguredToplevel(QString mixerId); ++ void refreshVolumeLevelsToplevel(); ++ + private: + Mixer *_mixer; + QVBoxLayout *m_topLayout; // contains TabWidget +@@ -82,6 +86,7 @@ + ProfTab* _tab; + std::vector<ViewBase*> _views; + KActionCollection* _actionCollection; // -<- applciations wide action collection ++ QWidget* _mainWindow; + + + void createLayout(ViewBase::ViewFlags vflags); +Index: kmix/gui/mixdevicewidget.h +=================================================================== +--- kmix/gui/mixdevicewidget.h (revision 1270927) ++++ kmix/gui/mixdevicewidget.h (revision 1270928) +@@ -47,7 +47,7 @@ + MixDeviceWidget( MixDevice* md, + bool small, Qt::Orientation orientation, + QWidget* parent, ViewBase*, ProfControl * ); +- ~MixDeviceWidget(); ++ virtual ~MixDeviceWidget(); + + void addActionToPopup( KAction *action ); + +Index: kmix/gui/mdwslider.cpp +=================================================================== +--- kmix/gui/mdwslider.cpp (revision 1270927) ++++ kmix/gui/mdwslider.cpp (revision 1270928) +@@ -81,6 +81,17 @@ + update(); + } + ++MDWSlider::~MDWSlider() ++{ ++ foreach( QAbstractSlider* slider, m_slidersPlayback) ++ { ++ delete slider; ++ } ++ foreach( QAbstractSlider* slider, m_slidersCapture) ++ { ++ delete slider; ++ } ++} + + void MDWSlider::createActions() + { +Index: kmix/gui/kmixerwidget.cpp +=================================================================== +--- kmix/gui/kmixerwidget.cpp (revision 1270927) ++++ kmix/gui/kmixerwidget.cpp (revision 1270928) +@@ -37,6 +37,7 @@ + #include <ktabwidget.h> + + // KMix ++#include "apps/kmix.h" + #include "gui/guiprofile.h" + #include "gui/kmixerwidget.h" + #include "gui/kmixtoolbox.h" +@@ -58,6 +59,8 @@ + m_topLayout(0), _guiprof(guiprof), + _actionCollection(actionCollection) + { ++ _mainWindow = parent; ++ //kDebug() << "kmixWindow created: parent=" << parent << ", parentWidget()=" << parentWidget(); + if ( _mixer ) + { + createLayout(vflags); +@@ -169,13 +172,42 @@ + connect( vbase, SIGNAL(toggleMenuBar()), parentWidget(), SLOT(toggleMenuBar()) ); + // *this will be deleted on rebuildGUI(), so lets queue the signal + connect( vbase, SIGNAL(rebuildGUI()) , parentWidget(), SLOT(recreateGUIwithSavingView()), Qt::QueuedConnection ); +- connect( vbase, SIGNAL(redrawMixer(QString)), parentWidget(), SLOT(redrawMixer(QString)), Qt::QueuedConnection ); ++ //connect( vbase, SIGNAL(redrawMixer(QString)), parentWidget(), SLOT(redrawMixer(QString)), Qt::QueuedConnection ); ++ ++ kDebug() << "CONNECT ViewBase count " << vbase->getMixers().size(); ++ foreach ( Mixer* mixer, vbase->getMixers() ) ++ { ++ kDebug(67100) << "CONNECT ViewBase controlschanged" << mixer->id(); ++ connect ( mixer, SIGNAL(controlChanged()), this, SLOT(refreshVolumeLevelsToplevel()) ); ++ connect ( mixer, SIGNAL(controlsReconfigured(QString)), this, SLOT(controlsReconfiguredToplevel(QString)) ); ++ } + return true; + } + } + ++void KMixerWidget::controlsReconfiguredToplevel(QString mixerId) ++{ ++ foreach ( ViewBase* vbase, _views) ++ { ++ vbase->controlsReconfigured(mixerId); ++ } ++ KMixWindow* kmixWindow = qobject_cast<KMixWindow*>(_mainWindow); ++ kDebug() << "kmixWindow to redraw: " << kmixWindow << ", not-casted=" << _mainWindow; ++ if (kmixWindow != 0) ++ { ++ kmixWindow->redrawMixer(mixerId); ++ } ++} + ++void KMixerWidget::refreshVolumeLevelsToplevel() ++{ ++ foreach ( ViewBase* vbase, _views) ++ { ++ vbase->refreshVolumeLevels(); ++ } ++} + ++ + /** + * Returns the current View. Normally we have only one View, so we always return the first view. + * This method is only here for one reason: We can plug in an action in the main menu, so that +Index: kmix/gui/viewbase.h +=================================================================== +--- kmix/gui/viewbase.h (revision 1270927) ++++ kmix/gui/viewbase.h (revision 1270928) +@@ -114,6 +114,8 @@ + GUIProfile* guiProfile() { return _guiprof; }; + KActionCollection* actionCollection() { return _actions; }; + ++ QSet<Mixer*>& getMixers() { return _mixers; }; ++ + /** + * Contains the widgets for the _mixSet. There is a 1:1 relationship, which means: + * _mdws[i] is the Widget for the MixDevice _mixSet[i] - please see ViewBase::createDeviceWidgets(). +@@ -124,7 +126,7 @@ + + signals: + void rebuildGUI(); +- void redrawMixer( const QString& mixer_ID ); ++ //void redrawMixer( const QString& mixer_ID ); + + + protected: |