[SCM] Amarok packaging branch, master, updated. debian/2.8.0-2
Modestas Vainius
modax at alioth.debian.org
Mon Nov 4 21:53:58 UTC 2013
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/amarok.git;a=commitdiff;h=e635c9c
The following commit has been merged in the master branch:
commit e635c9cc44ffc74d9410099b0aa684651584d1ad
Author: Modestas Vainius <modax at debian.org>
Date: Mon Nov 4 21:43:17 2013 +0200
Disallow Spectrum Analyzer applet with VLC backend
Patch (backport): backport_dont_allow_analyzer_with_vlc.diff
(Closes: #725893)
---
debian/changelog | 2 +
.../backport_dont_allow_analyzer_with_vlc.diff | 165 ++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 168 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 997645a..7f0923e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,8 @@ amarok (2.8.0-2) UNRELEASED; urgency=low
* Backport a fix for a crash on shuffle keyboard shortcut (Closes: #725895)
Patch: backport_dont_crash_on_shuffle_keyb_shortcut.diff
* Bump Standards-Version to 3.9.5: no further changes needed.
+ * Disallow Spectrum Analyzer applet with VLC backend (Closes: #725893)
+ Patch (backport): backport_dont_allow_analyzer_with_vlc.diff
-- Modestas Vainius <modax at debian.org> Sun, 18 Aug 2013 21:10:04 +0300
diff --git a/debian/patches/backport_dont_allow_analyzer_with_vlc.diff b/debian/patches/backport_dont_allow_analyzer_with_vlc.diff
new file mode 100644
index 0000000..d6c72eb
--- /dev/null
+++ b/debian/patches/backport_dont_allow_analyzer_with_vlc.diff
@@ -0,0 +1,165 @@
+From: Mark Kretschmann <kretschmann at kde.org>
+Subject: Don't allow adding Analyzer applet when not supported.
+Origin: backport, commit:2b87fb43c550e946acfb47b3c5b217a07fcefa0c
+Date: Thu Aug 22 16:47:30 2013 +0200
+Bug: https://bugs.kde.org/show_bug.cgi?id=323119
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=725893
+
+Also now shows an error message explaining why it can't be used.
+
+--- a/src/EngineController.cpp
++++ b/src/EngineController.cpp
+@@ -926,6 +926,13 @@ bool EngineController::supportsGainAdjus
+ return m_preamp;
+ }
+
++bool EngineController::supportsAudioDataOutput() const
++{
++ const Phonon::AudioDataOutput out;
++ return out.isValid();
++}
++
++
+ //////////////////////////////////////////////////////////////////////////////////////////
+ // PRIVATE SLOTS
+ //////////////////////////////////////////////////////////////////////////////////////////
+--- a/src/EngineController.h
++++ b/src/EngineController.h
+@@ -313,6 +313,11 @@ public slots:
+ */
+ bool supportsGainAdjustments() const;
+
++ /**
++ * Return true if the current Phonon backend supports visualizations.
++ */
++ bool supportsAudioDataOutput() const;
++
+ Q_SIGNALS:
+ /**
+ * Emitted when the playback stops while playing a track.
+--- a/src/context/Containment.h
++++ b/src/context/Containment.h
+@@ -51,7 +51,7 @@ public:
+ public slots:
+ void showApplet( Plasma::Applet* ) {}
+ void moveApplet( Plasma::Applet*, int, int ) {}
+- virtual Applet* addApplet( const QString& pluginName, const int ) { Q_UNUSED( pluginName ); return 0; }
++ virtual void addApplet( const QString& pluginName, const int ) = 0;
+ };
+
+ } // Context namespace
+--- a/src/context/ContextView.cpp
++++ b/src/context/ContextView.cpp
+@@ -36,6 +36,7 @@
+ #include "core/support/Amarok.h"
+ #include "core/support/Debug.h"
+ #include "core/meta/Meta.h"
++#include "EngineController.h"
+
+ #include <plasma/dataenginemanager.h>
+
+@@ -221,12 +222,8 @@ ContextView::loadConfig()
+ const bool firstTimeWithAnalyzer = Amarok::config( "Context View" ).readEntry( "firstTimeWithAnalyzer", true );
+ if( firstTimeWithAnalyzer )
+ {
+- // Check if the Phonon backend implements all features required by the analyzer
+- Phonon::AudioDataOutput out;
+- const bool phononCanHandleAnalyzer = out.isValid();
+-
+ QStringList plugins = cg.readEntry( "plugins", QStringList() );
+- if( phononCanHandleAnalyzer && !plugins.contains( "analyzer" ) )
++ if( EngineController::instance()->supportsAudioDataOutput() && !plugins.contains( "analyzer" ) )
+ {
+ Amarok::config( "Context View" ).writeEntry( "firstTimeWithAnalyzer", false );
+
+@@ -244,20 +241,6 @@ ContextView::loadConfig()
+ PERF_LOG( "Done loading config" );
+ }
+
+-Plasma::Applet*
+-ContextView::addApplet( const QString& name, const QStringList& args )
+-{
+- QVariantList argList;
+- QStringListIterator i(args);
+- while( i.hasNext() )
+- argList << QVariant( i.next() );
+-
+- if( !containment() )
+- contextScene()->addContainment( "amarok_containment_vertical" );
+-
+- return containment()->addApplet( name, argList );
+-}
+-
+ void
+ ContextView::addCollapseAnimation( QAbstractAnimation *anim )
+ {
+--- a/src/context/ContextView.h
++++ b/src/context/ContextView.h
+@@ -98,11 +98,6 @@ public:
+
+ public slots:
+ /**
+- * Add the applet with the given plugin name to the context view. Will add in default position, which is at
+- * the end of the applet list.
+- */
+- Plasma::Applet* addApplet(const QString& name, const QStringList& args = QStringList());
+- /**
+ * Convenience methods to show and hide the applet explorer.
+ */
+ void hideAppletExplorer();
+--- a/src/context/containments/verticallayout/VerticalToolbarContainment.cpp
++++ b/src/context/containments/verticallayout/VerticalToolbarContainment.cpp
+@@ -19,7 +19,10 @@
+ #include "VerticalToolbarContainment.h"
+
+ #include "ContextView.h"
++#include "core/interfaces/Logger.h"
++#include "core/support/Components.h"
+ #include "core/support/Debug.h"
++#include "EngineController.h"
+ #include "PaletteHandler.h"
+ #include "VerticalAppletLayout.h"
+
+@@ -136,19 +139,25 @@ Context::VerticalToolbarContainment::upd
+ m_applets->refresh();
+ }
+
+-Plasma::Applet*
++void
+ Context::VerticalToolbarContainment::addApplet( const QString& pluginName, const int loc ) // SLOT
+ {
+ DEBUG_BLOCK
+
++ if( pluginName == "analyzer" && !EngineController::instance()->supportsAudioDataOutput() )
++ {
++ Amarok::Components::logger()->longMessage( i18n( "Error: Visualizations are not supported by your current Phonon backend." ),
++ Amarok::Logger::Error ) ;
++
++ return;
++ }
++
+ Plasma::Applet* applet = Plasma::Containment::addApplet( pluginName );
+
+ Q_ASSERT_X( applet, "addApplet", "FAILED ADDING APPLET TO CONTAINMENT!! NOT FOUND!!" );
+
+ m_applets->addApplet( applet, loc );
+- applet->setFlag(QGraphicsItem::ItemIsMovable, false);
+-
+- return applet;
++ applet->setFlag( QGraphicsItem::ItemIsMovable, false );
+ }
+
+ void
+--- a/src/context/containments/verticallayout/VerticalToolbarContainment.h
++++ b/src/context/containments/verticallayout/VerticalToolbarContainment.h
+@@ -48,8 +48,8 @@ class VerticalToolbarContainment : publi
+ virtual ContextView *view();
+
+ public slots:
+- Applet* addApplet( const QString& pluginName, const int );
+- void appletRemoved( Plasma::Applet* );
++ void addApplet( const QString& pluginName, const int );
++ void appletRemoved( Plasma::Applet* );
+ // these slots below are forwarded to the layout
+ void showApplet( Plasma::Applet* );
+ void moveApplet( Plasma::Applet*, int, int );
diff --git a/debian/patches/series b/debian/patches/series
index 4fc40eb..3b702c1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,6 @@
backport_dont_add_analyzer_when_not_supported.diff
backport_dont_crash_on_shuffle_keyb_shortcut.diff
+backport_dont_allow_analyzer_with_vlc.diff
debian_disable_qtscriptbindings_check_fix.diff
debian_mysqle_amarok_local_errmsg_feature.diff
debian_mysqle_force_defaults_file.diff
--
Amarok packaging
More information about the pkg-kde-commits
mailing list