Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Default rendering path should be the project folder:

http://www.kdenlive.org:80/mantis/view.php?id=654

svn path=/branches/KDE4/; revision=3034
parent 114d07c2
......@@ -1376,6 +1376,7 @@ void MainWindow::slotEditProjectSettings() {
if (w->exec() == QDialog::Accepted) {
QString profile = w->selectedProfile();
m_activeDocument->setProjectFolder(w->selectedFolder());
if (m_renderWidget) m_renderWidget->setDocumentPath(w->selectedFolder().path());
if (m_activeDocument->profilePath() != profile) {
// Profile was changed
m_activeDocument->setProfilePath(profile);
......@@ -1396,7 +1397,8 @@ void MainWindow::slotEditProjectSettings() {
void MainWindow::slotRenderProject() {
if (!m_renderWidget) {
m_renderWidget = new RenderWidget(this);
QString projectfolder = m_activeDocument ? m_activeDocument->projectFolder().path() : KdenliveSettings::defaultprojectfolder();
m_renderWidget = new RenderWidget(projectfolder, this);
connect(m_renderWidget, SIGNAL(doRender(const QString&, const QString&, const QStringList &, const QStringList &, bool, bool, double, double, bool)), this, SLOT(slotDoRender(const QString&, const QString&, const QStringList &, const QStringList &, bool, bool, double, double, bool)));
connect(m_renderWidget, SIGNAL(abortProcess(const QString &)), this, SIGNAL(abortRenderJob(const QString &)));
connect(m_renderWidget, SIGNAL(openDvdWizard(const QString &, const QString &)), this, SLOT(slotDvdWizard(const QString &, const QString &)));
......@@ -1622,7 +1624,10 @@ void MainWindow::connectDocument(TrackView *trackView, KdenliveDoc *doc) { //cha
trackView->projectView()->setContextMenu(m_timelineContextMenu, m_timelineContextClipMenu, m_timelineContextTransitionMenu);
m_activeTimeline = trackView;
if (m_renderWidget) m_renderWidget->setProfile(doc->mltProfile());
if (m_renderWidget) {
m_renderWidget->setProfile(doc->mltProfile());
m_renderWidget->setDocumentPath(doc->projectFolder().path());
}
//doc->setRenderer(m_projectMonitor->render);
m_commandStack->setActiveStack(doc->commandStack());
KdenliveSettings::setProject_display_ratio(doc->dar());
......
......@@ -42,7 +42,7 @@ const int EditableRole = GroupRole + 5;
const int MetaGroupRole = GroupRole + 6;
const int ExtraRole = GroupRole + 7;
RenderWidget::RenderWidget(QWidget * parent): QDialog(parent) {
RenderWidget::RenderWidget(const QString &projectfolder, QWidget * parent): QDialog(parent), m_projectFolder(projectfolder) {
m_view.setupUi(this);
setWindowTitle(i18n("Rendering"));
m_view.buttonDelete->setIcon(KIcon("trash-empty"));
......@@ -133,6 +133,12 @@ void RenderWidget::showInfoPanel() {
}
}
void RenderWidget::setDocumentPath(const QString path) {
m_projectFolder = path;
const QString fileName = m_view.out_file->url().fileName();
m_view.out_file->setUrl(KUrl(m_projectFolder + '/' + fileName));
}
void RenderWidget::slotUpdateGuideBox() {
m_view.guides_box->setVisible(m_view.render_guide->isChecked());
}
......@@ -633,7 +639,7 @@ KUrl RenderWidget::filenameWithExtension(KUrl url, QString extension) {
else path = path.left(pos) + extension;
} else {
path = QDir::homePath() + "/untitled." + extension;
path = m_projectFolder + "/untitled." + extension;
}
return KUrl(path);
}
......
......@@ -98,12 +98,13 @@ class RenderWidget : public QDialog {
Q_OBJECT
public:
RenderWidget(QWidget * parent = 0);
RenderWidget(const QString &projectfolder, QWidget * parent = 0);
void setGuides(QDomElement guidesxml, double duration);
void focusFirstVisibleItem();
void setProfile(MltVideoProfile profile);
void setRenderJob(const QString &dest, int progress = 0);
void setRenderStatus(const QString &dest, int status, const QString &error);
void setDocumentPath(const QString path);
private slots:
void slotUpdateButtons(KUrl url);
......@@ -123,6 +124,7 @@ private slots:
private:
Ui::RenderWidget_UI m_view;
MltVideoProfile m_profile;
QString m_projectFolder;
void parseProfiles(QString group = QString(), QString profile = QString());
void parseFile(QString exportFile, bool editable);
void updateButtons();
......
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