diff --git a/src/lay/LogViewerDialog.ui b/src/lay/LogViewerDialog.ui
index 41834aa0c..889342ade 100644
--- a/src/lay/LogViewerDialog.ui
+++ b/src/lay/LogViewerDialog.ui
@@ -88,12 +88,24 @@
-
+
+
+ 16
+ 16
+
+
+
+ false
+
QListView::Adjust
true
+
+ false
+
-
@@ -157,7 +169,7 @@
- :/warn.png
+ :/warn_16.png
diff --git a/src/lay/images/empty_16.png b/src/lay/images/empty_16.png
new file mode 100644
index 000000000..10b1f1be6
Binary files /dev/null and b/src/lay/images/empty_16.png differ
diff --git a/src/lay/images/error_16.png b/src/lay/images/error_16.png
new file mode 100644
index 000000000..c9dad1310
Binary files /dev/null and b/src/lay/images/error_16.png differ
diff --git a/src/lay/images/info_16.png b/src/lay/images/info_16.png
new file mode 100644
index 000000000..d1fa36644
Binary files /dev/null and b/src/lay/images/info_16.png differ
diff --git a/src/lay/images/warn_16.png b/src/lay/images/warn_16.png
new file mode 100644
index 000000000..357216719
Binary files /dev/null and b/src/lay/images/warn_16.png differ
diff --git a/src/lay/layLogViewerDialog.cc b/src/lay/layLogViewerDialog.cc
index 0ccec52ca..b1a5a8172 100644
--- a/src/lay/layLogViewerDialog.cc
+++ b/src/lay/layLogViewerDialog.cc
@@ -233,18 +233,25 @@ LogFile::data(const QModelIndex &index, int role) const
{
QMutexLocker locker (&m_lock);
- if (role == Qt::DisplayRole) {
+ if (role == Qt::DecorationRole) {
if (index.row () < int (m_messages.size ()) && index.row () >= 0) {
LogFileEntry::mode_type mode = m_messages [index.row ()].mode ();
- std::string message = m_messages [index.row ()].text ();
if (mode == LogFileEntry::Error) {
- return QVariant (tl::to_qstring (tl::to_string (QObject::tr ("ERROR: ")) + message));
+ return QIcon (QString::fromUtf8 (":/error_16.png"));
} else if (mode == LogFileEntry::Warning) {
- return QVariant (tl::to_qstring (tl::to_string (QObject::tr ("Warning: ")) + message));
+ return QIcon (QString::fromUtf8 (":/warn_16.png"));
+ } else if (mode == LogFileEntry::Info) {
+ return QIcon (QString::fromUtf8 (":/info_16.png"));
} else {
- return QVariant (tl::to_qstring (message));
+ return QIcon (QString::fromUtf8 (":/empty_16.png"));
}
+ }
+
+ } else if (role == Qt::DisplayRole) {
+
+ if (index.row () < int (m_messages.size ()) && index.row () >= 0) {
+ return QVariant (tl::to_qstring (m_messages [index.row ()].text ()));
}
} else if (role == Qt::FontRole) {
diff --git a/src/lay/layResources.qrc b/src/lay/layResources.qrc
index ef87d4e5f..3ffd9e81e 100644
--- a/src/lay/layResources.qrc
+++ b/src/lay/layResources.qrc
@@ -116,6 +116,10 @@
images/salt.png
images/salt_icon.png
images/warn.png
+ images/warn_16.png
+ images/empty_16.png
+ images/error_16.png
+ images/info_16.png
syntax/ruby.xml
diff --git a/src/lay/laySaltGrainPropertiesDialog.cc b/src/lay/laySaltGrainPropertiesDialog.cc
index a3042783e..88fd3d652 100644
--- a/src/lay/laySaltGrainPropertiesDialog.cc
+++ b/src/lay/laySaltGrainPropertiesDialog.cc
@@ -519,8 +519,8 @@ SaltGrainPropertiesDialog::accept ()
if (! SaltGrain::valid_name (d->name)) {
dependencies_alert->error () << tr ("'%1' is not a valid package name").arg (tl::to_qstring (d->name)) << tl::endl
- << tr ("Valid package names are words (letters, digits, underscores)") << tl::endl
- << tr ("Package groups can be specified in the form 'group/package'");
+ << tr ("Valid package names are words (letters, digits, underscores).") << tl::endl
+ << tr ("Package groups can be specified in the form 'group/package'.");
continue;
}
@@ -539,20 +539,20 @@ SaltGrainPropertiesDialog::accept ()
dep.check_circular (dep.grain_for_name (m_grain.name ()), dep.grain_for_name (d->name));
} catch (tl::Exception &ex) {
dependencies_alert->error () << ex.msg () << tl::endl
- << tr ("Circular dependency means a package is eventually depending on itself.");
+ << tr ("Circular dependency means, a package is eventually depending on itself.");
}
}
if (d->version.empty ()) {
dependencies_alert->warn () << tr ("No version specified for dependency '%1'").arg (tl::to_qstring (d->name)) << tl::endl
- << tr ("Versions help checking dependencies.") << tl::endl
- << tr ("If the dependency package has a version itself, the version is automatically set to it's current version");
+ << tr ("Please consider giving a version here. Versions help deciding whether a package needs to be updated.") << tl::endl
+ << tr ("If the dependency package has a version itself, the version is automatically set to it's current version.");
}
if (d->url.empty ()) {
dependencies_alert->warn () << tr ("No download URL specified for dependency '%1'").arg (tl::to_qstring (d->name)) << tl::endl
<< tr ("A download URL should be specified to ensure the package dependencies can be resolved.") << tl::endl
- << tr ("If the dependency package was downloaded itself, the URL is automatically set to the download source");
+ << tr ("If the dependency package was downloaded itself, the URL is automatically set to the download source.");
} else {
std::string spec_url = SaltGrain::spec_url (d->url);
tl::InputHttpStream stream (spec_url);