]> Some of my projects - aniplayer-old.git/commitdiff
- More verbose file marking
authorunknown <APTX@.(none)>
Thu, 26 Mar 2009 14:39:46 +0000 (15:39 +0100)
committerunknown <APTX@.(none)>
Thu, 26 Mar 2009 14:39:46 +0000 (15:39 +0100)
src/videowindow.cpp
src/videowindow.h

index 110ce386e44f0fcb4214c28f112375af75ef90e4..8abbda308dcff88711f7ce3df95d6aef6148e769 100644 (file)
@@ -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<MylistAddCommand *>(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()
index 0361346b28ac5aa09ac571a5e30bb02154899717..7eedfbb096b79797d05dc180940f02a095077fb6 100644 (file)
@@ -110,6 +110,7 @@ private slots:
 
        void markWatched();
        void doMarkWatched();
+       void showMarkResult(bool success);
 
        void anidbSettings();