Commit 9d3d8fda authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Workspace: Use the new notification zone.

parent 5153faba
......@@ -31,6 +31,7 @@
#include <QtDebug>
#ifdef WITH_GUI
# include "NotificationZone.h"
# include <QMessageBox>
#endif
......@@ -39,6 +40,10 @@ const QString Workspace::workspacePrefix = "workspace://";
Workspace::Workspace() : m_copyInProgress( false )
{
m_mediasToCopyMutex = new QMutex;
#ifdef WITH_GUI
connect( this, SIGNAL( notify( QString ) ),
NotificationZone::getInstance(), SLOT( notify( QString ) ) );
#endif
}
Workspace::~Workspace()
......@@ -115,6 +120,8 @@ Workspace::clipLoaded( Clip *clip )
void
Workspace::copyTerminated( Media *media, QString dest )
{
emit notify( tr( "Workspace: " ) + media->fileInfo()->fileName() + tr( " copied to " ) + dest );
media->setFilePath( dest );
media->disconnect( this );
......@@ -177,7 +184,6 @@ Workspace::copyAllToWorkspace()
QMutexLocker lock( m_mediasToCopyMutex );
while ( it != ite )
{
qDebug() << "Enqueuing:" << it.value()->getMedia();
m_mediasToCopy.enqueue( it.value()->getMedia() );
++it;
}
......
......@@ -64,6 +64,9 @@ class Workspace : public QObject, public Singleton<Workspace>, public ErrorHandl
private slots:
void copyTerminated( Media* media, QString dest );
signals:
void notify( QString );
friend class Singleton<Workspace>;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment