┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinviewcontainer.cpp
diff options
context:
space:
mode:
authorSebastian Dörner <[email protected]>2011-03-24 00:45:14 +0100
committerSebastian Dörner <[email protected]>2011-03-24 22:43:45 +0100
commit4b0dc69070af505e2bc620dd1be8fd3e7dff7718 (patch)
treea893ebaa9eb7f81b87eed4533713a7c2587b78fa /src/dolphinviewcontainer.cpp
parente3063e001a016849276b65527ac56c26d56b5f30 (diff)
Make cursor keys always trigger a statusbar update
When the selection is changed using the cursor keys, the statusbar should be updated. Until now, this didn't actually happen directly after an operation ending in a OperationCompletedMessage, because the OperationCompletedMessage was protected. This patch changes the behaviour to only protect ErrorMessages in the ViewContainer. When an OperationCompletedMessage was issued very recently, it keeps being protected by DolphinStatusbar itself. Statusbar updates in the ViewContainer are only triggered by a) user actions (move keyboard focus, enter something in the filter bar) b) finished filed jobs In case a), the update is desired, also overriding OperationCompletedMessages. In case b), the OperationCompletedMessage issued by the file command is issues so shortly before the call to updateStatusBar, that the DolphinStatusBar skips the message anyway (see DolphinStatusBar::setMessage). BUG: 193847 FIXED-IN: 4.7.0 REVIEW: 100939
Diffstat (limited to 'src/dolphinviewcontainer.cpp')
-rw-r--r--src/dolphinviewcontainer.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp
index 540f38954..6deb7b846 100644
--- a/src/dolphinviewcontainer.cpp
+++ b/src/dolphinviewcontainer.cpp
@@ -288,21 +288,12 @@ void DolphinViewContainer::updateStatusBar()
{
m_statusBarTimestamp.start();
- // As the item count information is less important
- // in comparison with other messages, it should only
- // be shown if:
- // - the status bar is empty or
- // - shows already the item count information or
- // - shows only a not very important information
const QString newMessage = m_view->statusBarText();
- const QString currentMessage = m_statusBar->message();
- const bool updateStatusBarMsg = currentMessage.isEmpty()
- || (currentMessage == m_statusBar->defaultText())
- || (m_statusBar->type() == DolphinStatusBar::Information);
-
m_statusBar->setDefaultText(newMessage);
- if (updateStatusBarMsg) {
+ // We don't want to override errors. Other messages are only protected by
+ // the Statusbar itself depending on timings (see DolphinStatusBar::setMessage).
+ if (m_statusBar->type() != DolphinStatusBar::Error) {
m_statusBar->setMessage(newMessage, DolphinStatusBar::Default);
}
}