#include <KUrlRequester>
#include <KDebug>
+#include <KStandardDirs>
#include "dvdwizardvob.h"
m_view.intro_vob->setFilter("video/mpeg");
connect(m_view.use_intro, SIGNAL(toggled(bool)), m_view.intro_vob, SLOT(setEnabled(bool)));
connect(m_view.vob_1, SIGNAL(textChanged(const QString &)), this, SLOT(slotCheckVobList(const QString &)));
-
+ if (KStandardDirs::findExe("dvdauthor").isEmpty()) m_errorMessage.append(i18n("<strong>Program %1 is required for the dvd wizard.<br />", i18n("dvdauthor")));
+ if (KStandardDirs::findExe("mkisofs").isEmpty()) m_errorMessage.append(i18n("<strong>Program %1 is required for the dvd wizard.", i18n("mkisofs")));
+ if (m_errorMessage.isEmpty()) m_view.error_message->setVisible(false);
+ else m_view.error_message->setText(m_errorMessage);
}
DvdWizardVob::~DvdWizardVob() {
// virtual
bool DvdWizardVob::isComplete() const {
+ if (!m_view.error_message->text().isEmpty()) return false;
if (m_view.vob_1->url().path().isEmpty()) return false;
if (QFile::exists(m_view.vob_1->url().path())) return true;
return false;
private:
Ui::DvdWizardVob_UI m_view;
+ QString m_errorMessage;
private slots:
void slotCheckVobList(const QString &text);
<rect>
<x>0</x>
<y>0</y>
- <width>348</width>
- <height>153</height>
+ <width>359</width>
+ <height>177</height>
</rect>
</property>
<property name="windowTitle" >
</item>
<item row="1" column="0" colspan="2" >
<widget class="QGroupBox" name="vob_list" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="title" >
<string>DVD Files</string>
</property>
</layout>
</widget>
</item>
- <item row="2" column="0" colspan="2" >
+ <item row="3" column="0" colspan="2" >
+ <widget class="QLabel" name="error_message" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
<spacer name="verticalSpacer" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
if (KStandardDirs::findExe("dvgrab").isEmpty()) item->setIcon(0, missingIcon);
else item->setIcon(0, okIcon);
+ item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("Dvdauthor"));
+ item->setData(1, Qt::UserRole, i18n("Required for creation of dvd"));
+ item->setSizeHint(0, itemSize);
+ if (KStandardDirs::findExe("dvdauthor").isEmpty()) item->setIcon(0, missingIcon);
+ else item->setIcon(0, okIcon);
+
+ item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("Mkisofs"));
+ item->setData(1, Qt::UserRole, i18n("Required for creation of dvd iso images"));
+ item->setSizeHint(0, itemSize);
+ if (KStandardDirs::findExe("mkisofs").isEmpty()) item->setIcon(0, missingIcon);
+ else item->setIcon(0, okIcon);
+
}
void Wizard::installExtraMimes(QString baseName, QStringList globs) {