]> git.sesse.net Git - kdenlive/blobdiff - src/projectlist.cpp
Update year in the about dialog
[kdenlive] / src / projectlist.cpp
index f61a4560d437ce374d8fb66d520ff0c07cb03a8f..09d3200ae31b0edc3f5c86971518bf82fdf2770e 100644 (file)
@@ -253,6 +253,7 @@ void ProjectList::editClipSelection(QList<QTreeWidgetItem *> list)
     commonproperties.insert("force_aspect_den", "-");
     commonproperties.insert("force_fps", "-");
     commonproperties.insert("force_progressive", "-");
+    commonproperties.insert("force_tff", "-");
     commonproperties.insert("threads", "-");
     commonproperties.insert("video_index", "-");
     commonproperties.insert("audio_index", "-");
@@ -741,7 +742,6 @@ void ProjectList::slotRemoveClip()
 
     QUndoCommand *delCommand = new QUndoCommand();
     delCommand->setText(i18n("Delete Clip Zone"));
-
     for (int i = 0; i < selected.count(); i++) {
         if (selected.at(i)->type() == PROJECTSUBCLIPTYPE) {
             // subitem
@@ -763,11 +763,13 @@ void ProjectList::slotRemoveClip()
         } else {
             ProjectItem *item = static_cast <ProjectItem *>(selected.at(i));
             ids << item->clipId();
-            if (item->numReferences() > 0 && KMessageBox::questionYesNo(kapp->activeWindow(), i18np("Delete clip <b>%2</b>?<br />This will also remove the clip in timeline", "Delete clip <b>%2</b>?<br />This will also remove its %1 clips in timeline", item->numReferences(), item->names().at(1)), i18n("Delete Clip")) != KMessageBox::Yes)
+            if (item->numReferences() > 0 && KMessageBox::questionYesNo(kapp->activeWindow(), i18np("Delete clip <b>%2</b>?<br />This will also remove the clip in timeline", "Delete clip <b>%2</b>?<br />This will also remove its %1 clips in timeline", item->numReferences(), item->names().at(1)), i18n("Delete Clip"), KStandardGuiItem::yes(), KStandardGuiItem::no(), "DeleteAll") == KMessageBox::No) {
+                KMessageBox::enableMessage("DeleteAll");
                 return;
+            }
         }
     }
-
+    KMessageBox::enableMessage("DeleteAll");
     if (delCommand->childCount() == 0)
         delete delCommand;
     else
@@ -1071,8 +1073,8 @@ QString ProjectList::getExtensions()
 {
     // Build list of mime types
     QStringList mimeTypes = QStringList() << "application/x-kdenlive" << "application/x-kdenlivetitle" << "video/mlt-playlist" << "text/plain"
-                            << "video/x-flv" << "application/vnd.rn-realmedia" << "video/x-dv" << "video/dv" << "video/x-msvideo" << "video/x-matroska" << "video/mpeg" << "video/ogg" << "video/x-ms-wmv" << "video/mp4" << "video/quicktime"
-                            << "audio/x-flac" << "audio/x-matroska" << "audio/mp4" << "audio/mpeg" << "audio/x-mp3" << "audio/ogg" << "audio/x-wav" << "application/ogg" << "application/mxf"
+                            << "video/x-flv" << "application/vnd.rn-realmedia" << "video/x-dv" << "video/dv" << "video/x-msvideo" << "video/x-matroska" << "video/mpeg" << "video/ogg" << "video/x-ms-wmv" << "video/mp4" << "video/quicktime" << "video/webm"
+                            << "audio/x-flac" << "audio/x-matroska" << "audio/mp4" << "audio/mpeg" << "audio/x-mp3" << "audio/ogg" << "audio/x-wav" << "application/ogg" << "application/mxf" << "application/x-shockwave-flash"
                             << "image/gif" << "image/jpeg" << "image/png" << "image/x-tga" << "image/x-bmp" << "image/svg+xml" << "image/tiff" << "image/x-xcf" << "image/x-xcf-gimp" << "image/x-vnd.adobe.photoshop" << "image/x-pcx" << "image/x-exr";
 
     QString allExtensions;
@@ -1444,7 +1446,8 @@ void ProjectList::slotRefreshClipThumbnail(QTreeWidgetItem *it, bool update)
         }
         if (update)
             emit projectModified();
-        QTimer::singleShot(30, this, SLOT(slotProcessNextThumbnail()));
+
+        slotProcessNextThumbnail();
     }
 }
 
@@ -1460,7 +1463,6 @@ void ProjectList::slotReplyGetFileProperties(const QString &clipId, Mlt::Produce
             item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsDragEnabled | Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsDropEnabled);
             toReload = clipId;
         }
-        //Q_ASSERT_X(item->referencedClip(), "void ProjectList::slotReplyGetFileProperties", QString("Item with groupName %1 does not have a clip associated").arg(item->groupName()).toLatin1());
         item->referencedClip()->setProducer(producer, replace);
         item->referencedClip()->askForAudioThumbs();
         if (!replace && item->data(0, Qt::DecorationRole).isNull())
@@ -1468,7 +1470,6 @@ void ProjectList::slotReplyGetFileProperties(const QString &clipId, Mlt::Produce
         if (!toReload.isEmpty())
             item->slotSetToolTip();
 
-        //emit receivedClipDuration(clipId);
         if (m_listView->isEnabled() && replace) {
             // update clip in clip monitor
             emit clipSelected(NULL);
@@ -1487,7 +1488,6 @@ void ProjectList::slotReplyGetFileProperties(const QString &clipId, Mlt::Produce
             requestClipThumbnail(clipId);
         }*/
     } else kDebug() << "////////  COULD NOT FIND CLIP TO UPDATE PRPS...";
-    int max = m_doc->clipManager()->clipsCount();
     if (item && m_infoQueue.isEmpty() && m_thumbnailQueue.isEmpty()) {
         m_listView->setCurrentItem(item);
         bool updatedProfile = false;
@@ -1500,12 +1500,14 @@ void ProjectList::slotReplyGetFileProperties(const QString &clipId, Mlt::Produce
         }
         if (updatedProfile == false) emit clipSelected(item->referencedClip());
     } else {
+        int max = m_doc->clipManager()->clipsCount();
         emit displayMessage(i18n("Loading clips"), (int)(100 *(max - m_infoQueue.count()) / max));
     }
     if (!toReload.isEmpty())
         emit clipNeedsReload(toReload, true);
-    // small delay so that the app can display the progress info
-    QTimer::singleShot(30, this, SLOT(slotProcessNextClipInQueue()));
+
+    qApp->processEvents();
+    slotProcessNextClipInQueue();
 }
 
 bool ProjectList::adjustProjectProfileToItem(ProjectItem *item)
@@ -1559,7 +1561,9 @@ bool ProjectList::adjustProjectProfileToItem(ProjectItem *item)
                 }
                 delete list;
                 delete label;
-            } else KMessageBox::information(kapp->activeWindow(), i18n("Your clip does not match current project's profile.\nNo existing profile found to match the clip's properties.\nClip size: %1\nFps: %2\n", size, fps));
+            } else if (fps > 0) {
+                KMessageBox::information(kapp->activeWindow(), i18n("Your clip does not match current project's profile.\nNo existing profile found to match the clip's properties.\nClip size: %1\nFps: %2\n", size, fps));
+            }
         }
     }
     return profileUpdated;