]> git.sur5r.net Git - minitube/blobdiff - src/mainwindow.cpp
Imported Upstream version 2.2
[minitube] / src / mainwindow.cpp
index 3392ff2cf04c6fcebc5308444283c4c0cd04a79b..df6426171805e241c1376b1723d72cc948b48f86 100644 (file)
@@ -1484,6 +1484,8 @@ void MainWindow::dragEnterEvent(QDragEnterEvent *event) {
 }
 
 void MainWindow::dropEvent(QDropEvent *event) {
+    if (!toolbarSearch->isEnabled()) return;
+
     QList<QUrl> urls = event->mimeData()->urls();
     if (urls.isEmpty())
         return;
@@ -1582,6 +1584,8 @@ void MainWindow::messageReceived(const QString &message) {
         if (skipAct->isEnabled()) skipAct->trigger();
     } else if (message == QLatin1String("--previous")) {
         if (skipBackwardAct->isEnabled()) skipBackwardAct->trigger();
+    } else if (message == QLatin1String("--stop-after-this")) {
+        The::globalActions()->value("stopafterthis")->toggle();
     }  else if (message.startsWith("--")) {
         MainWindow::printHelp();
     } else if (!message.isEmpty()) {
@@ -1609,6 +1613,8 @@ void MainWindow::printHelp() {
     msg += "Skip to the next video.\n";
     msg += "  --previous\t\t";
     msg += "Go back to the previous video.\n";
+    msg += "  --stop-after-this\t";
+    msg += "Stop playback at the end of the video.\n";
     std::cout << msg.toLocal8Bit().data();
 }