Fix detection of missing codecs in render dialog, use kmessagewidget to inform user

svn path=/trunk/kdenlive/; revision=6009
parent f6071883
......@@ -223,6 +223,19 @@ RenderWidget::RenderWidget(const QString &projectfolder, bool enableProxy, QWidg
focusFirstVisibleItem();
adjustSize();
#if KDE_IS_VERSION(4,7,0)
m_infoMessage = new KMessageWidget;
QGridLayout *s = static_cast <QGridLayout*> (m_view.tab->layout());
s->addWidget(m_infoMessage, 12, 0, 1, -1);
m_infoMessage->hide();
#endif
}
QSize RenderWidget::sizeHint() const
{
// Make sure the widget has minimum size on opening
return QSize(200, 200);
}
RenderWidget::~RenderWidget()
......@@ -2030,12 +2043,23 @@ void RenderWidget::missingClips(bool hasMissing)
void RenderWidget::errorMessage(const QString &message)
{
if (!message.isEmpty()) {
#if KDE_IS_VERSION(4,7,0)
m_infoMessage->setMessageType(KMessageWidget::Warning);
m_infoMessage->setText(message);
m_infoMessage->animatedShow();
#else
m_view.errorLabel->setText(message);
m_view.errorBox->setHidden(false);
#endif
}
else {
#if KDE_IS_VERSION(4,7,0)
m_infoMessage->animatedHide();
#else
m_view.errorBox->setHidden(true);
m_view.errorLabel->setText(QString());
#endif
}
}
......
......@@ -21,6 +21,11 @@
#ifndef RENDERWIDGET_H
#define RENDERWIDGET_H
#include <kdeversion.h>
#if KDE_IS_VERSION(4,7,0)
#include <KMessageWidget>
#endif
#include <QPushButton>
#include <QPainter>
#include <QStyledItemDelegate>
......@@ -132,6 +137,9 @@ public:
/** @brief Should we render using proxy clips. */
bool proxyRendering();
protected:
virtual QSize sizeHint() const;
public slots:
void slotExport(bool scriptExport, int zoneIn, int zoneOut, const QString &playlistPath, const QString &scriptPath, bool exportAudio);
......@@ -179,6 +187,11 @@ private:
RenderViewDelegate *m_jobsDelegate;
bool m_blockProcessing;
QString m_renderer;
#if KDE_IS_VERSION(4,7,0)
KMessageWidget *m_infoMessage;
#endif
void parseProfiles(QString meta = QString(), QString group = QString(), QString profile = QString());
void parseFile(QString exportFile, bool editable);
void updateButtons();
......
......@@ -336,16 +336,19 @@ void Wizard::checkMltComponents()
for (int i = 0; i < vcodecs.count(); i++)
result << QString(vcodecs.get(i));
m_mltCheck.vcodecs_list->addItems(result);
KdenliveSettings::setVideocodecs(result);
result.clear();
Mlt::Properties acodecs((mlt_properties) consumer->get_data("acodec"));
for (int i = 0; i < acodecs.count(); i++)
result << QString(acodecs.get(i));
m_mltCheck.acodecs_list->addItems(result);
KdenliveSettings::setAudiocodecs(result);
result.clear();
Mlt::Properties formats((mlt_properties) consumer->get_data("f"));
for (int i = 0; i < formats.count(); i++)
result << QString(formats.get(i));
m_mltCheck.formats_list->addItems(result);
KdenliveSettings::setSupportedformats(result);
delete consumer;
}
......
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