]> git.sesse.net Git - kdenlive/blobdiff - src/mainwindow.cpp
* Allow to edit transparent background for images in group properties
[kdenlive] / src / mainwindow.cpp
index 7b99e596ef27e9a15d6b6d9fa20f8b833a11cad6..9a3382f9f62c9dbbe27f43c4e9a105e3c56b6cca 100644 (file)
@@ -617,13 +617,6 @@ MainWindow::~MainWindow()
     Mlt::Factory::close();
 }
 
-void MainWindow::queryQuit()
-{
-    if (queryClose()) {
-        close();
-    }
-}
-
 //virtual
 bool MainWindow::queryClose()
 {
@@ -1526,7 +1519,7 @@ void MainWindow::setupActions()
     connect(maxCurrent, SIGNAL(triggered(bool)), this, SLOT(slotMaximizeCurrent(bool)));*/
 
     m_closeAction = KStandardAction::close(this,  SLOT(closeCurrentDocument()),   collection);
-    KStandardAction::quit(this,                   SLOT(queryQuit()),              collection);
+    KStandardAction::quit(this,                   SLOT(close()),              collection);
     KStandardAction::open(this,                   SLOT(openFile()),               collection);
     m_saveAction = KStandardAction::save(this,    SLOT(saveFile()),               collection);
     KStandardAction::saveAs(this,                 SLOT(saveFileAs()),             collection);
@@ -1805,6 +1798,8 @@ void MainWindow::newFile(bool showProjectSettings, bool force)
     QPoint projectTracks(KdenliveSettings::videotracks(), KdenliveSettings::audiotracks());
     bool useProxy = KdenliveSettings::enableproxy();
     QString proxyParams = KdenliveSettings::proxyparams();
+    bool generateProxy = KdenliveSettings::enableproxy();
+    int proxyMinSize = 1000;
     if (!showProjectSettings) {
         if (!KdenliveSettings::activatetabs())
             if (!closeCurrentDocument())
@@ -1825,6 +1820,8 @@ void MainWindow::newFile(bool showProjectSettings, bool force)
         projectTracks = w->tracks();
         useProxy = w->useProxy();
         proxyParams = w->proxyParams();
+        generateProxy = w->generateProxy();
+        proxyMinSize = w->proxyMinSize();
         delete w;
     }
     m_timelineArea->setEnabled(true);
@@ -1832,6 +1829,8 @@ void MainWindow::newFile(bool showProjectSettings, bool force)
     KdenliveDoc *doc = new KdenliveDoc(KUrl(), projectFolder, m_commandStack, profileName, projectTracks, m_projectMonitor->render, m_notesWidget, this);
     doc->setDocumentProperty("useproxy", QString::number((int) useProxy));
     doc->setDocumentProperty("proxyparams", proxyParams);
+    doc->setDocumentProperty("generateproxy", QString::number((int) generateProxy));
+    doc->setDocumentProperty("proxyminsize", QString::number(proxyMinSize));
     doc->m_autosave = new KAutoSaveFile(KUrl(), doc);
     bool ok;
     TrackView *trackView = new TrackView(doc, &ok, this);
@@ -2226,6 +2225,8 @@ void MainWindow::slotEditProjectSettings()
         if (KdenliveSettings::audiothumbnails() != w->enableAudioThumbs()) slotSwitchAudioThumbs();
         if (m_activeDocument->profilePath() != profile) slotUpdateProjectProfile(profile);
         m_activeDocument->setDocumentProperty("proxyparams", w->proxyParams());
+        m_activeDocument->setDocumentProperty("generateproxy", QString::number((int) w->generateProxy()));
+        m_activeDocument->setDocumentProperty("proxyminsize", QString::number(w->proxyMinSize()));
         if (QString::number((int) w->useProxy()) != m_activeDocument->getDocumentProperty("enableproxy")) {
             m_activeDocument->setDocumentProperty("enableproxy", QString::number((int) w->useProxy()));
             slotUpdateProxySettings();
@@ -3191,10 +3192,17 @@ void MainWindow::slotShowClipProperties(QList <DocClipBase *> cliplist, QMap<QSt
     ClipProperties dia(cliplist, m_activeDocument->timecode(), commonproperties, this);
     if (dia.exec() == QDialog::Accepted) {
         QUndoCommand *command = new QUndoCommand();
+        QMap <QString, QString> newImageProps = dia.properties();
+        // Transparency setting applies only for images
+        QMap <QString, QString> newProps = newImageProps;
+        newProps.remove("transparency");
         command->setText(i18n("Edit clips"));
         for (int i = 0; i < cliplist.count(); i++) {
             DocClipBase *clip = cliplist.at(i);
-            new EditClipCommand(m_projectList, clip->getId(), clip->properties(), dia.properties(), true, command);
+            if (clip->clipType() == IMAGE)
+                new EditClipCommand(m_projectList, clip->getId(), clip->properties(), newImageProps, true, command);
+            else 
+                new EditClipCommand(m_projectList, clip->getId(), clip->properties(), newProps, true, command);
         }
         m_activeDocument->commandStack()->push(command);
         for (int i = 0; i < cliplist.count(); i++)