}
void MainWindow::saveFileAs() {
- QString outputFile = KFileDialog::getSaveFileName(KUrl(), "application/x-kdenlive");
+ // Check that the Kdenlive mime type is correctly installed
+ QString mimetype = "application/x-kdenlive";
+ KMimeType::Ptr mime = KMimeType::mimeType(mimetype);
+ if (!mime) mimetype = "*.kdenlive";
+
+ QString outputFile = KFileDialog::getSaveFileName(KUrl(), mimetype);
if (QFile::exists(outputFile)) {
if (KMessageBox::questionYesNo(this, i18n("File already exists.\nDo you want to overwrite it ?")) == KMessageBox::No) return;
}
}
void MainWindow::openFile() {
- KUrl url = KFileDialog::getOpenUrl(KUrl(), "application/x-kdenlive");
+ // Check that the Kdenlive mime type is correctly installed
+ QString mimetype = "application/x-kdenlive";
+ KMimeType::Ptr mime = KMimeType::mimeType(mimetype);
+ if (!mime) mimetype = "*.kdenlive";
+
+ KUrl url = KFileDialog::getOpenUrl(KUrl(), mimetype);
if (url.isEmpty()) return;
m_fileOpenRecent->addUrl(url);
openFile(url);
KdenliveSettings::setProject_fps(m_activeDocument->fps());
setCaption(m_activeDocument->description(), m_activeDocument->isModified());
m_monitorManager->resetProfiles(m_activeDocument->timecode());
- if (m_renderWidget) m_renderWidget->setDocumentStandard(m_activeDocument->getDocumentStandard());
+ if (m_renderWidget) m_renderWidget->setProfile(m_activeDocument->mltProfile());
m_timelineArea->setTabText(m_timelineArea->currentIndex(), m_activeDocument->description());
// We need to desactivate & reactivate monitors to get a refresh
m_renderWidget = new RenderWidget(this);
connect(m_renderWidget, SIGNAL(doRender(const QString&, const QString&, const QStringList &, const QStringList &, bool, bool, double, double)), this, SLOT(slotDoRender(const QString&, const QString&, const QStringList &, const QStringList &, bool, bool, double, double)));
if (m_activeDocument) {
- m_renderWidget->setDocumentStandard(m_activeDocument->getDocumentStandard());
+ m_renderWidget->setProfile(m_activeDocument->mltProfile());
m_renderWidget->setGuides(m_activeDocument->guidesXml(), m_activeDocument->projectDuration());
}
}
KdenliveSettings::setProject_fps(doc->fps());
m_monitorManager->resetProfiles(doc->timecode());
m_projectList->setDocument(doc);
- transitionConfig->updateProjectFormat(doc->mltProfile());
- effectStack->updateProjectFormat(doc->mltProfile());
+ transitionConfig->updateProjectFormat(doc->mltProfile(), doc->timecode());
+ effectStack->updateProjectFormat(doc->mltProfile(), doc->timecode());
connect(m_projectList, SIGNAL(clipSelected(DocClipBase *)), m_clipMonitor, SLOT(slotSetXml(DocClipBase *)));
connect(m_projectList, SIGNAL(projectModified()), doc, SLOT(setModified()));
connect(trackView, SIGNAL(cursorMoved()), m_projectMonitor, SLOT(activateMonitor()));
trackView->projectView()->setContextMenu(m_timelineContextMenu, m_timelineContextClipMenu, m_timelineContextTransitionMenu);
m_activeTimeline = trackView;
- if (m_renderWidget) m_renderWidget->setDocumentStandard(doc->getDocumentStandard());
+ if (m_renderWidget) m_renderWidget->setProfile(doc->mltProfile());
doc->setRenderer(m_projectMonitor->render);
m_commandStack->setActiveStack(doc->commandStack());
KdenliveSettings::setProject_display_ratio(doc->dar());
QStringList info = result->data().toStringList();
if (info.isEmpty()) return;
QDomElement transition = transitions.getEffectByTag(info.at(1), info.at(2));
- //QDomElement effect = transitions.getEffectByName(result->data().toString());
- if (m_activeTimeline) {
- m_activeTimeline->projectView()->slotAddTransitionToSelectedClips(transition);
+ if (m_activeTimeline && !transition.isNull()) {
+ m_activeTimeline->projectView()->slotAddTransitionToSelectedClips(transition.cloneNode().toElement());
}
}