Revert "[ksmserver]Reinstate login & logout sounds"

This reverts commit c2f4588431.

Apparently this can cause the login sequence to wait for PulseAudio and
can delay the startup quite considerably, so temporarily reverting.

REVIEW: 118636
CCBUG: 335948

Conflicts:
	ksmserver/plasma_workspace.notifyrc
wilder-5.14
Martin Klapetek 12 years ago
parent 0c834be253
commit 019f3bf526
  1. 1
      ksmserver/CMakeLists.txt
  2. 2
      ksmserver/server.h
  3. 31
      ksmserver/shutdown.cpp
  4. 7
      ksmserver/startup.cpp

@ -102,4 +102,3 @@ install(TARGETS kcheckrunning ${INSTALL_TARGETS_DEFAULT_ARGS})
install( FILES org.kde.KSMServerInterface.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})
install( DIRECTORY themes/ DESTINATION ${DATA_INSTALL_DIR}/ksmserver/themes )
install( FILES plasma_workspace.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR} )

@ -127,8 +127,6 @@ private Q_SLOTS:
void kcmPhase1Timeout();
void kcmPhase2Timeout();
void pendingShutdownTimeout();
void logoutSoundTimeout();
void logoutSoundFinished();
void autoStart0();
void autoStart1();

@ -63,7 +63,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <KConfigGroup>
#include <KGlobal>
#include <KLocale>
#include <KNotification>
// #include <KNotification>
#include <KStandardDirs>
#include <KTemporaryFile>
#include <kdisplaymanager.h>
@ -464,16 +464,9 @@ void KSMServer::completeShutdownOrCheckpoint()
discardSession();
if ( state == Shutdown ) {
KNotification *n = KNotification::event(QStringLiteral("exitkde"), QString(), QPixmap(), 0l, KNotification::DefaultEvent); // KDE says good bye
connect(n, SIGNAL(closed()), this, SLOT(logoutSoundFinished()));
// https://bugs.kde.org/show_bug.cgi?id=228005
// if sound is not working for some reason (e.g. no phonon
// backends are installed) the closed() signal never happens
// and logoutSoundFinished() never gets called. Add this timer to make
// sure the shutdown procedure continues even if sound system is broken.
QTimer::singleShot(5000, this, SLOT(logoutSoundTimeout()));
state = WaitingForKNotify;
createLogoutEffectWidget();
startKilling();
} else if ( state == Checkpoint ) {
foreach( KSMClient* c, clients ) {
SmsSaveComplete( c->connection());
@ -485,24 +478,6 @@ void KSMServer::completeShutdownOrCheckpoint()
}
void KSMServer::logoutSoundTimeout()
{
if (state != WaitingForKNotify) {
return;
}
kDebug(1218) << "logout sound timeout";
logoutSoundFinished();
}
void KSMServer::logoutSoundFinished( )
{
if (state != WaitingForKNotify) {
return;
}
kDebug(1218) << "Logout event finished";
startKilling();
}
void KSMServer::startKilling()
{
kDebug( 1218 ) << "Starting killing clients";

@ -413,10 +413,9 @@ void KSMServer::autoStart2()
}
if( !defaultSession())
restoreLegacySession(KSharedConfig::openConfig().data());
KNotification::event(QStringLiteral("startkde"),
QString(), QPixmap(), 0l,
KNotification::DefaultEvent); // this is the time KDE is up, more or less
// KNotification::event( QStringLiteral( "startkde" ),
// QString(), QPixmap(), 0l,
// KNotification::DefaultEvent ); // this is the time KDE is up, more or less
}
void KSMServer::runUserAutostart()

Loading…
Cancel
Save