]> git.sesse.net Git - kdenlive/blobdiff - src/mainwindow.cpp
Move undo commands to their own subdirectory
[kdenlive] / src / mainwindow.cpp
index 946af2724fe3721b1232bec02bfc5c6d39d7d31d..5a76ffb38f6137b627d8aa703e9850fef055b48e 100644 (file)
@@ -47,7 +47,7 @@
 #endif /* NO_JOGSHUTTLE */
 #include "clipproperties.h"
 #include "wizard.h"
-#include "editclipcommand.h"
+#include "commands/editclipcommand.h"
 #include "titlewidget.h"
 #include "markerdialog.h"
 #include "clipitem.h"
 #include <KFileItem>
 #include <KNotification>
 #include <KNotifyConfigWidget>
-#if KDE_IS_VERSION(4,3,80)
 #include <knewstuff3/downloaddialog.h>
 #include <knewstuff3/knewstuffaction.h>
-#else
-#include <knewstuff2/engine.h>
-#include <knewstuff2/ui/knewstuffaction.h>
-#define KNS3 KNS
-#endif /* KDE_IS_VERSION(4,3,80) */
 #include <KToolBar>
 #include <KColorScheme>
 #include <KProgressDialog>
@@ -182,7 +176,7 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString &
     closeTabButton->adjustSize();
     closeTabButton->setToolTip(i18n("Close the current tab"));
     m_timelineArea->setCornerWidget(closeTabButton);
-    connect(m_timelineArea, SIGNAL(currentChanged(int)), this, SLOT(activateDocument()));
+    //connect(m_timelineArea, SIGNAL(currentChanged(int)), this, SLOT(activateDocument()));
 
     connect(&m_findTimer, SIGNAL(timeout()), this, SLOT(findTimeout()));
     m_findTimer.setSingleShot(true);
@@ -235,9 +229,7 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString &
     connect(m_notesWidget, SIGNAL(seekProject(int)), m_projectMonitor->render, SLOT(seekToFrame(int)));
     
     m_notesWidget->setTabChangesFocus(true);
-#if KDE_IS_VERSION(4,4,0)
     m_notesWidget->setClickMessage(i18n("Enter your project notes here ..."));
-#endif
     m_notesDock->setWidget(m_notesWidget);
     addDockWidget(Qt::TopDockWidgetArea, m_notesDock);
 
@@ -622,7 +614,6 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString &
         QMapIterator<QString, QString> i(values);
         if (i.hasNext()) {
             i.next();
-            KdenliveSettings::setProxy_profile(i.key());
             QString data = i.value();
             KdenliveSettings::setProxyparams(data.section(';', 0, 0));
             KdenliveSettings::setProxyextension(data.section(';', 1, 1));
@@ -634,7 +625,6 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString &
         QMapIterator<QString, QString> i(values);
         if (i.hasNext()) {
             i.next();
-            KdenliveSettings::setV4l_profile(i.key());
             QString data = i.value();
             KdenliveSettings::setV4l_parameters(data.section(';', 0, 0));
             KdenliveSettings::setV4l_extension(data.section(';', 1, 1));
@@ -646,7 +636,6 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString &
         QMapIterator<QString, QString> i(values);
         if (i.hasNext()) {
             i.next();
-            KdenliveSettings::setDecklink_profile(i.key());
             QString data = i.value();
             KdenliveSettings::setDecklink_parameters(data.section(';', 0, 0));
             KdenliveSettings::setDecklink_extension(data.section(';', 1, 1));
@@ -1906,6 +1895,7 @@ bool MainWindow::closeCurrentDocument(bool saveChanges)
         }
     }
     m_clipMonitor->slotSetClipProducer(NULL);
+    m_projectList->slotResetProjectList();
     m_timelineArea->removeTab(m_timelineArea->indexOf(w));
     if (m_timelineArea->count() == 1) {
         m_timelineArea->setTabBarHidden(true);
@@ -2102,7 +2092,7 @@ void MainWindow::doOpenFile(const KUrl &url, KAutoSaveFile *stale)
 
     bool ok;
     TrackView *trackView = new TrackView(doc, &ok, this);
-
+    connectDocument(trackView, doc);
     progressDialog.progressBar()->setValue(3);
     qApp->processEvents();
 
@@ -3677,7 +3667,6 @@ void MainWindow::slotResizeItemEnd()
 int MainWindow::getNewStuff(const QString &configFile)
 {
     KNS3::Entry::List entries;
-#if KDE_IS_VERSION(4,3,80)
     KNS3::DownloadDialog dialog(configFile);
     dialog.exec();
     entries = dialog.changedEntries();
@@ -3685,15 +3674,6 @@ int MainWindow::getNewStuff(const QString &configFile)
         if (entry.status() == KNS3::Entry::Installed)
             kDebug() << "// Installed files: " << entry.installedFiles();
     }
-#else
-    KNS::Engine engine(0);
-    if (engine.init(configFile))
-        entries = engine.downloadDialogModal(this);
-    foreach(KNS::Entry * entry, entries) {
-        if (entry->status() == KNS::Entry::Installed)
-            kDebug() << "// Installed files: " << entry->installedFiles();
-    }
-#endif /* KDE_IS_VERSION(4,3,80) */
     return entries.size();
 }
 
@@ -3969,6 +3949,7 @@ void MainWindow::slotPrepareRendering(bool scriptExport, bool zoneOnly, const QS
                     // We need to delete the "aspect_ratio" property because proxy clips
                     // sometimes have different ratio than original clips
                     EffectsList::removeProperty(e, "aspect_ratio");
+                    EffectsList::removeMetaProperties(e);
                 }
             }
         }