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 @@
#include "musicbrainzquery.h"
#include <kprocess.h>
#include <klocale.h>
#include <kdeversion.h>
#include <kdebug.h>
......@@ -61,6 +62,7 @@ void MusicBrainzQuery::start()
connect(process, SIGNAL(processExited(KProcess *)),
SLOT(slotTrmGenerationFinished(KProcess *)));
emit signalStatusMsg( i18n( "Generating TRM signature..." ) );
bool started = process->start(KProcess::NotifyOnExit, KProcess::AllOutput);
if(!started) {
kdDebug(65432) << "trm utility could not be started." << endl;
......@@ -82,6 +84,8 @@ void MusicBrainzQuery::slotQuery()
queryStrings(queryString, resultString, extractString);
emit signalStatusMsg( i18n( "Querying MusicBrainz server..." ) );
// UseUTF8(false);
SetDepth(4);
......
......@@ -103,6 +103,7 @@ public:
void start();
signals:
void signalStatusMsg(const QString &msg);
void signalDone(const MusicBrainzQuery::AlbumList & = AlbumList());
void signalDone(const MusicBrainzQuery::TrackList &);
......
......@@ -15,7 +15,11 @@
* *
***************************************************************************/
#include <kstatusbar.h>
#include <kmainwindow.h>
#include <klocale.h>
#include <kdebug.h>
#include <kapplication.h>
#include "tagguesser.h"
#include "playlistitem.h"
......@@ -101,6 +105,9 @@ void PlaylistItem::guessTagInfoFromInternet()
tag()->absFilePath());
connect(query, SIGNAL(signalDone(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();
#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)
tag()->save();
slotRefresh();
KMainWindow *win = static_cast<KMainWindow *>(kapp->mainWidget());
win->statusBar()->message(i18n("Done."), 2000);
#else
Q_UNUSED(res)
#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