From b854e365affbc01f61f6a3f58347847437883953 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 1 Nov 2018 23:43:47 +0900 Subject: Conversion startkde -> starttde, exitkde -> exittde in r14-xdg-upd file and related usage in code. This resolves bug 2282 and 2283. Signed-off-by: Michele Calgaro --- kcontrol/kthememanager/ktheme.cpp | 2 +- ksmserver/shutdown.cpp | 6 +++--- r14-xdg-update | 17 ++++++++++++++++- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/kcontrol/kthememanager/ktheme.cpp b/kcontrol/kthememanager/ktheme.cpp index 0dcee8105..fc2d6e1c9 100644 --- a/kcontrol/kthememanager/ktheme.cpp +++ b/kcontrol/kthememanager/ktheme.cpp @@ -199,7 +199,7 @@ TQString KTheme::createYourself( bool pack ) // 4.1 Global sounds TDEConfig * soundConf = new TDEConfig( "knotify.eventsrc", true ); TQStringList stdEvents; - stdEvents << "cannotopenfile" << "catastrophe" << "exitkde" << "fatalerror" + stdEvents << "cannotopenfile" << "catastrophe" << "exittde" << "fatalerror" << "notification" << "printerror" << "starttde" << "warning" << "messageCritical" << "messageInformation" << "messageWarning" << "messageboxQuestion"; diff --git a/ksmserver/shutdown.cpp b/ksmserver/shutdown.cpp index 753703289..8b14ceaf1 100644 --- a/ksmserver/shutdown.cpp +++ b/ksmserver/shutdown.cpp @@ -812,7 +812,7 @@ void KSMServer::completeShutdownOrCheckpoint() waitForKNotify = false; } // event() can return -1 if KNotifyClient short-circuits and avoids KNotify - logoutSoundEvent = KNotifyClient::event( 0, "exitkde" ); // KDE says good bye + logoutSoundEvent = KNotifyClient::event( 0, "exittde" ); // TDE says good bye if( logoutSoundEvent <= 0 ) { waitForKNotify = false; } @@ -1013,8 +1013,8 @@ void KSMServer::notifySlot(TQString event ,TQString app,TQString,TQString,TQStri SHUTDOWN_MARKER("notifySlot state != WaitingForKNotify"); return; } - if( event != "exitkde" || app != "ksmserver" ) { - SHUTDOWN_MARKER("notifySlot event != \"exitkde\" || app != \"ksmserver\""); + if( event != "exittde" || app != "ksmserver" ) { + SHUTDOWN_MARKER("notifySlot event != \"exittde\" || app != \"ksmserver\""); return; } if( present & KNotifyClient::Sound ) { // logoutSoundFinished() will be called diff --git a/r14-xdg-update b/r14-xdg-update index 8db0693a6..762062d80 100644 --- a/r14-xdg-update +++ b/r14-xdg-update @@ -3,7 +3,7 @@ # A script to perform R14.0.0 XDG compliance updates. SCRIPT_NAME="`basename \`readlink -f $0\``" -SCRIPT_VERSION=201805260 +SCRIPT_VERSION=201811010 # This script should be needed to run only once, but corner cases # and file/directory permissions could cause incomplete updates. @@ -976,6 +976,21 @@ if [ "$R14_VERSION" -lt "201805260" ]; then fi fi +# Rename startkde/exitkde events if possible +if [ "$R14_VERSION" -lt "201811010" ]; then + if [ -f $PROFILE_DIR/share/config/knotify.eventsrc ]; then + if [ "`grep \"\[startkde\]\" $PROFILE_DIR/share/config/knotify.eventsrc`" ] && \ + [ -z "`grep \"\[starttde\]\" $PROFILE_DIR/share/config/knotify.eventsrc`" ]; then + Log " Rename startkde -> starttde" + sed -i "s|\[startkde\]|\[starttde\]|" $PROFILE_DIR/share/config/knotify.eventsrc + fi + if [ "`grep \"\[exitkde\]\" $PROFILE_DIR/share/config/knotify.eventsrc`" ] && \ + [ -z "`grep \"\[exittde\]\" $PROFILE_DIR/share/config/knotify.eventsrc`" ]; then + Log " Rename exitkde -> exittde" + sed -i "s|\[exitkde\]|\[exittde\]|" $PROFILE_DIR/share/config/knotify.eventsrc + fi + fi +fi # Perform some nominal update validations. # First clean house from any previous failures. -- cgit v1.2.1