saveOptions();
if (m_monitorManager) m_monitorManager->stopActiveMonitor();
if (m_activeDocument && m_activeDocument->isModified()) {
- switch (KMessageBox::warningYesNoCancel(this, i18n("Save changes to document ?"))) {
+ switch (KMessageBox::warningYesNoCancel(this, i18n("Save changes to document?"))) {
case KMessageBox::Yes :
// save document here. If saving fails, return false;
return saveFile();
case KMessageBox::No :
- // User does not want to save the changes, clear recovery files
- m_activeDocument->m_autosave->resize(0);
+ // User does not want to save the changes, clear recovery files
+ m_activeDocument->m_autosave->resize(0);
return true;
default: // cancel
return false;
kDebug() << "--- ERROR, TRYING TO APPEND NULL EFFECT";
return;
}
- TrackView *currentTimeLine = (TrackView *) m_timelineArea->currentWidget();
- currentTimeLine->projectView()->slotAddEffect(effect.cloneNode().toElement(), pos, track);
+ m_activeTimeline->projectView()->slotAddEffect(effect.cloneNode().toElement(), pos, track);
}
void MainWindow::slotRaiseMonitor(bool clipMonitor)
else m_projectMonitorDock->raise();
}
-void MainWindow::slotSetClipDuration(const QString &id, int duration)
+void MainWindow::slotUpdateClip(const QString &id)
{
if (!m_activeDocument) return;
- m_activeDocument->setProducerDuration(id, duration);
+ m_activeTimeline->projectView()->slotUpdateClip(id);
}
void MainWindow::slotConnectMonitors()
{
m_projectList->setRenderer(m_projectMonitor->render);
- connect(m_projectList, SIGNAL(receivedClipDuration(const QString &, int)), this, SLOT(slotSetClipDuration(const QString &, int)));
+ connect(m_projectList, SIGNAL(receivedClipDuration(const QString &)), this, SLOT(slotUpdateClip(const QString &)));
connect(m_projectList, SIGNAL(showClipProperties(DocClipBase *)), this, SLOT(slotShowClipProperties(DocClipBase *)));
connect(m_projectList, SIGNAL(getFileProperties(const QDomElement &, const QString &, bool)), m_projectMonitor->render, SLOT(getFileProperties(const QDomElement &, const QString &, bool)));
connect(m_projectMonitor->render, SIGNAL(replyGetImage(const QString &, const QPixmap &)), m_projectList, SLOT(slotReplyGetImage(const QString &, const QPixmap &)));
connect(m_projectMonitor->render, SIGNAL(replyGetFileProperties(const QString &, Mlt::Producer*, const QMap < QString, QString > &, const QMap < QString, QString > &, bool)), m_projectList, SLOT(slotReplyGetFileProperties(const QString &, Mlt::Producer*, const QMap < QString, QString > &, const QMap < QString, QString > &, bool)));
- connect(m_projectMonitor->render, SIGNAL(removeInvalidClip(const QString &)), m_projectList, SLOT(slotRemoveInvalidClip(const QString &)));
+ connect(m_projectMonitor->render, SIGNAL(removeInvalidClip(const QString &, bool)), m_projectList, SLOT(slotRemoveInvalidClip(const QString &, bool)));
connect(m_clipMonitor, SIGNAL(refreshClipThumbnail(const QString &)), m_projectList, SLOT(slotRefreshClipThumbnail(const QString &)));
QWidget * actionWidget;
actionWidget = toolbar->widgetForAction(m_buttonSelectTool);
actionWidget->setMaximumWidth(24);
- actionWidget->setMinimumHeight(17);
+ actionWidget->setMinimumHeight(18);
actionWidget = toolbar->widgetForAction(m_buttonRazorTool);
actionWidget->setMaximumWidth(24);
- actionWidget->setMinimumHeight(17);
+ actionWidget->setMinimumHeight(18);
actionWidget = toolbar->widgetForAction(m_buttonSpacerTool);
actionWidget->setMaximumWidth(24);
- actionWidget->setMinimumHeight(17);
+ actionWidget->setMinimumHeight(18);
toolbar->setStyleSheet(style1);
connect(m_toolGroup, SIGNAL(triggered(QAction *)), this, SLOT(slotChangeTool(QAction *)));
actionWidget = toolbar->widgetForAction(m_buttonFitZoom);
actionWidget->setMaximumWidth(24);
- actionWidget->setMinimumHeight(17);
+ actionWidget->setMinimumHeight(18);
m_zoomSlider = new QSlider(Qt::Horizontal, this);
m_zoomSlider->setMaximum(13);
actionWidget = toolbar->widgetForAction(m_buttonVideoThumbs);
actionWidget->setMaximumWidth(24);
- actionWidget->setMinimumHeight(17);
+ actionWidget->setMinimumHeight(18);
actionWidget = toolbar->widgetForAction(m_buttonAudioThumbs);
actionWidget->setMaximumWidth(24);
- actionWidget->setMinimumHeight(17);
+ actionWidget->setMinimumHeight(18);
actionWidget = toolbar->widgetForAction(m_buttonShowMarkers);
actionWidget->setMaximumWidth(24);
- actionWidget->setMinimumHeight(17);
+ actionWidget->setMinimumHeight(18);
actionWidget = toolbar->widgetForAction(m_buttonSnap);
actionWidget->setMaximumWidth(24);
- actionWidget->setMinimumHeight(17);
+ actionWidget->setMinimumHeight(18);
m_messageLabel = new StatusBarMessageLabel(this);
m_messageLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::MinimumExpanding);
TrackView *tabToClose = (TrackView *) w;
KdenliveDoc *docToClose = tabToClose->document();
if (docToClose && docToClose->isModified()) {
- switch (KMessageBox::warningYesNoCancel(this, i18n("Save changes to document ?"))) {
+ switch (KMessageBox::warningYesNoCancel(this, i18n("Save changes to document?"))) {
case KMessageBox::Yes :
// save document here. If saving fails, return false;
if (saveFile() == false) return;
QString outputFile = KFileDialog::getSaveFileName(KUrl(), mimetype);
if (outputFile.isEmpty()) return false;
if (QFile::exists(outputFile)) {
- if (KMessageBox::questionYesNo(this, i18n("File already exists.\nDo you want to overwrite it ?")) == KMessageBox::No) return false;
+ if (KMessageBox::questionYesNo(this, i18n("File already exists.\nDo you want to overwrite it?")) == KMessageBox::No) return false;
}
return saveFileAs(outputFile);
}
{
KSharedConfigPtr config = KGlobal::config();
KUrl::List urls = m_fileOpenRecent->urls();
- //WARNING: this is buggy, we get a random url, not the last one. Bug in KRecentFileAction ?
+ //WARNING: this is buggy, we get a random url, not the last one. Bug in KRecentFileAction?
if (urls.isEmpty()) newFile(false);
else openFile(urls.last());
}
continue;
}*/
kDebug() << "// OPENING RECOVERY: " << stale->fileName() << "\nMANAGED: " << stale->managedFile().path();
- // the stalefiles also contain ".lock" files so we must ignore them... bug in KAutoSaveFile ?
+ // the stalefiles also contain ".lock" files so we must ignore them... bug in KAutoSaveFile?
if (!stale->fileName().endsWith(".lock")) doOpenFile(KUrl(stale->fileName()), stale);
else KIO::NetAccess::del(KUrl(stale->fileName()), this);
}
KdenliveSettings::setRendererpath(rendererPath.path());
}
- kDebug() << "RESULTING MLT PATH: " << KdenliveSettings::mltpath();
+ kDebug() << "RESULTING MLT PATH: " << KdenliveSettings::mltpath();
// Parse MLT profiles to build a list of available video formats
if (profilesList.isEmpty()) parseProfiles();
if (dest.isEmpty()) return;
int in = 0;
int out = 0;
- TrackView *currentTab = (TrackView *) m_timelineArea->currentWidget();
- if (currentTab && zoneOnly) {
- in = currentTab->inPoint();
- out = currentTab->outPoint();
+
+ if (m_activeTimeline && zoneOnly) {
+ in = m_activeTimeline->inPoint();
+ out = m_activeTimeline->outPoint();
}
KTemporaryFile temp;
temp.setAutoRemove(false);
{
//m_projectMonitor->stop();
m_closeAction->setEnabled(m_timelineArea->count() > 1);
- kDebug() << "/////////////////// CONNECTING DOC TO PROJECT VIEW ////////////////";
+ kDebug() << "/////////////////// CONNECTING DOC TO PROJECT VIEW ////////////////";
if (m_activeDocument) {
if (m_activeDocument == doc) return;
if (m_activeTimeline) {
void MainWindow::slotFindNext()
{
if (m_activeTimeline && m_activeTimeline->projectView()->findNextString(m_findString)) {
- statusBar()->showMessage(i18n("Found : %1", m_findString));
+ statusBar()->showMessage(i18n("Found: %1", m_findString));
} else {
statusBar()->showMessage(i18n("Reached end of project"));
}
{
if (m_activeTimeline && m_activeTimeline->projectView()->findString(m_findString)) {
m_projectSearchNext->setEnabled(true);
- statusBar()->showMessage(i18n("Found : %1", m_findString));
+ statusBar()->showMessage(i18n("Found: %1", m_findString));
} else {
m_projectSearchNext->setEnabled(false);
- statusBar()->showMessage(i18n("Not found : %1", m_findString));
+ statusBar()->showMessage(i18n("Not found: %1", m_findString));
}
}