#include <KComboBox>
#include <KIO/NetAccess>
#include <KFileItem>
+#include <KMessageBox>
+#include <KApplication>
#if KDE_IS_VERSION(4,2,0)
#include <KDiskFreeSpaceInfo>
RecMonitor::~RecMonitor()
{
+#if KDE_IS_VERSION(4,2,0)
m_spaceTimer.stop();
+#endif
delete m_captureProcess;
delete m_displayProcess;
}
void RecMonitor::slotUpdateCaptureFolder()
{
if (m_captureProcess) m_captureProcess->setWorkingDirectory(KdenliveSettings::capturefolder());
- slotVideoDeviceChanged(device_selector->currentIndex());
+ if (m_captureProcess->state() != QProcess::NotRunning) {
+ if (device_selector->currentIndex() == FIREWIRE)
+ KMessageBox::information(this, i18n("You need to disconnect and reconnect in the capture monitor to apply your changes"), i18n("Capturing"));
+ else KMessageBox::information(this, i18n("You need to stop capture before your changes can be applied"), i18n("Capturing"));
+ } else slotVideoDeviceChanged(device_selector->currentIndex());
kDebug() << "// UPDATE CAPT FOLD: " << KdenliveSettings::capturefolder();
#if KDE_IS_VERSION(4,2,0)
res.fill(Qt::transparent);
p.begin(&res);
p.drawPixmap(0, 0, pix);
+ p.setPen(kapp->palette().text().color());
p.drawText(QRect(pixWidth + 8, 0, strWidth, strHeight), 0, txt);
p.end();
return res;
m_didCapture = false;
slotStartCapture(false);
m_discAction->setIcon(KIcon("network-disconnect"));
- m_discAction->setText(i18n("Disonnect"));
+ m_discAction->setText(i18n("Disconnect"));
m_recAction->setEnabled(true);
m_stopAction->setEnabled(true);
m_playAction->setEnabled(true);
m_captureProcess->setStandardOutputProcess(m_displayProcess);
m_captureProcess->setWorkingDirectory(KdenliveSettings::capturefolder());
kDebug() << "Capture: Running dvgrab " << m_captureArgs.join(" ");
-
+
m_captureProcess->start(KdenliveSettings::dvgrab_path(), m_captureArgs);
if (play) m_captureProcess->write(" ", 1);
m_discAction->setEnabled(true);
m_isCapturing = true;
m_didCapture = true;
m_captureProcess->write("c\n", 3);
+#if KDE_IS_VERSION(4,2,0)
m_spaceTimer.start();
+#endif
return;
}
if (m_captureProcess->state() == QProcess::NotRunning) {
else 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())));
}
m_isCapturing = false;
- m_spaceTimer.stop();
#if KDE_IS_VERSION(4,2,0)
+ m_spaceTimer.stop();
// update free space info
slotUpdateFreeSpace();
#endif
m_dvinfo.updateGeometry();
}
-#include "recmonitor.moc"
\ No newline at end of file
+#include "recmonitor.moc"
+