]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/statusbarmessagelabel.cpp
Further cleanup to prepare the move.
[dolphin.git] / src / statusbarmessagelabel.cpp
index 11bbea36db113633b78a4bf6312f6f85358b931e..c870406d3419258b66f90a51a27f9aba6c8c83cb 100644 (file)
@@ -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;