Some fixes for UI status handling.

This commit is contained in:
LoRd_MuldeR 2014-01-28 02:16:12 +01:00
parent 1f41a535d4
commit 014a9bee57
2 changed files with 13 additions and 2 deletions

View File

@ -26,7 +26,7 @@
#define VER_X264_MAJOR 2
#define VER_X264_MINOR 3
#define VER_X264_PATCH 0
#define VER_X264_BUILD 732
#define VER_X264_BUILD 733
#define VER_X264_MINIMUM_REV 2363
#define VER_X264_CURRENT_API 140

View File

@ -986,6 +986,7 @@ void MainWindow::handleCommand(const int &command, const QStringList &args)
if((m_status != STATUS_IDLE) && (m_status != STATUS_AWAITING))
{
qWarning("Cannot accapt commands at this time -> discarding!");
return;
}
x264_bring_to_front(this);
@ -1211,6 +1212,12 @@ void MainWindow::dragEnterEvent(QDragEnterEvent *event)
*/
void MainWindow::dropEvent(QDropEvent *event)
{
if((m_status != STATUS_IDLE) && (m_status != STATUS_AWAITING))
{
qWarning("Cannot accept drooped files at this time -> discarding!");
return;
}
QStringList droppedFiles;
QList<QUrl> urls = event->mimeData()->urls();
@ -1229,8 +1236,12 @@ void MainWindow::dropEvent(QDropEvent *event)
{
m_pendingFiles->append(droppedFiles);
m_pendingFiles->sort();
if(m_status != STATUS_AWAITING)
{
m_status = STATUS_AWAITING;
QTimer::singleShot(0, this, SLOT(handlePendingFiles()));
}
}
}
///////////////////////////////////////////////////////////////////////////////