// Make sure that the necessary folders exist
KStandardDirs::makeDir(m_projectFolder.path(KUrl::AddTrailingSlash) + "titles/");
KStandardDirs::makeDir(m_projectFolder.path(KUrl::AddTrailingSlash) + "thumbs/");
- KStandardDirs::makeDir(m_projectFolder.path(KUrl::AddTrailingSlash) + "ladspa/");
KStandardDirs::makeDir(m_projectFolder.path(KUrl::AddTrailingSlash) + "proxy/");
updateProjectFolderPlacesEntry();
// Creating new document
QDomDocument doc;
QDomElement mlt = doc.createElement("mlt");
+ mlt.setAttribute("LC_NUMERIC", "");
doc.appendChild(mlt);
// Create black producer
property = doc.createElement("property");
property.setAttribute("name", "aspect_ratio");
- value = doc.createTextNode(QString::number(0.0));
+ value = doc.createTextNode(QString::number(0));
property.appendChild(value);
blk.appendChild(property);
return sceneList;
}
+ // Set playlist audio volume to 100%
+ QDomElement tractor = mlt.firstChildElement("tractor");
+ if (!tractor.isNull()) {
+ QDomNodeList props = tractor.elementsByTagName("property");
+ for (int i = 0; i < props.count(); i++) {
+ if (props.at(i).toElement().attribute("name") == "meta.volume") {
+ props.at(i).firstChild().setNodeValue("1");
+ break;
+ }
+ }
+ }
+
QDomElement addedXml = sceneList.createElement("kdenlivedoc");
mlt.appendChild(addedXml);
void KdenliveDoc::moveProjectData(KUrl url)
{
QList <DocClipBase*> list = m_clipManager->documentClipList();
- //TODO: Also move ladspa effects files
for (int i = 0; i < list.count(); i++) {
DocClipBase *clip = list.at(i);
if (clip->clipType() == TEXT) {
void KdenliveDoc::setModified(bool mod)
{
+ if (isReadOnly()) return;
if (!m_url.isEmpty() && mod && KdenliveSettings::crashrecovery()) {
m_autoSaveTimer->start(3000);
}
pix.save(m_projectFolder.path(KUrl::AddTrailingSlash) + "thumbs/" + fileId + ".png");
}
-QString KdenliveDoc::getLadspaFile() const
-{
- int ct = 0;
- QString counter = QString::number(ct).rightJustified(5, '0', false);
- while (QFile::exists(m_projectFolder.path(KUrl::AddTrailingSlash) + "ladspa/" + counter + ".ladspa")) {
- ct++;
- counter = QString::number(ct).rightJustified(5, '0', false);
- }
- return m_projectFolder.path(KUrl::AddTrailingSlash) + "ladspa/" + counter + ".ladspa";
-}
-
bool KdenliveDoc::checkDocumentClips(QDomNodeList infoproducers)
{
DocumentChecker d(infoproducers, m_document);
}
}
+bool KdenliveDoc::isReadOnly() const
+{
+ return m_documentProperties.contains("readonly");
+}
+
void KdenliveDoc::cleanupBackupFiles()
{
KUrl backupFile = m_projectFolder;