Commit 79c215fa authored by David Faure's avatar David Faure
Browse files

Statusbar progress widget: show button immediately

Summary:
This fixes the bug where the progress dialog shows up, and the user has
no button to close it down.

This happened because for very quick jobs, by the time the delay timer kicked in,
the list of progress items is actually empty already. But the progress
dialog stays up a bit longer...

Test Plan: Sync, abort, delete one mail in kmail

Reviewers: mlaurent, dvratil

Reviewed By: dvratil

Subscribers: kde-pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D21065
parent e1b93e7a
......@@ -272,7 +272,6 @@ void StatusbarProgressWidget::slotClean()
// check if a new item showed up since we started the timer. If not, clear
if (ProgressManager::instance()->isEmpty()) {
mProgressBar->setValue(0);
//m_pLabel->clear();
mMode = Clean;
setMode();
}
......@@ -314,8 +313,10 @@ void StatusbarProgressWidget::slotProgressButtonClicked()
void StatusbarProgressWidget::slotProgressDialogVisible(bool b)
{
// Update the hide/show button when the detailed one is shown/hidden
if (b) {
// Show the hide/show button (mButton) as soon as the progress dialog is shown
// (StatusbarProgressWidget::slotShowItemDelayed happens later)
if (b && mMode != Progress) {
mMode = Progress;
setMode();
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment