Refactor settings

This commit is contained in:
Martchus 2016-10-24 20:15:10 +02:00
parent 0062384bad
commit 0ef07b7969
18 changed files with 851 additions and 977 deletions

View File

@ -10,7 +10,7 @@ set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
set(META_APP_DESCRIPTION "A tageditor with Qt GUI and command line interface. Supports MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska")
set(META_GUI_OPTIONAL true)
set(META_VERSION_MAJOR 2)
set(META_VERSION_MINOR 0)
set(META_VERSION_MINOR 1)
set(META_VERSION_PATCH 0)
# add project files

View File

@ -8,8 +8,6 @@
#include <qtutilities/settingsdialog/qtsettings.h>
#include <QString>
#include <QByteArray>
#include <QApplication>
#include <QSettings>
@ -17,541 +15,272 @@ using namespace Media;
namespace Settings {
// editor
AdoptFields &adoptFields()
{
static AdoptFields v = AdoptFields::Never;
return v;
}
bool &saveAndShowNextOnEnter()
{
static bool v = false;
return v;
}
bool &askBeforeDeleting()
{
static bool v = true;
return v;
}
MultipleTagHandling &multipleTagHandling()
{
static MultipleTagHandling v = MultipleTagHandling::SingleEditorPerTarget;
return v;
}
bool &hideTagSelectionComboBox()
{
static bool v = false;
return v;
}
bool &forceFullParse()
{
static bool v = false;
return v;
}
#ifndef TAGEDITOR_NO_WEBVIEW
bool &noWebView()
{
static bool v = false;
return v;
}
#endif
bool &hideCoverButtons()
{
static bool v = false;
return v;
}
AutoCompletition::AutoCompletition() :
fields(nullptr, KnownFieldModel::DefaultSelection::None)
{}
// file browser
bool &hideBackupFiles()
{
static bool v = true;
return v;
}
bool &fileBrowserReadOnly()
{
static bool v = true;
return v;
}
Editor::Editor() :
fields(nullptr, KnownFieldModel::DefaultSelection::CommonFields),
defaultTargets(nullptr, TargetLevelModel::DefaultSelection::MostUsefulTargets)
{}
// general tag processing
Media::TagTextEncoding &preferredEncoding()
{
static Media::TagTextEncoding v = Media::TagTextEncoding::Utf8;
return v;
}
DbQuery::DbQuery() :
fields(QList<Models::ChecklistItem>()
<< KnownFieldModel::mkItem(KnownField::Title)
<< KnownFieldModel::mkItem(KnownField::TrackPosition)
<< KnownFieldModel::mkItem(KnownField::DiskPosition)
<< KnownFieldModel::mkItem(KnownField::Album)
<< KnownFieldModel::mkItem(KnownField::Album)
<< KnownFieldModel::mkItem(KnownField::Year)
<< KnownFieldModel::mkItem(KnownField::Genre)
<< KnownFieldModel::mkItem(KnownField::Cover, Qt::Unchecked)
<< KnownFieldModel::mkItem(KnownField::Lyrics, Qt::Unchecked))
{}
UnsupportedFieldHandling &unsupportedFieldHandling()
Settings &values()
{
static UnsupportedFieldHandling v = UnsupportedFieldHandling::Ignore;
return v;
}
bool &autoTagManagement()
{
static bool v = true;
return v;
}
// ID3 tag processing
TagUsage &id3v1usage()
{
static TagUsage v = TagUsage::Always;
return v;
}
TagUsage &id3v2usage()
{
static TagUsage v = TagUsage::Always;
return v;
}
byte &id3v2versionToBeUsed()
{
static byte v = 3;
return v;
}
bool &keepVersionOfExistingId3v2Tag()
{
static bool v = true;
return v;
}
bool &mergeMultipleSuccessiveId3v2Tags()
{
static bool v = true;
return v;
}
// file layout
bool &forceRewrite()
{
static bool v = true;
return v;
}
ElementPosition &preferredTagPosition()
{
static ElementPosition v = ElementPosition::BeforeData;
return v;
}
bool &forceTagPosition()
{
static bool v = true;
return v;
}
ElementPosition &preferredIndexPosition()
{
static ElementPosition v = ElementPosition::BeforeData;
return v;
}
bool &forceIndexPosition()
{
static bool v = true;
return v;
}
size_t &minPadding()
{
static size_t v = 0;
return v;
}
size_t &maxPadding()
{
static size_t v = 0;
return v;
}
size_t &preferredPadding()
{
static size_t v = 0;
return v;
}
// targets
TargetLevelModel &defaultTargetsModel()
{
static TargetLevelModel model(nullptr, TargetLevelModel::DefaultSelection::MostUsefulTargets);
return model;
}
// fields
KnownFieldModel &selectedFieldsModel()
{
static KnownFieldModel model(nullptr, KnownFieldModel::DefaultSelection::CommonFields);
return model;
}
// auto correction/completition
bool &insertTitleFromFilename()
{
static bool v = false;
return v;
}
bool &trimWhitespaces()
{
static bool v = true;
return v;
}
bool &formatNames()
{
static bool v = false;
return v;
}
bool &fixUmlauts()
{
static bool v = false;
return v;
}
KnownFieldModel &autoCorrectionFields()
{
static KnownFieldModel model(nullptr, KnownFieldModel::DefaultSelection::None);
return model;
}
// main window
QByteArray &mainWindowGeometry()
{
static QByteArray v;
return v;
}
QByteArray &mainWindowState()
{
static QByteArray v;
return v;
}
QString &mainWindowCurrentFileBrowserDirectory()
{
static QString v;
return v;
}
bool &mainWindowLayoutLocked()
{
static bool v = false;
return v;
}
// db query
bool &dbQueryWidgetShown()
{
static bool v = false;
return v;
}
bool &dbQueryOverride()
{
static bool v = false;
return v;
}
KnownFieldModel &dbQueryFields()
{
static KnownFieldModel v(QList<Models::ChecklistItem>()
<< KnownFieldModel::mkItem(KnownField::Title)
<< KnownFieldModel::mkItem(KnownField::TrackPosition)
<< KnownFieldModel::mkItem(KnownField::DiskPosition)
<< KnownFieldModel::mkItem(KnownField::Album)
<< KnownFieldModel::mkItem(KnownField::Album)
<< KnownFieldModel::mkItem(KnownField::Year)
<< KnownFieldModel::mkItem(KnownField::Genre)
<< KnownFieldModel::mkItem(KnownField::Cover, Qt::Unchecked)
<< KnownFieldModel::mkItem(KnownField::Lyrics, Qt::Unchecked));
return v;
}
QString &musicBrainzUrl()
{
static QString v;
return v;
}
QString &coverArtArchiveUrl()
{
static QString v;
return v;
}
QString &lyricsWikiaUrl()
{
static QString v;
return v;
}
// renaming files dialog
int &scriptSource()
{
static int v = 0;
return v;
}
QString &externalScript()
{
static QString v;
return v;
}
QString &editorScript()
{
static QString v;
return v;
}
// Qt settings
Dialogs::QtSettings &qtSettings()
{
static Dialogs::QtSettings v;
return v;
static Settings settings;
return settings;
}
void restore()
{
QSettings settings(QSettings::IniFormat, QSettings::UserScope, QApplication::organizationName(), QApplication::applicationName());
Settings &v = values();
settings.beginGroup(QStringLiteral("editor"));
switch(settings.value(QStringLiteral("adoptfields"), 0).toInt()) {
case 1:
adoptFields() = AdoptFields::WithinDirectory;
v.editor.adoptFields = AdoptFields::WithinDirectory;
break;
case 2:
adoptFields() = AdoptFields::Always;
v.editor.adoptFields = AdoptFields::Always;
break;
default:
adoptFields() = AdoptFields::Never;
v.editor.adoptFields = AdoptFields::Never;
break;
};
saveAndShowNextOnEnter() = settings.value(QStringLiteral("saveandshownextonenter"), false).toBool();
askBeforeDeleting() = settings.value(QStringLiteral("askbeforedeleting"), true).toBool();
v.editor.saveAndShowNextOnEnter = settings.value(QStringLiteral("saveandshownextonenter"), false).toBool();
v.editor.askBeforeDeleting = settings.value(QStringLiteral("askbeforedeleting"), true).toBool();
switch(settings.value(QStringLiteral("multipletaghandling"), 0).toInt()) {
case 0:
multipleTagHandling() = MultipleTagHandling::SingleEditorPerTarget;
v.editor.multipleTagHandling = MultipleTagHandling::SingleEditorPerTarget;
break;
case 1:
multipleTagHandling() = MultipleTagHandling::SeparateEditors;
v.editor.multipleTagHandling = MultipleTagHandling::SeparateEditors;
break;
}
hideTagSelectionComboBox() = settings.value(QStringLiteral("hidetagselectioncombobox"), false).toBool();
v.editor.hideTagSelectionComboBox = settings.value(QStringLiteral("hidetagselectioncombobox"), false).toBool();
settings.beginGroup(QStringLiteral("autocorrection"));
insertTitleFromFilename() = settings.value(QStringLiteral("inserttitlefromfilename"), false).toBool();
trimWhitespaces() = settings.value(QStringLiteral("trimwhitespaces"), true).toBool();
formatNames() = settings.value(QStringLiteral("formatnames"), false).toBool();
fixUmlauts() = settings.value(QStringLiteral("fixumlauts"), false).toBool();
v.editor.autoCompletition.insertTitleFromFilename = settings.value(QStringLiteral("inserttitlefromfilename"), false).toBool();
v.editor.autoCompletition.trimWhitespaces = settings.value(QStringLiteral("trimwhitespaces"), true).toBool();
v.editor.autoCompletition.formatNames = settings.value(QStringLiteral("formatnames"), false).toBool();
v.editor.autoCompletition.fixUmlauts = settings.value(QStringLiteral("fixumlauts"), false).toBool();
settings.endGroup();
BackupHelper::backupDirectory() = settings.value(QStringLiteral("tempdir")).toString().toStdString();
Settings::hideCoverButtons() = settings.value(QStringLiteral("hidecoverbtn"), false).toBool();
v.editor.hideCoverButtons = settings.value(QStringLiteral("hidecoverbtn"), false).toBool();
settings.endGroup();
selectedFieldsModel().restore(settings, QStringLiteral("selectedfields"));
autoCorrectionFields().restore(settings, QStringLiteral("autocorrectionfields"));
v.editor.fields.restore(settings, QStringLiteral("selectedfields"));
v.editor.autoCompletition.fields.restore(settings, QStringLiteral("autocorrectionfields"));
settings.beginGroup(QStringLiteral("info"));
Settings::forceFullParse() = settings.value(QStringLiteral("forcefullparse"), false).toBool();
v.editor.forceFullParse = settings.value(QStringLiteral("forcefullparse"), false).toBool();
#ifndef TAGEDITOR_NO_WEBVIEW
Settings::noWebView() = settings.value(QStringLiteral("nowebview"), false).toBool();
v.editor.noWebView = settings.value(QStringLiteral("nowebview"), false).toBool();
#endif
settings.endGroup();
settings.beginGroup(QStringLiteral("filebrowser"));
hideBackupFiles() = settings.value(QStringLiteral("hidebackupfiles"), true).toBool();
fileBrowserReadOnly() = settings.value(QStringLiteral("readonly"), true).toBool();
v.fileBrowser.hideBackupFiles = settings.value(QStringLiteral("hidebackupfiles"), true).toBool();
v.fileBrowser.readOnly = settings.value(QStringLiteral("readonly"), true).toBool();
settings.endGroup();
settings.beginGroup(QStringLiteral("tagprocessing"));
switch(settings.value(QStringLiteral("preferredencoding"), 1).toInt()) {
case 0:
preferredEncoding() = Media::TagTextEncoding::Latin1;
v.tagPocessing.preferredEncoding = Media::TagTextEncoding::Latin1;
break;
case 2:
preferredEncoding() = Media::TagTextEncoding::Utf16BigEndian;
v.tagPocessing.preferredEncoding = Media::TagTextEncoding::Utf16BigEndian;
break;
case 3:
preferredEncoding() = Media::TagTextEncoding::Utf16LittleEndian;
v.tagPocessing.preferredEncoding = Media::TagTextEncoding::Utf16LittleEndian;
break;
default:
preferredEncoding() = Media::TagTextEncoding::Utf8;
v.tagPocessing.preferredEncoding = Media::TagTextEncoding::Utf8;
};
switch(settings.value(QStringLiteral("unsupportedfieldhandling"), 0).toInt()) {
case 1:
unsupportedFieldHandling() = UnsupportedFieldHandling::Discard;
v.tagPocessing.unsupportedFieldHandling = UnsupportedFieldHandling::Discard;
break;
default:
unsupportedFieldHandling() = UnsupportedFieldHandling::Ignore;
v.tagPocessing.unsupportedFieldHandling = UnsupportedFieldHandling::Ignore;
};
autoTagManagement() = settings.value(QStringLiteral("autotagmanagement"), true).toBool();
v.tagPocessing.autoTagManagement = settings.value(QStringLiteral("autotagmanagement"), true).toBool();
settings.beginGroup(QStringLiteral("id3v1"));
switch(settings.value(QStringLiteral("usage"), 0).toInt()) {
case 1:
id3v1usage() = TagUsage::KeepExisting;
v.tagPocessing.id3.v1Usage = TagUsage::KeepExisting;
break;
case 2:
id3v1usage() = TagUsage::Never;
v.tagPocessing.id3.v1Usage = TagUsage::Never;
break;
default:
id3v1usage() = TagUsage::Always;
v.tagPocessing.id3.v1Usage = TagUsage::Always;
break;
};
settings.endGroup();
settings.beginGroup(QStringLiteral("id3v2"));
switch(settings.value(QStringLiteral("usage"), 0).toInt()) {
case 1:
id3v2usage() = TagUsage::KeepExisting;
v.tagPocessing.id3.v2Usage = TagUsage::KeepExisting;
break;
case 2:
id3v2usage() = TagUsage::Never;
v.tagPocessing.id3.v2Usage = TagUsage::Never;
break;
default:
id3v2usage() = TagUsage::Always;
v.tagPocessing.id3.v2Usage = TagUsage::Always;
};
id3v2versionToBeUsed() = settings.value(QStringLiteral("versiontobeused"), 3).toUInt();
keepVersionOfExistingId3v2Tag() = settings.value(QStringLiteral("keepversionofexistingtag"), true).toBool();
mergeMultipleSuccessiveId3v2Tags() = settings.value(QStringLiteral("mergemultiplesuccessivetags"), true).toBool();
v.tagPocessing.id3.v2Version = settings.value(QStringLiteral("versiontobeused"), 3).toUInt();
v.tagPocessing.id3.keepVersionOfExistingId3v2Tag = settings.value(QStringLiteral("keepversionofexistingtag"), true).toBool();
v.tagPocessing.id3.mergeMultipleSuccessiveId3v2Tags = settings.value(QStringLiteral("mergemultiplesuccessivetags"), true).toBool();
settings.endGroup();
defaultTargetsModel().restore(settings, QStringLiteral("targets"));
v.editor.defaultTargets.restore(settings, QStringLiteral("targets"));
settings.beginGroup(QStringLiteral("filelayout"));
forceRewrite() = settings.value(QStringLiteral("forcerewrite"), true).toBool();
v.tagPocessing.fileLayout.forceRewrite = settings.value(QStringLiteral("forcerewrite"), true).toBool();
switch(settings.value(QStringLiteral("tagpos")).toInt()) {
case 0:
preferredTagPosition() = ElementPosition::BeforeData;
v.tagPocessing.fileLayout.preferredTagPosition = ElementPosition::BeforeData;
break;
case 1:
preferredTagPosition() = ElementPosition::AfterData;
v.tagPocessing.fileLayout.preferredTagPosition = ElementPosition::AfterData;
break;
}
forceTagPosition() = settings.value(QStringLiteral("forcetagpos"), true).toBool();
v.tagPocessing.fileLayout.forceTagPosition = settings.value(QStringLiteral("forcetagpos"), true).toBool();
switch(settings.value(QStringLiteral("indexpos")).toInt()) {
case 0:
preferredIndexPosition() = ElementPosition::BeforeData;
v.tagPocessing.fileLayout.preferredIndexPosition = ElementPosition::BeforeData;
break;
case 1:
preferredIndexPosition() = ElementPosition::AfterData;
v.tagPocessing.fileLayout.preferredIndexPosition = ElementPosition::AfterData;
break;
}
forceIndexPosition() = settings.value(QStringLiteral("forceindexpos"), true).toBool();
minPadding() = settings.value(QStringLiteral("minpad"), 0).toUInt();
maxPadding() = settings.value(QStringLiteral("maxpad"), 0).toUInt();
preferredPadding() = settings.value(QStringLiteral("prefpad"), 0).toUInt();
v.tagPocessing.fileLayout.forceIndexPosition = settings.value(QStringLiteral("forceindexpos"), true).toBool();
v.tagPocessing.fileLayout.minPadding = settings.value(QStringLiteral("minpad"), 0).toUInt();
v.tagPocessing.fileLayout.maxPadding = settings.value(QStringLiteral("maxpad"), 0).toUInt();
v.tagPocessing.fileLayout.preferredPadding = settings.value(QStringLiteral("prefpad"), 0).toUInt();
settings.endGroup();
settings.endGroup();
settings.beginGroup(QStringLiteral("mainwindow"));
mainWindowGeometry() = settings.value(QStringLiteral("geometry")).toByteArray();
mainWindowState() = settings.value(QStringLiteral("windowstate")).toByteArray();
mainWindowCurrentFileBrowserDirectory() = settings.value(QStringLiteral("currentfilebrowserdirectory")).toString();
mainWindowLayoutLocked() = settings.value(QStringLiteral("layoutlocked"), mainWindowLayoutLocked()).toBool();
v.mainWindow.geometry = settings.value(QStringLiteral("geometry")).toByteArray();
v.mainWindow.state = settings.value(QStringLiteral("windowstate")).toByteArray();
v.mainWindow.currentFileBrowserDirectory = settings.value(QStringLiteral("currentfilebrowserdirectory")).toString();
v.mainWindow.layoutLocked = settings.value(QStringLiteral("layoutlocked"), v.mainWindow.layoutLocked).toBool();
settings.endGroup();
settings.beginGroup(QStringLiteral("dbquery"));
dbQueryWidgetShown() = settings.value(QStringLiteral("visible"), false).toBool();
dbQueryOverride() = settings.value(QStringLiteral("override"), true).toBool();
dbQueryFields().restore(settings, QStringLiteral("fields"));
musicBrainzUrl() = settings.value(QStringLiteral("musicbrainzurl")).toString();
coverArtArchiveUrl() = settings.value(QStringLiteral("coverartarchiveurl")).toString();
v.dbQuery.widgetShown = settings.value(QStringLiteral("visible"), false).toBool();
v.dbQuery.override = settings.value(QStringLiteral("override"), true).toBool();
v.dbQuery.fields.restore(settings, QStringLiteral("fields"));
v.dbQuery.musicBrainzUrl = settings.value(QStringLiteral("musicbrainzurl")).toString();
v.dbQuery.coverArtArchiveUrl = settings.value(QStringLiteral("coverartarchiveurl")).toString();
settings.endGroup();
settings.beginGroup(QStringLiteral("renamedlg"));
scriptSource() = settings.value(QStringLiteral("src")).toInt();
externalScript() = settings.value(QStringLiteral("file")).toString();
editorScript() = settings.value(QStringLiteral("script")).toString();
v.renamingUtility.scriptSource = settings.value(QStringLiteral("src")).toInt();
v.renamingUtility.externalScript = settings.value(QStringLiteral("file")).toString();
v.renamingUtility.editorScript = settings.value(QStringLiteral("script")).toString();
settings.endGroup();
qtSettings().restore(settings);
v.qt.restore(settings);
}
void save()
{
QSettings settings(QSettings::IniFormat, QSettings::UserScope, QApplication::organizationName(), QApplication::applicationName());
const Settings &v = values();
settings.beginGroup(QStringLiteral("editor"));
settings.setValue(QStringLiteral("adoptfields"), static_cast<int>(adoptFields()));
settings.setValue(QStringLiteral("saveandshownextonenter"), saveAndShowNextOnEnter());
settings.setValue(QStringLiteral("askbeforedeleting"), askBeforeDeleting());
settings.setValue(QStringLiteral("multipletaghandling"), static_cast<int>(multipleTagHandling()));
settings.setValue(QStringLiteral("hidetagselectioncombobox"), hideTagSelectionComboBox());
settings.setValue(QStringLiteral("adoptfields"), static_cast<int>(v.editor.adoptFields));
settings.setValue(QStringLiteral("saveandshownextonenter"), v.editor.saveAndShowNextOnEnter);
settings.setValue(QStringLiteral("askbeforedeleting"), v.editor.askBeforeDeleting);
settings.setValue(QStringLiteral("multipletaghandling"), static_cast<int>(v.editor.multipleTagHandling));
settings.setValue(QStringLiteral("hidetagselectioncombobox"), v.editor.hideTagSelectionComboBox);
settings.beginGroup(QStringLiteral("autocorrection"));
settings.setValue(QStringLiteral("inserttitlefromfilename"), Settings::insertTitleFromFilename());
settings.setValue(QStringLiteral("trimwhitespaces"), Settings::trimWhitespaces());
settings.setValue(QStringLiteral("formatnames"), Settings::formatNames());
settings.setValue(QStringLiteral("fixumlauts"), Settings::fixUmlauts());
settings.setValue(QStringLiteral("inserttitlefromfilename"), v.editor.autoCompletition.insertTitleFromFilename);
settings.setValue(QStringLiteral("trimwhitespaces"), v.editor.autoCompletition.trimWhitespaces);
settings.setValue(QStringLiteral("formatnames"), v.editor.autoCompletition.formatNames);
settings.setValue(QStringLiteral("fixumlauts"), v.editor.autoCompletition.fixUmlauts);
settings.endGroup();
settings.setValue(QStringLiteral("tempdir"), QString::fromStdString(BackupHelper::backupDirectory()));
settings.setValue(QStringLiteral("hidecoverbtn"), Settings::hideCoverButtons());
settings.setValue(QStringLiteral("hidecoverbtn"), v.editor.hideCoverButtons);
settings.endGroup();
selectedFieldsModel().save(settings, QStringLiteral("selectedfields"));
autoCorrectionFields().save(settings, QStringLiteral("autocorrectionfields"));
v.editor.fields.save(settings, QStringLiteral("selectedfields"));
v.editor.autoCompletition.fields.save(settings, QStringLiteral("autocorrectionfields"));
settings.beginGroup(QStringLiteral("info"));
settings.setValue(QStringLiteral("forcefullparse"), Settings::forceFullParse());
settings.setValue(QStringLiteral("forcefullparse"), v.editor.forceFullParse);
#ifndef TAGEDITOR_NO_WEBVIEW
settings.setValue(QStringLiteral("nowebview"), Settings::noWebView());
settings.setValue(QStringLiteral("nowebview"), v.editor.noWebView);
#endif
settings.endGroup();
settings.beginGroup(QStringLiteral("filebrowser"));
settings.setValue(QStringLiteral("hidebackupfiles"), hideBackupFiles());
settings.setValue(QStringLiteral("readonly"), fileBrowserReadOnly());
settings.setValue(QStringLiteral("hidebackupfiles"), v.fileBrowser.hideBackupFiles);
settings.setValue(QStringLiteral("readonly"), v.fileBrowser.readOnly);
settings.endGroup();
settings.beginGroup(QStringLiteral("tagprocessing"));
settings.setValue(QStringLiteral("preferredencoding"), static_cast<int>(preferredEncoding()));
settings.setValue(QStringLiteral("unsupportedfieldhandling"), static_cast<int>(unsupportedFieldHandling()));
settings.setValue(QStringLiteral("autotagmanagement"), autoTagManagement());
settings.setValue(QStringLiteral("preferredencoding"), static_cast<int>(v.tagPocessing.preferredEncoding));
settings.setValue(QStringLiteral("unsupportedfieldhandling"), static_cast<int>(v.tagPocessing.unsupportedFieldHandling));
settings.setValue(QStringLiteral("autotagmanagement"), v.tagPocessing.autoTagManagement);
settings.beginGroup(QStringLiteral("id3v1"));
settings.setValue(QStringLiteral("usage"), static_cast<int>(id3v1usage()));
settings.setValue(QStringLiteral("usage"), static_cast<int>(v.tagPocessing.id3.v1Usage));
settings.endGroup();
settings.beginGroup(QStringLiteral("id3v2"));
settings.setValue(QStringLiteral("usage"), static_cast<int>(id3v2usage()));
settings.setValue(QStringLiteral("versiontobeused"), id3v2versionToBeUsed());
settings.setValue(QStringLiteral("keepversionofexistingtag"), keepVersionOfExistingId3v2Tag());
settings.setValue(QStringLiteral("mergemultiplesuccessivetags"), mergeMultipleSuccessiveId3v2Tags());
settings.setValue(QStringLiteral("usage"), static_cast<int>(v.tagPocessing.id3.v2Usage));
settings.setValue(QStringLiteral("versiontobeused"), v.tagPocessing.id3.v2Version);
settings.setValue(QStringLiteral("keepversionofexistingtag"), v.tagPocessing.id3.keepVersionOfExistingId3v2Tag);
settings.setValue(QStringLiteral("mergemultiplesuccessivetags"), v.tagPocessing.id3.mergeMultipleSuccessiveId3v2Tags);
settings.endGroup();
defaultTargetsModel().save(settings, QStringLiteral("targets"));
v.editor.defaultTargets.save(settings, QStringLiteral("targets"));
settings.beginGroup(QStringLiteral("filelayout"));
settings.setValue(QStringLiteral("forcerewrite"), forceRewrite());
settings.setValue(QStringLiteral("tagpos"), static_cast<int>(preferredTagPosition()));
settings.setValue(QStringLiteral("forcetagpos"), forceTagPosition());
settings.setValue(QStringLiteral("indexpos"), static_cast<int>(preferredIndexPosition()));
settings.setValue(QStringLiteral("forceindexpos"), forceIndexPosition());
settings.setValue(QStringLiteral("minpad"), QVariant::fromValue(minPadding()));
settings.setValue(QStringLiteral("maxpad"), QVariant::fromValue(maxPadding()));
settings.setValue(QStringLiteral("prefpad"), QVariant::fromValue(preferredPadding()));
settings.setValue(QStringLiteral("forcerewrite"), v.tagPocessing.fileLayout.forceRewrite);
settings.setValue(QStringLiteral("tagpos"), static_cast<int>(v.tagPocessing.fileLayout.preferredTagPosition));
settings.setValue(QStringLiteral("forcetagpos"), v.tagPocessing.fileLayout.forceTagPosition);
settings.setValue(QStringLiteral("indexpos"), static_cast<int>(v.tagPocessing.fileLayout.preferredIndexPosition));
settings.setValue(QStringLiteral("forceindexpos"), v.tagPocessing.fileLayout.forceIndexPosition);
settings.setValue(QStringLiteral("minpad"), QVariant::fromValue(v.tagPocessing.fileLayout.minPadding));
settings.setValue(QStringLiteral("maxpad"), QVariant::fromValue(v.tagPocessing.fileLayout.maxPadding));
settings.setValue(QStringLiteral("prefpad"), QVariant::fromValue(v.tagPocessing.fileLayout.preferredPadding));
settings.endGroup();
settings.endGroup();
settings.beginGroup(QStringLiteral("mainwindow"));
settings.setValue(QStringLiteral("geometry"), mainWindowGeometry());
settings.setValue(QStringLiteral("windowstate"), mainWindowState());
settings.setValue(QStringLiteral("currentfilebrowserdirectory"), mainWindowCurrentFileBrowserDirectory());
settings.setValue(QStringLiteral("layoutlocked"), mainWindowLayoutLocked());
settings.setValue(QStringLiteral("geometry"), v.mainWindow.geometry);
settings.setValue(QStringLiteral("windowstate"), v.mainWindow.state);
settings.setValue(QStringLiteral("currentfilebrowserdirectory"), v.mainWindow.currentFileBrowserDirectory);
settings.setValue(QStringLiteral("layoutlocked"), v.mainWindow.layoutLocked);
settings.endGroup();
settings.beginGroup(QStringLiteral("dbquery"));
settings.setValue(QStringLiteral("visible"), dbQueryWidgetShown());
settings.setValue(QStringLiteral("override"), dbQueryOverride());
dbQueryFields().save(settings, QStringLiteral("fields"));
settings.setValue(QStringLiteral("musicbrainzurl"), musicBrainzUrl());
settings.setValue(QStringLiteral("coverartarchiveurl"), coverArtArchiveUrl());
settings.setValue(QStringLiteral("visible"), v.dbQuery.widgetShown);
settings.setValue(QStringLiteral("override"), v.dbQuery.override);
v.dbQuery.fields.save(settings, QStringLiteral("fields"));
settings.setValue(QStringLiteral("musicbrainzurl"), v.dbQuery.musicBrainzUrl);
settings.setValue(QStringLiteral("coverartarchiveurl"), v.dbQuery.coverArtArchiveUrl);
settings.endGroup();
settings.beginGroup(QStringLiteral("renamedlg"));
settings.setValue(QStringLiteral("src"), Settings::scriptSource());
settings.setValue(QStringLiteral("file"), Settings::externalScript());
settings.setValue(QStringLiteral("script"), Settings::editorScript());
settings.setValue(QStringLiteral("src"), v.renamingUtility.scriptSource);
settings.setValue(QStringLiteral("file"), v.renamingUtility.externalScript);
settings.setValue(QStringLiteral("script"), v.renamingUtility.editorScript);
settings.endGroup();
qtSettings().save(settings);
v.qt.save(settings);
}
}

View File

@ -1,27 +1,22 @@
#ifndef SETTINGS_H
#define SETTINGS_H
#include "./targetlevelmodel.h"
#include "./knownfieldmodel.h"
#include <c++utilities/conversion/types.h>
#include <tagparser/tagvalue.h>
#include <tagparser/tag.h>
#include <tagparser/mediafileinfo.h>
#include <QtGlobal>
#include <qtutilities/settingsdialog/qtsettings.h>
QT_FORWARD_DECLARE_CLASS(QByteArray)
QT_FORWARD_DECLARE_CLASS(QString)
namespace Media {
enum class TagUsage;
enum class ElementPosition;
}
namespace Dialogs {
class QtSettings;
}
#include <QString>
#include <QByteArray>
namespace Settings {
// general
enum class ActionEnabled
{
Ask,
@ -29,97 +24,127 @@ enum class ActionEnabled
No
};
// editor
enum class AdoptFields
{
Never,
WithinDirectory,
Always
};
AdoptFields &adoptFields();
bool &saveAndShowNextOnEnter();
bool &askBeforeDeleting();
enum class MultipleTagHandling
{
SingleEditorPerTarget,
SeparateEditors
};
MultipleTagHandling &multipleTagHandling();
bool &hideTagSelectionComboBox();
bool &forceFullParse();
struct AutoCompletition
{
AutoCompletition();
bool insertTitleFromFilename = false;
bool trimWhitespaces = true;
bool formatNames = false;
bool fixUmlauts = false;
KnownFieldModel fields;
};
struct Editor
{
Editor();
AdoptFields adoptFields = AdoptFields::Never;
bool saveAndShowNextOnEnter = false;
bool askBeforeDeleting = true;
MultipleTagHandling multipleTagHandling = MultipleTagHandling::SingleEditorPerTarget;
bool hideTagSelectionComboBox = false;
bool forceFullParse = false;
#ifndef TAGEDITOR_NO_WEBVIEW
bool &noWebView();
bool noWebView = false;
#endif
bool &hideCoverButtons();
bool hideCoverButtons = false;
AutoCompletition autoCompletition;
KnownFieldModel fields;
TargetLevelModel defaultTargets;
};
// file browser
bool &hideBackupFiles();
bool &fileBrowserReadOnly();
// general tag processing
Media::TagTextEncoding &preferredEncoding();
enum class UnsupportedFieldHandling
{
Ignore,
Discard
};
UnsupportedFieldHandling &unsupportedFieldHandling();
bool &autoTagManagement();
// ID3 tag processing
Media::TagUsage &id3v1usage();
Media::TagUsage &id3v2usage();
byte &id3v2versionToBeUsed();
bool &keepVersionOfExistingId3v2Tag();
bool &mergeMultipleSuccessiveId3v2Tags();
struct FileBrowser
{
bool hideBackupFiles = true;
bool readOnly = true;
};
// file layout
bool &forceRewrite();
Media::ElementPosition &preferredTagPosition();
bool &forceTagPosition();
Media::ElementPosition &preferredIndexPosition();
bool &forceIndexPosition();
size_t &minPadding();
size_t &maxPadding();
size_t &preferredPadding();
struct Id3Processing
{
Media::TagUsage v1Usage = Media::TagUsage::Always;
Media::TagUsage v2Usage = Media::TagUsage::Always;
byte v2Version = 3;
bool keepVersionOfExistingId3v2Tag = true;
bool mergeMultipleSuccessiveId3v2Tags = true;
};
// targets
class TargetLevelModel;
TargetLevelModel &defaultTargetsModel();
struct FileLayout
{
bool forceRewrite = true;
Media::ElementPosition preferredTagPosition = Media::ElementPosition::BeforeData;
bool forceTagPosition = true;
Media::ElementPosition preferredIndexPosition = Media::ElementPosition::BeforeData;
bool forceIndexPosition = true;
std::size_t minPadding = 0;
std::size_t maxPadding = 0;
std::size_t preferredPadding = 0;
};
// fields
class KnownFieldModel;
KnownFieldModel &selectedFieldsModel();
struct TagProcessing
{
Media::TagTextEncoding preferredEncoding = Media::TagTextEncoding::Utf8;
UnsupportedFieldHandling unsupportedFieldHandling = UnsupportedFieldHandling::Ignore;
bool autoTagManagement = true;
Id3Processing id3;
FileLayout fileLayout;
};
// auto correction/completition
bool &insertTitleFromFilename();
bool &trimWhitespaces();
bool &formatNames();
bool &fixUmlauts();
KnownFieldModel &autoCorrectionFields();
struct MainWindow
{
QByteArray geometry;
QByteArray state;
QString currentFileBrowserDirectory;
bool layoutLocked = false;
};
// main window
QByteArray &mainWindowGeometry();
QByteArray &mainWindowState();
QString &mainWindowCurrentFileBrowserDirectory();
bool &mainWindowLayoutLocked();
struct DbQuery
{
DbQuery();
bool widgetShown = false;
bool override = false;
KnownFieldModel fields;
QString musicBrainzUrl;
QString coverArtArchiveUrl;
QString lyricsWikiaUrl;
};
// db query
bool &dbQueryWidgetShown();
bool &dbQueryOverride();
KnownFieldModel &dbQueryFields();
QString &musicBrainzUrl();
QString &coverArtArchiveUrl();
QString &lyricsWikiaUrl();
struct RenamingUtility
{
int scriptSource = 0;
QString externalScript;
QString editorScript;
};
// rename files dialog
int &scriptSource();
QString &externalScript();
QString &editorScript();
// Qt settings
Dialogs::QtSettings &qtSettings();
struct Settings
{
Editor editor;
FileBrowser fileBrowser;
TagProcessing tagPocessing;
MainWindow mainWindow;
DbQuery dbQuery;
RenamingUtility renamingUtility;
Dialogs::QtSettings qt;
};
Settings &values();
void restore();
void save();

View File

@ -57,11 +57,11 @@ public:
bool isFetchingCover() const;
Media::TagValue fieldValue(int row, Media::KnownField knownField) const;
QVariant data(const QModelIndex &index, int role) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
Qt::ItemFlags flags(const QModelIndex &index) const;
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
int rowCount(const QModelIndex &parent) const;
int columnCount(const QModelIndex &parent) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
const QByteArray *cover(const QModelIndex &index) const;
virtual bool fetchCover(const QModelIndex &index);
const QString *lyrics(const QModelIndex &index) const;

View File

@ -19,6 +19,12 @@ namespace QtGui {
static const QString defaultLyricsWikiaUrl(QStringLiteral("https://lyrics.wikia.com"));
QUrl lyricsWikiaApiUrl()
{
const QString &lyricsWikiaUrl = Settings::values().dbQuery.lyricsWikiaUrl;
return QUrl((lyricsWikiaUrl.isEmpty() ? defaultLyricsWikiaUrl : lyricsWikiaUrl) + QStringLiteral("/api.php"));
}
LyricsWikiaResultsModel::LyricsWikiaResultsModel(SongDescription &&initialSongDescription, QNetworkReply *reply) :
HttpResultsModel(move(initialSongDescription), reply)
{}
@ -117,7 +123,6 @@ void LyricsWikiaResultsModel::parseInitialResults(const QByteArray &data)
QNetworkReply *LyricsWikiaResultsModel::requestSongDetails(const SongDescription &songDescription)
{
// compose URL
QUrl url((Settings::lyricsWikiaUrl().isEmpty() ? defaultLyricsWikiaUrl : Settings::lyricsWikiaUrl()) + QStringLiteral("/api.php"));
QUrlQuery query;
query.addQueryItem(QStringLiteral("func"), QStringLiteral("getSong"));
query.addQueryItem(QStringLiteral("action"), QStringLiteral("lyrics"));
@ -129,6 +134,7 @@ QNetworkReply *LyricsWikiaResultsModel::requestSongDetails(const SongDescription
// specifying album seems to have no effect but also don't hurt
query.addQueryItem(QStringLiteral("album"), songDescription.album);
}
QUrl url(lyricsWikiaApiUrl());
url.setQuery(query);
return Utility::networkAccessManager().get(QNetworkRequest(url));
@ -202,7 +208,7 @@ void LyricsWikiaResultsModel::parseSongDetails(int row, const QByteArray &data)
return;
}
// do not use parsed URL directly to avoid unintended requests
QUrl requestUrl(Settings::lyricsWikiaUrl().isEmpty() ? defaultLyricsWikiaUrl : Settings::lyricsWikiaUrl());
QUrl requestUrl(lyricsWikiaApiUrl());
requestUrl.setPath(parsedUrl.path());
auto *reply = Utility::networkAccessManager().get(QNetworkRequest(parsedUrl));
addReply(reply, bind(&LyricsWikiaResultsModel::handleLyricsReplyFinished, this, reply, row));
@ -250,12 +256,12 @@ void LyricsWikiaResultsModel::parseLyricsResults(int row, const QByteArray &data
QueryResultsModel *queryLyricsWikia(SongDescription &&songDescription)
{
// compose URL
QUrl url((Settings::lyricsWikiaUrl().isEmpty() ? defaultLyricsWikiaUrl : Settings::lyricsWikiaUrl()) + QStringLiteral("/api.php"));
QUrlQuery query;
query.addQueryItem(QStringLiteral("func"), QStringLiteral("getArtist"));
query.addQueryItem(QStringLiteral("fmt"), QStringLiteral("xml"));
query.addQueryItem(QStringLiteral("fixXML"), QString());
query.addQueryItem(QStringLiteral("artist"), songDescription.artist);
QUrl url(lyricsWikiaApiUrl());
url.setQuery(query);
// NOTE: Only getArtist seems to work, so artist must be specified and filtering must

View File

@ -206,7 +206,8 @@ QueryResultsModel *queryMusicBrainz(SongDescription &&songDescription)
}
// compose URL
QUrl url(Settings::musicBrainzUrl().isEmpty() ? defaultMusicBrainzUrl : (Settings::musicBrainzUrl() + QStringLiteral("/recording/")));
const QString &musicBrainzUrl = Settings::values().dbQuery.musicBrainzUrl;
QUrl url(musicBrainzUrl.isEmpty() ? defaultMusicBrainzUrl : (musicBrainzUrl + QStringLiteral("/recording/")));
QUrlQuery query;
query.addQueryItem(QStringLiteral("query"), parts.join(QStringLiteral(" AND ")));
url.setQuery(query);
@ -218,7 +219,8 @@ QueryResultsModel *queryMusicBrainz(SongDescription &&songDescription)
QNetworkReply *queryCoverArtArchive(const QString &albumId)
{
static const QString defaultArchiveUrl(QStringLiteral("https://coverartarchive.org"));
return networkAccessManager().get(QNetworkRequest(QUrl((Settings::coverArtArchiveUrl().isEmpty() ? defaultArchiveUrl : Settings::coverArtArchiveUrl()) % QStringLiteral("/release/") % albumId % QStringLiteral("/front"))));
const QString &coverArtArchiveUrl = Settings::values().dbQuery.coverArtArchiveUrl;
return networkAccessManager().get(QNetworkRequest(QUrl((coverArtArchiveUrl.isEmpty() ? defaultArchiveUrl : coverArtArchiveUrl) % QStringLiteral("/release/") % albumId % QStringLiteral("/front"))));
}
} // namespace QtGui

View File

@ -22,6 +22,10 @@
#include <QGraphicsItem>
#include <QTextBrowser>
#include <functional>
using namespace std;
using namespace std::placeholders;
using namespace ConversionUtilities;
using namespace Dialogs;
using namespace Models;
@ -56,13 +60,13 @@ DbQueryWidget::DbQueryWidget(TagEditorWidget *tagEditorWidget, QWidget *parent)
m_ui->applyPushButton->setIcon(style()->standardIcon(QStyle::SP_DialogApplyButton, nullptr, m_ui->applyPushButton));
// initialize fields model
m_ui->fieldsListView->setModel(&Settings::dbQueryFields());
m_ui->fieldsListView->setModel(&values().dbQuery.fields);
// initialize search terms form
insertSearchTermsFromTagEdit(m_tagEditorWidget->activeTagEdit());
// restore settings
m_ui->overrideCheckBox->setChecked(Settings::dbQueryOverride());
m_ui->overrideCheckBox->setChecked(values().dbQuery.override);
// setup menu
m_insertPresentDataAction = m_menu->addAction(tr("Insert present data"));
@ -78,14 +82,14 @@ DbQueryWidget::DbQueryWidget(TagEditorWidget *tagEditorWidget, QWidget *parent)
connect(m_ui->abortPushButton, &QPushButton::clicked, this, &DbQueryWidget::abortSearch);
connect(m_ui->searchMusicBrainzPushButton, &QPushButton::clicked, this, &DbQueryWidget::searchMusicBrainz);
connect(m_ui->searchLyricsWikiaPushButton, &QPushButton::clicked, this, &DbQueryWidget::searchLyricsWikia);
connect(m_ui->applyPushButton, &QPushButton::clicked, this, &DbQueryWidget::applyResults);
connect(m_ui->applyPushButton, &QPushButton::clicked, this, static_cast<void(DbQueryWidget::*)(void)>(&DbQueryWidget::applySelectedResults));
connect(m_tagEditorWidget, &TagEditorWidget::fileStatusChanged, this, &DbQueryWidget::fileStatusChanged);
connect(m_ui->resultsTreeView, &QTreeView::customContextMenuRequested, this, &DbQueryWidget::showResultsContextMenu);
}
DbQueryWidget::~DbQueryWidget()
{
Settings::dbQueryOverride() = m_ui->overrideCheckBox->isChecked();
values().dbQuery.override = m_ui->overrideCheckBox->isChecked();
}
void DbQueryWidget::insertSearchTermsFromTagEdit(TagEdit *tagEdit)
@ -239,80 +243,156 @@ void DbQueryWidget::fileStatusChanged(bool, bool hasTags)
m_insertPresentDataAction->setEnabled(hasTags);
}
void DbQueryWidget::applyResults()
/*!
* \brief Applies the selected results for the selected fields to the active tag edit.
* \sa applyResults()
*/
void DbQueryWidget::applySelectedResults()
{
// check whether model, tag edit and current selection exist
if(TagEdit *tagEdit = m_tagEditorWidget->activeTagEdit()) {
if(const QItemSelectionModel *selectionModel = m_ui->resultsTreeView->selectionModel()) {
const QModelIndexList selection = selectionModel->selection().indexes();
if(!selection.isEmpty()) {
applyResults(tagEdit, selection.front());
}
}
}
}
/*!
* \brief Completes all present tag edits with the best matching result row.
* \remarks
* - Does nothing if no result row matches.
* - Only the selected fields are applied.
* \sa applyResults()
*/
void DbQueryWidget::applyMatchingResults()
{
m_tagEditorWidget->foreachTagEdit(bind(static_cast<void(DbQueryWidget::*)(TagEdit *)>(&DbQueryWidget::applyMatchingResults), this, _1));
}
/*!
* \brief Completes the specified \a tagEdit with the best matching result row.
* \remarks
* - Does nothing if no result row matches.
* - Only the selected fields are applied.
* \sa applyResults()
*/
void DbQueryWidget::applyMatchingResults(TagEdit *tagEdit)
{
// determine already present title, album and artist
const TagValue givenTitle = tagEdit->value(KnownField::Title);
const TagValue givenAlbum = tagEdit->value(KnownField::Album);
const TagValue givenArtist = tagEdit->value(KnownField::Artist);
// also determine already present track number (which is a little bit more complex -> TODO: improve backend API)
int givenTrack;
try {
givenTrack = tagEdit->value(KnownField::TrackPosition).toPositionInSet().position();
} catch (const ConversionException &) {
}
if(!givenTrack) {
for(const Tag *tag : tagEdit->tags()) {
if(!tag->supportsTarget() || tag->targetLevel() == TagTargetLevel::Track) {
try {
givenTrack = tagEdit->value(KnownField::PartNumber).toInteger();
} catch (const ConversionException &) {
}
break;
}
}
}
// find row matching already present data
for(int row = 0, rowCount = m_model->rowCount(); row != rowCount; ++row) {
if((!givenTitle.isEmpty() && givenTitle != m_model->fieldValue(row, KnownField::Title))
|| (!givenAlbum.isEmpty() && givenAlbum != m_model->fieldValue(row, KnownField::Album))
|| (!givenArtist.isEmpty() && givenArtist != m_model->fieldValue(row, KnownField::Artist))
|| (givenTrack && m_model->data(m_model->index(row, QueryResultsModel::TitleCol)).toInt())) {
continue;
}
// apply results for matching row
applyResults(tagEdit, m_model->index(row, 0));
// just take the first matching row for now
break;
}
}
/*!
* \brief Applies the results at the specified \a resultIndex for the selected fields to the specified \a tagEdit.
* \remarks
* - Returns instantly. If cover/lyrics need to be retrieved, this is done asynchronously.
* - Does nothing if no results are available.
*/
void DbQueryWidget::applyResults(TagEdit *tagEdit, const QModelIndex &resultIndex)
{
if(m_model) {
if(TagEdit *tagEdit = m_tagEditorWidget->activeTagEdit()) {
if(const QItemSelectionModel *selectionModel = m_ui->resultsTreeView->selectionModel()) {
const QModelIndexList selection = selectionModel->selection().indexes();
if(!selection.isEmpty()) {
// determine previous value handling
PreviousValueHandling previousValueHandling = m_ui->overrideCheckBox->isChecked()
? PreviousValueHandling::Update : PreviousValueHandling::Keep;
// determine previous value handling
PreviousValueHandling previousValueHandling = m_ui->overrideCheckBox->isChecked()
? PreviousValueHandling::Update : PreviousValueHandling::Keep;
// loop through all fields
for(const ChecklistItem &item : Settings::dbQueryFields().items()) {
if(item.isChecked()) {
// field should be used
const auto field = static_cast<KnownField>(item.id().toInt());
int row = selection.front().row();
TagValue value = m_model->fieldValue(row, field);
// loop through all fields
for(const ChecklistItem &item : values().dbQuery.fields.items()) {
if(item.isChecked()) {
// field should be used
const auto field = static_cast<KnownField>(item.id().toInt());
int row = resultIndex.row();
TagValue value = m_model->fieldValue(row, field);
if(value.isEmpty()) {
// cover and lyrics might be fetched belated
switch(field) {
case KnownField::Cover:
if(m_model->fetchCover(selection.front())) {
// cover is available now
if(value.isEmpty()) {
// cover and lyrics might be fetched belated
switch(field) {
case KnownField::Cover:
if(m_model->fetchCover(resultIndex)) {
// cover is available now
tagEdit->setValue(KnownField::Cover, m_model->fieldValue(row, KnownField::Cover), previousValueHandling);
} else {
// cover is fetched asynchronously
// -> show status
m_ui->notificationLabel->setNotificationType(NotificationType::Progress);
m_ui->notificationLabel->appendLine(tr("Retrieving cover art to be applied ..."));
setStatus(false);
// -> apply cover when available
connect(m_model, &QueryResultsModel::coverAvailable, [this, row, previousValueHandling](const QModelIndex &index) {
if(row == index.row()) {
if(TagEdit *tagEdit = m_tagEditorWidget->activeTagEdit()) {
tagEdit->setValue(KnownField::Cover, m_model->fieldValue(row, KnownField::Cover), previousValueHandling);
} else {
// cover is fetched asynchronously
// -> show status
m_ui->notificationLabel->setNotificationType(NotificationType::Progress);
m_ui->notificationLabel->appendLine(tr("Retrieving cover art to be applied ..."));
setStatus(false);
// -> apply cover when available
connect(m_model, &QueryResultsModel::coverAvailable, [this, row, previousValueHandling](const QModelIndex &index) {
if(row == index.row()) {
if(TagEdit *tagEdit = m_tagEditorWidget->activeTagEdit()) {
tagEdit->setValue(KnownField::Cover, m_model->fieldValue(row, KnownField::Cover), previousValueHandling);
}
}
});
}
break;
case KnownField::Lyrics:
if(m_model->fetchLyrics(selection.front())) {
// lyrics are available now
tagEdit->setValue(KnownField::Lyrics, m_model->fieldValue(row, KnownField::Lyrics), previousValueHandling);
} else {
// lyrics are fetched asynchronously
// -> show status
m_ui->notificationLabel->setNotificationType(NotificationType::Progress);
m_ui->notificationLabel->appendLine(tr("Retrieving lyrics to be applied ..."));
setStatus(false);
// -> apply cover when available
connect(m_model, &QueryResultsModel::lyricsAvailable, [this, row, previousValueHandling](const QModelIndex &index) {
if(row == index.row()) {
if(TagEdit *tagEdit = m_tagEditorWidget->activeTagEdit()) {
tagEdit->setValue(KnownField::Lyrics, m_model->fieldValue(row, KnownField::Lyrics), previousValueHandling);
}
}
});
}
break;
default:
;
}
} else {
// any other fields are just set
tagEdit->setValue(field, value, previousValueHandling);
}
});
}
break;
case KnownField::Lyrics:
if(m_model->fetchLyrics(resultIndex)) {
// lyrics are available now
tagEdit->setValue(KnownField::Lyrics, m_model->fieldValue(row, KnownField::Lyrics), previousValueHandling);
} else {
// lyrics are fetched asynchronously
// -> show status
m_ui->notificationLabel->setNotificationType(NotificationType::Progress);
m_ui->notificationLabel->appendLine(tr("Retrieving lyrics to be applied ..."));
setStatus(false);
// -> apply cover when available
connect(m_model, &QueryResultsModel::lyricsAvailable, [this, row, previousValueHandling](const QModelIndex &index) {
if(row == index.row()) {
if(TagEdit *tagEdit = m_tagEditorWidget->activeTagEdit()) {
tagEdit->setValue(KnownField::Lyrics, m_model->fieldValue(row, KnownField::Lyrics), previousValueHandling);
}
}
});
}
break;
default:
;
}
} else {
// any other fields are just set
tagEdit->setValue(field, value, previousValueHandling);
}
}
}

View File

@ -34,12 +34,15 @@ public:
void insertSearchTermsFromTagEdit(TagEdit *tagEdit);
SongDescription currentSongDescription() const;
void applyResults(TagEdit *tagEdit, const QModelIndex &resultIndex);
public slots:
void searchMusicBrainz();
void searchLyricsWikia();
void abortSearch();
void applyResults();
void applySelectedResults();
void applyMatchingResults();
void applyMatchingResults(TagEdit *tagEdit);
void insertSearchTermsFromActiveTagEdit();
void clearSearchCriteria();

View File

@ -23,8 +23,8 @@ int runWidgetsGui(int argc, char *argv[], const QtConfigArguments &qtConfigArgs,
QApplication a(argc, argv);
Settings::restore();
// apply settings specified via command line args after the settings chosen in the GUI to give the CLI options precedence
Settings::qtSettings().apply();
qtConfigArgs.applySettings(Settings::qtSettings().hasCustomFont());
Settings::values().qt.apply();
qtConfigArgs.applySettings(Settings::values().qt.hasCustomFont());
// load resources needed by classes of qtutilities
QtUtilitiesResources::init();
LOAD_QT_TRANSLATIONS;

View File

@ -88,8 +88,9 @@ MainWindow::MainWindow(QWidget *parent) :
#endif
// restore geometry and state
restoreGeometry(Settings::mainWindowGeometry());
restoreState(Settings::mainWindowState());
const auto &settings = Settings::values();
restoreGeometry(settings.mainWindow.geometry);
restoreState(settings.mainWindow.state);
// setup file model and file tree view
m_fileModel = new QFileSystemModel(this);
@ -97,7 +98,7 @@ MainWindow::MainWindow(QWidget *parent) :
m_fileFilterModel = new FileFilterProxyModel(this);
m_fileFilterModel->setExtensionsToBeFiltered(QStringList() << QStringLiteral("bak") << QStringLiteral("tmp"));
m_fileFilterModel->setSourceModel(m_fileModel);
m_fileFilterModel->setFilterEnabled(Settings::hideBackupFiles());
m_fileFilterModel->setFilterEnabled(settings.fileBrowser.hideBackupFiles);
m_ui->filesTreeView->sortByColumn(0, Qt::AscendingOrder);
m_ui->filesTreeView->setModel(m_fileFilterModel);
m_ui->filesTreeView->setColumnWidth(0, 300);
@ -109,12 +110,12 @@ MainWindow::MainWindow(QWidget *parent) :
handleFileStatusChange(false, false);
// dbquery dock widget
if(Settings::dbQueryWidgetShown()) {
if(settings.dbQuery.widgetShown) {
m_ui->dbQueryDockWidget->setWidget(m_dbQueryWidget = new DbQueryWidget(m_ui->tagEditorWidget, this));
}
// restore locked
setLayoutLocked(Settings::mainWindowLayoutLocked());
setLayoutLocked(settings.mainWindow.layoutLocked);
// connect signals and slots, install event filter
// menu: application
@ -147,7 +148,7 @@ MainWindow::MainWindow(QWidget *parent) :
connect(m_ui->filesTreeView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &MainWindow::fileSelected);
connect(m_ui->selectNextCommandLinkButton, &QCommandLinkButton::clicked, this, static_cast<void(MainWindow::*)(void)>(&MainWindow::selectNextFile));
// apply settings
setCurrentDirectory(Settings::mainWindowCurrentFileBrowserDirectory());
setCurrentDirectory(settings.mainWindow.currentFileBrowserDirectory);
applySettingsFromDialog();
}
@ -222,14 +223,15 @@ void MainWindow::startParsing(const QString &path)
*/
bool MainWindow::event(QEvent *event)
{
auto &settings = Settings::values();
switch(event->type()) {
case QEvent::Close:
// save settings
Settings::mainWindowGeometry() = saveGeometry();
Settings::mainWindowState() = saveState();
Settings::mainWindowCurrentFileBrowserDirectory() = currentDirectory();
Settings::mainWindowLayoutLocked() = isLayoutLocked();
Settings::dbQueryWidgetShown() = m_ui->dbQueryDockWidget->isVisible();
settings.mainWindow.geometry = saveGeometry();
settings.mainWindow.state = saveState();
settings.mainWindow.currentFileBrowserDirectory = currentDirectory();
settings.mainWindow.layoutLocked = isLayoutLocked();
settings.dbQuery.widgetShown = m_ui->dbQueryDockWidget->isVisible();
break;
default:
;
@ -542,16 +544,17 @@ void MainWindow::saveFileInformation()
*/
void MainWindow::applySettingsFromDialog()
{
if(m_fileFilterModel->isFilterEnabled() != Settings::hideBackupFiles()) {
auto &settings = Settings::values();
if(m_fileFilterModel->isFilterEnabled() != settings.fileBrowser.hideBackupFiles) {
// check this condition to avoid unnecessary model reset
m_fileFilterModel->setFilterEnabled(Settings::hideBackupFiles());
m_fileFilterModel->setFilterEnabled(settings.fileBrowser.hideBackupFiles);
const QModelIndex index = m_fileFilterModel->mapFromSource(m_fileModel->index(m_ui->pathLineEdit->text()));
if(index.isValid()) {
m_ui->filesTreeView->selectionModel()->setCurrentIndex(index, QItemSelectionModel::Select);
}
}
if(m_fileModel->isReadOnly() != Settings::fileBrowserReadOnly()) {
m_fileModel->setReadOnly(Settings::fileBrowserReadOnly());
if(m_fileModel->isReadOnly() != settings.fileBrowser.readOnly) {
m_fileModel->setReadOnly(settings.fileBrowser.readOnly);
}
}

View File

@ -55,7 +55,7 @@ PicturePreviewSelection::PicturePreviewSelection(Tag *tag, KnownField field, QWi
m_currentTypeIndex(0)
{
m_ui->setupUi(this);
m_ui->coverButtonsWidget->setHidden(Settings::hideCoverButtons());
m_ui->coverButtonsWidget->setHidden(Settings::values().editor.hideCoverButtons);
connect(m_ui->addButton, &QPushButton::clicked, this, static_cast<void (PicturePreviewSelection::*)(void)>(&PicturePreviewSelection::addOfSelectedType));
connect(m_ui->removeButton, &QPushButton::clicked, this, &PicturePreviewSelection::removeSelected);
connect(m_ui->extractButton, &QPushButton::clicked, this, &PicturePreviewSelection::extractSelected);
@ -549,7 +549,8 @@ void PicturePreviewSelection::updateDescription(int lastIndex, int newIndex)
{
TagTextEncoding enc;
if(m_tag) {
enc = m_tag->canEncodingBeUsed(Settings::preferredEncoding()) ? Settings::preferredEncoding() : m_tag->proposedTextEncoding();
TagTextEncoding preferredEncoding = Settings::values().tagPocessing.preferredEncoding;
enc = m_tag->canEncodingBeUsed(preferredEncoding) ? preferredEncoding : m_tag->proposedTextEncoding();
} else {
enc = m_values[lastIndex].descriptionEncoding();
}

View File

@ -66,12 +66,13 @@ RenameFilesDialog::RenameFilesDialog(QWidget *parent) :
m_ui->abortClosePushButton->setIcon(style()->standardIcon(QStyle::SP_DialogCancelButton, nullptr, m_ui->abortClosePushButton));
// restore settings
if(Settings::scriptSource() < m_ui->sourceFileStackedWidget->count()) {
m_ui->sourceFileStackedWidget->setCurrentIndex(Settings::scriptSource());
const auto &settings = Settings::values().renamingUtility;
if(Settings::values().renamingUtility.scriptSource < m_ui->sourceFileStackedWidget->count()) {
m_ui->sourceFileStackedWidget->setCurrentIndex(settings.scriptSource);
}
m_ui->scriptFilePathLineEdit->setText(Settings::externalScript());
if(!Settings::editorScript().isEmpty()) {
m_ui->javaScriptPlainTextEdit->setPlainText(Settings::editorScript());
m_ui->scriptFilePathLineEdit->setText(settings.externalScript);
if(!Settings::values().renamingUtility.editorScript.isEmpty()) {
m_ui->javaScriptPlainTextEdit->setPlainText(settings.editorScript);
m_scriptModified = true;
} else {
pasteDefaultExampleScript();
@ -108,15 +109,16 @@ void RenameFilesDialog::setDirectory(const QString &directory)
bool RenameFilesDialog::event(QEvent *event)
{
auto &settings = Settings::values().renamingUtility;
switch(event->type()) {
case QEvent::Close:
// save settings
Settings::scriptSource() = m_ui->sourceFileStackedWidget->currentIndex();
Settings::externalScript() = m_ui->scriptFilePathLineEdit->text();
settings.scriptSource = m_ui->sourceFileStackedWidget->currentIndex();
settings.externalScript = m_ui->scriptFilePathLineEdit->text();
if(m_scriptModified) {
Settings::editorScript() = m_ui->javaScriptPlainTextEdit->toPlainText();
settings.editorScript = m_ui->javaScriptPlainTextEdit->toPlainText();
} else {
Settings::editorScript().clear();
settings.editorScript.clear();
}
break;
default:

View File

@ -46,18 +46,20 @@ FileBrowserGeneralOptionPage::~FileBrowserGeneralOptionPage()
bool FileBrowserGeneralOptionPage::apply()
{
auto &settings = values().fileBrowser;
if(hasBeenShown()) {
hideBackupFiles() = ui()->hideBackupFilesCheckBox->isChecked();
fileBrowserReadOnly() = ui()->readOnlyCheckBox->isChecked();
settings.hideBackupFiles = ui()->hideBackupFilesCheckBox->isChecked();
settings.readOnly = ui()->readOnlyCheckBox->isChecked();
}
return true;
}
void FileBrowserGeneralOptionPage::reset()
{
const auto &settings = values().fileBrowser;
if(hasBeenShown()) {
ui()->hideBackupFilesCheckBox->setChecked(hideBackupFiles());
ui()->readOnlyCheckBox->setChecked(fileBrowserReadOnly());
ui()->hideBackupFilesCheckBox->setChecked(settings.hideBackupFiles);
ui()->readOnlyCheckBox->setChecked(settings.readOnly);
}
}
@ -72,22 +74,23 @@ EditorGeneralOptionPage::~EditorGeneralOptionPage()
bool EditorGeneralOptionPage::apply()
{
if(hasBeenShown()) {
auto &settings = values().editor;
if(ui()->disableAdoptRadioButton->isChecked()) {
adoptFields() = AdoptFields::Never;
settings.adoptFields = AdoptFields::Never;
} else if(ui()->enableWithinDirRadioButton->isChecked()) {
adoptFields() = AdoptFields::WithinDirectory;
settings.adoptFields = AdoptFields::WithinDirectory;
} else if(ui()->enableForAllRadioButton->isChecked()) {
adoptFields() = AdoptFields::Always;
settings.adoptFields = AdoptFields::Always;
}
if(ui()->multipleTagsOneEditorRadioButton->isChecked()) {
multipleTagHandling() = MultipleTagHandling::SingleEditorPerTarget;
settings.multipleTagHandling = MultipleTagHandling::SingleEditorPerTarget;
} else if(ui()->multipleTagsSeparateEditorsRadioButton->isChecked()) {
multipleTagHandling() = MultipleTagHandling::SeparateEditors;
settings.multipleTagHandling = MultipleTagHandling::SeparateEditors;
}
saveAndShowNextOnEnter() = ui()->nextWhenPressingEnterCheckBox->isChecked();
askBeforeDeleting() = ui()->askBeforeDeletingCheckBox->isChecked();
hideTagSelectionComboBox() = ui()->hideTagSelectionComboBoxCheckBox->isChecked();
hideCoverButtons() = ui()->hideCoverButtonsCheckBox->isChecked();
settings.saveAndShowNextOnEnter = ui()->nextWhenPressingEnterCheckBox->isChecked();
settings.askBeforeDeleting = ui()->askBeforeDeletingCheckBox->isChecked();
settings.hideTagSelectionComboBox = ui()->hideTagSelectionComboBoxCheckBox->isChecked();
settings.hideCoverButtons = ui()->hideCoverButtonsCheckBox->isChecked();
}
return true;
}
@ -95,7 +98,8 @@ bool EditorGeneralOptionPage::apply()
void EditorGeneralOptionPage::reset()
{
if(hasBeenShown()) {
switch(adoptFields()) {
const auto &settings = values().editor;
switch(settings.adoptFields) {
case AdoptFields::Never:
ui()->disableAdoptRadioButton->setChecked(true);
break;
@ -106,7 +110,7 @@ void EditorGeneralOptionPage::reset()
ui()->enableForAllRadioButton->setChecked(true);
break;
}
switch(multipleTagHandling()) {
switch(settings.multipleTagHandling) {
case MultipleTagHandling::SingleEditorPerTarget:
ui()->multipleTagsOneEditorRadioButton->setChecked(true);
break;
@ -114,10 +118,10 @@ void EditorGeneralOptionPage::reset()
ui()->multipleTagsSeparateEditorsRadioButton->setChecked(true);
break;
}
ui()->nextWhenPressingEnterCheckBox->setChecked(saveAndShowNextOnEnter());
ui()->askBeforeDeletingCheckBox->setChecked(askBeforeDeleting());
ui()->hideTagSelectionComboBoxCheckBox->setChecked(hideTagSelectionComboBox());
ui()->hideCoverButtonsCheckBox->setChecked(hideCoverButtons());
ui()->nextWhenPressingEnterCheckBox->setChecked(settings.saveAndShowNextOnEnter);
ui()->askBeforeDeletingCheckBox->setChecked(settings.askBeforeDeleting);
ui()->hideTagSelectionComboBoxCheckBox->setChecked(settings.hideTagSelectionComboBox);
ui()->hideCoverButtonsCheckBox->setChecked(settings.hideCoverButtons);
}
}
@ -164,7 +168,7 @@ EditorFieldsOptionPage::~EditorFieldsOptionPage()
bool EditorFieldsOptionPage::apply()
{
if(hasBeenShown() && m_model) {
Settings::selectedFieldsModel().setItems(m_model->items());
values().editor.fields.setItems(m_model->items());
}
return true;
}
@ -172,7 +176,7 @@ bool EditorFieldsOptionPage::apply()
void EditorFieldsOptionPage::reset()
{
if(hasBeenShown() && m_model) {
m_model->setItems(Settings::selectedFieldsModel().items());
m_model->setItems(values().editor.fields.items());
}
}
@ -198,12 +202,13 @@ EditorAutoCorrectionOptionPage::~EditorAutoCorrectionOptionPage()
bool EditorAutoCorrectionOptionPage::apply()
{
if(hasBeenShown()) {
Settings::insertTitleFromFilename() = ui()->insertTitleFromFilenameCheckBox->isChecked();
Settings::trimWhitespaces() = ui()->trimWhitespacesCheckBox->isChecked();
Settings::formatNames() = ui()->formatNamesCheckBox->isChecked();
Settings::fixUmlauts() = ui()->fixUmlautsCheckBox->isChecked();
auto &settings = values().editor.autoCompletition;
settings.insertTitleFromFilename = ui()->insertTitleFromFilenameCheckBox->isChecked();
settings.trimWhitespaces = ui()->trimWhitespacesCheckBox->isChecked();
settings.formatNames = ui()->formatNamesCheckBox->isChecked();
settings.fixUmlauts = ui()->fixUmlautsCheckBox->isChecked();
if(m_model) {
Settings::autoCorrectionFields().setItems(m_model->items());
settings.fields.setItems(m_model->items());
}
}
return true;
@ -212,12 +217,13 @@ bool EditorAutoCorrectionOptionPage::apply()
void EditorAutoCorrectionOptionPage::reset()
{
if(hasBeenShown()) {
ui()->insertTitleFromFilenameCheckBox->setChecked(Settings::insertTitleFromFilename());
ui()->trimWhitespacesCheckBox->setChecked(Settings::trimWhitespaces());
ui()->formatNamesCheckBox->setChecked(Settings::formatNames());
ui()->fixUmlautsCheckBox->setChecked(Settings::fixUmlauts());
const auto &settings = values().editor.autoCompletition;
ui()->insertTitleFromFilenameCheckBox->setChecked(settings.insertTitleFromFilename);
ui()->trimWhitespacesCheckBox->setChecked(settings.trimWhitespaces);
ui()->formatNamesCheckBox->setChecked(settings.formatNames);
ui()->fixUmlautsCheckBox->setChecked(settings.fixUmlauts);
if(m_model) {
m_model->setItems(Settings::autoCorrectionFields().items());
m_model->setItems(settings.fields.items());
}
}
}
@ -243,8 +249,9 @@ EditorDbQueryOptionsPage::~EditorDbQueryOptionsPage()
bool EditorDbQueryOptionsPage::apply()
{
if(hasBeenShown()) {
Settings::musicBrainzUrl() = ui()->musicBrainzUrlLineEdit->text();
Settings::coverArtArchiveUrl() = ui()->coverArtArchiveUrlLineEdit->text();
auto &settings = values().dbQuery;
settings.musicBrainzUrl = ui()->musicBrainzUrlLineEdit->text();
settings.coverArtArchiveUrl = ui()->coverArtArchiveUrlLineEdit->text();
}
return true;
}
@ -252,8 +259,9 @@ bool EditorDbQueryOptionsPage::apply()
void EditorDbQueryOptionsPage::reset()
{
if(hasBeenShown()) {
ui()->musicBrainzUrlLineEdit->setText(Settings::musicBrainzUrl());
ui()->coverArtArchiveUrlLineEdit->setText(Settings::coverArtArchiveUrl());
const auto &settings = values().dbQuery;
ui()->musicBrainzUrlLineEdit->setText(settings.musicBrainzUrl);
ui()->coverArtArchiveUrlLineEdit->setText(settings.coverArtArchiveUrl);
}
}
@ -268,9 +276,10 @@ InfoOptionPage::~InfoOptionPage()
bool InfoOptionPage::apply()
{
if(hasBeenShown()) {
Settings::forceFullParse() = ui()->forceFullParseCheckBox->isChecked();
auto &settings = values().editor;
settings.forceFullParse = ui()->forceFullParseCheckBox->isChecked();
#ifndef TAGEDITOR_NO_WEBVIEW
Settings::noWebView() = ui()->noWebViewCheckBox->isChecked();
settings.noWebView = ui()->noWebViewCheckBox->isChecked();
#endif
}
return true;
@ -279,12 +288,13 @@ bool InfoOptionPage::apply()
void InfoOptionPage::reset()
{
if(hasBeenShown()) {
ui()->forceFullParseCheckBox->setChecked(Settings::forceFullParse());
const auto &settings = values().editor;
ui()->forceFullParseCheckBox->setChecked(settings.forceFullParse);
#ifdef TAGEDITOR_NO_WEBVIEW
ui()->noWebViewCheckBox->setChecked(true);
ui()->noWebViewCheckBox->setEnabled(false);
#else
ui()->noWebViewCheckBox->setChecked(Settings::noWebView());
ui()->noWebViewCheckBox->setChecked(settings.noWebView);
#endif
}
}
@ -300,24 +310,25 @@ TagProcessingGeneralOptionPage::~TagProcessingGeneralOptionPage()
bool TagProcessingGeneralOptionPage::apply()
{
if(hasBeenShown()) {
auto &settings = values().tagPocessing;
if(ui()->latin1RadioButton->isChecked()) {
preferredEncoding() = TagTextEncoding::Latin1;
settings.preferredEncoding = TagTextEncoding::Latin1;
} else if(ui()->utf8RadioButton->isChecked()) {
preferredEncoding() = TagTextEncoding::Utf8;
settings.preferredEncoding = TagTextEncoding::Utf8;
} else if(ui()->utf16leRadioButton->isChecked()) {
preferredEncoding() = TagTextEncoding::Utf16LittleEndian;
settings.preferredEncoding = TagTextEncoding::Utf16LittleEndian;
} else if(ui()->utf16beRadioButton->isChecked()) {
preferredEncoding() = TagTextEncoding::Utf16BigEndian;
settings.preferredEncoding = TagTextEncoding::Utf16BigEndian;
} else if(ui()->autoRadioButton->isChecked()) {
preferredEncoding() = TagTextEncoding::Unspecified;
settings.preferredEncoding = TagTextEncoding::Unspecified;
}
if(ui()->ignoreUnsupportedRadioButton->isChecked()) {
unsupportedFieldHandling() = UnsupportedFieldHandling::Ignore;
settings.unsupportedFieldHandling = UnsupportedFieldHandling::Ignore;
} else if(ui()->discardUnsupportedRadioButton->isChecked()) {
unsupportedFieldHandling() = UnsupportedFieldHandling::Discard;
settings.unsupportedFieldHandling = UnsupportedFieldHandling::Discard;
}
autoTagManagement() = ui()->autoTagManagementCheckBox->isChecked();
settings.autoTagManagement = ui()->autoTagManagementCheckBox->isChecked();
}
return true;
}
@ -325,7 +336,8 @@ bool TagProcessingGeneralOptionPage::apply()
void TagProcessingGeneralOptionPage::reset()
{
if(hasBeenShown()) {
switch(preferredEncoding()) {
const auto &settings = values().tagPocessing;
switch(settings.preferredEncoding) {
case TagTextEncoding::Latin1:
ui()->latin1RadioButton->setChecked(true);
break;
@ -342,7 +354,7 @@ void TagProcessingGeneralOptionPage::reset()
ui()->autoRadioButton->setChecked(true);
break;
}
switch(unsupportedFieldHandling()) {
switch(settings.unsupportedFieldHandling) {
case UnsupportedFieldHandling::Ignore:
ui()->ignoreUnsupportedRadioButton->setChecked(true);
break;
@ -350,7 +362,7 @@ void TagProcessingGeneralOptionPage::reset()
ui()->discardUnsupportedRadioButton->setChecked(true);
break;
}
ui()->autoTagManagementCheckBox->setChecked(autoTagManagement());
ui()->autoTagManagementCheckBox->setChecked(settings.autoTagManagement);
}
}
@ -365,12 +377,13 @@ Id3v1OptionPage::~Id3v1OptionPage()
bool Id3v1OptionPage::apply()
{
if(hasBeenShown()) {
auto &settings = values().tagPocessing.id3;
if(ui()->alwaysCreateRadioButton->isChecked()) {
id3v1usage() = TagUsage::Always;
settings.v1Usage = TagUsage::Always;
} else if(ui()->keepExistingRadioButton->isChecked()) {
id3v1usage() = TagUsage::KeepExisting;
settings.v1Usage = TagUsage::KeepExisting;
} else if(ui()->removeExistingRadioButton->isChecked()) {
id3v1usage() = TagUsage::Never;
settings.v1Usage = TagUsage::Never;
}
}
return true;
@ -379,7 +392,8 @@ bool Id3v1OptionPage::apply()
void Id3v1OptionPage::reset()
{
if(hasBeenShown()) {
switch(id3v1usage()) {
const auto &settings = values().tagPocessing.id3;
switch(settings.v1Usage) {
case TagUsage::Always:
ui()->alwaysCreateRadioButton->setChecked(true);
break;
@ -404,22 +418,23 @@ Id3v2OptionPage::~Id3v2OptionPage()
bool Id3v2OptionPage::apply()
{
if(hasBeenShown()) {
auto &settings = values().tagPocessing.id3;
if(ui()->alwaysCreateRadioButton->isChecked()) {
id3v2usage() = TagUsage::Always;
settings.v2Usage = TagUsage::Always;
} else if(ui()->keepExistingRadioButton->isChecked()) {
id3v2usage() = TagUsage::KeepExisting;
settings.v2Usage = TagUsage::KeepExisting;
} else if(ui()->removeExistingRadioButton->isChecked()) {
id3v2usage() = TagUsage::Never;
settings.v2Usage = TagUsage::Never;
}
if(ui()->version230radioButton->isChecked()) {
id3v2versionToBeUsed() = 3;
settings.v2Version = 3;
} else if(ui()->version240radioButton->isChecked()) {
id3v2versionToBeUsed() = 4;
settings.v2Version = 4;
} else if(ui()->version220radioButton->isChecked()) {
id3v2versionToBeUsed() = 2;
settings.v2Version = 2;
}
keepVersionOfExistingId3v2Tag() = ui()->keepExistingVersionCheckBox->isChecked();
mergeMultipleSuccessiveId3v2Tags() = ui()->mergeRadioButton->isChecked();
settings.keepVersionOfExistingId3v2Tag = ui()->keepExistingVersionCheckBox->isChecked();
settings.mergeMultipleSuccessiveId3v2Tags = ui()->mergeRadioButton->isChecked();
}
return true;
}
@ -427,7 +442,8 @@ bool Id3v2OptionPage::apply()
void Id3v2OptionPage::reset()
{
if(hasBeenShown()) {
switch(id3v2usage()) {
const auto &settings = values().tagPocessing.id3;
switch(settings.v2Usage) {
case TagUsage::Always:
ui()->alwaysCreateRadioButton->setChecked(true);
break;
@ -438,7 +454,7 @@ void Id3v2OptionPage::reset()
ui()->removeExistingRadioButton->setChecked(true);
break;
}
switch(id3v2versionToBeUsed()) {
switch(settings.v2Version) {
case 3:
ui()->version230radioButton->setChecked(true);
break;
@ -449,8 +465,8 @@ void Id3v2OptionPage::reset()
ui()->version220radioButton->setChecked(true);
break;
}
ui()->keepExistingVersionCheckBox->setChecked(keepVersionOfExistingId3v2Tag());
if(mergeMultipleSuccessiveId3v2Tags()) {
ui()->keepExistingVersionCheckBox->setChecked(settings.keepVersionOfExistingId3v2Tag);
if(settings.mergeMultipleSuccessiveId3v2Tags) {
ui()->mergeRadioButton->setChecked(true);
} else {
ui()->keepSeparateRadioButton->setChecked(true);
@ -470,7 +486,7 @@ TagProcessingTargetsOptionPage::~TagProcessingTargetsOptionPage()
bool TagProcessingTargetsOptionPage::apply()
{
if(hasBeenShown() && m_model) {
Settings::defaultTargetsModel().setItems(m_model->items());
values().editor.defaultTargets.setItems(m_model->items());
}
return true;
}
@ -478,7 +494,7 @@ bool TagProcessingTargetsOptionPage::apply()
void TagProcessingTargetsOptionPage::reset()
{
if(hasBeenShown() && m_model) {
m_model->setItems(Settings::defaultTargetsModel().items());
m_model->setItems(values().editor.defaultTargets.items());
}
}
@ -507,31 +523,32 @@ bool FileLayoutPage::apply()
bool ok = true;
if(hasBeenShown()) {
Settings::forceRewrite() = ui()->forceRewriteCheckBox->isChecked();
auto &settings = values().tagPocessing.fileLayout;
settings.forceRewrite = ui()->forceRewriteCheckBox->isChecked();
if(ui()->minPaddingSpinBox->value() > ui()->maxPaddingSpinBox->value()) {
errors() << QCoreApplication::translate("QtGui::FileLayoutPage", "Minimum padding must be less or equal than maximum padding.");
ok = false;
} else {
Settings::maxPadding() = static_cast<size_t>(ui()->maxPaddingSpinBox->value());
Settings::minPadding() = static_cast<size_t>(ui()->minPaddingSpinBox->value());
settings.maxPadding = static_cast<size_t>(ui()->maxPaddingSpinBox->value());
settings.minPadding = static_cast<size_t>(ui()->minPaddingSpinBox->value());
}
Settings::preferredPadding() = static_cast<size_t>(ui()->preferredPaddingSpinBox->value());
settings.preferredPadding = static_cast<size_t>(ui()->preferredPaddingSpinBox->value());
if(ui()->tagPosBeforeDataRadioButton->isChecked()) {
preferredTagPosition() = ElementPosition::BeforeData;
settings.preferredTagPosition = ElementPosition::BeforeData;
} else if(ui()->tagPosAfterDataRadioButton->isChecked()) {
preferredTagPosition() = ElementPosition::AfterData;
settings.preferredTagPosition = ElementPosition::AfterData;
} else if(ui()->tagPosKeepRadioButton->isChecked()) {
preferredTagPosition() = ElementPosition::Keep;
settings.preferredTagPosition = ElementPosition::Keep;
}
forceTagPosition() = ui()->tagPosForceCheckBox->isChecked();
settings.forceTagPosition = ui()->tagPosForceCheckBox->isChecked();
if(ui()->indexPosBeforeDataRadioButton->isChecked()) {
preferredIndexPosition() = ElementPosition::BeforeData;
settings.preferredIndexPosition = ElementPosition::BeforeData;
} else if(ui()->indexPosAfterDataRadioButton->isChecked()) {
preferredIndexPosition() = ElementPosition::AfterData;
settings.preferredIndexPosition = ElementPosition::AfterData;
} else if(ui()->indexPosKeepRadioButton->isChecked()) {
preferredIndexPosition() = ElementPosition::Keep;
settings.preferredIndexPosition = ElementPosition::Keep;
}
forceIndexPosition() = ui()->indexPosForceCheckBox->isChecked();
settings.forceIndexPosition = ui()->indexPosForceCheckBox->isChecked();
}
return ok;
}
@ -539,11 +556,12 @@ bool FileLayoutPage::apply()
void FileLayoutPage::reset()
{
if(hasBeenShown()) {
ui()->forceRewriteCheckBox->setChecked(Settings::forceRewrite());
ui()->maxPaddingSpinBox->setValue(static_cast<int>(Settings::maxPadding()));
ui()->minPaddingSpinBox->setValue(static_cast<int>(Settings::minPadding()));
ui()->preferredPaddingSpinBox->setValue(static_cast<int>(Settings::preferredPadding()));
switch(preferredTagPosition()) {
const auto &settings = values().tagPocessing.fileLayout;
ui()->forceRewriteCheckBox->setChecked(settings.forceRewrite);
ui()->maxPaddingSpinBox->setValue(static_cast<int>(settings.maxPadding));
ui()->minPaddingSpinBox->setValue(static_cast<int>(settings.minPadding));
ui()->preferredPaddingSpinBox->setValue(static_cast<int>(settings.preferredPadding));
switch(settings.preferredTagPosition) {
case ElementPosition::BeforeData:
ui()->tagPosBeforeDataRadioButton->setChecked(true);
break;
@ -554,8 +572,8 @@ void FileLayoutPage::reset()
ui()->tagPosKeepRadioButton->setChecked(true);
break;
}
ui()->tagPosForceCheckBox->setChecked(forceTagPosition());
switch(preferredIndexPosition()) {
ui()->tagPosForceCheckBox->setChecked(settings.forceTagPosition);
switch(settings.preferredIndexPosition) {
case ElementPosition::BeforeData:
ui()->indexPosBeforeDataRadioButton->setChecked(true);
break;
@ -566,7 +584,7 @@ void FileLayoutPage::reset()
ui()->indexPosKeepRadioButton->setChecked(true);
break;
}
ui()->indexPosForceCheckBox->setChecked(forceIndexPosition());
ui()->indexPosForceCheckBox->setChecked(settings.forceIndexPosition);
}
}
@ -616,7 +634,7 @@ SettingsDialog::SettingsDialog(QWidget *parent) :
category->assignPages(QList<Dialogs::OptionPage *>() << new FileBrowserGeneralOptionPage);
categories << category;
categories << Settings::qtSettings().category();
categories << values().qt.category();
categoryModel()->setCategories(categories);

View File

@ -179,7 +179,7 @@ void TagEdit::restore()
*/
void TagEdit::apply()
{
switch(Settings::unsupportedFieldHandling()) {
switch(Settings::values().tagPocessing.unsupportedFieldHandling) {
case Settings::UnsupportedFieldHandling::Discard:
// remove all old fields of all tags to discard
// all unsupported values
@ -241,7 +241,7 @@ void TagEdit::setupUi()
// setup editing controls
TagFieldEdit *edit = nullptr;
int rowOverall = 0, rowLeft = 0, rowRight = 0;
for(const auto &item : Settings::selectedFieldsModel().items()) {
for(const auto &item : Settings::values().editor.fields.items()) {
KnownField field = static_cast<KnownField>(item.id().toInt());
if(item.isChecked() && hasField(field)) {
// the field is not disabled and the field is supported by at least one of the assigned tags

View File

@ -116,7 +116,7 @@ TagEditorWidget::TagEditorWidget(QWidget *parent) :
// setup m_tagOptionsMenu, m_addTagMenu, m_removeTagMenu, m_changeTargetMenu
m_tagOptionsMenu = new QMenu(this);
m_tagOptionsMenu->addAction(m_ui->actionManage_tags_automatically_when_loading_file);
connect(m_ui->actionManage_tags_automatically_when_loading_file, &QAction::triggered, [] (bool checked) { Settings::autoTagManagement() = checked; });
connect(m_ui->actionManage_tags_automatically_when_loading_file, &QAction::triggered, [] (bool checked) { Settings::values().tagPocessing.autoTagManagement = checked; });
m_tagOptionsMenu->addSeparator();
m_addTagMenu = new QMenu(tr("Add tag"), m_tagOptionsMenu);
m_addTagMenu->setEnabled(false);
@ -284,7 +284,7 @@ void TagEditorWidget::updateTagEditsAndAttachmentEdits(bool updateUi, PreviousVa
// determine to previous value handling according to the settings if auto is specified
switch(previousValueHandling) {
case PreviousValueHandling::Auto:
switch(Settings::adoptFields()) {
switch(Settings::values().editor.adoptFields) {
case Settings::AdoptFields::WithinDirectory:
if(m_lastDir != m_currentDir) {
previousValueHandling = PreviousValueHandling::Clear;
@ -333,7 +333,7 @@ void TagEditorWidget::updateTagEditsAndAttachmentEdits(bool updateUi, PreviousVa
}
}
// create a singe editor per target or seperate editors for each tag depending on the settings
switch(Settings::multipleTagHandling()) {
switch(Settings::values().editor.multipleTagHandling) {
case Settings::MultipleTagHandling::SingleEditorPerTarget:
// iterate through all targets in both cases
for(int targetIndex = 0, targetCount = targets.size(); targetIndex < targetCount; ++targetIndex) {
@ -411,7 +411,7 @@ void TagEditorWidget::updateTagSelectionComboBox()
m_ui->tagSelectionComboBox->addItem(label);
}
// set visibility
m_ui->tagSelectionComboBox->setHidden(Settings::hideTagSelectionComboBox() && m_ui->tagSelectionComboBox->count() <= 1 && !haveTargetInfo);
m_ui->tagSelectionComboBox->setHidden(Settings::values().editor.hideTagSelectionComboBox && m_ui->tagSelectionComboBox->count() <= 1 && !haveTargetInfo);
// restore selected index
if(previouslySelectedEditIndex >= 0 && previouslySelectedEditIndex < m_ui->tagSelectionComboBox->count()) {
m_ui->tagSelectionComboBox->setCurrentIndex(previouslySelectedEditIndex);
@ -564,7 +564,7 @@ void TagEditorWidget::updateTagManagementMenu()
*/
void TagEditorWidget::insertTitleFromFilename()
{
if(!m_tags.empty() && Settings::insertTitleFromFilename()) {
if(!m_tags.empty() && Settings::values().editor.autoCompletition.insertTitleFromFilename) {
QString title;
int trackNum;
parseFileName(QString::fromLocal8Bit(m_fileInfo.fileName().c_str()), title, trackNum);
@ -583,7 +583,7 @@ void TagEditorWidget::insertTitleFromFilename()
void TagEditorWidget::initInfoView()
{
#ifndef TAGEDITOR_NO_WEBVIEW
if(!Settings::noWebView() && !m_infoWebView) {
if(!Settings::values().editor.noWebView && !m_infoWebView) {
if(m_infoTreeView) {
m_infoTreeView->deleteLater();
m_infoTreeView = nullptr;
@ -597,7 +597,7 @@ void TagEditorWidget::initInfoView()
m_infoWebView->setContextMenuPolicy(Qt::CustomContextMenu);
connect(m_infoWebView, &QWidget::customContextMenuRequested, this, &TagEditorWidget::showInfoWebViewContextMenu);
m_ui->tagSplitter->addWidget(m_infoWebView);
} else if(Settings::noWebView() && !m_infoTreeView) {
} else if(Settings::values().editor.noWebView && !m_infoTreeView) {
if(m_infoWebView) {
m_infoWebView->deleteLater();
m_infoWebView = nullptr;
@ -761,7 +761,7 @@ bool TagEditorWidget::startParsing(const QString &path, bool forceRefresh)
// try to open read-only if opening with write access failed
m_fileInfo.reopen(true);
}
m_fileInfo.setForceFullParse(Settings::forceFullParse());
m_fileInfo.setForceFullParse(Settings::values().editor.forceFullParse);
m_fileInfo.parseEverything();
result = ParsingSuccessful;
} catch(const Failure &) {
@ -845,21 +845,22 @@ void TagEditorWidget::showFile(char result)
}
// create appropriate tags according to file type and user preferences when automatic tag management is enabled
if(Settings::autoTagManagement()) {
const auto &settings = Settings::values().tagPocessing;
if(settings.autoTagManagement) {
vector<TagTarget> requiredTargets;
requiredTargets.reserve(2);
for(const ChecklistItem &targetItem : Settings::defaultTargetsModel().items()) {
for(const ChecklistItem &targetItem : Settings::values().editor.defaultTargets.items()) {
if(targetItem.isChecked()) {
requiredTargets.emplace_back(containerTargetLevelValue(m_fileInfo.containerFormat(), static_cast<TagTargetLevel>(targetItem.id().toInt())));
}
}
// TODO: allow initialization of new ID3 tag with values from already present ID3 tag
// TODO: allow not to transfer values from removed ID3 tag to remaining ID3 tags
if(!m_fileInfo.createAppropriateTags(false, Settings::id3v1usage(), Settings::id3v2usage(), false, true, Settings::mergeMultipleSuccessiveId3v2Tags(),
Settings::keepVersionOfExistingId3v2Tag(), Settings::id3v2versionToBeUsed(), requiredTargets)) {
if(!m_fileInfo.createAppropriateTags(false, settings.id3.v1Usage, settings.id3.v2Usage, false, true, settings.id3.mergeMultipleSuccessiveId3v2Tags,
settings.id3.keepVersionOfExistingId3v2Tag, settings.id3.v2Version, requiredTargets)) {
if(confirmCreationOfId3TagForUnsupportedFile()) {
m_fileInfo.createAppropriateTags(true, Settings::id3v1usage(), Settings::id3v2usage(), false, true, Settings::mergeMultipleSuccessiveId3v2Tags(),
Settings::keepVersionOfExistingId3v2Tag(), Settings::id3v2versionToBeUsed(), requiredTargets);
m_fileInfo.createAppropriateTags(true, settings.id3.v1Usage, settings.id3.v2Usage, false, true, settings.id3.mergeMultipleSuccessiveId3v2Tags,
settings.id3.keepVersionOfExistingId3v2Tag, settings.id3.v2Version, requiredTargets);
}
}
// tags might have been adjusted -> reload tags
@ -981,7 +982,7 @@ bool TagEditorWidget::deleteAllTagsAndSave()
{
TryLocker<> locker(m_fileOperationMutex);
if(locker) {
if(Settings::askBeforeDeleting()) {
if(Settings::values().editor.askBeforeDeleting) {
QMessageBox msgBox(this);
msgBox.setText(tr("Do you really want to delete all tags from the file?"));
msgBox.setIcon(QMessageBox::Warning);
@ -995,7 +996,7 @@ bool TagEditorWidget::deleteAllTagsAndSave()
int res = msgBox.exec();
#if QT_VERSION >= 0x050200
if(checkBox->isChecked()) {
Settings::askBeforeDeleting() = false;
Settings::values().editor.askBeforeDeleting = false;
}
#endif
if(res != QMessageBox::Yes) {
@ -1056,14 +1057,15 @@ bool TagEditorWidget::startSaving()
// remove current path from file watcher
m_fileWatcher->removePath(m_currentPath);
// use current configuration
m_fileInfo.setForceRewrite(Settings::forceRewrite());
m_fileInfo.setTagPosition(Settings::preferredTagPosition());
m_fileInfo.setForceTagPosition(Settings::forceTagPosition());
m_fileInfo.setIndexPosition(Settings::preferredIndexPosition());
m_fileInfo.setForceIndexPosition(Settings::forceIndexPosition());
m_fileInfo.setMinPadding(Settings::minPadding());
m_fileInfo.setMaxPadding(Settings::maxPadding());
m_fileInfo.setPreferredPadding(Settings::preferredPadding());
const auto &settings = Settings::values().tagPocessing.fileLayout;
m_fileInfo.setForceRewrite(settings.forceRewrite);
m_fileInfo.setTagPosition(settings.preferredTagPosition);
m_fileInfo.setForceTagPosition(settings.forceTagPosition);
m_fileInfo.setIndexPosition(settings.preferredIndexPosition);
m_fileInfo.setForceIndexPosition(settings.forceIndexPosition);
m_fileInfo.setMinPadding(settings.minPadding);
m_fileInfo.setMaxPadding(settings.maxPadding);
m_fileInfo.setPreferredPadding(settings.preferredPadding);
// define functions to show the saving progress and to actually applying the changes
auto showProgress = [this] (StatusProvider &sender) -> void {
QMetaObject::invokeMethod(m_ui->makingNotificationWidget, "setPercentage", Qt::QueuedConnection, Q_ARG(int, static_cast<int>(sender.currentPercentage() * 100.0)));
@ -1233,19 +1235,20 @@ void TagEditorWidget::closeFile()
*/
void TagEditorWidget::handleReturnPressed()
{
if(Settings::saveAndShowNextOnEnter() && m_fileInfo.isOpen()) {
if(Settings::values().editor.saveAndShowNextOnEnter && m_fileInfo.isOpen()) {
saveAndShowNextFile();
}
}
void TagEditorWidget::handleKeepPreviousValuesActionTriggered(QAction *action)
{
auto &settings = Settings::values().editor;
if(action == m_ui->actionKeep_previous_values_never) {
Settings::adoptFields() = Settings::AdoptFields::Never;
settings.adoptFields = Settings::AdoptFields::Never;
} else if(action == m_ui->actionKeep_previous_values_within_same_dir) {
Settings::adoptFields() = Settings::AdoptFields::WithinDirectory;
settings.adoptFields = Settings::AdoptFields::WithinDirectory;
} else if(action == m_ui->actionKeep_previous_values_always) {
Settings::adoptFields() = Settings::AdoptFields::Always;
settings.adoptFields = Settings::AdoptFields::Always;
}
}
@ -1255,7 +1258,8 @@ void TagEditorWidget::handleKeepPreviousValuesActionTriggered(QAction *action)
*/
void TagEditorWidget::applySettingsFromDialog()
{
switch(Settings::adoptFields()) {
const auto &settings = Settings::values();
switch(settings.editor.adoptFields) {
case Settings::AdoptFields::Never:
m_ui->actionKeep_previous_values_never->setChecked(true);
break;
@ -1266,8 +1270,8 @@ void TagEditorWidget::applySettingsFromDialog()
m_ui->actionKeep_previous_values_always->setChecked(true);
break;
}
m_ui->actionManage_tags_automatically_when_loading_file->setChecked(Settings::autoTagManagement());
foreachTagEdit(bind(&TagEdit::setCoverButtonsHidden, _1, Settings::hideCoverButtons()));
m_ui->actionManage_tags_automatically_when_loading_file->setChecked(settings.tagPocessing.autoTagManagement);
foreachTagEdit(bind(&TagEdit::setCoverButtonsHidden, _1, settings.editor.hideCoverButtons));
// ensure info view is displayed/not displayed according to settings
initInfoView();
updateInfoView();

View File

@ -193,12 +193,12 @@ bool TagFieldEdit::canApply(KnownField field) const
for(Tag *tag : tags()) {
switch(tag->type()) {
case TagType::Id3v1Tag:
if(Settings::id3v1usage() == TagUsage::Never) {
if(Settings::values().tagPocessing.id3.v1Usage == TagUsage::Never) {
continue;
}
break;
case TagType::Id3v2Tag:
if(Settings::id3v2usage() == TagUsage::Never) {
if(Settings::values().tagPocessing.id3.v2Usage == TagUsage::Never) {
continue;
}
break;
@ -851,20 +851,21 @@ void TagFieldEdit::showRestoreButton()
*/
void TagFieldEdit::applyAutoCorrection(QString &textValue)
{
auto &fields = Settings::autoCorrectionFields().items();
const auto &settings = Settings::values().editor.autoCompletition;
auto &fields = settings.fields.items();
auto i = find_if(fields.constBegin(), fields.constEnd(), [this] (const ChecklistItem &item) {
bool ok;
return (item.id().toInt(&ok) == static_cast<int>(this->field())) && ok;
});
// if current field is in the list of auto correction fields and auto correction should be applied
if(i != fields.constEnd() && i->isChecked()) {
if(Settings::trimWhitespaces()) {
if(settings.trimWhitespaces) {
textValue = textValue.trimmed();
}
if(Settings::fixUmlauts()) {
if(settings.fixUmlauts) {
textValue = Utility::fixUmlauts(textValue);
}
if(Settings::formatNames()) {
if(settings.formatNames) {
textValue = Utility::formatName(textValue);
}
}
@ -943,7 +944,7 @@ void TagFieldEdit::apply()
m_pictureSelection->apply();
}
} else {
TagTextEncoding encoding = Settings::preferredEncoding();
TagTextEncoding encoding = Settings::values().tagPocessing.preferredEncoding;
if(!tag->canEncodingBeUsed(encoding)) {
encoding = tag->proposedTextEncoding();
}

View File

@ -648,123 +648,123 @@
<context>
<name>QtGui::DbQueryWidget</name>
<message>
<location filename="../gui/dbquerywidget.ui" line="14"/>
<location filename="../gui/dbquerywidget.ui" line="6"/>
<source>MusicBrainz/LyricsWikia search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="59"/>
<location filename="../gui/dbquerywidget.ui" line="51"/>
<source>Search &amp;criteria</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="83"/>
<location filename="../gui/dbquerywidget.ui" line="75"/>
<source>Song</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="101"/>
<location filename="../gui/dbquerywidget.ui" line="108"/>
<location filename="../gui/dbquerywidget.ui" line="124"/>
<location filename="../gui/dbquerywidget.ui" line="138"/>
<location filename="../gui/dbquerywidget.ui" line="93"/>
<location filename="../gui/dbquerywidget.ui" line="100"/>
<location filename="../gui/dbquerywidget.ui" line="116"/>
<location filename="../gui/dbquerywidget.ui" line="130"/>
<source>?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="117"/>
<location filename="../gui/dbquerywidget.ui" line="109"/>
<source>Album</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="131"/>
<location filename="../gui/dbquerywidget.ui" line="123"/>
<source>Artist</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="175"/>
<location filename="../gui/dbquerywidget.ui" line="167"/>
<source>Fields to be used</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="221"/>
<source>override existing values</source>
<location filename="../gui/dbquerywidget.ui" line="213"/>
<source>Override existing values</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="279"/>
<location filename="../gui/dbquerywidget.ui" line="271"/>
<source>Abort</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="292"/>
<location filename="../gui/dbquerywidget.ui" line="284"/>
<source>Search
MusicBrainz</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="310"/>
<location filename="../gui/dbquerywidget.ui" line="302"/>
<source>Search
LyricWikia</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="331"/>
<location filename="../gui/dbquerywidget.ui" line="323"/>
<source>Inserts the selected result into the current tag (doesn&apos;t save anything)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="334"/>
<location filename="../gui/dbquerywidget.ui" line="326"/>
<source>Use selected
row</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="50"/>
<location filename="../gui/dbquerywidget.cpp" line="54"/>
<source>Search hasn&apos;t been started</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="68"/>
<location filename="../gui/dbquerywidget.cpp" line="72"/>
<source>Insert present data</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="72"/>
<location filename="../gui/dbquerywidget.cpp" line="76"/>
<source>Clear search criteria</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="137"/>
<location filename="../gui/dbquerywidget.cpp" line="141"/>
<source>Insufficient search criteria supplied - at least title, album or artist must be specified</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="147"/>
<location filename="../gui/dbquerywidget.cpp" line="151"/>
<source>Retrieving meta data from MusicBrainz ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="161"/>
<location filename="../gui/dbquerywidget.cpp" line="165"/>
<source>Insufficient search criteria supplied - artist is mandatory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="171"/>
<location filename="../gui/dbquerywidget.cpp" line="175"/>
<source>Retrieving meta data from LyricsWikia ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="194"/>
<location filename="../gui/dbquerywidget.cpp" line="198"/>
<source>Aborted</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="206"/>
<location filename="../gui/dbquerywidget.cpp" line="210"/>
<source>No results available</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location filename="../gui/dbquerywidget.cpp" line="208"/>
<location filename="../gui/dbquerywidget.cpp" line="212"/>
<source>%1 result(s) available</source>
<translation type="unfinished">
<numerusform></numerusform>
@ -772,47 +772,47 @@ row</source>
</translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="273"/>
<location filename="../gui/dbquerywidget.cpp" line="356"/>
<source>Retrieving cover art to be applied ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="294"/>
<location filename="../gui/dbquerywidget.cpp" line="377"/>
<source>Retrieving lyrics to be applied ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="334"/>
<location filename="../gui/dbquerywidget.cpp" line="414"/>
<source>Use selected row</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="337"/>
<location filename="../gui/dbquerywidget.cpp" line="417"/>
<source>Show cover</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="338"/>
<location filename="../gui/dbquerywidget.cpp" line="418"/>
<source>Show lyrics</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="367"/>
<location filename="../gui/dbquerywidget.cpp" line="447"/>
<source>Retrieving cover art ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="398"/>
<location filename="../gui/dbquerywidget.cpp" line="478"/>
<source>Retrieving lyrics ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="411"/>
<location filename="../gui/dbquerywidget.cpp" line="491"/>
<source>Cover - %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="436"/>
<location filename="../gui/dbquerywidget.cpp" line="516"/>
<source>Lyrics - %1</source>
<translation type="unfinished"></translation>
</message>
@ -996,7 +996,7 @@ Remarks
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/settingsdialog.cpp" line="150"/>
<location filename="../gui/settingsdialog.cpp" line="154"/>
<source>To avoid unnecessary copying this directory should be on the same partition as the files you want to edit.</source>
<translation type="unfinished"></translation>
</message>
@ -1593,12 +1593,12 @@ another position would prevent rewriting the entire file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/settingsdialog.cpp" line="512"/>
<location filename="../gui/settingsdialog.cpp" line="529"/>
<source>Minimum padding must be less or equal than maximum padding.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/settingsdialog.cpp" line="577"/>
<location filename="../gui/settingsdialog.cpp" line="595"/>
<source>These options might be ignored if not supported by either the format or the implementation.</source>
<translation type="unfinished"></translation>
</message>
@ -1759,32 +1759,32 @@ another position would prevent rewriting the entire file</source>
<context>
<name>QtGui::LyricsWikiaResultsModel</name>
<message>
<location filename="../dbquery/lyricswikia.cpp" line="37"/>
<location filename="../dbquery/lyricswikia.cpp" line="43"/>
<source>Unable to fetch lyrics: Artist or title is unknown.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../dbquery/lyricswikia.cpp" line="151"/>
<location filename="../dbquery/lyricswikia.cpp" line="157"/>
<source>Internal error: context for song details reply invalid</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../dbquery/lyricswikia.cpp" line="191"/>
<location filename="../dbquery/lyricswikia.cpp" line="197"/>
<source>Unable to parse song details: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../dbquery/lyricswikia.cpp" line="200"/>
<location filename="../dbquery/lyricswikia.cpp" line="206"/>
<source>Song details requested for %1/%2 do not contain URL for Wiki page</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../dbquery/lyricswikia.cpp" line="228"/>
<location filename="../dbquery/lyricswikia.cpp" line="234"/>
<source>Internal error: context for LyricsWikia page reply invalid</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../dbquery/lyricswikia.cpp" line="238"/>
<location filename="../dbquery/lyricswikia.cpp" line="244"/>
<source>Song details requested for %1/%2 do not contain lyrics</source>
<translation type="unfinished"></translation>
</message>
@ -1912,7 +1912,7 @@ another position would prevent rewriting the entire file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="199"/>
<location filename="../gui/mainwindow.cpp" line="200"/>
<source>Lock layout</source>
<translation type="unfinished"></translation>
</message>
@ -1988,63 +1988,63 @@ another position would prevent rewriting the entire file</source>
<translation></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="332"/>
<location filename="../gui/mainwindow.cpp" line="334"/>
<source>No file opened.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="353"/>
<location filename="../gui/mainwindow.cpp" line="355"/>
<source>A tag editing utility supporting ID3, MP4 (iTunes style), Vorbis and Matroska tags.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="470"/>
<location filename="../gui/mainwindow.cpp" line="472"/>
<source>Unable to show the next file because it can&apos;t be found anymore.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="480"/>
<location filename="../gui/mainwindow.cpp" line="482"/>
<source>Open file - </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="491"/>
<location filename="../gui/mainwindow.cpp" line="493"/>
<source>Save changes as - </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="513"/>
<location filename="../gui/mainwindow.cpp" line="515"/>
<source>Save file information - </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="532"/>
<location filename="../gui/mainwindow.cpp" line="534"/>
<source>No file is opened.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="535"/>
<location filename="../gui/mainwindow.cpp" line="537"/>
<source>Unable to save file information because the current process hasn&apos;t been finished yet.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="522"/>
<location filename="../gui/mainwindow.cpp" line="524"/>
<source>Unable to write to file.
%1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="194"/>
<location filename="../gui/mainwindow.cpp" line="195"/>
<source>Unlock layout</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="525"/>
<location filename="../gui/mainwindow.cpp" line="527"/>
<source>Unable to open file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="529"/>
<location filename="../gui/mainwindow.cpp" line="531"/>
<source>No file information available.</source>
<translation type="unfinished"></translation>
</message>
@ -2139,7 +2139,7 @@ another position would prevent rewriting the entire file</source>
</message>
<message>
<location filename="../gui/picturepreviewselection.ui" line="150"/>
<location filename="../gui/picturepreviewselection.cpp" line="592"/>
<location filename="../gui/picturepreviewselection.cpp" line="593"/>
<source>Add</source>
<translation type="unfinished"></translation>
</message>
@ -2338,7 +2338,7 @@ another position would prevent rewriting the entire file</source>
</message>
<message>
<location filename="../gui/picturepreviewselection.cpp" line="402"/>
<location filename="../gui/picturepreviewselection.cpp" line="600"/>
<location filename="../gui/picturepreviewselection.cpp" line="601"/>
<source>The attached image can&apos;t be found.</source>
<translation type="unfinished"></translation>
</message>
@ -2358,22 +2358,22 @@ another position would prevent rewriting the entire file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/picturepreviewselection.cpp" line="590"/>
<location filename="../gui/picturepreviewselection.cpp" line="591"/>
<source>No image (of the selected type) attached.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/picturepreviewselection.cpp" line="610"/>
<location filename="../gui/picturepreviewselection.cpp" line="611"/>
<source>Unable to display attached image.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/picturepreviewselection.cpp" line="619"/>
<location filename="../gui/picturepreviewselection.cpp" line="620"/>
<source>Change</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/picturepreviewselection.cpp" line="631"/>
<location filename="../gui/picturepreviewselection.cpp" line="632"/>
<source>Change MIME-type</source>
<translation type="unfinished"></translation>
</message>
@ -2470,8 +2470,8 @@ another position would prevent rewriting the entire file</source>
</message>
<message>
<location filename="../gui/renamefilesdialog.ui" line="697"/>
<location filename="../gui/renamefilesdialog.cpp" line="219"/>
<location filename="../gui/renamefilesdialog.cpp" line="244"/>
<location filename="../gui/renamefilesdialog.cpp" line="221"/>
<location filename="../gui/renamefilesdialog.cpp" line="246"/>
<source>Close</source>
<translation type="unfinished"></translation>
</message>
@ -2491,8 +2491,8 @@ another position would prevent rewriting the entire file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="163"/>
<location filename="../gui/renamefilesdialog.cpp" line="198"/>
<location filename="../gui/renamefilesdialog.cpp" line="165"/>
<location filename="../gui/renamefilesdialog.cpp" line="200"/>
<source>Abort</source>
<translation type="unfinished"></translation>
</message>
@ -2538,28 +2538,28 @@ another position would prevent rewriting the entire file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="161"/>
<location filename="../gui/renamefilesdialog.cpp" line="163"/>
<source>Generating preview ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="170"/>
<location filename="../gui/renamefilesdialog.cpp" line="172"/>
<source>The script is not valid.
Error in line %1: %3</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="186"/>
<location filename="../gui/renamefilesdialog.cpp" line="188"/>
<source>The selected directory doesn&apos;t exist.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="196"/>
<location filename="../gui/renamefilesdialog.cpp" line="198"/>
<source>Applying changings ...</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location filename="../gui/renamefilesdialog.cpp" line="209"/>
<location filename="../gui/renamefilesdialog.cpp" line="211"/>
<source>%1 files/directories processed</source>
<translation type="unfinished">
<numerusform></numerusform>
@ -2567,13 +2567,13 @@ Error in line %1: %3</source>
</translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="223"/>
<location filename="../gui/renamefilesdialog.cpp" line="225"/>
<source>Preview has been generated.</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location filename="../gui/renamefilesdialog.cpp" line="237"/>
<location filename="../gui/renamefilesdialog.cpp" line="255"/>
<location filename="../gui/renamefilesdialog.cpp" line="239"/>
<location filename="../gui/renamefilesdialog.cpp" line="257"/>
<source>%1 error(s) occured.</source>
<translation type="unfinished">
<numerusform></numerusform>
@ -2581,8 +2581,8 @@ Error in line %1: %3</source>
</translation>
</message>
<message numerus="yes">
<location filename="../gui/renamefilesdialog.cpp" line="224"/>
<location filename="../gui/renamefilesdialog.cpp" line="248"/>
<location filename="../gui/renamefilesdialog.cpp" line="226"/>
<location filename="../gui/renamefilesdialog.cpp" line="250"/>
<source>%1 files/directories have been processed.</source>
<translation type="unfinished">
<numerusform></numerusform>
@ -2590,12 +2590,12 @@ Error in line %1: %3</source>
</translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="228"/>
<location filename="../gui/renamefilesdialog.cpp" line="230"/>
<source>No files and directories have been found.</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location filename="../gui/renamefilesdialog.cpp" line="212"/>
<location filename="../gui/renamefilesdialog.cpp" line="214"/>
<source>%1 error(s) occured</source>
<translation type="unfinished">
<numerusform></numerusform>
@ -2603,62 +2603,62 @@ Error in line %1: %3</source>
</translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="148"/>
<location filename="../gui/renamefilesdialog.cpp" line="150"/>
<source>There is no external script file is selected.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="155"/>
<location filename="../gui/renamefilesdialog.cpp" line="157"/>
<source>Unable to open external script file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="173"/>
<location filename="../gui/renamefilesdialog.cpp" line="175"/>
<source>An error occured when parsing the script: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="181"/>
<location filename="../gui/renamefilesdialog.cpp" line="183"/>
<source>The script is empty.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="233"/>
<location filename="../gui/renamefilesdialog.cpp" line="235"/>
<source>Generation of preview has been aborted prematurely.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="247"/>
<location filename="../gui/renamefilesdialog.cpp" line="249"/>
<source>Changins applied.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="251"/>
<location filename="../gui/renamefilesdialog.cpp" line="253"/>
<source>Applying has been aborted prematurely.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="319"/>
<location filename="../gui/renamefilesdialog.cpp" line="321"/>
<source>Unable to open script file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="325"/>
<location filename="../gui/renamefilesdialog.cpp" line="327"/>
<source>Select script</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="346"/>
<location filename="../gui/renamefilesdialog.cpp" line="348"/>
<source>Clipboard contains no text.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="359"/>
<location filename="../gui/renamefilesdialog.cpp" line="361"/>
<source>Expand all</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="360"/>
<location filename="../gui/renamefilesdialog.cpp" line="362"/>
<source>Collapse all</source>
<translation type="unfinished"></translation>
</message>
@ -2672,17 +2672,17 @@ Error in line %1: %3</source>
<translation></translation>
</message>
<message>
<location filename="../gui/settingsdialog.cpp" line="598"/>
<location filename="../gui/settingsdialog.cpp" line="616"/>
<source>Tag processing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/settingsdialog.cpp" line="606"/>
<location filename="../gui/settingsdialog.cpp" line="624"/>
<source>Editor</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/settingsdialog.cpp" line="614"/>
<location filename="../gui/settingsdialog.cpp" line="632"/>
<source>File browser</source>
<translation type="unfinished"></translation>
</message>
@ -2774,7 +2774,7 @@ the file reverting all unsaved changings.</source>
</message>
<message>
<location filename="../gui/tageditorwidget.ui" line="226"/>
<location filename="../gui/tageditorwidget.cpp" line="1193"/>
<location filename="../gui/tageditorwidget.cpp" line="1195"/>
<source>Abort</source>
<translation type="unfinished"></translation>
</message>
@ -2926,22 +2926,22 @@ the file reverting all unsaved changings.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="880"/>
<location filename="../gui/tageditorwidget.cpp" line="881"/>
<source>File could be parsed correctly.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="884"/>
<location filename="../gui/tageditorwidget.cpp" line="885"/>
<source>File couldn&apos;t be parsed correctly.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="889"/>
<location filename="../gui/tageditorwidget.cpp" line="890"/>
<source>There are critical parsing notifications.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="893"/>
<location filename="../gui/tageditorwidget.cpp" line="894"/>
<source>There are warnings.</source>
<translation type="unfinished"></translation>
</message>
@ -2951,67 +2951,67 @@ the file reverting all unsaved changings.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="900"/>
<location filename="../gui/tageditorwidget.cpp" line="901"/>
<source>File format is not supported (an ID3 tag can be added anyways).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="915"/>
<location filename="../gui/tageditorwidget.cpp" line="916"/>
<source>The file %1 has been opened.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="966"/>
<location filename="../gui/tageditorwidget.cpp" line="967"/>
<source>Unable to apply the entered tags to the file because the current process hasn&apos;t finished yet.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="954"/>
<location filename="../gui/tageditorwidget.cpp" line="955"/>
<source>Saving tags ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="960"/>
<location filename="../gui/tageditorwidget.cpp" line="961"/>
<source>No file has been opened.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1027"/>
<location filename="../gui/tageditorwidget.cpp" line="1028"/>
<source>Unable to delete all tags from the file because the current process hasn&apos;t been finished yet.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="986"/>
<location filename="../gui/tageditorwidget.cpp" line="987"/>
<source>Do you really want to delete all tags from the file?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="992"/>
<location filename="../gui/tageditorwidget.cpp" line="993"/>
<source>don&apos;t show this message again</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1015"/>
<location filename="../gui/tageditorwidget.cpp" line="1016"/>
<source>Deleting all tags ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1019"/>
<location filename="../gui/tageditorwidget.cpp" line="1020"/>
<source>The selected file stores no tag (at least no supported), so there is nothing to delete.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1023"/>
<location filename="../gui/tageditorwidget.cpp" line="1024"/>
<source>No file has been opened, so no tags can be deleted.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1098"/>
<location filename="../gui/tageditorwidget.cpp" line="1100"/>
<source>Unable to start saving process because there an other process hasn&apos;t finished yet.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1071"/>
<location filename="../gui/tageditorwidget.cpp" line="1073"/>
<source>Cancelling ...</source>
<translation type="unfinished"></translation>
</message>
@ -3036,17 +3036,17 @@ the file reverting all unsaved changings.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="897"/>
<location filename="../gui/tageditorwidget.cpp" line="898"/>
<source>No write access; the file has been opened in read-only mode.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="903"/>
<location filename="../gui/tageditorwidget.cpp" line="904"/>
<source>The file is composed of multiple segments. Dealing with such files has not been tested yet and might be broken.</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location filename="../gui/tageditorwidget.cpp" line="1139"/>
<location filename="../gui/tageditorwidget.cpp" line="1141"/>
<source>The tags have been saved, but there is/are %1 warning(s) </source>
<translation type="unfinished">
<numerusform></numerusform>
@ -3054,7 +3054,7 @@ the file reverting all unsaved changings.</source>
</translation>
</message>
<message numerus="yes">
<location filename="../gui/tageditorwidget.cpp" line="1140"/>
<location filename="../gui/tageditorwidget.cpp" line="1142"/>
<source>and %1 error(s).</source>
<translation type="unfinished">
<numerusform></numerusform>
@ -3062,7 +3062,7 @@ the file reverting all unsaved changings.</source>
</translation>
</message>
<message numerus="yes">
<location filename="../gui/tageditorwidget.cpp" line="1142"/>
<location filename="../gui/tageditorwidget.cpp" line="1144"/>
<source>The tags have been saved, but there is/are %1 warning(s).</source>
<translation type="unfinished">
<numerusform></numerusform>
@ -3070,72 +3070,72 @@ the file reverting all unsaved changings.</source>
</translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1147"/>
<location filename="../gui/tageditorwidget.cpp" line="1149"/>
<source>The tags have been saved.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1167"/>
<location filename="../gui/tageditorwidget.cpp" line="1169"/>
<source>The tags couldn&apos;t be saved. See the info box for detail.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1168"/>
<location filename="../gui/tageditorwidget.cpp" line="1170"/>
<source>The tags couldn&apos;t be saved because an IO error occured.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1189"/>
<location filename="../gui/tageditorwidget.cpp" line="1191"/>
<source>Automatic tag management</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1190"/>
<location filename="../gui/tageditorwidget.cpp" line="1192"/>
<source>The container format of the selected file is not supported. The file can be treated as MP3 file (an ID3 tag according to the settings will be created). This might break the file. Do you want to continue?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1192"/>
<location filename="../gui/tageditorwidget.cpp" line="1194"/>
<source>Treat file as MP3 file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1204"/>
<location filename="../gui/tageditorwidget.cpp" line="1206"/>
<source>The currently opened file changed on the disk.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1298"/>
<location filename="../gui/tageditorwidget.cpp" line="1302"/>
<source>A tag (with the selected target) already exists.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1301"/>
<location filename="../gui/tageditorwidget.cpp" line="1305"/>
<source>The tag can not be created.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1361"/>
<location filename="../gui/tageditorwidget.cpp" line="1365"/>
<source>Unable to remove the tag because the current process hasn&apos;t been finished yet.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1319"/>
<location filename="../gui/tageditorwidget.cpp" line="1323"/>
<source>Unable to remove the tag because no file is opened.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1394"/>
<location filename="../gui/tageditorwidget.cpp" line="1398"/>
<source>Unable to change the target because the current process hasn&apos;t been finished yet.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1377"/>
<location filename="../gui/tageditorwidget.cpp" line="1381"/>
<source>Unable to change the target because no file is opened.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1390"/>
<location filename="../gui/tageditorwidget.cpp" line="1394"/>
<source>Can not change the target of the selected tag because the tag does not support targets.</source>
<translation type="unfinished"></translation>
</message>
@ -4134,7 +4134,7 @@ the file reverting all unsaved changings.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tagfieldedit.cpp" line="996"/>
<location filename="../gui/tagfieldedit.cpp" line="997"/>
<source>restore to value from %1 (%2)</source>
<translation type="unfinished"></translation>
</message>

View File

@ -648,52 +648,52 @@
<context>
<name>QtGui::DbQueryWidget</name>
<message>
<location filename="../gui/dbquerywidget.cpp" line="50"/>
<location filename="../gui/dbquerywidget.cpp" line="54"/>
<source>Search hasn&apos;t been started</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="68"/>
<location filename="../gui/dbquerywidget.cpp" line="72"/>
<source>Insert present data</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="72"/>
<location filename="../gui/dbquerywidget.cpp" line="76"/>
<source>Clear search criteria</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="137"/>
<location filename="../gui/dbquerywidget.cpp" line="141"/>
<source>Insufficient search criteria supplied - at least title, album or artist must be specified</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="147"/>
<location filename="../gui/dbquerywidget.cpp" line="151"/>
<source>Retrieving meta data from MusicBrainz ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="161"/>
<location filename="../gui/dbquerywidget.cpp" line="165"/>
<source>Insufficient search criteria supplied - artist is mandatory</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="171"/>
<location filename="../gui/dbquerywidget.cpp" line="175"/>
<source>Retrieving meta data from LyricsWikia ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="194"/>
<location filename="../gui/dbquerywidget.cpp" line="198"/>
<source>Aborted</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="206"/>
<location filename="../gui/dbquerywidget.cpp" line="210"/>
<source>No results available</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location filename="../gui/dbquerywidget.cpp" line="208"/>
<location filename="../gui/dbquerywidget.cpp" line="212"/>
<source>%1 result(s) available</source>
<translation type="unfinished">
<numerusform>%1 result available</numerusform>
@ -701,117 +701,117 @@
</translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="273"/>
<location filename="../gui/dbquerywidget.cpp" line="356"/>
<source>Retrieving cover art to be applied ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="294"/>
<location filename="../gui/dbquerywidget.cpp" line="377"/>
<source>Retrieving lyrics to be applied ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="334"/>
<location filename="../gui/dbquerywidget.cpp" line="414"/>
<source>Use selected row</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="337"/>
<location filename="../gui/dbquerywidget.cpp" line="417"/>
<source>Show cover</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="338"/>
<location filename="../gui/dbquerywidget.cpp" line="418"/>
<source>Show lyrics</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="367"/>
<location filename="../gui/dbquerywidget.cpp" line="447"/>
<source>Retrieving cover art ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="398"/>
<location filename="../gui/dbquerywidget.cpp" line="478"/>
<source>Retrieving lyrics ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="411"/>
<location filename="../gui/dbquerywidget.cpp" line="491"/>
<source>Cover - %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.cpp" line="436"/>
<location filename="../gui/dbquerywidget.cpp" line="516"/>
<source>Lyrics - %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="14"/>
<location filename="../gui/dbquerywidget.ui" line="6"/>
<source>MusicBrainz/LyricsWikia search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="59"/>
<location filename="../gui/dbquerywidget.ui" line="51"/>
<source>Search &amp;criteria</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="83"/>
<location filename="../gui/dbquerywidget.ui" line="75"/>
<source>Song</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="101"/>
<location filename="../gui/dbquerywidget.ui" line="108"/>
<location filename="../gui/dbquerywidget.ui" line="124"/>
<location filename="../gui/dbquerywidget.ui" line="138"/>
<location filename="../gui/dbquerywidget.ui" line="93"/>
<location filename="../gui/dbquerywidget.ui" line="100"/>
<location filename="../gui/dbquerywidget.ui" line="116"/>
<location filename="../gui/dbquerywidget.ui" line="130"/>
<source>?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="117"/>
<location filename="../gui/dbquerywidget.ui" line="109"/>
<source>Album</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="131"/>
<location filename="../gui/dbquerywidget.ui" line="123"/>
<source>Artist</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="175"/>
<location filename="../gui/dbquerywidget.ui" line="167"/>
<source>Fields to be used</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="221"/>
<source>override existing values</source>
<location filename="../gui/dbquerywidget.ui" line="213"/>
<source>Override existing values</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="279"/>
<location filename="../gui/dbquerywidget.ui" line="271"/>
<source>Abort</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="292"/>
<location filename="../gui/dbquerywidget.ui" line="284"/>
<source>Search
MusicBrainz</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="310"/>
<location filename="../gui/dbquerywidget.ui" line="302"/>
<source>Search
LyricWikia</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="331"/>
<location filename="../gui/dbquerywidget.ui" line="323"/>
<source>Inserts the selected result into the current tag (doesn&apos;t save anything)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/dbquerywidget.ui" line="334"/>
<location filename="../gui/dbquerywidget.ui" line="326"/>
<source>Use selected
row</source>
<translation type="unfinished"></translation>
@ -996,7 +996,7 @@ Remarks
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/settingsdialog.cpp" line="150"/>
<location filename="../gui/settingsdialog.cpp" line="154"/>
<source>To avoid unnecessary copying this directory should be on the same partition as the files you want to edit.</source>
<translation type="unfinished"></translation>
</message>
@ -1593,12 +1593,12 @@ another position would prevent rewriting the entire file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/settingsdialog.cpp" line="512"/>
<location filename="../gui/settingsdialog.cpp" line="529"/>
<source>Minimum padding must be less or equal than maximum padding.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/settingsdialog.cpp" line="577"/>
<location filename="../gui/settingsdialog.cpp" line="595"/>
<source>These options might be ignored if not supported by either the format or the implementation.</source>
<translation type="unfinished"></translation>
</message>
@ -1759,32 +1759,32 @@ another position would prevent rewriting the entire file</source>
<context>
<name>QtGui::LyricsWikiaResultsModel</name>
<message>
<location filename="../dbquery/lyricswikia.cpp" line="37"/>
<location filename="../dbquery/lyricswikia.cpp" line="43"/>
<source>Unable to fetch lyrics: Artist or title is unknown.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../dbquery/lyricswikia.cpp" line="151"/>
<location filename="../dbquery/lyricswikia.cpp" line="157"/>
<source>Internal error: context for song details reply invalid</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../dbquery/lyricswikia.cpp" line="191"/>
<location filename="../dbquery/lyricswikia.cpp" line="197"/>
<source>Unable to parse song details: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../dbquery/lyricswikia.cpp" line="200"/>
<location filename="../dbquery/lyricswikia.cpp" line="206"/>
<source>Song details requested for %1/%2 do not contain URL for Wiki page</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../dbquery/lyricswikia.cpp" line="228"/>
<location filename="../dbquery/lyricswikia.cpp" line="234"/>
<source>Internal error: context for LyricsWikia page reply invalid</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../dbquery/lyricswikia.cpp" line="238"/>
<location filename="../dbquery/lyricswikia.cpp" line="244"/>
<source>Song details requested for %1/%2 do not contain lyrics</source>
<translation type="unfinished"></translation>
</message>
@ -1978,7 +1978,7 @@ another position would prevent rewriting the entire file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="199"/>
<location filename="../gui/mainwindow.cpp" line="200"/>
<source>Lock layout</source>
<translation type="unfinished"></translation>
</message>
@ -1988,63 +1988,63 @@ another position would prevent rewriting the entire file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="194"/>
<location filename="../gui/mainwindow.cpp" line="195"/>
<source>Unlock layout</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="332"/>
<location filename="../gui/mainwindow.cpp" line="334"/>
<source>No file opened.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="353"/>
<location filename="../gui/mainwindow.cpp" line="355"/>
<source>A tag editing utility supporting ID3, MP4 (iTunes style), Vorbis and Matroska tags.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="470"/>
<location filename="../gui/mainwindow.cpp" line="472"/>
<source>Unable to show the next file because it can&apos;t be found anymore.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="480"/>
<location filename="../gui/mainwindow.cpp" line="482"/>
<source>Open file - </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="491"/>
<location filename="../gui/mainwindow.cpp" line="493"/>
<source>Save changes as - </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="513"/>
<location filename="../gui/mainwindow.cpp" line="515"/>
<source>Save file information - </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="522"/>
<location filename="../gui/mainwindow.cpp" line="524"/>
<source>Unable to write to file.
%1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="525"/>
<location filename="../gui/mainwindow.cpp" line="527"/>
<source>Unable to open file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="529"/>
<location filename="../gui/mainwindow.cpp" line="531"/>
<source>No file information available.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="532"/>
<location filename="../gui/mainwindow.cpp" line="534"/>
<source>No file is opened.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/mainwindow.cpp" line="535"/>
<location filename="../gui/mainwindow.cpp" line="537"/>
<source>Unable to save file information because the current process hasn&apos;t been finished yet.</source>
<translation type="unfinished"></translation>
</message>
@ -2145,7 +2145,7 @@ another position would prevent rewriting the entire file</source>
</message>
<message>
<location filename="../gui/picturepreviewselection.ui" line="150"/>
<location filename="../gui/picturepreviewselection.cpp" line="592"/>
<location filename="../gui/picturepreviewselection.cpp" line="593"/>
<source>Add</source>
<translation type="unfinished"></translation>
</message>
@ -2338,7 +2338,7 @@ another position would prevent rewriting the entire file</source>
</message>
<message>
<location filename="../gui/picturepreviewselection.cpp" line="402"/>
<location filename="../gui/picturepreviewselection.cpp" line="600"/>
<location filename="../gui/picturepreviewselection.cpp" line="601"/>
<source>The attached image can&apos;t be found.</source>
<translation type="unfinished"></translation>
</message>
@ -2358,22 +2358,22 @@ another position would prevent rewriting the entire file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/picturepreviewselection.cpp" line="590"/>
<location filename="../gui/picturepreviewselection.cpp" line="591"/>
<source>No image (of the selected type) attached.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/picturepreviewselection.cpp" line="610"/>
<location filename="../gui/picturepreviewselection.cpp" line="611"/>
<source>Unable to display attached image.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/picturepreviewselection.cpp" line="619"/>
<location filename="../gui/picturepreviewselection.cpp" line="620"/>
<source>Change</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/picturepreviewselection.cpp" line="631"/>
<location filename="../gui/picturepreviewselection.cpp" line="632"/>
<source>Change MIME-type</source>
<translation type="unfinished"></translation>
</message>
@ -2435,7 +2435,7 @@ another position would prevent rewriting the entire file</source>
<translation></translation>
</message>
<message numerus="yes">
<location filename="../gui/renamefilesdialog.cpp" line="209"/>
<location filename="../gui/renamefilesdialog.cpp" line="211"/>
<source>%1 files/directories processed</source>
<translation>
<numerusform>%1 file/directory processed</numerusform>
@ -2443,23 +2443,23 @@ another position would prevent rewriting the entire file</source>
</translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="223"/>
<location filename="../gui/renamefilesdialog.cpp" line="225"/>
<source>Preview has been generated.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="228"/>
<location filename="../gui/renamefilesdialog.cpp" line="230"/>
<source>No files and directories have been found.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="233"/>
<location filename="../gui/renamefilesdialog.cpp" line="235"/>
<source>Generation of preview has been aborted prematurely.</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location filename="../gui/renamefilesdialog.cpp" line="237"/>
<location filename="../gui/renamefilesdialog.cpp" line="255"/>
<location filename="../gui/renamefilesdialog.cpp" line="239"/>
<location filename="../gui/renamefilesdialog.cpp" line="257"/>
<source>%1 error(s) occured.</source>
<translation>
<numerusform>%1 error occured.</numerusform>
@ -2467,8 +2467,8 @@ another position would prevent rewriting the entire file</source>
</translation>
</message>
<message numerus="yes">
<location filename="../gui/renamefilesdialog.cpp" line="224"/>
<location filename="../gui/renamefilesdialog.cpp" line="248"/>
<location filename="../gui/renamefilesdialog.cpp" line="226"/>
<location filename="../gui/renamefilesdialog.cpp" line="250"/>
<source>%1 files/directories have been processed.</source>
<translation>
<numerusform>%1 file/directory has been processed.</numerusform>
@ -2491,54 +2491,54 @@ another position would prevent rewriting the entire file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="148"/>
<location filename="../gui/renamefilesdialog.cpp" line="150"/>
<source>There is no external script file is selected.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="155"/>
<location filename="../gui/renamefilesdialog.cpp" line="157"/>
<source>Unable to open external script file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="161"/>
<location filename="../gui/renamefilesdialog.cpp" line="163"/>
<source>Generating preview ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="163"/>
<location filename="../gui/renamefilesdialog.cpp" line="198"/>
<location filename="../gui/renamefilesdialog.cpp" line="165"/>
<location filename="../gui/renamefilesdialog.cpp" line="200"/>
<source>Abort</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="170"/>
<location filename="../gui/renamefilesdialog.cpp" line="172"/>
<source>The script is not valid.
Error in line %1: %3</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="173"/>
<location filename="../gui/renamefilesdialog.cpp" line="175"/>
<source>An error occured when parsing the script: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="181"/>
<location filename="../gui/renamefilesdialog.cpp" line="183"/>
<source>The script is empty.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="186"/>
<location filename="../gui/renamefilesdialog.cpp" line="188"/>
<source>The selected directory doesn&apos;t exist.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="196"/>
<location filename="../gui/renamefilesdialog.cpp" line="198"/>
<source>Applying changings ...</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location filename="../gui/renamefilesdialog.cpp" line="212"/>
<location filename="../gui/renamefilesdialog.cpp" line="214"/>
<source>%1 error(s) occured</source>
<translation>
<numerusform>%1 error occured</numerusform>
@ -2546,37 +2546,37 @@ Error in line %1: %3</source>
</translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="247"/>
<location filename="../gui/renamefilesdialog.cpp" line="249"/>
<source>Changins applied.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="251"/>
<location filename="../gui/renamefilesdialog.cpp" line="253"/>
<source>Applying has been aborted prematurely.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="319"/>
<location filename="../gui/renamefilesdialog.cpp" line="321"/>
<source>Unable to open script file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="325"/>
<location filename="../gui/renamefilesdialog.cpp" line="327"/>
<source>Select script</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="346"/>
<location filename="../gui/renamefilesdialog.cpp" line="348"/>
<source>Clipboard contains no text.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="359"/>
<location filename="../gui/renamefilesdialog.cpp" line="361"/>
<source>Expand all</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/renamefilesdialog.cpp" line="360"/>
<location filename="../gui/renamefilesdialog.cpp" line="362"/>
<source>Collapse all</source>
<translation type="unfinished"></translation>
</message>
@ -2637,8 +2637,8 @@ Error in line %1: %3</source>
</message>
<message>
<location filename="../gui/renamefilesdialog.ui" line="697"/>
<location filename="../gui/renamefilesdialog.cpp" line="219"/>
<location filename="../gui/renamefilesdialog.cpp" line="244"/>
<location filename="../gui/renamefilesdialog.cpp" line="221"/>
<location filename="../gui/renamefilesdialog.cpp" line="246"/>
<source>Close</source>
<translation type="unfinished"></translation>
</message>
@ -2672,17 +2672,17 @@ Error in line %1: %3</source>
<translation></translation>
</message>
<message>
<location filename="../gui/settingsdialog.cpp" line="598"/>
<location filename="../gui/settingsdialog.cpp" line="616"/>
<source>Tag processing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/settingsdialog.cpp" line="606"/>
<location filename="../gui/settingsdialog.cpp" line="624"/>
<source>Editor</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/settingsdialog.cpp" line="614"/>
<location filename="../gui/settingsdialog.cpp" line="632"/>
<source>File browser</source>
<translation type="unfinished"></translation>
</message>
@ -2816,37 +2816,37 @@ Error in line %1: %3</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="880"/>
<location filename="../gui/tageditorwidget.cpp" line="881"/>
<source>File could be parsed correctly.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="884"/>
<location filename="../gui/tageditorwidget.cpp" line="885"/>
<source>File couldn&apos;t be parsed correctly.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="889"/>
<location filename="../gui/tageditorwidget.cpp" line="890"/>
<source>There are critical parsing notifications.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="893"/>
<location filename="../gui/tageditorwidget.cpp" line="894"/>
<source>There are warnings.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="897"/>
<location filename="../gui/tageditorwidget.cpp" line="898"/>
<source>No write access; the file has been opened in read-only mode.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="900"/>
<location filename="../gui/tageditorwidget.cpp" line="901"/>
<source>File format is not supported (an ID3 tag can be added anyways).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="903"/>
<location filename="../gui/tageditorwidget.cpp" line="904"/>
<source>The file is composed of multiple segments. Dealing with such files has not been tested yet and might be broken.</source>
<translation type="unfinished"></translation>
</message>
@ -2856,67 +2856,67 @@ Error in line %1: %3</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="915"/>
<location filename="../gui/tageditorwidget.cpp" line="916"/>
<source>The file %1 has been opened.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="954"/>
<location filename="../gui/tageditorwidget.cpp" line="955"/>
<source>Saving tags ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="960"/>
<location filename="../gui/tageditorwidget.cpp" line="961"/>
<source>No file has been opened.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="966"/>
<location filename="../gui/tageditorwidget.cpp" line="967"/>
<source>Unable to apply the entered tags to the file because the current process hasn&apos;t finished yet.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="986"/>
<location filename="../gui/tageditorwidget.cpp" line="987"/>
<source>Do you really want to delete all tags from the file?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="992"/>
<location filename="../gui/tageditorwidget.cpp" line="993"/>
<source>don&apos;t show this message again</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1015"/>
<location filename="../gui/tageditorwidget.cpp" line="1016"/>
<source>Deleting all tags ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1019"/>
<location filename="../gui/tageditorwidget.cpp" line="1020"/>
<source>The selected file stores no tag (at least no supported), so there is nothing to delete.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1023"/>
<location filename="../gui/tageditorwidget.cpp" line="1024"/>
<source>No file has been opened, so no tags can be deleted.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1027"/>
<location filename="../gui/tageditorwidget.cpp" line="1028"/>
<source>Unable to delete all tags from the file because the current process hasn&apos;t been finished yet.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1071"/>
<location filename="../gui/tageditorwidget.cpp" line="1073"/>
<source>Cancelling ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1098"/>
<location filename="../gui/tageditorwidget.cpp" line="1100"/>
<source>Unable to start saving process because there an other process hasn&apos;t finished yet.</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location filename="../gui/tageditorwidget.cpp" line="1139"/>
<location filename="../gui/tageditorwidget.cpp" line="1141"/>
<source>The tags have been saved, but there is/are %1 warning(s) </source>
<translation>
<numerusform>The tags have been saved, but there is %1 warning</numerusform>
@ -2924,7 +2924,7 @@ Error in line %1: %3</source>
</translation>
</message>
<message numerus="yes">
<location filename="../gui/tageditorwidget.cpp" line="1140"/>
<location filename="../gui/tageditorwidget.cpp" line="1142"/>
<source>and %1 error(s).</source>
<translation>
<numerusform>and %1 error.</numerusform>
@ -2932,7 +2932,7 @@ Error in line %1: %3</source>
</translation>
</message>
<message numerus="yes">
<location filename="../gui/tageditorwidget.cpp" line="1142"/>
<location filename="../gui/tageditorwidget.cpp" line="1144"/>
<source>The tags have been saved, but there is/are %1 warning(s).</source>
<translation>
<numerusform>The tags have been saved, but there is %1 warning.</numerusform>
@ -2940,72 +2940,72 @@ Error in line %1: %3</source>
</translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1147"/>
<location filename="../gui/tageditorwidget.cpp" line="1149"/>
<source>The tags have been saved.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1167"/>
<location filename="../gui/tageditorwidget.cpp" line="1169"/>
<source>The tags couldn&apos;t be saved. See the info box for detail.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1168"/>
<location filename="../gui/tageditorwidget.cpp" line="1170"/>
<source>The tags couldn&apos;t be saved because an IO error occured.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1189"/>
<location filename="../gui/tageditorwidget.cpp" line="1191"/>
<source>Automatic tag management</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1190"/>
<location filename="../gui/tageditorwidget.cpp" line="1192"/>
<source>The container format of the selected file is not supported. The file can be treated as MP3 file (an ID3 tag according to the settings will be created). This might break the file. Do you want to continue?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1192"/>
<location filename="../gui/tageditorwidget.cpp" line="1194"/>
<source>Treat file as MP3 file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1204"/>
<location filename="../gui/tageditorwidget.cpp" line="1206"/>
<source>The currently opened file changed on the disk.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1298"/>
<location filename="../gui/tageditorwidget.cpp" line="1302"/>
<source>A tag (with the selected target) already exists.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1301"/>
<location filename="../gui/tageditorwidget.cpp" line="1305"/>
<source>The tag can not be created.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1319"/>
<location filename="../gui/tageditorwidget.cpp" line="1323"/>
<source>Unable to remove the tag because no file is opened.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1361"/>
<location filename="../gui/tageditorwidget.cpp" line="1365"/>
<source>Unable to remove the tag because the current process hasn&apos;t been finished yet.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1377"/>
<location filename="../gui/tageditorwidget.cpp" line="1381"/>
<source>Unable to change the target because no file is opened.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1390"/>
<location filename="../gui/tageditorwidget.cpp" line="1394"/>
<source>Can not change the target of the selected tag because the tag does not support targets.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tageditorwidget.cpp" line="1394"/>
<location filename="../gui/tageditorwidget.cpp" line="1398"/>
<source>Unable to change the target because the current process hasn&apos;t been finished yet.</source>
<translation type="unfinished"></translation>
</message>
@ -3075,7 +3075,7 @@ the file reverting all unsaved changings.</source>
</message>
<message>
<location filename="../gui/tageditorwidget.ui" line="226"/>
<location filename="../gui/tageditorwidget.cpp" line="1193"/>
<location filename="../gui/tageditorwidget.cpp" line="1195"/>
<source>Abort</source>
<translation type="unfinished"></translation>
</message>
@ -4134,7 +4134,7 @@ the file reverting all unsaved changings.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../gui/tagfieldedit.cpp" line="996"/>
<location filename="../gui/tagfieldedit.cpp" line="997"/>
<source>restore to value from %1 (%2)</source>
<translation type="unfinished"></translation>
</message>