From 960cc8392da291eaf6c90d2101b721f6c20488f3 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 8 Aug 2013 14:36:50 -0500 Subject: Update tdehw-based media manager for new mount API Allow active VT to be queried from tdm Only display media notification messages on active VT Hide logout action buttons if logout process unstalls --- ksmserver/shutdown.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'ksmserver/shutdown.cpp') diff --git a/ksmserver/shutdown.cpp b/ksmserver/shutdown.cpp index cf849e757..cc6e8ab7c 100644 --- a/ksmserver/shutdown.cpp +++ b/ksmserver/shutdown.cpp @@ -260,6 +260,8 @@ void KSMServer::shutdownInternal( TDEApplication::ShutdownConfirm confirm, if (showLogoutStatusDlg) { shutdownNotifierIPDlg = KSMShutdownIPDlg::showShutdownIP(); if (shutdownNotifierIPDlg) { + connect(shutdownNotifierIPDlg, SIGNAL(abortLogoutClicked()), this, SLOT(cancelShutdown())); + connect(shutdownNotifierIPDlg, SIGNAL(skipNotificationClicked()), this, SLOT(forceSkipSaveYourself())); static_cast(shutdownNotifierIPDlg)->setStatusMessage(i18n("Notifying applications of logout request...")); notificationTimer.start( KSMSERVER_NOTIFICATION_MANUAL_OPTIONS_TIMEOUT, true ); } @@ -440,6 +442,10 @@ void KSMServer::saveYourselfDone( KSMClient* client, bool success ) } notificationTimer.stop(); + if (shutdownNotifierIPDlg) { + static_cast(shutdownNotifierIPDlg)->hideNotificationActionButtons(); + } + updateLogoutStatusDialog(); } @@ -503,8 +509,6 @@ void KSMServer::updateLogoutStatusDialog() static_cast(shutdownNotifierIPDlg)->hide(); notificationTimer.stop(); static_cast(shutdownNotifierIPDlg)->hideNotificationActionButtons(); - disconnect(shutdownNotifierIPDlg, SIGNAL(abortLogoutClicked()), this, SLOT(cancelShutdown())); - disconnect(shutdownNotifierIPDlg, SIGNAL(skipNotificationClicked()), this, SLOT(forceSkipSaveYourself())); #endif if (nextClientToKill == "") { static_cast(shutdownNotifierIPDlg)->setStatusMessage(i18n("An application is requesting attention, logout paused...")); @@ -677,8 +681,6 @@ void KSMServer::handleProtectionTimeout() notificationTimer.stop(); if (shutdownNotifierIPDlg) { static_cast(shutdownNotifierIPDlg)->hideNotificationActionButtons(); - disconnect(shutdownNotifierIPDlg, SIGNAL(abortLogoutClicked()), this, SLOT(cancelShutdown())); - disconnect(shutdownNotifierIPDlg, SIGNAL(skipNotificationClicked()), this, SLOT(forceSkipSaveYourself())); static_cast(shutdownNotifierIPDlg)->setStatusMessage(i18n("Forcing interacting application termination").append("...")); } @@ -695,8 +697,6 @@ void KSMServer::notificationTimeout() { if (shutdownNotifierIPDlg) { // Display the buttons in the logout dialog - connect(shutdownNotifierIPDlg, SIGNAL(abortLogoutClicked()), this, SLOT(cancelShutdown())); - connect(shutdownNotifierIPDlg, SIGNAL(skipNotificationClicked()), this, SLOT(forceSkipSaveYourself())); static_cast(shutdownNotifierIPDlg)->showNotificationActionButtons(); } } @@ -742,6 +742,10 @@ void KSMServer::completeShutdownOrCheckpoint() KSMShutdownIPFeedback::showit(); // hide the UGLY logout process from the user if (!shutdownNotifierIPDlg) { shutdownNotifierIPDlg = KSMShutdownIPDlg::showShutdownIP(); + if (shutdownNotifierIPDlg) { + connect(shutdownNotifierIPDlg, SIGNAL(abortLogoutClicked()), this, SLOT(cancelShutdown())); + connect(shutdownNotifierIPDlg, SIGNAL(skipNotificationClicked()), this, SLOT(forceSkipSaveYourself())); + } } while (!KSMShutdownIPFeedback::ispainted()) { tqApp->processEvents(); @@ -751,8 +755,6 @@ void KSMServer::completeShutdownOrCheckpoint() notificationTimer.stop(); if (shutdownNotifierIPDlg) { static_cast(shutdownNotifierIPDlg)->hideNotificationActionButtons(); - disconnect(shutdownNotifierIPDlg, SIGNAL(abortLogoutClicked()), this, SLOT(cancelShutdown())); - disconnect(shutdownNotifierIPDlg, SIGNAL(skipNotificationClicked()), this, SLOT(forceSkipSaveYourself())); } // synchronize any folders that were requested for shutdown sync -- cgit v1.2.1