summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/nowlistening
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-13 06:26:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-13 06:26:27 +0000
commit9fab5b8a216e283e563f3457315715672bc8b55a (patch)
treec1251952e4e0e28fad0bca829d49335ff15b6e98 /kopete/plugins/nowlistening
parentbcb704366cb5e333a626c18c308c7e0448a8e69f (diff)
downloadtdenetwork-9fab5b8a216e283e563f3457315715672bc8b55a.tar.gz
tdenetwork-9fab5b8a216e283e563f3457315715672bc8b55a.zip
Update to Trinity 3.5.11
Will need to watch for commit warnings and rebuild test git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1061808 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/plugins/nowlistening')
-rw-r--r--kopete/plugins/nowlistening/Makefile.am4
-rw-r--r--kopete/plugins/nowlistening/nlxmms.cpp11
-rw-r--r--kopete/plugins/nowlistening/nlxmms.h4
3 files changed, 16 insertions, 3 deletions
diff --git a/kopete/plugins/nowlistening/Makefile.am b/kopete/plugins/nowlistening/Makefile.am
index a9357d5f..dbbeec1a 100644
--- a/kopete/plugins/nowlistening/Makefile.am
+++ b/kopete/plugins/nowlistening/Makefile.am
@@ -5,8 +5,8 @@ AM_CPPFLAGS = $(KOPETE_INCLUDES) $(XMMS_INCLUDES) $(all_includes)
kde_module_LTLIBRARIES = kopete_nowlistening.la kcm_kopete_nowlistening.la
kopete_nowlistening_la_SOURCES = nowlisteningconfig.kcfgc nowlisteningplugin.cpp nlkscd.cpp nlnoatun.cpp nlxmms.cpp nowlisteningguiclient.cpp nljuk.cpp nlamarok.cpp nlkaffeine.cpp
-kopete_nowlistening_la_LDFLAGS = -module $(KDE_PLUGIN) $(XMMS_LDFLAGS) $(all_libraries)
-kopete_nowlistening_la_LIBADD = ../../libkopete/libkopete.la $(XMMS_LIBS)
+kopete_nowlistening_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries)
+kopete_nowlistening_la_LIBADD = ../../libkopete/libkopete.la
kcm_kopete_nowlistening_la_SOURCES = nowlisteningprefs.ui nowlisteningpreferences.cpp nowlisteningconfig.kcfgc
kcm_kopete_nowlistening_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) $(all_libraries)
diff --git a/kopete/plugins/nowlistening/nlxmms.cpp b/kopete/plugins/nowlistening/nlxmms.cpp
index f0a9f47a..a2d3637d 100644
--- a/kopete/plugins/nowlistening/nlxmms.cpp
+++ b/kopete/plugins/nowlistening/nlxmms.cpp
@@ -24,6 +24,7 @@
#ifdef HAVE_XMMS
+#include <dlfcn.h>
#include <kdebug.h>
#include <xmmsctrl.h> // need to fix Makefile.am for this?
#include "nlmediaplayer.h"
@@ -32,13 +33,21 @@
NLXmms::NLXmms() : NLMediaPlayer()
{
m_name = "Xmms";
+
+ xmmslib = dlopen("libxmms.so.1", RTLD_LAZY | RTLD_GLOBAL);
}
+NLXmms::~NLXmms()
+{
+ if (xmmslib)
+ dlclose(xmmslib);
+}
void NLXmms::update()
{
//look for running xmms
- if ( xmms_remote_get_version( 0 ) )
+ if ( xmmslib &&
+ xmms_remote_get_version( 0 ) )
{
QString newTrack;
// see if it's playing
diff --git a/kopete/plugins/nowlistening/nlxmms.h b/kopete/plugins/nowlistening/nlxmms.h
index 14c74ea8..d64fc08f 100644
--- a/kopete/plugins/nowlistening/nlxmms.h
+++ b/kopete/plugins/nowlistening/nlxmms.h
@@ -31,7 +31,11 @@ class NLXmms : public NLMediaPlayer
{
public:
NLXmms();
+ ~NLXmms();
virtual void update();
+
+ private:
+ void *xmmslib;
};
#endif