diff options
author | Robert Xu <robxu9@gmail.com> | 2011-11-10 18:04:39 -0500 |
---|---|---|
committer | Robert Xu <robxu9@gmail.com> | 2011-11-10 18:04:39 -0500 |
commit | 21fcfa3348213aa87f0e3aef62ca4720c6d31cb7 (patch) | |
tree | 2cfb64c59322628e613ed0895e3c3694d3abe6bd /opensuse/core/tdebase/libkonq-kdemm.diff | |
parent | 8667643bff14a60d8571c599efd3e48bed3e3b12 (diff) | |
download | tde-packaging-21fcfa3348213aa87f0e3aef62ca4720c6d31cb7.tar.gz tde-packaging-21fcfa3348213aa87f0e3aef62ca4720c6d31cb7.zip |
initial commit to suse branch: eclipse integration
Diffstat (limited to 'opensuse/core/tdebase/libkonq-kdemm.diff')
-rw-r--r-- | opensuse/core/tdebase/libkonq-kdemm.diff | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/opensuse/core/tdebase/libkonq-kdemm.diff b/opensuse/core/tdebase/libkonq-kdemm.diff new file mode 100644 index 000000000..6eb45eab4 --- /dev/null +++ b/opensuse/core/tdebase/libkonq-kdemm.diff @@ -0,0 +1,117 @@ +Index: libkonq/Makefile.am +=================================================================== +--- libkonq/Makefile.am.orig ++++ libkonq/Makefile.am +@@ -53,14 +53,10 @@ include_HEADERS = konq_popupmenu.h knewm + konq_faviconmgr.h konq_xmlguiclient.h konqbookmarkmanager.h konq_filetip.h + + +-if include_ARTS +-ARTS_MODULE = konq_sound.la +-endif +- +-kde_module_LTLIBRARIES = $(ARTS_MODULE) ++kde_module_LTLIBRARIES = konq_sound.la + konq_sound_la_SOURCES = konq_sound.cc + konq_sound_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) +-konq_sound_la_LIBADD = -lsoundserver_idl -lartskde ++konq_sound_la_LIBADD = -lkdemm + + noinst_HEADERS = konq_sound.h + +Index: libkonq/konq_sound.cc +=================================================================== +--- libkonq/konq_sound.cc.orig ++++ libkonq/konq_sound.cc +@@ -16,10 +16,9 @@ + Boston, MA 02110-1301, USA. + */ + +-#include <kartsdispatcher.h> + #include <kdebug.h> +-#include <kplayobjectfactory.h> +-#include <soundserver.h> ++#include <kdemm/simpleplayer.h> ++#include <kdemm/factory.h> + + #include "konq_sound.h" + +@@ -39,71 +38,38 @@ public: + private: + QStringList m_mimeTypes; + +- KArtsDispatcher m_dispatcher; +- Arts::SoundServerV2 m_soundServer; +- KDE::PlayObjectFactory *m_factory; +- KDE::PlayObject *m_player; ++ KDE::Multimedia::SimplePlayer m_player; + }; + + KonqSoundPlayerImpl::KonqSoundPlayerImpl() +- : m_player(0) + { +- m_soundServer = Arts::Reference("global:Arts_SoundServerV2"); +- m_factory = new KDE::PlayObjectFactory(m_soundServer); + } + + KonqSoundPlayerImpl::~KonqSoundPlayerImpl() + { +- delete m_player; +- delete m_factory; + } + + const QStringList &KonqSoundPlayerImpl::mimeTypes() + { +- if (m_mimeTypes.isEmpty()) +- { +- Arts::TraderQuery query; +- vector<Arts::TraderOffer> *offers = query.query(); +- +- for (vector<Arts::TraderOffer>::iterator it = offers->begin(); +- it != offers->end(); ++it) +- { +- vector<string> *prop = (*it).getProperty("MimeType"); +- for (vector<string>::iterator mt = prop->begin(); +- mt != prop->end(); ++mt) +- if ((*mt).length()) // && (*mt).find("video/") == string::npos) +- m_mimeTypes << (*mt).c_str(); +- delete prop; +- } +- delete offers; +- } ++ if( m_mimeTypes.isEmpty() ) ++ m_mimeTypes = KDE::Multimedia::Factory::self()->playableMimeTypes(); ++ + return m_mimeTypes; + } + + void KonqSoundPlayerImpl::play(const QString &fileName) + { +- if (m_soundServer.isNull()) +- return; +- +- delete m_player; +- if ((m_player = m_factory->createPlayObject(fileName, true))) +- { +- if (m_player->isNull()) +- stop(); +- else +- m_player->play(); +- } ++ m_player.play( KURL( fileName ) ); + } + + void KonqSoundPlayerImpl::stop() + { +- delete m_player; +- m_player = 0; ++ m_player.stop(); + } + + bool KonqSoundPlayerImpl::isPlaying() + { +- return m_player ? (m_player->state() == Arts::posPlaying) : false; ++ return m_player.isPlaying(); + } + + class KonqSoundFactory : public KLibFactory |