- Removed "large_cover_images" patch; included upstream - Removed "config_dialog_layout" patch; included upstream - Updated "fedora_paths" patch - Updated "start_amarok" patch - Updated "theme_howto" patch - Updated amarok integration script
66 lines
1.9 KiB
Diff
66 lines
1.9 KiB
Diff
diff -uNr amarokFS-0.5/amfs-xml.cpp amarokFS-0.5-mod/amfs-xml.cpp
|
|
--- amarokFS-0.5/amfs-xml.cpp 2007-03-19 14:35:38.000000000 +0200
|
|
+++ amarokFS-0.5-mod/amfs-xml.cpp 2007-03-29 10:26:05.000000000 +0200
|
|
@@ -16,6 +16,7 @@
|
|
#include <qmessagebox.h>
|
|
#include <qerrormessage.h>
|
|
#include <qregexp.h>
|
|
+#include <qprocess.h>
|
|
|
|
using namespace std;
|
|
|
|
@@ -23,7 +24,7 @@
|
|
AmfsXML::AmfsXML( QWidget* parent, const char* name, WFlags fl )
|
|
: QWidget( parent, name, fl ) {
|
|
|
|
-
|
|
+ startedAmarok = false;
|
|
progressBar = (QProgressBar *) 0;
|
|
cdcover = (QLabel *) 0;
|
|
gradient = (QLabel *) 0;
|
|
@@ -439,6 +440,20 @@
|
|
mouseTimer->start( 5000, TRUE );
|
|
|
|
setMouseTracking(TRUE);
|
|
+
|
|
+ //start Amarok (if necessary)
|
|
+ if (!dcopClient->isApplicationRegistered("amarok")) {
|
|
+ QProcess *amarokProc = new QProcess(QString("amarok"));
|
|
+ if (!amarokProc->launch(QString::null)) {
|
|
+ qDebug("error starting Amarok.");
|
|
+ } else {
|
|
+ while (!dcopClient->isApplicationRegistered("amarok"))
|
|
+ qApp->processEvents();
|
|
+ usleep(100);
|
|
+ startedAmarok = true;
|
|
+ }
|
|
+ delete amarokProc;
|
|
+ }
|
|
|
|
nowPlaying = "";
|
|
updateTrackLabels();
|
|
@@ -472,6 +487,11 @@
|
|
if(isSetDisScrSvr) restoreScreenSaver();
|
|
//restore OSD if it was disabled
|
|
if(isSetDisAmaOSD) restoreAmarokOSD();
|
|
+ //stop Amarok (if it was started by AmarokFS)
|
|
+ if (startedAmarok) {
|
|
+ if (!dcopClient->send("amarok", "MainApplication-Interface", "quit()", (QByteArray) 0))
|
|
+ qDebug("there was some error using DCOP.");
|
|
+ }
|
|
ce->accept();
|
|
return;
|
|
}
|
|
diff -uNr amarokFS-0.5/amfs-xml.h amarokFS-0.5-mod/amfs-xml.h
|
|
--- amarokFS-0.5/amfs-xml.h 2007-03-19 13:59:03.000000000 +0200
|
|
+++ amarokFS-0.5-mod/amfs-xml.h 2007-03-29 10:27:00.000000000 +0200
|
|
@@ -96,6 +96,9 @@
|
|
|
|
AmarokFS_config *configWindow;
|
|
|
|
+ //stores whether Amarok was started by AmarokFS (true) or by the user
|
|
+ bool startedAmarok;
|
|
+
|
|
|
|
private slots:
|
|
void updateTime();
|