X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmainwindow.cpp;h=5f9e06618872c47faf56ea3e784c4772c0ee4c66;hb=0ecaca991853809ccb21f4232a7edfee3e660237;hp=8a348fb6ea174119b6716d3dcb66dbca5de6ef4e;hpb=e5d7ec0b184543b85c9671d6ef072c1cb4437bb6;p=kdenlive diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 8a348fb6..5f9e0661 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2835,11 +2835,11 @@ void MainWindow::slotAddClipMarker() return; } QString id = clip->getId(); - CommentedTime marker(pos, i18n("Marker")); + CommentedTime marker(pos, i18n("Marker"), KdenliveSettings::default_marker_type()); QPointer d = new MarkerDialog(clip, marker, m_activeDocument->timecode(), i18n("Add Marker"), this); if (d->exec() == QDialog::Accepted) - m_activeTimeline->projectView()->slotAddClipMarker(id, d->newMarker().time(), d->newMarker().comment()); + m_activeTimeline->projectView()->slotAddClipMarker(id, d->newMarker()); delete d; } @@ -2915,20 +2915,20 @@ void MainWindow::slotEditClipMarker() } QString id = clip->getId(); - QString oldcomment = clip->markerComment(pos); - if (oldcomment.isEmpty()) { + CommentedTime oldMarker = clip->markerAt(pos); + if (oldMarker == CommentedTime()) { m_messageLabel->setMessage(i18n("No marker found at cursor time"), ErrorMessage); return; } - CommentedTime marker(pos, oldcomment); - QPointer d = new MarkerDialog(clip, marker, + QPointer d = new MarkerDialog(clip, oldMarker, m_activeDocument->timecode(), i18n("Edit Marker"), this); if (d->exec() == QDialog::Accepted) { - m_activeTimeline->projectView()->slotAddClipMarker(id, d->newMarker().time(), d->newMarker().comment()); + m_activeTimeline->projectView()->slotAddClipMarker(id, d->newMarker()); if (d->newMarker().time() != pos) { // remove old marker - m_activeTimeline->projectView()->slotAddClipMarker(id, pos, QString()); + oldMarker.setMarkerType(-1); + m_activeTimeline->projectView()->slotAddClipMarker(id, oldMarker); } } delete d; @@ -2947,8 +2947,9 @@ void MainWindow::slotAddMarkerGuideQuickly() m_messageLabel->setMessage(i18n("Cannot find clip to add marker"), ErrorMessage); return; } - - m_activeTimeline->projectView()->slotAddClipMarker(clip->getId(), pos, m_activeDocument->timecode().getDisplayTimecode(pos, false)); + //TODO: allow user to set default marker category + CommentedTime marker(pos, m_activeDocument->timecode().getDisplayTimecode(pos, false), KdenliveSettings::default_marker_type()); + m_activeTimeline->projectView()->slotAddClipMarker(clip->getId(), marker); } else { m_activeTimeline->projectView()->slotAddGuide(false); } @@ -3311,7 +3312,7 @@ void MainWindow::slotShowClipProperties(DocClipBase *clip) // any type of clip but a title ClipProperties *dia = new ClipProperties(clip, m_activeDocument->timecode(), m_activeDocument->fps(), this); - connect(dia, SIGNAL(addMarker(const QString &, GenTime, QString)), m_activeTimeline->projectView(), SLOT(slotAddClipMarker(const QString &, GenTime, QString))); + connect(dia, SIGNAL(addMarker(const QString &, CommentedTime)), m_activeTimeline->projectView(), SLOT(slotAddClipMarker(const QString &, CommentedTime))); connect(m_activeTimeline->projectView(), SIGNAL(updateClipMarkers(DocClipBase *)), dia, SLOT(slotFillMarkersList(DocClipBase *))); connect(dia, SIGNAL(loadMarkers(const QString &)), m_activeTimeline->projectView(), SLOT(slotLoadClipMarkers(const QString &))); connect(dia, SIGNAL(saveMarkers(const QString &)), m_activeTimeline->projectView(), SLOT(slotSaveClipMarkers(const QString &))); @@ -3896,21 +3897,21 @@ void MainWindow::loadClipActions() Mlt::Filter *filter = Mlt::Factory::filter(profile,(char*)"videostab"); if (filter) { delete filter; - QAction *action=actionMenu->addAction("Videostab (vstab)"); + QAction *action=actionMenu->addAction(i18n("Stabilize (vstab)")); action->setData("videostab"); connect(action,SIGNAL(triggered()), this, SLOT(slotStabilize())); } filter = Mlt::Factory::filter(profile,(char*)"videostab2"); if (filter) { delete filter; - QAction *action=actionMenu->addAction("Videostab (transcode)"); + QAction *action=actionMenu->addAction(i18n("Stabilize (transcode)")); action->setData("videostab2"); connect(action,SIGNAL(triggered()), this, SLOT(slotStabilize())); } filter = Mlt::Factory::filter(profile,(char*)"motion_est"); if (filter) { delete filter; - QAction *action=actionMenu->addAction("Automatic scene split"); + QAction *action=actionMenu->addAction(i18n("Automatic scene split")); action->setData("motion_est"); connect(action,SIGNAL(triggered()), this, SLOT(slotStabilize())); }