From: Flavio Date: Fri, 18 Jul 2014 21:08:45 +0000 (+0200) Subject: --stop-after-this cli switch X-Git-Tag: 2.2~8 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d3c8f2abaf46bc0996a32eff8168f3b2071c7983;p=minitube --stop-after-this cli switch --- diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 3392ff2..acd5c17 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1484,6 +1484,8 @@ void MainWindow::dragEnterEvent(QDragEnterEvent *event) { } void MainWindow::dropEvent(QDropEvent *event) { + if (!toolbarSearch->isEnabled()) return; + QList 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()) {