m_view.buttonFavorite->setIcon(KIcon("favorites"));
m_view.buttonFavorite->setToolTip(i18n("Copy profile to favorites"));
+
+ m_view.advanced_params->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 5);
if (KdenliveSettings::showrenderparams()) {
m_view.buttonInfo->setDown(true);
height = m_profile.height;
}
renderArgs.replace("%dar", '@' + QString::number(m_profile.display_aspect_num) + '/' + QString::number(m_profile.display_aspect_den));
+ //renderArgs.replace("%width", QString::number((int)(m_profile.height * m_profile.display_aspect_num / (double) m_profile.display_aspect_den + 0.5)));
+ //renderArgs.replace("%height", QString::number((int)m_profile.height));
// Adjust scanning
if (m_view.scanning_list->currentIndex() == 1) renderArgs.append(" progressive=1");
QTextStream outStream(&file);
outStream << "#! /bin/sh" << "\n" << "\n";
outStream << "SOURCE=" << "\"" + playlistPath + "\"" << "\n";
- outStream << "TARGET=" << "\"" + dest + "\"" << "\n";
+ outStream << "TARGET=" << "\"" + KUrl(dest).url() + "\"" << "\n";
outStream << "RENDERER=" << "\"" + m_renderer + "\"" << "\n";
outStream << "MELT=" << "\"" + render_process_args.takeFirst() + "\"" << "\n";
outStream << "PARAMETERS=" << "\"" + render_process_args.join(" ") + "\"" << "\n";
while (!stream.atEnd()) {
QString line = stream.readLine();
if (line.startsWith("TARGET=")) {
- target = line.section("TARGET=", 1).simplified();
- target.remove(QChar('"'));
- } else if (line.startsWith("RENDERER=")) {
- renderer = line.section("RENDERER=", 1).simplified();
- renderer.remove(QChar('"'));
- } else if (line.startsWith("MELT=")) {
- melt = line.section("MELT=", 1).simplified();
- melt.remove(QChar('"'));
+ target = line.section("TARGET=\"", 1);
+ target = target.section('"', 0, 0);
+ } else if (line.startsWith("RENDERER=\"")) {
+ renderer = line.section("RENDERER=", 1);
+ renderer = renderer.section('"', 0, 0);
+ } else if (line.startsWith("MELT=\"")) {
+ melt = line.section("MELT=", 1);
+ melt = melt.section('"', 0, 0);
}
}
file.close();
item->setData(0, Qt::UserRole, '1');
} else item->setIcon(0, KIcon("application-x-executable-script"));
item->setSizeHint(0, QSize(m_view.scripts_list->columnWidth(0), fontMetrics().height() * 2));
- item->setData(1, Qt::UserRole, target.simplified());
+ item->setData(1, Qt::UserRole, KUrl(target).path());
item->setData(1, Qt::UserRole + 1, scriptpath.path());
}
bool activate = false;
void RenderWidget::slotPlayRendering(QTreeWidgetItem *item, int)
{
if (KdenliveSettings::defaultplayerapp().isEmpty() || item->data(1, Qt::UserRole + 2).toInt() != FINISHEDJOB) return;
- const QByteArray startId = KStartupInfo::createNewStartupId();
- const QString command = KdenliveSettings::defaultplayerapp() + ' ' + item->text(1);
- KRun::runCommand(command, KdenliveSettings::defaultplayerapp(), KdenliveSettings::defaultplayerapp(), this, startId);
+ KUrl::List urls;
+ urls.append(KUrl(item->text(1)));
+ KRun::run(KdenliveSettings::defaultplayerapp(), urls, this);
}
void RenderWidget::missingClips(bool hasMissing)