X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmainwindow.cpp;h=7abcf53436aa3ebf39779e5c01f9a868a9410056;hb=d1ae9c451b613cf4597433ffe315e64dd8c0144d;hp=38b4d51524a9a3c6d164f308b0b7424244160319;hpb=96c828aa19d2ea91989079d9adf8d6a4e405567b;p=kdenlive diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 38b4d515..7abcf534 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1738,11 +1738,8 @@ void MainWindow::recoverFiles(QList staleFiles) } } - void MainWindow::parseProfiles(const QString &mltPath) { - // kDebug()<<" + + YOUR MLT INSTALL WAS FOUND IN: "<< MLT_PREFIX <exec() == QDialog::Rejected) { + ::exit(0); + } + KUrl rendererPath = getUrl->selectedUrl(); + delete getUrl; + if (rendererPath.isEmpty()) ::exit(0); + KdenliveSettings::setRendererpath(rendererPath.path()); + } + QStringList profilesFilter; profilesFilter << "*"; QStringList profilesList = QDir(KdenliveSettings::mltpath()).entryList(profilesFilter, QDir::Files); - if (profilesList.isEmpty()) { // Cannot find MLT path, try finding melt QString profilePath = KdenliveSettings::rendererpath(); if (!profilePath.isEmpty()) { profilePath = profilePath.section('/', 0, -3); KdenliveSettings::setMltpath(profilePath + "/share/mlt/profiles/"); - QStringList profilesList = QDir(KdenliveSettings::mltpath()).entryList(profilesFilter, QDir::Files); + profilesList = QDir(KdenliveSettings::mltpath()).entryList(profilesFilter, QDir::Files); } - if (profilesList.isEmpty()) { // Cannot find the MLT profiles, ask for location - KUrlRequesterDialog *getUrl = new KUrlRequesterDialog(KdenliveSettings::mltpath(), i18n("Cannot find your Mlt profiles, please give the path"), this); + KUrlRequesterDialog *getUrl = new KUrlRequesterDialog(KdenliveSettings::mltpath(), i18n("Cannot find your MLT profiles, please give the path"), this); getUrl->fileDialog()->setMode(KFile::Directory); if (getUrl->exec() == QDialog::Rejected) { ::exit(0); @@ -1782,25 +1791,13 @@ void MainWindow::parseProfiles(const QString &mltPath) delete getUrl; if (mltPath.isEmpty()) ::exit(0); KdenliveSettings::setMltpath(mltPath.path(KUrl::AddTrailingSlash)); - QStringList profilesList = QDir(KdenliveSettings::mltpath()).entryList(profilesFilter, QDir::Files); - } - } - - if (KdenliveSettings::rendererpath().isEmpty()) { - // Cannot find the MLT melt renderer, ask for location - KUrlRequesterDialog *getUrl = new KUrlRequesterDialog(QString(), i18n("Cannot find the melt program required for rendering (part of Mlt)"), this); - if (getUrl->exec() == QDialog::Rejected) { - ::exit(0); + profilesList = QDir(KdenliveSettings::mltpath()).entryList(profilesFilter, QDir::Files); } - KUrl rendererPath = getUrl->selectedUrl(); - delete getUrl; - if (rendererPath.isEmpty()) ::exit(0); - KdenliveSettings::setRendererpath(rendererPath.path()); } kDebug() << "RESULTING MLT PATH: " << KdenliveSettings::mltpath(); - // Parse MLT profiles to build a list of available video formats + // Parse again MLT profiles to build a list of available video formats if (profilesList.isEmpty()) parseProfiles(); } @@ -2947,12 +2944,9 @@ void MainWindow::keyPressEvent(QKeyEvent *ke) /** Gets called when the window gets hidden */ void MainWindow::hideEvent(QHideEvent */*event*/) { - // kDebug() << "I was hidden"; - // issue http://www.kdenlive.org/mantis/view.php?id=231 - if (isMinimized()) { - // kDebug() << "I am minimized"; - if (m_monitorManager) m_monitorManager->stopActiveMonitor(); - } + if (isMinimized()) + if (m_monitorManager) + m_monitorManager->stopActiveMonitor(); } bool MainWindow::eventFilter(QObject *obj, QEvent *event)