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 <michele.calgaro@yahoo.it>
(cherry picked from commit b854e365af)
pull/182/head
Michele Calgaro 6 years ago
parent c2c8163388
commit 753410778b
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -199,7 +199,7 @@ TQString KTheme::createYourself( bool pack )
// 4.1 Global sounds // 4.1 Global sounds
TDEConfig * soundConf = new TDEConfig( "knotify.eventsrc", true ); TDEConfig * soundConf = new TDEConfig( "knotify.eventsrc", true );
TQStringList stdEvents; TQStringList stdEvents;
stdEvents << "cannotopenfile" << "catastrophe" << "exitkde" << "fatalerror" stdEvents << "cannotopenfile" << "catastrophe" << "exittde" << "fatalerror"
<< "notification" << "printerror" << "starttde" << "warning" << "notification" << "printerror" << "starttde" << "warning"
<< "messageCritical" << "messageInformation" << "messageWarning" << "messageCritical" << "messageInformation" << "messageWarning"
<< "messageboxQuestion"; << "messageboxQuestion";

@ -807,7 +807,7 @@ void KSMServer::completeShutdownOrCheckpoint()
waitForKNotify = false; waitForKNotify = false;
} }
// event() can return -1 if KNotifyClient short-circuits and avoids KNotify // 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 ) { if( logoutSoundEvent <= 0 ) {
waitForKNotify = false; waitForKNotify = false;
} }
@ -1008,8 +1008,8 @@ void KSMServer::notifySlot(TQString event ,TQString app,TQString,TQString,TQStri
SHUTDOWN_MARKER("notifySlot state != WaitingForKNotify"); SHUTDOWN_MARKER("notifySlot state != WaitingForKNotify");
return; return;
} }
if( event != "exitkde" || app != "ksmserver" ) { if( event != "exittde" || app != "ksmserver" ) {
SHUTDOWN_MARKER("notifySlot event != \"exitkde\" || app != \"ksmserver\""); SHUTDOWN_MARKER("notifySlot event != \"exittde\" || app != \"ksmserver\"");
return; return;
} }
if( present & KNotifyClient::Sound ) { // logoutSoundFinished() will be called if( present & KNotifyClient::Sound ) { // logoutSoundFinished() will be called

@ -3,7 +3,7 @@
# A script to perform R14.0.0 XDG compliance updates. # A script to perform R14.0.0 XDG compliance updates.
SCRIPT_NAME="`basename \`readlink -f $0\``" SCRIPT_NAME="`basename \`readlink -f $0\``"
SCRIPT_VERSION=201805260 SCRIPT_VERSION=201811010
# This script should be needed to run only once, but corner cases # This script should be needed to run only once, but corner cases
# and file/directory permissions could cause incomplete updates. # and file/directory permissions could cause incomplete updates.
@ -976,6 +976,21 @@ if [ "$R14_VERSION" -lt "201805260" ]; then
fi fi
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. # Perform some nominal update validations.
# First clean house from any previous failures. # First clean house from any previous failures.

Loading…
Cancel
Save