]> git.sesse.net Git - kdenlive/blobdiff - src/wizard.cpp
Fix audio thumbs not displayed on project opening and abortion if audio thumbs creation
[kdenlive] / src / wizard.cpp
index d7ce009c28a5aff3a93c7ff84d741676337e3d27..430afa2a8dd0be31fa31d1c6f045c3ff6a34b0c7 100644 (file)
@@ -35,8 +35,8 @@
 #include <QXmlStreamWriter>
 #include <QTimer>
 
-const double recommendedMltVersion = 40;
-static const char version[] = VERSION;
+const double recommendedMltVersion = 50;
+static const char kdenlive_version[] = VERSION;
 
 Wizard::Wizard(bool upgrade, QWidget *parent) :
         QWizard(parent)
@@ -48,7 +48,7 @@ Wizard::Wizard(bool upgrade, QWidget *parent) :
     page1->setTitle(i18n("Welcome"));
     QLabel *label;
     if (upgrade)
-        label = new QLabel(i18n("Your Kdenlive version was upgraded to version %1. Please take some time to review the basic settings", QString(version).section(' ', 0, 0)));
+        label = new QLabel(i18n("Your Kdenlive version was upgraded to version %1. Please take some time to review the basic settings", QString(kdenlive_version).section(' ', 0, 0)));
     else
         label = new QLabel(i18n("This is the first time you run Kdenlive. This wizard will let you adjust some basic settings, you will be ready to edit your first movie in a few seconds..."));
     label->setWordWrap(true);
@@ -113,7 +113,7 @@ Wizard::Wizard(bool upgrade, QWidget *parent) :
     page3->setTitle(i18n("Additional Settings"));
     m_extra.setupUi(page3);
     m_extra.projectfolder->setMode(KFile::Directory);
-    m_extra.projectfolder->setPath(KdenliveSettings::defaultprojectfolder());
+    m_extra.projectfolder->setUrl(KUrl(KdenliveSettings::defaultprojectfolder()));
     m_extra.videothumbs->setChecked(KdenliveSettings::videothumbnails());
     m_extra.audiothumbs->setChecked(KdenliveSettings::audiothumbnails());
     m_extra.autosave->setChecked(KdenliveSettings::crashrecovery());
@@ -299,6 +299,18 @@ void Wizard::checkMltComponents()
         } else {
             imageItem->setIcon(0, m_okIcon);
         }
+
+        // Check MLT title module
+        QTreeWidgetItem *titleItem = new QTreeWidgetItem(m_mltCheck.programList, QStringList() << QString() << i18n("Title module"));
+        titleItem->setData(1, Qt::UserRole, i18n("Required to work with titles"));
+        titleItem->setSizeHint(0, itemSize);
+        if (!result.contains("- kdenlivetitle")) {
+            KdenliveSettings::setHastitleproducer(false);
+            titleItem->setIcon(0, m_badIcon);
+        } else {
+            titleItem->setIcon(0, m_okIcon);
+            KdenliveSettings::setHastitleproducer(true);
+        }
     }
 }
 
@@ -316,29 +328,36 @@ void Wizard::slotCheckPrograms()
     else if (KStandardDirs::findExe("ffplay").isEmpty()) item->setIcon(0, m_badIcon);
     else item->setIcon(0, m_okIcon);
 
-    item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("Recordmydesktop"));
+#ifndef Q_WS_MAC
+    item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("recordmydesktop"));
     item->setData(1, Qt::UserRole, i18n("Required for screen capture"));
     item->setSizeHint(0, itemSize);
     if (KStandardDirs::findExe("recordmydesktop").isEmpty()) item->setIcon(0, m_badIcon);
     else item->setIcon(0, m_okIcon);
 
-    item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("Dvgrab"));
+    item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("dvgrab"));
     item->setData(1, Qt::UserRole, i18n("Required for firewire capture"));
     item->setSizeHint(0, itemSize);
     if (KStandardDirs::findExe("dvgrab").isEmpty()) item->setIcon(0, m_badIcon);
     else item->setIcon(0, m_okIcon);
+#endif
 
-    item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("Dvdauthor"));
+    item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("dvdauthor"));
     item->setData(1, Qt::UserRole, i18n("Required for creation of DVD"));
     item->setSizeHint(0, itemSize);
     if (KStandardDirs::findExe("dvdauthor").isEmpty()) item->setIcon(0, m_badIcon);
     else item->setIcon(0, m_okIcon);
 
-    item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("Mkisofs"));
+
+    item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("genisoimage or mkisofs"));
     item->setData(1, Qt::UserRole, i18n("Required for creation of DVD ISO images"));
     item->setSizeHint(0, itemSize);
-    if (KStandardDirs::findExe("mkisofs").isEmpty()) item->setIcon(0, m_badIcon);
-    else item->setIcon(0, m_okIcon);
+    if (KStandardDirs::findExe("genisoimage").isEmpty()) {
+        // no GenIso, check for mkisofs
+        if (!KStandardDirs::findExe("mkisofs").isEmpty()) {
+            item->setIcon(0, m_okIcon);
+        } else item->setIcon(0, m_badIcon);
+    } else item->setIcon(0, m_okIcon);
 
     // set up some default applications
     QString program;
@@ -506,8 +525,9 @@ void Wizard::adjustSettings()
         KdenliveSettings::setDefault_profile(selectedProfile);
     }
     QString path = m_extra.projectfolder->url().path();
-    if (KStandardDirs::makeDir(path) == false) kDebug() << "/// ERROR CREATING PROJECT FOLDER: " << path;
-    KdenliveSettings::setDefaultprojectfolder(path);
+    if (KStandardDirs::makeDir(path) == false) {
+        kDebug() << "/// ERROR CREATING PROJECT FOLDER: " << path;
+    } else KdenliveSettings::setDefaultprojectfolder(path);
 
 }
 
@@ -538,7 +558,7 @@ void Wizard::slotCheckMlt()
     if (!result.contains("sdl") || !result.contains("sdl_preview")) errorMessage.append(i18n("MLT's SDL module not found. Please check your MLT install. Kdenlive will not work until this issue is fixed.") + '\n');
 
     if (!errorMessage.isEmpty()) {
-        errorMessage.prepend(QString("<b>%1</b><br>").arg(i18n("Fatal Error")));
+        errorMessage.prepend(QString("<b>%1</b><br />").arg(i18n("Fatal Error")));
         QLabel *pix = new QLabel();
         pix->setPixmap(KIcon("dialog-error").pixmap(30));
         QLabel *label = new QLabel(errorMessage);
@@ -561,7 +581,7 @@ bool Wizard::isOk() const
 
 void Wizard::slotShowWebInfos()
 {
-    KRun::runUrl(KUrl("http://kdenlive.org/discover/" + QString(version).section(' ', 0, 0)), "text/html", this);
+    KRun::runUrl(KUrl("http://kdenlive.org/discover/" + QString(kdenlive_version).section(' ', 0, 0)), "text/html", this);
 }
 
 #include "wizard.moc"