X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/9c8e7f4e43d23c6d014ca4ffe2083ad8cc737753..4eec2a77cfa8719f0cf7f6741c8cfa11b23ebf5b:/src/statusbarmessagelabel.cpp diff --git a/src/statusbarmessagelabel.cpp b/src/statusbarmessagelabel.cpp index 11bbea36d..c870406d3 100644 --- a/src/statusbarmessagelabel.cpp +++ b/src/statusbarmessagelabel.cpp @@ -61,22 +61,21 @@ StatusBarMessageLabel::~StatusBarMessageLabel() void StatusBarMessageLabel::setMessage(const QString& text, DolphinStatusBar::Type type) { + if ((text == m_text) && (type == m_type)) { + return; + } + if (m_type == DolphinStatusBar::Error) { - // If an error is shown currently, other error messages get queued. - // Non-error messages are ignored if there are pending error messages. if (type == DolphinStatusBar::Error) { - m_pendingMessages.append(text); - return; + m_pendingMessages.insert(0, m_text); } - if ((m_state != Default) || !m_pendingMessages.isEmpty()) { + else if ((m_state != Default) || !m_pendingMessages.isEmpty()) { + // a non-error message should not be shown, as there + // are other pending error messages in the queue return; } } - if ((text == m_text) && (type == m_type)) { - return; - } - m_text = text; m_type = type; @@ -93,7 +92,7 @@ void StatusBarMessageLabel::setMessage(const QString& text, break; case DolphinStatusBar::Information: - iconName = "info"; + iconName = "document-properties"; m_closeButton->hide(); break;