From: unknown Date: Thu, 26 Mar 2009 14:39:46 +0000 (+0100) Subject: - More verbose file marking X-Git-Url: https://gitweb.aptx.org/?a=commitdiff_plain;h=70a153e0c3d1d69baab80a411f7b4652b7fdc1b5;p=aniplayer-old.git - More verbose file marking --- diff --git a/src/videowindow.cpp b/src/videowindow.cpp index 110ce38..8abbda3 100644 --- a/src/videowindow.cpp +++ b/src/videowindow.cpp @@ -558,6 +558,8 @@ void VideoWindow::markWatched() menu->showMessage("File already Marked"); return; } + menu->showMessage("Hashing file"); + connect(addCommand, SIGNAL(hashComplete()), this, SLOT(doMarkWatched())); addCommand->setMarkWatched(true); qDebug() << "hashing file..."; @@ -571,9 +573,26 @@ void VideoWindow::doMarkWatched() if (!cmd) return; - connect(cmd, SIGNAL(replyReady()), cmd, SLOT(deleteLater())); + connect(cmd, SIGNAL(replyReady(bool)), this, SLOT(showMarkResult(bool))); anidb->send(cmd); + menu->showMessage(tr("Marking file %1").arg(cmd->file())); +} + +void VideoWindow::showMarkResult(bool success) +{ + MylistAddCommand *cmd = qobject_cast(sender()); + if (!cmd) + return; + if (success) + { + menu->showMessage(tr("File %1 marked watched").arg(cmd->file())); + } + else + { + menu->showMessage(tr("Failed to mark file %1").arg(cmd->file())); + } + cmd->deleteLater(); } void VideoWindow::anidbSettings() diff --git a/src/videowindow.h b/src/videowindow.h index 0361346..7eedfbb 100644 --- a/src/videowindow.h +++ b/src/videowindow.h @@ -110,6 +110,7 @@ private slots: void markWatched(); void doMarkWatched(); + void showMarkResult(bool success); void anidbSettings();