]> git.sesse.net Git - kdenlive/blobdiff - src/mainwindow.cpp
Fix repeated close confirmation:
[kdenlive] / src / mainwindow.cpp
index 7b99e596ef27e9a15d6b6d9fa20f8b833a11cad6..64c420cf0e56863ee694c6233f03f30fdbd134fc 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();