connect(m_configEnv.kp_audio, SIGNAL(clicked()), this, SLOT(slotEditAudioApplication()));
connect(m_configEnv.kp_player, SIGNAL(clicked()), this, SLOT(slotEditVideoApplication()));
- QMap <QString, QString> profilesInfo = ProfilesDialog::getProfilesInfo();
- QMapIterator<QString, QString> i(profilesInfo);
- while (i.hasNext()) {
- i.next();
- m_configMisc.kcfg_profiles_list->addItem(i.key(), i.value());
- }
-
checkProfile();
slotUpdateDisplay();
}
void KdenliveSettingsDialog::checkProfile() {
+ m_configMisc.kcfg_profiles_list->clear();
+ QMap <QString, QString> profilesInfo = ProfilesDialog::getProfilesInfo();
+ QMapIterator<QString, QString> i(profilesInfo);
+ while (i.hasNext()) {
+ i.next();
+ m_configMisc.kcfg_profiles_list->addItem(i.key(), i.value());
+ }
+
if (!KdenliveSettings::default_profile().isEmpty()) {
for (int i = 0; i < m_configMisc.kcfg_profiles_list->count(); i++) {
if (m_configMisc.kcfg_profiles_list->itemData(i).toString() == KdenliveSettings::default_profile()) {
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<gui name="kdenlive" version="35">
+<gui name="kdenlive" version="36">
<ToolBar name="extraToolBar" >
<text>Extra Toolbar</text>
<Action name="project_render" />
<Action name="manage_profiles" />
<Action name="get_new_lumas" />
<Action name="get_new_profiles" />
- <Action name="run_wizard" />
+ <Action name="get_new_mlt_profiles" />
+ <Action name="run_wizard" />
</Menu>
</MenuBar>
</gui>
\ No newline at end of file
m_projectSearchNext->setShortcut(Qt::Key_F3);
m_projectSearchNext->setEnabled(false);
- KAction* profilesAction = new KAction(KIcon("document-new"), i18n("Manage Profiles"), this);
+ KAction* profilesAction = new KAction(KIcon("document-new"), i18n("Manage Project Profiles"), this);
collection->addAction("manage_profiles", profilesAction);
connect(profilesAction, SIGNAL(triggered(bool)), this, SLOT(slotEditProfiles()));
KNS::standardAction(i18n("Download New Lumas..."), this, SLOT(slotGetNewLumaStuff()), actionCollection(), "get_new_lumas");
- KNS::standardAction(i18n("Download New Profiles..."), this, SLOT(slotGetNewRenderStuff()), actionCollection(), "get_new_profiles");
+ KNS::standardAction(i18n("Download New Render Profiles..."), this, SLOT(slotGetNewRenderStuff()), actionCollection(), "get_new_profiles");
+
+ KNS::standardAction(i18n("Download New Project Profiles..."), this, SLOT(slotGetNewMltProfileStuff()), actionCollection(), "get_new_mlt_profiles");
KAction* wizAction = new KAction(KIcon("configure"), i18n("Run Config Wizard"), this);
collection->addAction("run_wizard", wizAction);
void MainWindow::slotEditProfiles() {
ProfilesDialog *w = new ProfilesDialog;
- w->exec();
+ if (w->exec() == QDialog::Accepted) {
+ KdenliveSettingsDialog* d = static_cast <KdenliveSettingsDialog*>(KConfigDialog::exists("settings"));
+ if (d) d->checkProfile();
+ }
delete w;
}
if (KConfigDialog::showDialog("settings")) {
KdenliveSettingsDialog* d = static_cast <KdenliveSettingsDialog*>(KConfigDialog::exists("settings"));
if (page != -1) d->showPage(page, option);
- d->checkProfile();
return;
}
}
}
+void MainWindow::slotGetNewMltProfileStuff() {
+ //KNS::Entry::List download();
+
+ KNS::Engine engine(0);
+ if (engine.init("kdenlive_mltprofiles.knsrc")) {
+ KNS::Entry::List entries = engine.downloadDialogModal(this);
+
+ if (entries.size() > 0) {
+ foreach(KNS::Entry* entry, entries) {
+ // care only about installed ones
+ if (entry->status() == KNS::Entry::Installed) {
+ foreach(const QString &file, entry->installedFiles()) {
+ kDebug() << "// CURRENTLY INSTALLED: " << file;
+ }
+ }
+ }
+
+ // update the list of profiles in settings dialog
+ KdenliveSettingsDialog* d = static_cast <KdenliveSettingsDialog*>(KConfigDialog::exists("settings"));
+ if (d) d->checkProfile();
+ }
+ }
+}
+
void MainWindow::slotAutoTransition() {
m_activeTimeline->projectView()->autoTransition();
}