]> git.sur5r.net Git - minitube/blobdiff - src/mainwindow.cpp
--stop-after-this cli switch
[minitube] / src / mainwindow.cpp
index 3392ff2cf04c6fcebc5308444283c4c0cd04a79b..acd5c174f4765b56849daf96d8d5abbb79c66e3c 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()) {