#include <KProcess>
#include <KActionMenu>
#include <KMenu>
-#include <locale.h>
#include <ktogglefullscreenaction.h>
#include <KFileItem>
#include <KNotification>
#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);
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);
}
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.
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) {
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()));
if (m_activeTimeline) {
m_activeTimeline->refresh();
m_activeTimeline->projectView()->checkAutoScroll();
- m_activeTimeline->projectView()->checkTrackHeight();
+ m_activeTimeline->checkTrackHeight();
if (m_activeDocument)
m_activeDocument->clipManager()->checkAudioThumbs();
}
if (m_renderWidget->automaticAudioExport()) {
exportAudio = m_activeTimeline->checkProjectAudio();
} else exportAudio = m_renderWidget->selectedAudioExport();
+
+ // Set playlist audio volume to 100%
+ QDomDocument doc;
+ doc.setContent(playlistContent);
+ QDomElement tractor = doc.documentElement().firstChildElement("tractor");
+ if (!tractor.isNull()) {
+ QDomNodeList props = tractor.elementsByTagName("property");
+ for (int i = 0; i < props.count(); i++) {
+ if (props.at(i).toElement().attribute("name") == "meta.volume") {
+ props.at(i).firstChild().setNodeValue("1");
+ break;
+ }
+ }
+ }
// Do we want proxy rendering
if (m_projectList->useProxy() && !m_renderWidget->proxyRendering()) {
- QDomDocument doc;
- doc.setContent(playlistContent);
QString root = doc.documentElement().attribute("root");
// replace proxy clips with originals
playlistContent.replace(key, i.value());
}
}*/
- playlistContent = doc.toString();
}
+ playlistContent = doc.toString();
// Do save scenelist
QFile file(playlistPath);
{
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;*/