Remove deprecated save clip feature (replaced by save selection)

parent 6c5d4faf
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui name="kdenlive" version="110" translationDomain="kdenlive">
<kpartgui name="kdenlive" version="111" translationDomain="kdenlive">
<ToolBar name="extraToolBar" >
<text>Extra Toolbar</text>
<Action name="project_render" />
......@@ -112,7 +112,6 @@
<Action name="delete_timeline_clip" />
<Action name="edit_item_duration" />
<Action name="clip_in_project_tree" />
<Action name="save_timeline_clip" />
<Action name="expand_timeline_clip" />
</Menu>
<Menu name="all_clips" ><text>All clips</text>
......
......@@ -1181,7 +1181,6 @@ void MainWindow::setupActions()
ungroupClip->setData("ungroup_clip");
addAction(QStringLiteral("edit_item_duration"), i18n("Edit Duration"), this, SLOT(slotEditItemDuration()), KoIconUtils::themedIcon(QStringLiteral("measure")));
addAction(QStringLiteral("save_timeline_clip"), i18n("Save clip"), this, SLOT(slotSaveTimelineClip()), KoIconUtils::themedIcon(QStringLiteral("document-save")));
addAction(QStringLiteral("clip_in_project_tree"), i18n("Clip in Project Bin"), this, SLOT(slotClipInProjectTree()), KoIconUtils::themedIcon(QStringLiteral("go-jump-definition")));
addAction(QStringLiteral("overwrite_to_in_point"), i18n("Insert Clip Zone in Timeline (Overwrite)"), this, SLOT(slotInsertClipOverwrite()), QIcon(), Qt::Key_V);
addAction(QStringLiteral("select_timeline_clip"), i18n("Select Clip"), this, SLOT(slotSelectTimelineClip()), KoIconUtils::themedIcon(QStringLiteral("edit-select")), Qt::Key_Plus);
......@@ -3358,22 +3357,6 @@ void MainWindow::slotDownloadResources()
d->show();
}
void MainWindow::slotSaveTimelineClip()
{
if (pCore->projectManager()->currentTimeline() && m_projectMonitor->render) {
ClipItem *clip = pCore->projectManager()->currentTimeline()->projectView()->getActiveClipUnderCursor(true);
if (!clip) {
m_messageLabel->setMessage(i18n("Select a clip to save"), InformationMessage);
return;
}
QUrl url = QFileDialog::getSaveFileUrl(this, i18n("Save clip"), pCore->projectManager()->current()->projectFolder(), i18n("MLT playlist (*.mlt)"));
if (url.isValid()) {
m_projectMonitor->render->saveClip(clip->track(), clip->startPos(), url);
}
}
}
void MainWindow::slotProcessImportKeyframes(GraphicsRectItem type, const QString &tag, const QString& data)
{
if (type == AVWidget) {
......
......@@ -425,8 +425,6 @@ private slots:
/** @brief Open the online services search dialog. */
void slotDownloadResources();
/** @brief Save current timeline clip as mlt playlist. */
void slotSaveTimelineClip();
/** @brief Process keyframe data sent from a clip to effect / transition stack. */
void slotProcessImportKeyframes(GraphicsRectItem type, const QString &tag, const QString& data);
/** @brief Move playhead to mouse curser position if defined key is pressed */
......
......@@ -633,34 +633,6 @@ void Render::saveZone(QPoint zone)
}
}
bool Render::saveClip(int track, const GenTime &position, const QUrl &url, const QString &desc)
{
// find clip
Mlt::Service service(m_mltProducer->parent().get_service());
Mlt::Tractor tractor(service);
//TODO: memleak
Mlt::Producer trackProducer(tractor.track(track));
Mlt::Playlist trackPlaylist((mlt_playlist) trackProducer.get_service());
int clipIndex = trackPlaylist.get_clip_index_at((int) position.frames(m_fps));
QScopedPointer<Mlt::Producer> clip(trackPlaylist.get_clip(clipIndex));
if (!clip) {
qDebug() << "WARINIG, CANNOT FIND CLIP ON track: " << track << ", AT POS: " << position.frames(m_fps);
return false;
}
Mlt::Consumer xmlConsumer(*m_qmlView->profile(), ("xml:" + url.toLocalFile()).toUtf8().constData());
xmlConsumer.set("terminate_on_pause", 1);
Mlt::Playlist list(*m_qmlView->profile());
list.insert_at(0, clip.data(), 0);
//delete clip;
list.set("title", desc.toUtf8().constData());
xmlConsumer.connect(list);
xmlConsumer.run();
//qDebug()<<"// SAVED: "<<url;
return true;
}
double Render::fps() const
{
return m_fps;
......
......@@ -153,9 +153,6 @@ class Render: public AbstractRender
void play(const GenTime & startTime);
bool playZone(const GenTime & startTime, const GenTime & stopTime);
void loopZone(const GenTime & startTime, const GenTime & stopTime);
/** @brief Save a clip in timeline to an xml playlist. */
bool saveClip(int track, const GenTime &position, const QUrl &url, const QString &desc = QString());
/** @brief Return true if we are currently playing */
bool isPlaying() const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment