]> git.sesse.net Git - kdenlive/blobdiff - src/mainwindow.cpp
Show rendering progress in the correct Kdenlive instance:
[kdenlive] / src / mainwindow.cpp
index 4b534f62d4f630f56cde1cdecc391a763173cacf..42bf7ac76be153586b9741b52c65c63ce6118e75 100644 (file)
@@ -87,7 +87,6 @@
 #include <KProcess>
 #include <KActionMenu>
 #include <KMenu>
-#include <locale.h>
 #include <ktogglefullscreenaction.h>
 #include <KFileItem>
 #include <KNotification>
@@ -148,13 +147,19 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString &
 #endif /* NO_JOGSHUTTLE */
     m_findActivated(false),
     m_stopmotion(NULL)
-{
+{   
     qRegisterMetaType<QVector<int16_t> > ();
+
+    // Init locale
+    QLocale systemLocale = QLocale();
+    systemLocale.setNumberOptions(QLocale::OmitGroupSeparator);
+    QLocale::setDefault(systemLocale);
+
     // Create DBus interface
     new MainWindowAdaptor(this);
     QDBusConnection dbus = QDBusConnection::sessionBus();
     dbus.registerObject("/MainWindow", this);
-    //setlocale(LC_NUMERIC, "POSIX");
+
     if (!KdenliveSettings::colortheme().isEmpty()) slotChangePalette(NULL, KdenliveSettings::colortheme());
     setFont(KGlobalSettings::toolBarFont());
     parseProfiles(MltPath);
@@ -2086,13 +2091,6 @@ void MainWindow::doOpenFile(const KUrl &url, KAutoSaveFile *stale)
     m_clipMonitor->refreshMonitor(true);
 
     progressDialog.progressBar()->setValue(4);
-    bool readOnly = !doc->isReadOnly();
-    factory()->container("edit", this)->setEnabled(readOnly);
-    factory()->container("project", this)->setEnabled(readOnly);
-    factory()->container("tool", this)->setEnabled(readOnly);
-    factory()->container("clip", this)->setEnabled(readOnly);
-    factory()->container("timeline", this)->setEnabled(readOnly);
-    factory()->container("monitor", this)->setEnabled(readOnly);
     if (openBackup) slotOpenBackupDialog(url);
 }
 
@@ -2298,6 +2296,8 @@ void MainWindow::slotUpdateProjectProfile(const QString &profile)
     if (m_renderWidget) m_renderWidget->setProfile(m_activeDocument->mltProfile());
     m_timelineArea->setTabText(m_timelineArea->currentIndex(), m_activeDocument->description());
     if (updateFps) m_activeTimeline->updateProjectFps();
+    m_activeDocument->clipManager()->clearCache();
+    m_activeTimeline->updateProfile();
     m_activeDocument->setModified(true);
     m_commandStack->activeStack()->clear();
     //Update the mouse position display so it will display in DF/NDF format by default based on the project setting.
@@ -2373,7 +2373,7 @@ void MainWindow::slotUpdateMousePosition(int pos)
 
 void MainWindow::slotUpdateDocumentState(bool modified)
 {
-    if (!m_activeDocument || m_activeDocument->isReadOnly()) return;
+    if (!m_activeDocument) return;
     setCaption(m_activeDocument->description(), modified);
     m_saveAction->setEnabled(modified);
     if (modified) {
@@ -2495,7 +2495,7 @@ void MainWindow::connectDocument(TrackView *trackView, KdenliveDoc *doc)   //cha
 
     connect(doc, SIGNAL(docModified(bool)), this, SLOT(slotUpdateDocumentState(bool)));
     connect(doc, SIGNAL(guidesUpdated()), this, SLOT(slotGuidesUpdated()));
-    connect(doc, SIGNAL(saveTimelinePreview(const QString)), trackView, SLOT(slotSaveTimelinePreview(const QString)));
+    connect(doc, SIGNAL(saveTimelinePreview(const QString &)), trackView, SLOT(slotSaveTimelinePreview(const QString)));
     
     connect(m_notesWidget, SIGNAL(textChanged()), doc, SLOT(setModified()));
 
@@ -2641,7 +2641,7 @@ void MainWindow::updateConfiguration()
     if (m_activeTimeline) {
         m_activeTimeline->refresh();
         m_activeTimeline->projectView()->checkAutoScroll();
-        m_activeTimeline->projectView()->checkTrackHeight();
+        m_activeTimeline->checkTrackHeight();
         if (m_activeDocument)
             m_activeDocument->clipManager()->checkAudioThumbs();
     }
@@ -4302,7 +4302,7 @@ void MainWindow::slotOpenStopmotion()
 {
     if (m_stopmotion == NULL) {
         m_stopmotion = new StopmotionWidget(m_monitorManager, m_activeDocument->projectFolder(), m_stopmotion_actions->actions(), this);
-        connect(m_stopmotion, SIGNAL(addOrUpdateSequence(const QString)), m_projectList, SLOT(slotAddOrUpdateSequence(const QString)));
+        connect(m_stopmotion, SIGNAL(addOrUpdateSequence(const QString &)), m_projectList, SLOT(slotAddOrUpdateSequence(const QString)));
         //for (int i = 0; i < m_gfxScopesList.count(); i++) {
             // Check if we need the renderer to send a new frame for update
             /*if (!m_scopesList.at(i)->widget()->visibleRegion().isEmpty() && !(static_cast<AbstractScopeWidget *>(m_scopesList.at(i)->widget())->autoRefreshEnabled())) request = true;*/