]> git.sesse.net Git - kdenlive/blobdiff - src/dvdwizardvob.cpp
const'ify, move static function to public not in slot function
[kdenlive] / src / dvdwizardvob.cpp
index 655d086ed511506e12a328ac6c271901bdac8df8..f29c3f53cf1b1e8aab18f6ccfd24bdff492cd67f 100644 (file)
@@ -333,7 +333,12 @@ QStringList DvdWizardVob::durations() const
     QStringList result;
     QString path;
     int max = m_vobList->topLevelItemCount();
-    for (int i = 0; i < max; i++) {
+    int i = 0;
+    if (m_view.use_intro->isChecked()) {
+       // First movie is only for intro
+       i = 1;
+    }
+    for (; i < max; i++) {
         QTreeWidgetItem *item = m_vobList->topLevelItem(i);
         if (item) result.append(QString::number(item->data(1, Qt::UserRole).toInt()));
     }
@@ -345,7 +350,12 @@ QStringList DvdWizardVob::chapters() const
     QStringList result;
     QString path;
     int max = m_vobList->topLevelItemCount();
-    for (int i = 0; i < max; i++) {
+    int i = 0;
+    if (m_view.use_intro->isChecked()) {
+       // First movie is only for intro
+       i = 1;
+    }
+    for (; i < max; i++) {
         QTreeWidgetItem *item = m_vobList->topLevelItem(i);
         if (item) {
             result.append(item->data(1, Qt::UserRole + 1).toString());
@@ -357,7 +367,12 @@ QStringList DvdWizardVob::chapters() const
 void DvdWizardVob::updateChapters(QMap <QString, QString> chaptersdata)
 {
     int max = m_vobList->topLevelItemCount();
-    for (int i = 0; i < max; i++) {
+    int i = 0;
+    if (m_view.use_intro->isChecked()) {
+       // First movie is only for intro
+       i = 1;
+    }
+    for (; i < max; i++) {
         QTreeWidgetItem *item = m_vobList->topLevelItem(i);
         if (chaptersdata.contains(item->text(0))) item->setData(1, Qt::UserRole + 1, chaptersdata.value(item->text(0)));
     }
@@ -542,7 +557,7 @@ void DvdWizardVob::slotTranscodeFiles()
                postParams << "-vf" << QString("scale=%1:%2,pad=%3:%4:%5:0,setdar=%6").arg(finalSize.width() - 2 * conv_pad).arg(destSize.height()).arg(finalSize.width()).arg(finalSize.height()).arg(conv_pad).arg(input_aspect);
            }
            ClipTranscode *d = new ClipTranscode(KUrl::List () << KUrl(item->text(0)), params.section(';', 0, 0), postParams, i18n("Transcoding to DVD format"), true, this);
-           connect(d, SIGNAL(transcodedClip(KUrl,KUrl)), this, SLOT(slotTranscodedClip(KUrl, KUrl)));
+           connect(d, SIGNAL(transcodedClip(KUrl,KUrl)), this, SLOT(slotTranscodedClip(KUrl,KUrl)));
            d->slotStartTransCode();
            d->show();
            
@@ -653,4 +668,5 @@ void DvdWizardVob::showError(const QString error)
     m_view.error_message->setText(error);
     m_view.error_message->setVisible(true);
 #endif    
-}
\ No newline at end of file
+}
+