Compare commits
3 Commits
0cf5b7705e
...
bcb89dedfa
Author | SHA1 | Date |
---|---|---|
Alexey Sokolov | bcb89dedfa | |
Clementine Buildbot | 2f3464403b | |
Alexey Sokolov | fb3d5ad476 |
|
@ -3,10 +3,10 @@
|
||||||
# This file is distributed under the same license as the Clementine package.
|
# This file is distributed under the same license as the Clementine package.
|
||||||
#
|
#
|
||||||
# Translators:
|
# Translators:
|
||||||
# Adolfo Jayme-Barrientos, 2014
|
# Adolfo Jayme Barrientos, 2014
|
||||||
# Adolfo Jayme-Barrientos, 2018-2022
|
# Adolfo Jayme Barrientos, 2018-2022
|
||||||
# Adolfo Jayme-Barrientos, 2015-2016
|
# Adolfo Jayme Barrientos, 2015-2016
|
||||||
# Adolfo Jayme-Barrientos, 2014
|
# Adolfo Jayme Barrientos, 2014
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010
|
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -14,7 +14,7 @@ msgstr ""
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2011-04-09 10:24+0000\n"
|
"POT-Creation-Date: 2011-04-09 10:24+0000\n"
|
||||||
"PO-Revision-Date: 2011-10-27 18:53+0000\n"
|
"PO-Revision-Date: 2011-10-27 18:53+0000\n"
|
||||||
"Last-Translator: Adolfo Jayme-Barrientos, 2018-2022\n"
|
"Last-Translator: Adolfo Jayme Barrientos, 2018-2022\n"
|
||||||
"Language-Team: Esperanto (http://app.transifex.com/davidsansome/clementine/language/eo/)\n"
|
"Language-Team: Esperanto (http://app.transifex.com/davidsansome/clementine/language/eo/)\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
#
|
#
|
||||||
# Translators:
|
# Translators:
|
||||||
# Coroccotta <adiazubierna@gmail.com>, 2012
|
# Coroccotta <adiazubierna@gmail.com>, 2012
|
||||||
# Adolfo Jayme-Barrientos, 2014
|
# Adolfo Jayme Barrientos, 2014
|
||||||
# Adolfo Jayme-Barrientos, 2012-2013,2018,2021
|
# Adolfo Jayme Barrientos, 2012-2013,2018,2021
|
||||||
# Adolfo Jayme-Barrientos, 2016-2022
|
# Adolfo Jayme Barrientos, 2016-2022
|
||||||
# Adolfo Jayme-Barrientos, 2015-2016
|
# Adolfo Jayme Barrientos, 2015-2016
|
||||||
# Adolfo Jayme-Barrientos, 2013
|
# Adolfo Jayme Barrientos, 2013
|
||||||
# Adolfo Jayme-Barrientos, 2014
|
# Adolfo Jayme Barrientos, 2014
|
||||||
# Adrián Prado Castro <adrian.prado@gmail.com>, 2013
|
# Adrián Prado Castro <adrian.prado@gmail.com>, 2013
|
||||||
# Adrián Ramirez Escalante <buried.prophet@gmail.com>, 2012
|
# Adrián Ramirez Escalante <buried.prophet@gmail.com>, 2012
|
||||||
# Amaury Ortega <amauryocortega@gmail.com>, 2018
|
# Amaury Ortega <amauryocortega@gmail.com>, 2018
|
||||||
|
|
|
@ -27,22 +27,26 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
#include <QDirIterator>
|
||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
|
#include <set>
|
||||||
|
|
||||||
ProjectMPresetModel::ProjectMPresetModel(ProjectMVisualisation* vis,
|
ProjectMPresetModel::ProjectMPresetModel(ProjectMVisualisation* vis,
|
||||||
QObject* parent)
|
QObject* parent)
|
||||||
: QAbstractItemModel(parent), vis_(vis) {
|
: QAbstractItemModel(parent), vis_(vis) {
|
||||||
// Find presets
|
// Find presets
|
||||||
QDir preset_dir(vis_->preset_url());
|
QDirIterator it(vis_->preset_url(),
|
||||||
QStringList presets(
|
QStringList() << "*.milk" << "*.prjm",
|
||||||
preset_dir.entryList(QStringList() << "*.milk"
|
|
||||||
<< "*.prjm",
|
|
||||||
QDir::Files | QDir::NoDotAndDotDot | QDir::Readable,
|
QDir::Files | QDir::NoDotAndDotDot | QDir::Readable,
|
||||||
QDir::Name | QDir::IgnoreCase));
|
QDirIterator::Subdirectories);
|
||||||
|
std::set<std::pair<QString, QString>> files;
|
||||||
|
while (it.hasNext()) {
|
||||||
|
it.next();
|
||||||
|
files.insert({it.filePath(), it.fileName()});
|
||||||
|
}
|
||||||
|
|
||||||
for (const QString& filename : presets) {
|
for (const auto& [filePath, fileName] : files) {
|
||||||
all_presets_ << Preset(preset_dir.absoluteFilePath(filename), filename,
|
all_presets_ << Preset(filePath, fileName, false);
|
||||||
false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ void ProjectMVisualisation::InitProjectM() {
|
||||||
if (!QFile::exists(path)) continue;
|
if (!QFile::exists(path)) continue;
|
||||||
|
|
||||||
// Don't use empty directories
|
// Don't use empty directories
|
||||||
if (QDir(path).entryList(QDir::Files | QDir::NoDotAndDotDot).isEmpty())
|
if (QDir(path).entryList(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot).isEmpty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
preset_path = path;
|
preset_path = path;
|
||||||
|
|
Loading…
Reference in New Issue