]> git.sesse.net Git - kdenlive/blobdiff - src/projectsettings.cpp
Cleanup UI for render job list
[kdenlive] / src / projectsettings.cpp
index 41deae0fc5c6976c2d68c703e42a3178a854d220..0504ba827552e0af64caa4553c26606a192fec7d 100644 (file)
@@ -94,8 +94,7 @@ ProjectSettings::ProjectSettings(ProjectList *projectlist, QStringList lumas, in
 
 
     // load proxy profiles
-    QString profileFile = KStandardDirs::locateLocal("appdata", "encodingprofiles.rc");
-    KConfig conf(profileFile, KConfig::SimpleConfig);
+    KConfig conf("encodingprofiles.rc", KConfig::FullConfig, "appdata");
     KConfigGroup group(&conf, "proxy");
     QMap <QString, QString> values = group.entryMap();
     QMapIterator<QString, QString> k(values);
@@ -105,7 +104,7 @@ ProjectSettings::ProjectSettings(ProjectList *projectlist, QStringList lumas, in
         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();
             }
@@ -187,8 +186,10 @@ void ProjectSettings::slotClearCache()
 
 void ProjectSettings::slotDeleteProxies()
 {
+    if (KMessageBox::warningContinueCancel(this, i18n("Deleting proxy clips will disable proxies for this project.")) != KMessageBox::Continue) return;
     buttonBox->setEnabled(false);
-    
+    enable_proxy->setChecked(false);
+    emit disableProxies();
     KIO::NetAccess::del(KUrl(project_folder->url().path(KUrl::AddTrailingSlash) + "proxy/"), this);
     KStandardDirs::makeDir(project_folder->url().path(KUrl::AddTrailingSlash) + "proxy/");
     buttonBox->setEnabled(true);
@@ -216,7 +217,7 @@ void ProjectSettings::slotUpdateFiles(bool cacheOnly)
 
     // List all files that are used in the project. That also means:
     // images included in slideshow and titles, files in playlist clips
-    // TODO: images used in luma transitions, files used for LADSPA effects?
+    // TODO: images used in luma transitions?
 
     // Setup categories
     QTreeWidgetItem *videos = new QTreeWidgetItem(files_list, QStringList() << i18n("Video clips"));
@@ -297,9 +298,7 @@ void ProjectSettings::slotUpdateFiles(bool cacheOnly)
             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) {
@@ -328,6 +327,7 @@ void ProjectSettings::accept()
 
 void ProjectSettings::slotUpdateDisplay()
 {
+    QLocale locale;
     QString currentProfile = profiles_list->itemData(profiles_list->currentIndex()).toString();
     QMap< QString, QString > values = ProfilesDialog::getSettingsFromFile(currentProfile);
     p_size->setText(values.value("width") + 'x' + values.value("height"));
@@ -336,7 +336,7 @@ void ProjectSettings::slotUpdateDisplay()
     p_display->setText(values.value("display_aspect_num") + '/' + values.value("display_aspect_den"));
     if (values.value("progressive").toInt() == 0) {
         p_progressive->setText(i18n("Interlaced (%1 fields per second)",
-                                    QString::number((double)2 * values.value("frame_rate_num").toInt() / values.value("frame_rate_den").toInt(), 'f', 2)));
+                                    locale.toString((double)2 * values.value("frame_rate_num").toInt() / values.value("frame_rate_den").toInt(), 'f', 2)));
     } else {
         p_progressive->setText(i18n("Progressive"));
     }