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;
break;
case DolphinStatusBar::Information:
- iconName = "info";
+ iconName = "document-properties";
m_closeButton->hide();
break;