diff -urNad kopete-3.5.4+kopete0.12.2/kopete/plugins/nowlistening/Makefile.am kopete-3.5.4+kopete0.12.2.new/kopete/plugins/nowlistening/Makefile.am --- kopete-3.5.4+kopete0.12.2/kopete/plugins/nowlistening/Makefile.am 2006-08-12 02:50:43.000000000 +0200 +++ kopete-3.5.4+kopete0.12.2.new/kopete/plugins/nowlistening/Makefile.am 2006-08-15 22:21:31.000000000 +0200 @@ -5,8 +5,8 @@ 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 -urNad kopete-3.5.4+kopete0.12.2/kopete/plugins/nowlistening/nlxmms.cpp kopete-3.5.4+kopete0.12.2.new/kopete/plugins/nowlistening/nlxmms.cpp --- kopete-3.5.4+kopete0.12.2/kopete/plugins/nowlistening/nlxmms.cpp 2006-08-12 02:50:43.000000000 +0200 +++ kopete-3.5.4+kopete0.12.2.new/kopete/plugins/nowlistening/nlxmms.cpp 2006-08-15 22:23:29.000000000 +0200 @@ -24,6 +24,7 @@ #ifdef HAVE_XMMS +#include #include #include // 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 -urNad kopete-3.5.4+kopete0.12.2/kopete/plugins/nowlistening/nlxmms.h kopete-3.5.4+kopete0.12.2.new/kopete/plugins/nowlistening/nlxmms.h --- kopete-3.5.4+kopete0.12.2/kopete/plugins/nowlistening/nlxmms.h 2006-08-12 02:50:43.000000000 +0200 +++ kopete-3.5.4+kopete0.12.2.new/kopete/plugins/nowlistening/nlxmms.h 2006-08-15 22:22:05.000000000 +0200 @@ -31,7 +31,11 @@ { public: NLXmms(); + ~NLXmms(); virtual void update(); + + private: + void *xmmslib; }; #endif