Commit 3822f254 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

ProjectManager: Remove clean state from projectUpdated signal

parent 17ec00d6
......@@ -772,12 +772,21 @@ MainWindow::closeEvent( QCloseEvent* e )
}
void
MainWindow::projectUpdated( const QString& projectName, bool savedStatus )
MainWindow::projectUpdated( const QString& projectName )
{
QString title = tr( "VideoLAN Movie Creator" );
title += " - ";
title += projectName;
if ( savedStatus == false )
setWindowTitle( title );
}
void
MainWindow::cleanStateChanged( bool isClean )
{
QString title = windowTitle();
if ( isClean == true )
title.replace(" *", "");
else
title += " *";
setWindowTitle( title );
}
......
......@@ -155,7 +155,8 @@ private slots:
void on_actionCrash_triggered();
void on_actionImport_triggered();
void toolButtonClicked( QAction *action );
void projectUpdated( const QString& projectName, bool savedStatus );
void projectUpdated(const QString& projectName);
void cleanStateChanged( bool isClean );
void canUndoChanged( bool canUndo );
void canRedoChanged( bool canRedo );
......
......@@ -122,15 +122,9 @@ void
ProjectManager::loadWorkflow()
{
QDomElement root = m_domDocument->documentElement();
bool savedState;
Project::getInstance()->workflow()->loadProject( root );
loadTimeline( root );
if ( m_projectFile != NULL )
savedState = true;
else
savedState = false;
emit projectUpdated( projectName(), savedState );
emit projectLoaded( projectName(), m_projectFile->fileName() );
delete m_domDocument;
......@@ -228,7 +222,7 @@ ProjectManager::saveAs()
if ( fileName.isEmpty() )
return ;
saveProject( fileName );
emit projectUpdated( projectName(), true );
emit projectUpdated( projectName() );
}
bool
......@@ -280,14 +274,14 @@ void
ProjectManager::cleanChanged( bool val )
{
m_needSave = !val;
emit projectUpdated( projectName(), val );
emit projectUpdated( projectName() );
}
void
ProjectManager::projectNameChanged( const QVariant& name )
{
m_projectName = name.toString();
emit projectUpdated( m_projectName, !m_needSave );
emit projectUpdated( m_projectName );
}
void
......@@ -405,7 +399,7 @@ ProjectManager::closeProject()
m_projectName = QString();
//This one is for the mainwindow, to update the title bar
Project::getInstance()->undoStack()->clear();
emit projectUpdated( projectName(), true );
emit projectUpdated( projectName() );
return true;
}
......
......@@ -162,7 +162,7 @@ signals:
* - The clean state has changed
* - The revision (if activated) has changed
*/
void projectUpdated( const QString& projectName, bool savedState );
void projectUpdated( const QString& projectName );
/**
* \brief Used to signal that the project has been saved.
......
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