]> git.sesse.net Git - kdenlive/commitdiff
Merge branch 'buildsystem' into next
authorAlberto Villa <avilla@FreeBSD.org>
Wed, 9 Nov 2011 11:26:00 +0000 (12:26 +0100)
committerAlberto Villa <avilla@FreeBSD.org>
Wed, 9 Nov 2011 11:26:00 +0000 (12:26 +0100)
1  2 
src/kdenlivesettingsdialog.cpp
src/mainwindow.cpp
src/projectsettings.cpp

index 520501e5069191995bcf1f966ffa5acaf2d93bd8,d1a586d5745f56934cee579c791804e30537fa1c..34297068c8e61ff847ac971ade8d10fabbb2b8fe
@@@ -618,17 -618,17 +618,17 @@@ void KdenliveSettingsDialog::updateSett
  
      // Check encoding profiles
      QString data = m_configCapture.kcfg_v4l_profile->itemData(m_configCapture.kcfg_v4l_profile->currentIndex()).toString();
 -    if (!data.isEmpty() && data.section(";", 0, 0) != KdenliveSettings::v4l_parameters()) {
 +    if (!data.isEmpty() && (data.section(";", 0, 0) != KdenliveSettings::v4l_parameters() || data.section(";", 1, 1) != KdenliveSettings::v4l_extension())) {
          KdenliveSettings::setV4l_parameters(data.section(";", 0, 0));
          KdenliveSettings::setV4l_extension(data.section(";", 1, 1));
      }
      data = m_configCapture.kcfg_decklink_profile->itemData(m_configCapture.kcfg_decklink_profile->currentIndex()).toString();
 -    if (!data.isEmpty() && data.section(";", 0, 0) != KdenliveSettings::decklink_parameters()) {
 +    if (!data.isEmpty() && (data.section(";", 0, 0) != KdenliveSettings::decklink_parameters() || data.section(";", 1, 1) != KdenliveSettings::decklink_extension())) {
          KdenliveSettings::setDecklink_parameters(data.section(";", 0, 0));
          KdenliveSettings::setDecklink_extension(data.section(";", 1, 1));
      }
      data = m_configProject.kcfg_proxy_profile->itemData(m_configProject.kcfg_proxy_profile->currentIndex()).toString();
 -    if (!data.isEmpty() && data.section(";", 0, 0) != KdenliveSettings::proxyparams()) {
 +    if (!data.isEmpty() && (data.section(";", 0, 0) != KdenliveSettings::proxyparams() || data.section(";", 1, 1) != KdenliveSettings::proxyextension())) {
          KdenliveSettings::setProxyparams(data.section(";", 0, 0));
          KdenliveSettings::setProxyextension(data.section(";", 1, 1));
      }
  #endif
  
      KConfigDialog::settingsChangedSlot();
      //KConfigDialog::updateSettings();
      if (resetProfile) emit doResetProfile();
  }
diff --combined src/mainwindow.cpp
index 5982d3024a143a93ef807e3144e37f012a18b83b,75ea1445b1cf0f6f7aca6cc8f509b3bdd37c99c8..d9f6c403823d3cb56a92700130107de6b4f01df9
  #include <KFileItem>
  #include <KNotification>
  #include <KNotifyConfigWidget>
+ #if KDE_IS_VERSION(4,3,80)
  #include <knewstuff3/downloaddialog.h>
  #include <knewstuff3/knewstuffaction.h>
+ #else
+ #include <knewstuff2/engine.h>
+ #include <knewstuff2/ui/knewstuffaction.h>
+ #define KNS3 KNS
+ #endif
  #include <KToolBar>
  #include <KColorScheme>
  #include <KProgressDialog>
@@@ -203,19 -209,9 +209,19 @@@ MainWindow::MainWindow(const QString &M
      m_clipMonitorDock->setObjectName("clip_monitor");
      m_clipMonitor = new Monitor("clip", m_monitorManager, QString(), m_timelineArea);
      m_clipMonitorDock->setWidget(m_clipMonitor);
 +    
 +    // Connect the project list
      connect(m_projectList, SIGNAL(clipSelected(DocClipBase *, QPoint)), m_clipMonitor, SLOT(slotSetClipProducer(DocClipBase *, QPoint)));
      connect(m_projectList, SIGNAL(raiseClipMonitor()), m_clipMonitor, SLOT(activateMonitor()));
 -    
 +    connect(m_projectList, SIGNAL(loadingIsOver()), this, SLOT(slotElapsedTime()));
 +    connect(m_projectList, SIGNAL(displayMessage(const QString&, int)), this, SLOT(slotGotProgressInfo(const QString&, int)));
 +    connect(m_projectList, SIGNAL(updateRenderStatus()), this, SLOT(slotCheckRenderStatus()));
 +    connect(m_projectList, SIGNAL(clipNeedsReload(const QString&)),this, SLOT(slotUpdateClip(const QString &)));
 +    connect(m_projectList, SIGNAL(updateProfile(const QString &)), this, SLOT(slotUpdateProjectProfile(const QString &)));
 +    connect(m_projectList, SIGNAL(refreshClip(const QString &, bool)), m_monitorManager, SLOT(slotRefreshCurrentMonitor()));
 +    connect(m_projectList, SIGNAL(findInTimeline(const QString&)), this, SLOT(slotClipInTimeline(const QString&)));
 +    connect(m_clipMonitor, SIGNAL(zoneUpdated(QPoint)), m_projectList, SLOT(slotUpdateClipCut(QPoint)));
 +
      m_projectMonitorDock = new QDockWidget(i18n("Project Monitor"), this);
      m_projectMonitorDock->setObjectName("project_monitor");
      m_projectMonitor = new Monitor("project", m_monitorManager, QString());
      connect(m_notesWidget, SIGNAL(seekProject(int)), m_projectMonitor->render, SLOT(seekToFrame(int)));
      
      m_notesWidget->setTabChangesFocus(true);
+ #if KDE_IS_VERSION(4,4,0)
      m_notesWidget->setClickMessage(i18n("Enter your project notes here ..."));
+ #endif
      m_notesDock->setWidget(m_notesWidget);
      addDockWidget(Qt::TopDockWidgetArea, m_notesDock);
  
  
      connect(m_projectMonitorDock, SIGNAL(visibilityChanged(bool)), m_projectMonitor, SLOT(refreshMonitor(bool)));
      connect(m_clipMonitorDock, SIGNAL(visibilityChanged(bool)), m_clipMonitor, SLOT(refreshMonitor(bool)));
 -    //connect(m_monitorManager, SIGNAL(connectMonitors()), this, SLOT(slotConnectMonitors()));
      connect(m_monitorManager, SIGNAL(checkColorScopes()), this, SLOT(slotUpdateColorScopes()));
      connect(m_monitorManager, SIGNAL(clearScopes()), this, SLOT(slotClearColorScopes()));
      connect(m_effectList, SIGNAL(addEffect(const QDomElement)), this, SLOT(slotAddEffect(const QDomElement)));
      
      // Populate encoding profiles
      KConfig conf("encodingprofiles.rc", KConfig::FullConfig, "appdata");
 -    if (KdenliveSettings::proxyparams().isEmpty()) {
 +    if (KdenliveSettings::proxyparams().isEmpty() || KdenliveSettings::proxyextension().isEmpty()) {
          KConfigGroup group(&conf, "proxy");
          QMap< QString, QString > values = group.entryMap();
          QMapIterator<QString, QString> i(values);
              KdenliveSettings::setProxyextension(data.section(';', 1, 1));
          }
      }
 -    if (KdenliveSettings::v4l_parameters().isEmpty()) {
 +    if (KdenliveSettings::v4l_parameters().isEmpty() || KdenliveSettings::v4l_extension().isEmpty()) {
          KConfigGroup group(&conf, "video4linux");
          QMap< QString, QString > values = group.entryMap();
          QMapIterator<QString, QString> i(values);
              KdenliveSettings::setV4l_extension(data.section(';', 1, 1));
          }
      }
 -    if (KdenliveSettings::decklink_parameters().isEmpty()) {
 +    if (KdenliveSettings::decklink_parameters().isEmpty() || KdenliveSettings::decklink_extension().isEmpty()) {
          KConfigGroup group(&conf, "decklink");
          QMap< QString, QString > values = group.entryMap();
          QMapIterator<QString, QString> i(values);
@@@ -2441,6 -2440,7 +2449,6 @@@ void MainWindow::connectDocument(TrackV
              disconnect(m_notesWidget, SIGNAL(textChanged()), m_activeDocument, SLOT(setModified()));
              disconnect(m_clipMonitor, SIGNAL(zoneUpdated(QPoint)), m_activeDocument, SLOT(setModified()));
              disconnect(m_projectList, SIGNAL(projectModified()), m_activeDocument, SLOT(setModified()));
 -            disconnect(m_projectList, SIGNAL(updateProfile(const QString &)), this, SLOT(slotUpdateProjectProfile(const QString &)));
  
              disconnect(m_projectMonitor->render, SIGNAL(refreshDocumentProducers(bool, bool)), m_activeDocument, SLOT(checkProjectClips(bool, bool)));
  
              disconnect(m_activeTimeline->projectView(), SIGNAL(activateDocumentMonitor()), m_projectMonitor, SLOT(activateMonitor()));
              disconnect(m_activeTimeline, SIGNAL(zoneMoved(int, int)), this, SLOT(slotZoneMoved(int, int)));
              disconnect(m_projectList, SIGNAL(loadingIsOver()), m_activeTimeline->projectView(), SLOT(slotUpdateAllThumbs()));
 -            disconnect(m_projectList, SIGNAL(displayMessage(const QString&, int)), this, SLOT(slotGotProgressInfo(const QString&, int)));
 -            disconnect(m_projectList, SIGNAL(updateRenderStatus()), this, SLOT(slotCheckRenderStatus()));
 -            disconnect(m_projectList, SIGNAL(clipNeedsReload(const QString&)), this, SLOT(slotUpdateClip(const QString &)));
              disconnect(m_projectList, SIGNAL(refreshClip(const QString &)), m_activeTimeline->projectView(), SLOT(slotRefreshThumbs(const QString &)));
              m_effectStack->clear();
          }
          //m_activeDocument->setRenderer(NULL);
 -        disconnect(m_projectList, SIGNAL(refreshClip(const QString &, bool)), m_monitorManager, SLOT(slotRefreshCurrentMonitor()));
          m_clipMonitor->stop();
      }
      KdenliveSettings::setCurrent_profile(doc->profilePath());
      m_projectList->setDocument(doc);
      m_transitionConfig->updateProjectFormat(doc->mltProfile(), doc->timecode(), doc->tracksList());
      m_effectStack->updateProjectFormat(doc->mltProfile(), doc->timecode());
 -    connect(m_projectList, SIGNAL(refreshClip(const QString &, bool)), m_monitorManager, SLOT(slotRefreshCurrentMonitor()));
      connect(m_projectList, SIGNAL(refreshClip(const QString &, bool)), trackView->projectView(), SLOT(slotRefreshThumbs(const QString &, bool)));
 -    connect(m_projectList, SIGNAL(clipNeedsReload(const QString&)),this, SLOT(slotUpdateClip(const QString &)));
  
      connect(m_projectList, SIGNAL(projectModified()), doc, SLOT(setModified()));
 -    connect(m_projectList, SIGNAL(updateProfile(const QString &)), this, SLOT(slotUpdateProjectProfile(const QString &)));
      connect(m_projectList, SIGNAL(clipNameChanged(const QString, const QString)), trackView->projectView(), SLOT(clipNameChanged(const QString, const QString)));
  
 -    connect(m_projectList, SIGNAL(findInTimeline(const QString&)), this, SLOT(slotClipInTimeline(const QString&)));
 -
 -
      //connect(trackView, SIGNAL(cursorMoved()), m_projectMonitor, SLOT(activateMonitor()));
      connect(trackView, SIGNAL(insertTrack(int)), this, SLOT(slotInsertTrack(int)));
      connect(trackView, SIGNAL(deleteTrack(int)), this, SLOT(slotDeleteTrack(int)));
      connect(trackView->projectView(), SIGNAL(forceClipProcessing(const QString &)), m_projectList, SLOT(slotForceProcessing(const QString &)));
      connect(m_projectMonitor, SIGNAL(renderPosition(int)), trackView, SLOT(moveCursorPos(int)));
      connect(m_projectMonitor, SIGNAL(zoneUpdated(QPoint)), trackView, SLOT(slotSetZone(QPoint)));
 -    connect(m_clipMonitor, SIGNAL(zoneUpdated(QPoint)), m_projectList, SLOT(slotUpdateClipCut(QPoint)));
      connect(m_projectMonitor, SIGNAL(zoneUpdated(QPoint)), doc, SLOT(setModified()));
      connect(m_clipMonitor, SIGNAL(zoneUpdated(QPoint)), doc, SLOT(setModified()));
      connect(m_projectMonitor, SIGNAL(durationChanged(int)), trackView, SLOT(setDuration(int)));
      connect(trackView->projectView(), SIGNAL(activateDocumentMonitor()), m_projectMonitor, SLOT(activateMonitor()));
      connect(trackView, SIGNAL(zoneMoved(int, int)), this, SLOT(slotZoneMoved(int, int)));
      connect(m_projectList, SIGNAL(loadingIsOver()), trackView->projectView(), SLOT(slotUpdateAllThumbs()));
 -    connect(m_projectList, SIGNAL(loadingIsOver()), this, SLOT(slotElapsedTime()));
 -    connect(m_projectList, SIGNAL(displayMessage(const QString&, int)), this, SLOT(slotGotProgressInfo(const QString&, int)));
 -    connect(m_projectList, SIGNAL(updateRenderStatus()), this, SLOT(slotCheckRenderStatus()));
  
  
      trackView->projectView()->setContextMenu(m_timelineContextMenu, m_timelineContextClipMenu, m_timelineContextTransitionMenu, m_clipTypeGroup, (QMenu*)(factory()->container("marker_menu", this)));
@@@ -3661,6 -3675,7 +3669,7 @@@ void MainWindow::slotResizeItemEnd(
  int MainWindow::getNewStuff(const QString &configFile)
  {
      KNS3::Entry::List entries;
+ #if KDE_IS_VERSION(4,3,80)
      KNS3::DownloadDialog dialog(configFile);
      dialog.exec();
      entries = dialog.changedEntries();
          if (entry.status() == KNS3::Entry::Installed)
              kDebug() << "// Installed files: " << entry.installedFiles();
      }
+ #else
+     KNS::Engine engine(0);
+     if (engine.init(configFile))
+         entries = engine.downloadDialogModal(this);
+     foreach(KNS::Entry * entry, entries) {
+         if (entry->status() == KNS::Entry::Installed)
+             kDebug() << "// Installed files: " << entry->installedFiles();
+     }
+ #endif
      return entries.size();
  }
  
diff --combined src/projectsettings.cpp
index bce75275d7ac0f46bdaf6e359154124c8fd5e1c0,270845f3c73d64b496e0755945892a420b827045..0504ba827552e0af64caa4553c26606a192fec7d
@@@ -104,7 -104,7 +104,7 @@@ ProjectSettings::ProjectSettings(Projec
          if (!k.key().isEmpty()) {
              QString params = k.value().section(';', 0, 0);
              QString extension = k.value().section(';', 1, 1);
 -            if (params == proxyparameters && extension == proxyextension) {
 +            if (ix == -1 && ((params == proxyparameters && extension == proxyextension) || (proxyparameters.isEmpty() || proxyextension.isEmpty()))) {
                  // this is the current profile
                  ix = proxy_profile->count();
              }
@@@ -298,9 -298,7 +298,7 @@@ void ProjectSettings::slotUpdateFiles(b
              usedSize += clip->fileSize();
          }
      }
- #if QT_VERSION >= 0x040500
      allFonts.removeDuplicates();
- #endif
      // Hide unused categories
      for (int i = 0; i < files_list->topLevelItemCount(); i++) {
          if (files_list->topLevelItem(i)->childCount() == 0) {