In Qt-builds, if we failt to update files (tag editor, replaygain) then show the list of failures in the 'detailed text' section.
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
9. If we loose MPD connection, then show error widget.
|
||||
10. Reset status when connection lost.
|
||||
11. Dont attempt to send commands if not connected.
|
||||
12. In Qt-builds, if we failt to update files (tag editor, replaygain) then
|
||||
show the list of failures in the 'detailed text' section.
|
||||
|
||||
0.8.2
|
||||
-----
|
||||
|
||||
@@ -680,11 +680,12 @@ void TagEditor::applyUpdates()
|
||||
|
||||
if (failed.count()) {
|
||||
#ifdef ENABLE_KDE_SUPPORT
|
||||
KMessageBox::errorList(this, i18n("Failed to update the tags of the following tracks:"), failed);
|
||||
MessageBox::errorList(this, i18n("Failed to update the tags of the following tracks:"), failed);
|
||||
#else
|
||||
QMessageBox::warning(this, tr("Warning"), 1==failed.count()
|
||||
? tr("Failed to update the tags of %1").arg(failed.at(0))
|
||||
: tr("Failed to update the tags of %2 tracks").arg(failed.count()));
|
||||
MessageBox::errorList(this, 1==failed.count()
|
||||
? tr("Failed to update the tags of 1 track")
|
||||
: tr("Failed to update the tags of %2 tracks").arg(failed.count()),
|
||||
failed);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -391,11 +391,12 @@ void RgDialog::saveTags()
|
||||
|
||||
if (failed.count()) {
|
||||
#ifdef ENABLE_KDE_SUPPORT
|
||||
KMessageBox::errorList(this, i18n("Failed to update the tags of the following tracks:"), failed);
|
||||
MessageBox::errorList(this, i18n("Failed to update the tags of the following tracks:"), failed);
|
||||
#else
|
||||
QMessageBox::warning(this, tr("Warning"), 1==failed.count()
|
||||
? tr("Failed to update the tags of %1").arg(failed.at(0))
|
||||
: tr("Failed to update the tags of %2 tracks").arg(failed.count()));
|
||||
MessageBox::errorList(this, 1==failed.count()
|
||||
? tr("Failed to update the tags of 1 track")
|
||||
: tr("Failed to update the tags of %2 tracks").arg(failed.count()),
|
||||
failed);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,3 +67,10 @@ MessageBox::ButtonCode MessageBox::questionYesNoCancel(QWidget *parent, const QS
|
||||
return -1==box.exec() ? Cancel : map(box.standardButton(box.clickedButton()));
|
||||
}
|
||||
}
|
||||
|
||||
void MessageBox::errorList(QWidget *parent, const QString &message, const QStringList &strlist, const QString &title)
|
||||
{
|
||||
QMessageBox box(QMessageBox::Critical, title.isEmpty() ? QObject::tr("Error") : title, message, QMessageBox::Ok, parent);
|
||||
box.setDetailedText(strlist.join("\n"));
|
||||
box.exec();
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace MessageBox {
|
||||
inline void error(QWidget *parent, const QString &message, const QString &title=QString()) {
|
||||
QMessageBox::warning(parent, title.isEmpty() ? QObject::tr("Error") : title, message);
|
||||
}
|
||||
|
||||
void errorList(QWidget *parent, const QString &message, const QStringList &strlist, const QString &title=QString());
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user