diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2013-11-21 01:34:25 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-11-21 01:34:25 +0100 |
commit | 1c618af70de66f304481efe05b8ebcc0d5d8d4f6 (patch) | |
tree | 40b749d4e687065f2b32cfecbfe92a66b303366e /ksmserver/shutdown.cpp | |
parent | c4083c1d476f6dfd575599ffce4434e534251fd2 (diff) | |
download | tdebase-1c618af70de66f304481efe05b8ebcc0d5d8d4f6.tar.gz tdebase-1c618af70de66f304481efe05b8ebcc0d5d8d4f6.zip |
Add progress bar to logout status dialog
This resolves Bug 1667
Diffstat (limited to 'ksmserver/shutdown.cpp')
-rw-r--r-- | ksmserver/shutdown.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/ksmserver/shutdown.cpp b/ksmserver/shutdown.cpp index 12743e892..a463c37d2 100644 --- a/ksmserver/shutdown.cpp +++ b/ksmserver/shutdown.cpp @@ -817,11 +817,14 @@ void KSMServer::completeShutdownOrCheckpoint() } } } + KSMShutdownIPDlg *shutdownNotifierDlg=static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg); + shutdownNotifierDlg->setProgressBarTotalSteps(initialClientCount); + shutdownNotifierDlg->setProgressBarProgress(initialClientCount-clients.count()); if (nextClientToKill == "") { - static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->setStatusMessage(i18n("Closing applications (%1/%2)...").arg(initialClientCount-clients.count()).arg(initialClientCount)); + shutdownNotifierDlg->setStatusMessage(i18n("Closing applications (%1/%2)...").arg(initialClientCount-clients.count()).arg(initialClientCount)); } else { - static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->setStatusMessage(i18n("Closing applications (%1/%2, %3)...").arg(initialClientCount-clients.count()).arg(initialClientCount).arg(nextClientToKill)); + shutdownNotifierDlg->setStatusMessage(i18n("Closing applications (%1/%2, %3)...").arg(initialClientCount-clients.count()).arg(initialClientCount).arg(nextClientToKill)); } } if( waitForKNotify ) { @@ -886,12 +889,15 @@ void KSMServer::completeKilling() } if( wait ) { if (shutdownNotifierIPDlg) { - static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->show(); + KSMShutdownIPDlg *shutdownNotifierDlg=static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg); + shutdownNotifierDlg->setProgressBarTotalSteps(initialClientCount); + shutdownNotifierDlg->setProgressBarProgress(initialClientCount-clients.count()); + shutdownNotifierDlg->show(); if (nextClientToKill == "") { - static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->setStatusMessage(i18n("Closing applications (%1/%2)...").arg(initialClientCount-clients.count()).arg(initialClientCount)); + shutdownNotifierDlg->setStatusMessage(i18n("Closing applications (%1/%2)...").arg(initialClientCount-clients.count()).arg(initialClientCount)); } else { - static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->setStatusMessage(i18n("Closing applications (%1/%2, %3)...").arg(initialClientCount-clients.count()).arg(initialClientCount).arg(nextClientToKill)); + shutdownNotifierDlg->setStatusMessage(i18n("Closing applications (%1/%2, %3)...").arg(initialClientCount-clients.count()).arg(initialClientCount).arg(nextClientToKill)); } } return; |