aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <[email protected]>2015-01-07 01:00:24 +0100
committerJean-Baptiste Mardelle <[email protected]>2015-01-07 01:00:24 +0100
commita4367f8f225a860928aac71c33031a60cba42fa1 (patch)
treebf1f74f115dfad14e68ab3a8215f9f7e3a71099f
parent44f4b31f786898e43a1b3821ced05262e8b1bce2 (diff)
cleanup folder saving
-rw-r--r--src/bin/bin.cpp6
-rw-r--r--src/bin/projectclip.cpp3
-rw-r--r--src/dialogs/clipcreationdialog.cpp15
-rw-r--r--src/project/projectlist.cpp4
-rw-r--r--src/renderer.cpp5
5 files changed, 12 insertions, 21 deletions
diff --git a/src/bin/bin.cpp b/src/bin/bin.cpp
index 696328a..c86322a 100644
--- a/src/bin/bin.cpp
+++ b/src/bin/bin.cpp
@@ -326,10 +326,9 @@ void Bin::setDocument(KdenliveDoc* project)
void Bin::createClip(QDomElement xml)
{
// Check if clip should be in a folder
- QString groupId = ProjectClip::getXmlProperty(xml, "kdenlive.groupid");
+ QString groupId = ProjectClip::getXmlProperty(xml, "kdenlive.folderid");
ProjectFolder *parentFolder = m_rootFolder;
if (!groupId.isEmpty()) {
- QString groupName = ProjectClip::getXmlProperty(xml, "kdenlive.groupname");
parentFolder = m_rootFolder->folder(groupId);
if (!parentFolder) {
// parent folder does not exist, put in root folder
@@ -801,10 +800,9 @@ void Bin::slotProducerReady(requestClipInfo info, ClipController *controller)
}
else {
// Clip not found, create it
- QString groupId = controller->property("kdenlive.groupid");
+ QString groupId = controller->property("kdenlive.folderid");
ProjectFolder *parentFolder;
if (!groupId.isEmpty()) {
- QString groupName = controller->property("kdenlive.groupname");
parentFolder = m_rootFolder->folder(groupId);
if (!parentFolder) {
// parent folder does not exist, put in root folder
diff --git a/src/bin/projectclip.cpp b/src/bin/projectclip.cpp
index cbcbd81..8e21ee6 100644
--- a/src/bin/projectclip.cpp
+++ b/src/bin/projectclip.cpp
@@ -436,7 +436,6 @@ ClipPropertiesController *ProjectClip::buildProperties(QWidget *parent)
void ProjectClip::updateParentInfo(const QString &folderid, const QString &foldername)
{
- m_controller->setProperty("kdenlive.groupid", folderid);
- m_controller->setProperty("kdenlive.groupname", foldername);
+ m_controller->setProperty("kdenlive.folderid", folderid);
}
diff --git a/src/dialogs/clipcreationdialog.cpp b/src/dialogs/clipcreationdialog.cpp
index a1eafd2..dc579e6 100644
--- a/src/dialogs/clipcreationdialog.cpp
+++ b/src/dialogs/clipcreationdialog.cpp
@@ -74,8 +74,7 @@ void ClipCreationDialogDialog::createColorClip(KdenliveDoc *doc, QStringList gro
properties.insert("kdenlive.clipname", dia_ui.clip_name->text());
properties.insert("mlt_service", "color");
if (!groupInfo.isEmpty()) {
- properties.insert("kdenlive.groupname", groupInfo.at(0));
- properties.insert("kdenlive.groupid", groupInfo.at(1));
+ properties.insert("kdenlive.folderid", groupInfo.at(0));
}
addXmlProperties(prod, properties);
AddClipCommand *command = new AddClipCommand(doc, xml.documentElement(), QString::number(id), true);
@@ -110,8 +109,7 @@ void ClipCreationDialogDialog::createSlideshowClip(KdenliveDoc *doc, QStringList
properties.insert("softness", QString::number(dia->softness()));
properties.insert("animation", dia->animation());
if (!groupInfo.isEmpty()) {
- properties.insert("kdenlive.groupname", groupInfo.at(0));
- properties.insert("kdenlive.groupid", groupInfo.at(1));
+ properties.insert("kdenlive.folderid", groupInfo.at(0));
}
addXmlProperties(prod, properties);
uint id = bin->getFreeClipId();
@@ -141,8 +139,7 @@ void ClipCreationDialogDialog::createTitleClip(KdenliveDoc *doc, QStringList gro
properties.insert("xmldata", dia_ui->xml().toString());
properties.insert("kdenlive.clipname", i18n("Title clip"));
if (!groupInfo.isEmpty()) {
- properties.insert("kdenlive.groupname", groupInfo.at(0));
- properties.insert("kdenlive.groupid", groupInfo.at(1));
+ properties.insert("kdenlive.folderid", groupInfo.at(0));
}
addXmlProperties(prod, properties);
prod.setAttribute("type", (int) Text);
@@ -199,8 +196,7 @@ void ClipCreationDialogDialog::createClipsCommand(KdenliveDoc *doc, const QList<
QMap <QString, QString> properties;
properties.insert("resource", file.path());
if (!groupInfo.isEmpty()) {
- properties.insert("kdenlive.groupname", groupInfo.at(0));
- properties.insert("kdenlive.groupid", groupInfo.at(1));
+ properties.insert("kdenlive.folderid", groupInfo.at(0));
}
addXmlProperties(prod, properties);
//prod.setAttribute("resource", file.path());
@@ -340,8 +336,7 @@ void ClipCreationDialogDialog::createClipsCommand(KdenliveDoc *doc, QStringList
properties.insert("fade", QString::number(false));
properties.insert("luma_duration", QString::number(doc->getFramePos(doc->timecode().getTimecodeFromFrames(int(ceil(doc->timecode().fps()))))));
if (!groupInfo.isEmpty()) {
- properties.insert("kdenlive.groupname", groupInfo.at(0));
- properties.insert("kdenlive.groupid", groupInfo.at(1));
+ properties.insert("kdenlive.folderid", groupInfo.at(0));
}
addXmlProperties(prod, properties);
uint id = bin->getFreeClipId();
diff --git a/src/project/projectlist.cpp b/src/project/projectlist.cpp
index 1e3c362..a613305 100644
--- a/src/project/projectlist.cpp
+++ b/src/project/projectlist.cpp
@@ -1893,9 +1893,9 @@ QStringList ProjectList::getGroup() const
if (item) {
FolderProjectItem *folder = static_cast <FolderProjectItem *>(item);
- result << folder->groupName() << folder->clipId();
+ result << folder->clipId();
} else {
- result << QString() << QString();
+ result << QString();
}
return result;
}
diff --git a/src/renderer.cpp b/src/renderer.cpp
index 0deaee7..9bb89a4 100644
--- a/src/renderer.cpp
+++ b/src/renderer.cpp
@@ -729,10 +729,9 @@ void Render::processFileProperties()
if (!clipName.isEmpty()) {
producer->set("kdenlive.clipname", clipName.toUtf8().constData());
}
- QString groupId = ProjectClip::getXmlProperty(info.xml, "kdenlive.groupid");
+ QString groupId = ProjectClip::getXmlProperty(info.xml, "kdenlive.folderid");
if (!groupId.isEmpty()) {
- producer->set("kdenlive.groupid", groupId.toUtf8().constData());
- producer->set("kdenlive.groupname", ProjectClip::getXmlProperty(info.xml, "kdenlive.groupname").toUtf8().constData());
+ producer->set("kdenlive.folderid", groupId.toUtf8().constData());
}
if (proxyProducer && info.xml.hasAttribute("proxy_out")) {