m_zoomSlider(0),
m_zoomIn(0),
m_progressBar(0),
- m_progress(100)
+ m_progress(100),
+ m_messageTimeStamp()
{
setMargin(0);
setSpacing(4);
return;
}
+ const QTime currentTime = QTime::currentTime();
+ const bool skipMessage = (type == Default) &&
+ m_messageTimeStamp.isValid() &&
+ (m_messageTimeStamp.msecsTo(currentTime) < 1000);
+ if (skipMessage) {
+ // A non-default message is shown just for a very short time. Don't hide
+ // the message by a default message, so that the user gets the chance to
+ // read the information.
+ return;
+ }
+
m_messageLabel->setMessage(msg, type);
+ if (type != Default) {
+ m_messageTimeStamp = currentTime;
+ }
const int widthGap = m_messageLabel->widthGap();
if (widthGap > 0) {
#define DOLPHINSTATUSBAR_H
#include <khbox.h>
+#include <QTime>
class DolphinView;
class KUrl;
QLabel* m_progressText;
QProgressBar* m_progressBar;
int m_progress;
+
+ // Timestamp when the last message has been set that has not the type
+ // 'Default'. The timestamp is used to prevent that default messages
+ // hide more important messages after a very short delay.
+ QTime m_messageTimeStamp;
};
#endif