comparison main/main.cpp @ 2008:55d9bbf1fe45 zoom

Merge from default branch
author Chris Cannam
date Mon, 17 Sep 2018 14:05:41 +0100
parents b0138a0fbace 36e5cbe6a16f
children 9ae7725215e3
comparison
equal deleted inserted replaced
2007:246bdf94ef7b 2008:55d9bbf1fe45
22 #include "base/PropertyContainer.h" 22 #include "base/PropertyContainer.h"
23 #include "base/Preferences.h" 23 #include "base/Preferences.h"
24 #include "data/fileio/FileSource.h" 24 #include "data/fileio/FileSource.h"
25 #include "widgets/TipDialog.h" 25 #include "widgets/TipDialog.h"
26 #include "widgets/InteractiveFileFinder.h" 26 #include "widgets/InteractiveFileFinder.h"
27 #include "svapp/framework/TransformUserConfigurator.h" 27 #include "framework/TransformUserConfigurator.h"
28 #include "transform/TransformFactory.h" 28 #include "transform/TransformFactory.h"
29 #include "svcore/plugin/PluginScan.h" 29 #include "plugin/PluginScan.h"
30 #include "plugin/PluginPathSetter.h"
30 31
31 #include <QMetaType> 32 #include <QMetaType>
32 #include <QApplication> 33 #include <QApplication>
33 #include <QDesktopWidget> 34 #include <QDesktopWidget>
34 #include <QMessageBox> 35 #include <QMessageBox>
277 QSettings settings; 278 QSettings settings;
278 279
279 settings.beginGroup("Preferences"); 280 settings.beginGroup("Preferences");
280 // Default to using Piper server; can change in preferences 281 // Default to using Piper server; can change in preferences
281 if (!settings.contains("run-vamp-plugins-in-process")) { 282 if (!settings.contains("run-vamp-plugins-in-process")) {
282 cerr << "setting does not exist yet" << endl;
283 settings.setValue("run-vamp-plugins-in-process", false); 283 settings.setValue("run-vamp-plugins-in-process", false);
284 } 284 }
285 settings.endGroup(); 285 settings.endGroup();
286 286
287 settings.beginGroup("Preferences"); 287 settings.beginGroup("Preferences");
299 list << "http://www.vamp-plugins.org/rdf/plugins/index.txt"; 299 list << "http://www.vamp-plugins.org/rdf/plugins/index.txt";
300 settings.setValue("rdf-indices", list); 300 settings.setValue("rdf-indices", list);
301 } 301 }
302 settings.endGroup(); 302 settings.endGroup();
303 303
304 PluginPathSetter::initialiseEnvironmentVariables();
305
304 QIcon icon; 306 QIcon icon;
305 int sizes[] = { 16, 22, 24, 32, 48, 64, 128 }; 307 int sizes[] = { 16, 22, 24, 32, 48, 64, 128 };
306 for (int i = 0; i < int(sizeof(sizes)/sizeof(sizes[0])); ++i) { 308 for (int i = 0; i < int(sizeof(sizes)/sizeof(sizes[0])); ++i) {
307 icon.addFile(QString(":icons/sv-%1x%2.png").arg(sizes[i]).arg(sizes[i])); 309 icon.addFile(QString(":icons/sv-%1x%2.png").arg(sizes[i]).arg(sizes[i]));
308 } 310 }
309 QApplication::setWindowIcon(icon); 311 QApplication::setWindowIcon(icon);
310 312
311 QString language = QLocale::system().name(); 313 QString language = QLocale::system().name();
314 SVDEBUG << "System language is: " << language << endl;
312 315
313 settings.beginGroup("Preferences"); 316 settings.beginGroup("Preferences");
314 language = settings.value("locale", language).toString(); 317 QString prefLanguage = settings.value("locale", language).toString();
318 if (prefLanguage != QString()) language = prefLanguage;
315 settings.endGroup(); 319 settings.endGroup();
316 320
317 QTranslator qtTranslator; 321 QTranslator qtTranslator;
318 QString qtTrName = QString("qt_%1").arg(language); 322 QString qtTrName = QString("qt_%1").arg(language);
319 SVDEBUG << "Loading " << qtTrName << "... "; 323 SVDEBUG << "Loading " << qtTrName << "... ";