[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Traverso-commit] traverso src/core/Project.cpp src/core/Project....
From: |
Remon Sijrier |
Subject: |
[Traverso-commit] traverso src/core/Project.cpp src/core/Project.... |
Date: |
Tue, 26 Jun 2007 18:07:57 +0000 |
CVSROOT: /sources/traverso
Module name: traverso
Changes by: Remon Sijrier <r_sijrier> 07/06/26 18:07:57
Modified files:
src/core : Project.cpp Project.h ProjectManager.cpp
ProjectManager.h ReadSource.cpp Themer.cpp
Themer.h
src/engine : defines.h
src/traverso/dialogs/project: OpenProjectDialog.cpp
OpenProjectDialog.h
ProjectManagerDialog.cpp
src/traverso : Interface.cpp
src/traverso/songcanvas: songcanvas.pro
src/traverso/ui: ProjectManagerDialog.ui
. : TODO
Log message:
* Detect project file renaming outside of Traverso, and start
complaining!
* Implemented Project renaming
* some cleanups
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Project.cpp?cvsroot=traverso&r1=1.50&r2=1.51
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Project.h?cvsroot=traverso&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/ProjectManager.cpp?cvsroot=traverso&r1=1.34&r2=1.35
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/ProjectManager.h?cvsroot=traverso&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/ReadSource.cpp?cvsroot=traverso&r1=1.36&r2=1.37
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Themer.cpp?cvsroot=traverso&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/Themer.h?cvsroot=traverso&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/traverso/src/engine/defines.h?cvsroot=traverso&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/dialogs/project/OpenProjectDialog.cpp?cvsroot=traverso&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/dialogs/project/OpenProjectDialog.h?cvsroot=traverso&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/dialogs/project/ProjectManagerDialog.cpp?cvsroot=traverso&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/Interface.cpp?cvsroot=traverso&r1=1.92&r2=1.93
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/songcanvas.pro?cvsroot=traverso&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/ui/ProjectManagerDialog.ui?cvsroot=traverso&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/traverso/TODO?cvsroot=traverso&r1=1.9&r2=1.10
Patches:
Index: src/core/Project.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Project.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -b -r1.50 -r1.51
--- src/core/Project.cpp 25 Jun 2007 15:59:59 -0000 1.50
+++ src/core/Project.cpp 26 Jun 2007 18:07:56 -0000 1.51
@@ -50,15 +50,15 @@
#include "Debugger.h"
-Project::Project(const QString& pTitle)
- : ContextItem(), title(pTitle)
+Project::Project(const QString& title)
+ : ContextItem(), m_title(title)
{
PENTERCONS;
m_currentSongId = 0;
m_exportThread = 0;
engineer = "";
- rootDir = config().get_property("Project", "directory",
"/directory/unknown/").toString() + "/" + title;
+ rootDir = config().get_property("Project", "directory",
"/directory/unknown/").toString() + "/" + m_title;
sourcesDir = rootDir + "/audiosources";
m_rate = audiodevice().get_sample_rate();
m_bitDepth = audiodevice().get_bit_depth();
@@ -87,7 +87,7 @@
int Project::create(int songcount, int numtracks)
{
PENTER;
- PMESG("Creating new project %s NumSongs=%d", title.toAscii().data(),
songcount);
+ PMESG("Creating new project %s NumSongs=%d", m_title.toAscii().data(),
songcount);
QDir dir;
if (dir.mkdir(rootDir) < 0) {
@@ -119,7 +119,7 @@
m_id = create_id();
m_importDir = QDir::homePath();
- info().information(tr("Created new Project %1").arg(title));
+ info().information(tr("Created new Project %1").arg(m_title));
return 1;
}
@@ -143,7 +143,7 @@
{
file.close();
info().critical(tr("Project %1: Cannot open project.tpf file!
(%2)")
- .arg(title).arg(file.errorString()));
+ .arg(m_title).arg(file.errorString()));
QFile backup(filename + "~");
backup.copy(filename);
@@ -159,7 +159,7 @@
if (!doc.setContent(&file, &errorMsg))
{
info().critical(tr("Project %1: Failed to parse project.tpf
file! (%2)")
- .arg(title).arg(errorMsg));
+ .arg(m_title).arg(errorMsg));
file.remove();
file.close();
@@ -194,7 +194,7 @@
return -1;
}
- title = e.attribute( "title", "" );
+ m_title = e.attribute( "title", "" );
engineer = e.attribute( "engineer", "" );
m_description = e.attribute( "description", "No description set");
m_discid = e.attribute( "discId", "" );
@@ -240,7 +240,7 @@
set_current_song(id);
- info().information( tr("Project %1 loaded").arg(title) );
+ info().information( tr("Project %1 loaded").arg(m_title) );
return 1;
}
@@ -264,7 +264,7 @@
QTextStream stream(&data);
doc.save(stream, 4);
data.close();
- info().information( tr("Project %1 saved ").arg(title) );
+ info().information( tr("Project %1 saved ").arg(m_title) );
} else {
info().critical( tr("Couldn't open Project properties file for
writing! (%1)").arg(fileName) );
return -1;
@@ -281,7 +281,7 @@
QDomElement projectNode = doc.createElement("Project");
QDomElement properties = doc.createElement("Properties");
- properties.setAttribute("title", title);
+ properties.setAttribute("title", m_title);
properties.setAttribute("engineer", engineer);
properties.setAttribute("description", m_description);
properties.setAttribute("discId", m_discid );
@@ -325,9 +325,42 @@
}
-void Project::set_title(const QString& pTitle)
+void Project::set_title(const QString& title)
{
- title = pTitle;
+ if (title == m_title) {
+ // do nothing if the title is the same as the current one
+ return;
+ }
+
+ if (pm().project_exists(title)) {
+ info().critical(tr("Project with title '%1' allready exists,
not setting new title!").arg(title));
+ return;
+ }
+
+ QString newrootdir = config().get_property("Project", "directory",
"/directory/unknown/").toString() + "/" + title;
+
+ QDir dir(rootDir);
+
+ if ( ! dir.exists() ) {
+ info().critical(tr("Project directory %1 no longer exists, did
you rename it? "
+ "Shame on you! Please undo that, and come back
later to rename your Project...").arg(rootDir));
+ return;
+ }
+
+ m_title = title;
+
+ save();
+
+ if (pm().rename_project_dir(rootDir, newrootdir) < 0 ) {
+ return;
+ }
+
+ QMessageBox::information( 0,
+ tr("Traverso - Information"),
+ tr("Project title changed, Project will to be reloaded
to ensure proper operation"),
+ QMessageBox::Ok);
+
+ pm().load_renamed_project(m_title);
}
@@ -715,7 +748,7 @@
QString Project::get_title( ) const
{
- return title;
+ return m_title;
}
QString Project::get_engineer( ) const
Index: src/core/Project.h
===================================================================
RCS file: /sources/traverso/traverso/src/core/Project.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- src/core/Project.h 17 May 2007 21:38:15 -0000 1.22
+++ src/core/Project.h 26 Jun 2007 18:07:56 -0000 1.23
@@ -69,7 +69,7 @@
// Set functions
- void set_title(const QString& pTitle);
+ void set_title(const QString& title);
void set_engineer(const QString& pEngineer);
void set_description(const QString& des);
void set_discid(const QString& pId);
@@ -108,7 +108,7 @@
ResourcesManager* m_resourcesManager;
ExportThread* m_exportThread;
- QString title;
+ QString m_title;
QString rootDir;
QString sourcesDir;
QString engineer;
Index: src/core/ProjectManager.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/ProjectManager.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- src/core/ProjectManager.cpp 7 Jun 2007 04:38:23 -0000 1.34
+++ src/core/ProjectManager.cpp 26 Jun 2007 18:07:56 -0000 1.35
@@ -55,6 +55,7 @@
PENTERCONS;
currentProject = (Project*) 0;
m_exitInProgress = false;
+ m_renamingDir = false;
cpointer().add_contextitem(this);
}
@@ -194,6 +195,17 @@
return 1;
}
+int ProjectManager::load_renamed_project(const QString & name)
+{
+ Q_ASSERT(currentProject);
+
+ delete currentProject;
+ currentProject= 0;
+
+ return load_project(name);
+}
+
+
int ProjectManager::remove_project( const QString& name )
{
// check if we are removing the currentProject, and delete it before
removing its files
@@ -261,10 +273,6 @@
projects_path );
if (dir.exists(newPath)) {
info().information(tr("Using existing Project
directory: %1\n").arg(newPath));
- //QMessageBox::information( 0,
- // tr("Traverso - Information"),
- // tr("Using existing Project directory:
%1\n").arg(newPath),
- // "OK", 0 );
} else if (!dir.mkpath(newPath)) {
QMessageBox::warning( 0, tr("Traverso - Warning"),
tr("Unable to create Project directory!
\n") +
@@ -272,10 +280,6 @@
return;
} else {
info().information(tr("Created new Project directory
for you here: %1\n").arg(newPath));
- //QMessageBox::information( 0,
- // tr("Traverso - Information"),
- // tr("Created new Project directory for
you here: %1\n").arg(newPath),
- // "OK", 0 );
}
QDir newdir(newPath);
config().set_property("Project", "directory",
newdir.canonicalPath());
@@ -286,11 +290,12 @@
if (loadProjectAtStartUp || !(projectToLoad.isEmpty())) {
if (!projectToLoad.isEmpty()) {
int splitpoint = projectToLoad.lastIndexOf("/");
- QString dir = projectToLoad.left(splitpoint);
- int splitpoint2 = dir.lastIndexOf("/") + 1;
- projectToLoad = dir.right(splitpoint - splitpoint2);
- dir = dir.remove(projectToLoad);
- config().set_property("Project", "directory", dir);
+ QString dirpath = projectToLoad.left(splitpoint);
+ int splitpoint2 = dirpath.lastIndexOf("/") + 1;
+ projectToLoad = dirpath.right(splitpoint - splitpoint2);
+ dirpath = dir.remove(projectToLoad);
+ QDir dir(dirpath);
+ config().set_property("Project", "directory",
dir.canonicalPath());
} else {
projectToLoad = config().get_property("Project",
"current", "").toString();
}
@@ -301,6 +306,9 @@
if (project_exists(projectToLoad)) {
load_project(projectToLoad);
} else {
+ if (projectToLoad != "Untitled") {
+ info().critical(tr("Project %1 no longer could
be found! (Did you remove or rename the Project directory
?)").arg(projectToLoad));
+ } else {
Project* project;
if ( (project = create_new_project(1, 4, "Untitled")) )
{
project->set_description(tr("Default Project
created by Traverso"));
@@ -310,7 +318,7 @@
} else {
PWARN("Cannot create project Untitled.
Continuing anyway...");
}
-
+ }
}
} else {
set_current_project(0);
@@ -375,4 +383,27 @@
}
-//eof
+int ProjectManager::rename_project_dir(const QString & olddir, const QString &
newdir)
+{
+ m_renamingDir = true;
+
+ QDir dir(olddir);
+
+ if ( ! dir.rename(olddir, newdir)) {
+ info().critical(tr("Could not rename Project directory to
%1").arg(newdir));
+ return - 1;
+ }
+
+ return 1;
+}
+
+bool ProjectManager::renaming_directory_in_progress()
+{
+ if (m_renamingDir) {
+ m_renamingDir = false;
+ return true;
+ }
+
+ return false;
+}
+
Index: src/core/ProjectManager.h
===================================================================
RCS file: /sources/traverso/traverso/src/core/ProjectManager.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- src/core/ProjectManager.h 31 May 2007 13:56:41 -0000 1.14
+++ src/core/ProjectManager.h 26 Jun 2007 18:07:56 -0000 1.15
@@ -42,14 +42,18 @@
Project* create_new_project(const QString& templatefile, const QString&
projectName);
int load_project(const QString& projectName);
+ int load_renamed_project(const QString& name);
bool project_exists(const QString& title);
+ bool renaming_directory_in_progress();
int remove_project(const QString& title);
void scheduled_for_deletion(Song* song);
void delete_song(Song* song);
+ int rename_project_dir(const QString& olddir, const QString& newdir);
+
Project* get_project();
QUndoGroup* get_undogroup() const;
@@ -70,6 +74,7 @@
Project* currentProject;
QList<Song*> m_deletionSongList;
bool m_exitInProgress;
+ bool m_renamingDir;
bool clientRequestInProgress;
static QUndoGroup undogroup;
Index: src/core/ReadSource.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/ReadSource.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- src/core/ReadSource.cpp 5 Jun 2007 12:47:09 -0000 1.36
+++ src/core/ReadSource.cpp 26 Jun 2007 18:07:56 -0000 1.37
@@ -53,7 +53,8 @@
// and give it priority over the dir as given by the project.tpf file
// This makes it possible to move project directories without Traverso
being
// unable to find it's audiosources!
- if (QFile::exists(project->get_root_dir() + "/audiosources/" + m_name))
{
+ if ( QFile::exists(project->get_root_dir() + "/audiosources/" + m_name)
||
+ QFile::exists(project->get_root_dir() + "/audiosources/" + m_name
+ "-ch0.wav") ) {
set_dir(project->get_root_dir() + "/audiosources/");
}
Index: src/core/Themer.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/Themer.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- src/core/Themer.cpp 17 May 2007 23:29:39 -0000 1.4
+++ src/core/Themer.cpp 26 Jun 2007 18:07:56 -0000 1.5
@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-$Id: Themer.cpp,v 1.4 2007/05/17 23:29:39 r_sijrier Exp $
+$Id: Themer.cpp,v 1.5 2007/06/26 18:07:56 r_sijrier Exp $
*/
#include "Themer.h"
@@ -29,6 +29,7 @@
#include <QDomDocument>
#include <QApplication>
#include <QStyle>
+#include <QFileSystemWatcher>
// Always put me below _all_ includes, this is needed
Index: src/core/Themer.h
===================================================================
RCS file: /sources/traverso/traverso/src/core/Themer.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- src/core/Themer.h 17 Apr 2007 11:51:20 -0000 1.1
+++ src/core/Themer.h 26 Jun 2007 18:07:56 -0000 1.2
@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- $Id: Themer.h,v 1.1 2007/04/17 11:51:20 r_sijrier Exp $
+ $Id: Themer.h,v 1.2 2007/06/26 18:07:56 r_sijrier Exp $
*/
#ifndef COLORMANAGER_H
@@ -29,10 +29,11 @@
#include <QHash>
#include <QCursor>
#include <QString>
-#include <QFileSystemWatcher>
#include <QVariant>
#include <QPalette>
+class QFileSystemWatcher;
+
class Themer : public QObject
{
Q_OBJECT
Index: src/engine/defines.h
===================================================================
RCS file: /sources/traverso/traverso/src/engine/defines.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- src/engine/defines.h 25 Jun 2007 13:32:28 -0000 1.10
+++ src/engine/defines.h 26 Jun 2007 18:07:57 -0000 1.11
@@ -11,18 +11,18 @@
#if defined(__ppc__) || defined(__powerpc__) || defined(__PPC__)
-# define ATOMIC_MEMORY_BARRIER __asm__ ("sync" : : : "memory")
+# define T_ATOMIC_MEMORY_BARRIER __asm__ ("sync" : : : "memory")
int t_atomic_int_get (volatile int *atomic)
{
- ATOMIC_MEMORY_BARRIER;
+ T_ATOMIC_MEMORY_BARRIER;
return *atomic;
}
void t_atomic_int_set (volatile int *atomic, int newval)
{
*atomic = newval;
- ATOMIC_MEMORY_BARRIER;
+ T_ATOMIC_MEMORY_BARRIER;
}
#else
Index: src/traverso/dialogs/project/OpenProjectDialog.cpp
===================================================================
RCS file:
/sources/traverso/traverso/src/traverso/dialogs/project/OpenProjectDialog.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- src/traverso/dialogs/project/OpenProjectDialog.cpp 24 May 2007 19:16:34
-0000 1.7
+++ src/traverso/dialogs/project/OpenProjectDialog.cpp 26 Jun 2007 18:07:57
-0000 1.8
@@ -29,13 +29,15 @@
#include <QDomDocument>
#include <QFileDialog>
#include <QHeaderView>
+#include <QFileSystemWatcher>
+
#include <Config.h>
#include <Information.h>
#include <ProjectManager.h>
#include <Project.h>
#include <Utils.h>
-
+#include "Interface.h"
// Always put me below _all_ includes, this is needed
// in case we run with memory leak detection enabled!
@@ -45,6 +47,12 @@
: QDialog(parent)
{
setupUi(this);
+
+ QString path = config().get_property("Project", "directory",
getenv("HOME")).toString();
+ m_watcher = new QFileSystemWatcher(this);
+ m_watcher->addPath(path);
+ m_dirchangeDetected = false;
+
projectListView->setColumnCount(2);
update_projects_list();
QStringList stringList;
@@ -55,6 +63,7 @@
projectListView->header()->resizeSection(1, 30);
connect(projectListView, SIGNAL(itemClicked(QTreeWidgetItem*,int)),
this, SLOT(projectitem_clicked(QTreeWidgetItem*,int)));
+ connect(m_watcher, SIGNAL(directoryChanged(const QString&)), this,
SLOT(project_dir_rename_detected(const QString&)));
}
OpenProjectDialog::~ OpenProjectDialog( )
@@ -62,6 +71,7 @@
void OpenProjectDialog::update_projects_list()
{
+ printf("update_projects_list()\n");
projectListView->clear();
QString path = config().get_property("Project", "directory",
getenv("HOME")).toString();
@@ -119,8 +129,16 @@
QTreeWidgetItem* item = new QTreeWidgetItem(projectListView);
item->setTextAlignment(0, Qt::AlignLeft);
item->setTextAlignment(1, Qt::AlignHCenter);
- item->setText(0, title);
- item->setText(1, sNumSongs);
+
+ if (title != dirname) {
+ item->setIcon(0,
style()->standardIcon(QStyle::SP_MessageBoxWarning));
+ QString html;
+ html += tr("<p>Project directory name <b>%1</b> is
different from the Project title <b>%2</b>!</p>"
+ "<p>Did you rename the Project directory ?
</p><p>Please rename the directory back to the "
+ "Project title <b>%1</b>, and change the
Project title with the Project Manager Dialog!</p>")
+ .arg(dirname).arg(title);
+ item->setToolTip(0, html);
+ } else {
QString html = "<html><head></head><body>Project: " + title +
"<br /><br />";
html += tr("Description:") + "<br />";
html += description + "<br /><br />";
@@ -128,6 +146,10 @@
html += "</body></html>";
item->setToolTip(0, html);
}
+
+ item->setText(0, title);
+ item->setText(1, sNumSongs);
+ }
}
void OpenProjectDialog::projectitem_clicked( QTreeWidgetItem* item, int)
@@ -169,7 +191,7 @@
// Note: this shouldn't be needed really, the projects in the view
// should exist, but just in case someone removed it, you never know!
if (!pm().project_exists(title)) {
- info().warning(tr("Project does not exist! (%1)").arg(title));
+ info().warning(tr("Project %1 does not exist, did you rename or
remove the directory what that name ?").arg(title));
return;
}
@@ -216,8 +238,11 @@
{
QString path = config().get_property("Project", "directory",
getenv("HOME")).toString();
+ QDir rootDir(path);
+ rootDir.cdUp();
+
QString newPath = QFileDialog::getExistingDirectory(this,
- tr("Choose an existing or create a new Project
Directory"), path);
+ tr("Choose an existing or create a new Project
Directory"), rootDir.canonicalPath());
if (newPath.isEmpty() || newPath.isNull()) {
return;
@@ -239,8 +264,30 @@
config().set_property("Project", "directory", newdir.canonicalPath());
+ m_watcher->addPath(newdir.canonicalPath());
+
+
update_projects_list();
}
+void OpenProjectDialog::project_dir_rename_detected(const QString & dirname)
+{
+ update_projects_list();
+
+ if (m_dirchangeDetected || pm().renaming_directory_in_progress()) {
+ return;
+ }
+
+ m_dirchangeDetected = true;
+
+ QMessageBox::critical( Interface::instance(),
+ tr("Traverso - Important"),
+ tr("A Project directory changed outside of Traverso.
\n\n"
+ "This is NOT supported! Please undo this change
now!\n\n"
+ "If you want to rename a Project, use the Project
Manager instead!").arg(dirname),
+ QMessageBox::Ok);
+
+ m_dirchangeDetected = false;
+}
//eof
Index: src/traverso/dialogs/project/OpenProjectDialog.h
===================================================================
RCS file:
/sources/traverso/traverso/src/traverso/dialogs/project/OpenProjectDialog.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- src/traverso/dialogs/project/OpenProjectDialog.h 4 Apr 2007 00:07:14
-0000 1.1
+++ src/traverso/dialogs/project/OpenProjectDialog.h 26 Jun 2007 18:07:57
-0000 1.2
@@ -25,6 +25,8 @@
#include "ui_OpenProjectDialog.h"
#include <QDialog>
+class QFileSystemWatcher;
+
class OpenProjectDialog : public QDialog, protected Ui::OpenProjectDialog
{
Q_OBJECT
@@ -33,12 +35,18 @@
OpenProjectDialog(QWidget* parent = 0);
~OpenProjectDialog();
+
+private:
+ QFileSystemWatcher* m_watcher;
+ bool m_dirchangeDetected;
+
private slots:
void update_projects_list();
void on_loadProjectButton_clicked();
void on_deleteProjectbutton_clicked();
void on_projectDirSelectButton_clicked();
void projectitem_clicked( QTreeWidgetItem* , int );
+ void project_dir_rename_detected(const QString& dirname);
};
#endif
Index: src/traverso/dialogs/project/ProjectManagerDialog.cpp
===================================================================
RCS file:
/sources/traverso/traverso/src/traverso/dialogs/project/ProjectManagerDialog.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- src/traverso/dialogs/project/ProjectManagerDialog.cpp 3 Jun 2007
14:24:05 -0000 1.18
+++ src/traverso/dialogs/project/ProjectManagerDialog.cpp 26 Jun 2007
18:07:57 -0000 1.19
@@ -287,8 +287,21 @@
return;
}
+ QString newtitle = lineEditTitle->text();
+
+ if (newtitle != m_project->get_title()) {
+ if (pm().project_exists(newtitle)) {
+ QMessageBox::warning( 0,
+ tr("Traverso - Information"),
+ tr("Project with title '%1' allready exists,
please supply a different title!").arg(newtitle),
+ QMessageBox::Ok);
+ return rejected();
+ }
+ }
+
+
+ m_project->set_title(newtitle);
m_project->set_description(descriptionTextEdit->toPlainText());
- m_project->set_title(lineEditTitle->text());
m_project->set_discid(lineEditId->text());
m_project->set_upc_ean(lineEditUPC->text());
m_project->set_performer(lineEditPerformer->text());
Index: src/traverso/Interface.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/Interface.cpp,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -b -r1.92 -r1.93
--- src/traverso/Interface.cpp 16 Jun 2007 15:28:55 -0000 1.92
+++ src/traverso/Interface.cpp 26 Jun 2007 18:07:57 -0000 1.93
@@ -168,7 +168,7 @@
exportWidget = 0;
m_settingsdialog = 0;
m_projectManagerDialog = 0;
- m_openProjectDialog = 0;
+ m_openProjectDialog = new OpenProjectDialog(this);
m_newProjectDialog = 0;
m_insertSilenceDialog = 0;
m_markerDialog = 0;
@@ -927,9 +927,6 @@
Command* Interface::show_open_project_dialog()
{
- if (! m_openProjectDialog ) {
- m_openProjectDialog = new OpenProjectDialog(this);
- }
m_openProjectDialog->show();
return 0;
}
Index: src/traverso/songcanvas/songcanvas.pro
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/songcanvas.pro,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- src/traverso/songcanvas/songcanvas.pro 16 Jun 2007 15:28:56 -0000
1.6
+++ src/traverso/songcanvas/songcanvas.pro 26 Jun 2007 18:07:57 -0000
1.7
@@ -53,19 +53,6 @@
TrackView.h \
ViewItem.h \
LineView.h
-FORMS += ../ui/ExportWidget.ui \
- ../ui/AudioSourcesManagerWidget.ui \
- ../ui/PluginSelectorDialog.ui \
- ../ui/SpectralMeterConfigWidget.ui \
- ../ui/QuickDriverConfigWidget.ui \
- ../ui/DriverConfigPage.ui \
- ../ui/AlsaDevicesPage.ui \
- ../ui/KeyboardConfigPage.ui \
- ../ui/BehaviorConfigPage.ui \
- ../ui/MemoryConfigPage.ui \
- ../ui/ThemeConfigPage.ui \
- ../ui/SongManagerDialog.ui \
- ../ui/ProjectManagerDialog.ui
contains(DEFINES, LV2_SUPPORT){
Index: src/traverso/ui/ProjectManagerDialog.ui
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/ui/ProjectManagerDialog.ui,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- src/traverso/ui/ProjectManagerDialog.ui 25 Jun 2007 15:59:59 -0000
1.14
+++ src/traverso/ui/ProjectManagerDialog.ui 26 Jun 2007 18:07:57 -0000
1.15
@@ -77,10 +77,10 @@
<item>
<widget class="QLineEdit" name="lineEditTitle" >
<property name="enabled" >
- <bool>false</bool>
+ <bool>true</bool>
</property>
<property name="acceptDrops" >
- <bool>false</bool>
+ <bool>true</bool>
</property>
</widget>
</item>
Index: TODO
===================================================================
RCS file: /sources/traverso/traverso/TODO,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- TODO 16 Jun 2007 15:28:56 -0000 1.9
+++ TODO 26 Jun 2007 18:07:57 -0000 1.10
@@ -1,8 +1,10 @@
TOBEDONE FOR 0.40.x
-* add docs for preparing pc for realtime use! (limits.conf stuff)
+* invert plugin for j_ack
+
+* import file, peak creation starts, undo, redo (while peak creation still
active) -> crash
-* horizontal scroll bar doesn't move during play
+* add docs for preparing pc for realtime use! (limits.conf stuff)
* sometimes audible glitch when playing over splitpoint..
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Traverso-commit] traverso src/core/Project.cpp src/core/Project....,
Remon Sijrier <=