Commit 2a0c82c9 authored by Frerich Raabe's avatar Frerich Raabe

- Print some progress messages in the status bar so that I can see it's

  actually doing something.

svn path=/trunk/kdemultimedia/juk/; revision=224635
parent b3f576d7
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "musicbrainzquery.h" #include "musicbrainzquery.h"
#include <kprocess.h> #include <kprocess.h>
#include <klocale.h>
#include <kdeversion.h> #include <kdeversion.h>
#include <kdebug.h> #include <kdebug.h>
...@@ -61,11 +62,12 @@ void MusicBrainzQuery::start() ...@@ -61,11 +62,12 @@ void MusicBrainzQuery::start()
connect(process, SIGNAL(processExited(KProcess *)), connect(process, SIGNAL(processExited(KProcess *)),
SLOT(slotTrmGenerationFinished(KProcess *))); SLOT(slotTrmGenerationFinished(KProcess *)));
emit signalStatusMsg( i18n( "Generating TRM signature..." ) );
bool started = process->start(KProcess::NotifyOnExit, KProcess::AllOutput); bool started = process->start(KProcess::NotifyOnExit, KProcess::AllOutput);
if(!started) { if(!started) {
kdDebug(65432) << "trm utility could not be started." << endl; kdDebug(65432) << "trm utility could not be started." << endl;
emit signalDone(); emit signalDone();
} }
} }
else else
QTimer::singleShot(0, this, SLOT(slotQuery())); QTimer::singleShot(0, this, SLOT(slotQuery()));
...@@ -82,6 +84,8 @@ void MusicBrainzQuery::slotQuery() ...@@ -82,6 +84,8 @@ void MusicBrainzQuery::slotQuery()
queryStrings(queryString, resultString, extractString); queryStrings(queryString, resultString, extractString);
emit signalStatusMsg( i18n( "Querying MusicBrainz server..." ) );
// UseUTF8(false); // UseUTF8(false);
SetDepth(4); SetDepth(4);
......
...@@ -103,6 +103,7 @@ public: ...@@ -103,6 +103,7 @@ public:
void start(); void start();
signals: signals:
void signalStatusMsg(const QString &msg);
void signalDone(const MusicBrainzQuery::AlbumList & = AlbumList()); void signalDone(const MusicBrainzQuery::AlbumList & = AlbumList());
void signalDone(const MusicBrainzQuery::TrackList &); void signalDone(const MusicBrainzQuery::TrackList &);
......
...@@ -15,7 +15,11 @@ ...@@ -15,7 +15,11 @@
* * * *
***************************************************************************/ ***************************************************************************/
#include <kstatusbar.h>
#include <kmainwindow.h>
#include <klocale.h>
#include <kdebug.h> #include <kdebug.h>
#include <kapplication.h>
#include "tagguesser.h" #include "tagguesser.h"
#include "playlistitem.h" #include "playlistitem.h"
...@@ -101,6 +105,9 @@ void PlaylistItem::guessTagInfoFromInternet() ...@@ -101,6 +105,9 @@ void PlaylistItem::guessTagInfoFromInternet()
tag()->absFilePath()); tag()->absFilePath());
connect(query, SIGNAL(signalDone(const MusicBrainzQuery::TrackList &)), connect(query, SIGNAL(signalDone(const MusicBrainzQuery::TrackList &)),
SLOT(slotTagGuessResults(const MusicBrainzQuery::TrackList &))); SLOT(slotTagGuessResults(const MusicBrainzQuery::TrackList &)));
KMainWindow *win = static_cast<KMainWindow *>(kapp->mainWidget());
connect(query, SIGNAL(signalStatusMsg(const QString &)),
win->statusBar(), SLOT(message(const QString &)));
query->start(); query->start();
#endif //add message box teeling users musicbrainz is not installed or keep it quiet? #endif //add message box teeling users musicbrainz is not installed or keep it quiet?
} }
...@@ -310,6 +317,9 @@ void PlaylistItem::slotTagGuessResults(const MusicBrainzQuery::TrackList &res) ...@@ -310,6 +317,9 @@ void PlaylistItem::slotTagGuessResults(const MusicBrainzQuery::TrackList &res)
tag()->save(); tag()->save();
slotRefresh(); slotRefresh();
KMainWindow *win = static_cast<KMainWindow *>(kapp->mainWidget());
win->statusBar()->message(i18n("Done."), 2000);
#else #else
Q_UNUSED(res) Q_UNUSED(res)
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment