//HACK: check dvgrab version, because only dvgrab >= 3.3 supports
// --timestamp option without bug
- double dvgrabVersion = 0;
-
- QProcess *versionCheck = new QProcess;
- versionCheck->setProcessChannelMode(QProcess::MergedChannels);
- versionCheck->start("dvgrab", QStringList() << "--version");
- if (versionCheck->waitForFinished()) {
- QString version = QString(versionCheck->readAll()).simplified();
- if (version.contains(' ')) version = version.section(' ', -1);
- dvgrabVersion = version.toDouble();
- kDebug() << "// FOUND DVGRAB VERSION: " << dvgrabVersion;
- }
- if (versionCheck) delete versionCheck;
- if (dvgrabVersion < 3.3) {
- KdenliveSettings::setFirewiretimestamp(false);
- m_configCapture.kcfg_firewiretimestamp->setEnabled(false);
+ if (KdenliveSettings::dvgrab_path().isEmpty() || !QFile::exists(KdenliveSettings::dvgrab_path())) {
+ QString dvgrabpath = KStandardDirs::findExe("dvgrab");
+ KdenliveSettings::setDvgrab_path(dvgrabpath);
}
- QString rmdpath = KStandardDirs::findExe("recordmydesktop");
- if (rmdpath.isEmpty()) {
- KdenliveSettings::setRmd_path(QString());
- m_configCapture.rmd_info->setText(i18n("Recordmydesktop utility not found, please install it for screen grabs"));
- } else {
+
+ double dvgrabVersion = 0;
+ if (!KdenliveSettings::dvgrab_path().isEmpty()) {
+ QProcess *versionCheck = new QProcess;
+ versionCheck->setProcessChannelMode(QProcess::MergedChannels);
+ versionCheck->start("dvgrab", QStringList() << "--version");
+ if (versionCheck->waitForFinished()) {
+ QString version = QString(versionCheck->readAll()).simplified();
+ if (version.contains(' ')) version = version.section(' ', -1);
+ dvgrabVersion = version.toDouble();
+
+ kDebug() << "// FOUND DVGRAB VERSION: " << dvgrabVersion;
+ }
+ if (versionCheck) delete versionCheck;
+ if (dvgrabVersion < 3.3) {
+ KdenliveSettings::setFirewiretimestamp(false);
+ m_configCapture.kcfg_firewiretimestamp->setEnabled(false);
+ }
+ m_configCapture.dvgrab_info->setText(i18n("dvgrab version %1 at %2", dvgrabVersion, KdenliveSettings::dvgrab_path()));
+ } else m_configCapture.dvgrab_info->setText(i18n("<b>dvgrab utility not found, please install it for firewire capture</b>"));
+
+ if (KdenliveSettings::rmd_path().isEmpty() || !QFile::exists(KdenliveSettings::rmd_path())) {
+ QString rmdpath = KStandardDirs::findExe("recordmydesktop");
KdenliveSettings::setRmd_path(rmdpath);
- m_configCapture.rmd_info->setText(i18n("Recordmydesktop found at: %1", rmdpath));
}
+ if (KdenliveSettings::rmd_path().isEmpty()) m_configCapture.rmd_info->setText(i18n("<b>Recordmydesktop utility not found, please install it for screen grabs</b>"));
+ else m_configCapture.rmd_info->setText(i18n("Recordmydesktop found at: %1", KdenliveSettings::rmd_path()));
}
KdenliveSettingsDialog::~KdenliveSettingsDialog() {}
m_playAction->setEnabled(false);
if (KdenliveSettings::rmd_path().isEmpty()) {
QString rmdpath = KStandardDirs::findExe("recordmydesktop");
- if (rmdpath.isEmpty()) ui.video_frame->setPixmap(mergeSideBySide(KIcon("dialog-warning").pixmap(QSize(50, 50)), i18n("Recordmydesktop utility not found, please install it for screen grabs")));
+ if (rmdpath.isEmpty()) ui.video_frame->setPixmap(mergeSideBySide(KIcon("dialog-warning").pixmap(QSize(50, 50)), i18n("Recordmydesktop utility not found,\n please install it for screen grabs")));
else KdenliveSettings::setRmd_path(rmdpath);
}
- ui.video_frame->setPixmap(mergeSideBySide(KIcon("video-display").pixmap(QSize(50, 50)), i18n("Press record button\nto start screen capture\nFiles will be saved in:\n%1", KdenliveSettings::capturefolder())));
+ if (!KdenliveSettings::rmd_path().isEmpty()) ui.video_frame->setPixmap(mergeSideBySide(KIcon("video-display").pixmap(QSize(50, 50)), i18n("Press record button\nto start screen capture\nFiles will be saved in:\n%1", KdenliveSettings::capturefolder())));
//ui.video_frame->setText(i18n("Press record button\nto start screen capture"));
break;
case VIDEO4LINUX:
m_rewAction->setEnabled(false);
m_fwdAction->setEnabled(false);
//ui.video_frame->setText(i18n("Plug your camcorder and\npress connect button\nto initialize connection"));
- ui.video_frame->setPixmap(mergeSideBySide(KIcon("network-connect").pixmap(QSize(50, 50)), i18n("Plug your camcorder and\npress connect button\nto initialize connection\nFiles will be saved in:\n%1", KdenliveSettings::capturefolder())));
+ if (KdenliveSettings::dvgrab_path().isEmpty()) {
+ QString dvgrabpath = KStandardDirs::findExe("dvgrab");
+ if (dvgrabpath.isEmpty()) ui.video_frame->setPixmap(mergeSideBySide(KIcon("dialog-warning").pixmap(QSize(50, 50)), i18n("dvgrab utility not found,\n please install it for firewire capture")));
+ else KdenliveSettings::setDvgrab_path(dvgrabpath);
+ }
+
+ if (!KdenliveSettings::dvgrab_path().isEmpty()) ui.video_frame->setPixmap(mergeSideBySide(KIcon("network-connect").pixmap(QSize(50, 50)), i18n("Plug your camcorder and\npress connect button\nto initialize connection\nFiles will be saved in:\n%1", KdenliveSettings::capturefolder())));
break;
}
}