From 70a153e0c3d1d69baab80a411f7b4652b7fdc1b5 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 26 Mar 2009 15:39:46 +0100 Subject: [PATCH] - More verbose file marking --- src/videowindow.cpp | 21 ++++++++++++++++++++- src/videowindow.h | 1 + 2 files changed, 21 insertions(+), 1 deletion(-) 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(); -- 2.52.0