Browse Source

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>
Michele Calgaro 5 months ago
parent
commit
b854e365af
Signed by: Michele Calgaro <michele.calgaro@yahoo.it> GPG Key ID: 2A75B7CA8ADED5CF
3 changed files with 20 additions and 5 deletions
  1. 1
    1
      kcontrol/kthememanager/ktheme.cpp
  2. 3
    3
      ksmserver/shutdown.cpp
  3. 16
    1
      r14-xdg-update

+ 1
- 1
kcontrol/kthememanager/ktheme.cpp View File

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

+ 3
- 3
ksmserver/shutdown.cpp View File

@@ -812,7 +812,7 @@ void KSMServer::completeShutdownOrCheckpoint()
812 812
             waitForKNotify = false;
813 813
         }
814 814
         // event() can return -1 if KNotifyClient short-circuits and avoids KNotify
815
-        logoutSoundEvent = KNotifyClient::event( 0, "exitkde" ); // KDE says good bye
815
+        logoutSoundEvent = KNotifyClient::event( 0, "exittde" ); // TDE says good bye
816 816
         if( logoutSoundEvent <= 0 ) {
817 817
             waitForKNotify = false;
818 818
         }
@@ -1013,8 +1013,8 @@ void KSMServer::notifySlot(TQString event ,TQString app,TQString,TQString,TQStri
1013 1013
         SHUTDOWN_MARKER("notifySlot state != WaitingForKNotify");
1014 1014
         return;
1015 1015
     }
1016
-    if( event != "exitkde" || app != "ksmserver" ) {
1017
-        SHUTDOWN_MARKER("notifySlot event != \"exitkde\" || app != \"ksmserver\"");
1016
+    if( event != "exittde" || app != "ksmserver" ) {
1017
+        SHUTDOWN_MARKER("notifySlot event != \"exittde\" || app != \"ksmserver\"");
1018 1018
         return;
1019 1019
     }
1020 1020
     if( present & KNotifyClient::Sound ) { // logoutSoundFinished() will be called

+ 16
- 1
r14-xdg-update View File

@@ -3,7 +3,7 @@
3 3
 # A script to perform R14.0.0 XDG compliance updates.
4 4
 
5 5
 SCRIPT_NAME="`basename \`readlink -f $0\``"
6
-SCRIPT_VERSION=201805260
6
+SCRIPT_VERSION=201811010
7 7
 
8 8
 # This script should be needed to run only once, but corner cases
9 9
 # and file/directory permissions could cause incomplete updates.
@@ -976,6 +976,21 @@ if [ "$R14_VERSION" -lt "201805260" ]; then
976 976
   fi
977 977
 fi
978 978
 
979
+# Rename startkde/exitkde events if possible
980
+if [ "$R14_VERSION" -lt "201811010" ]; then
981
+	if [ -f $PROFILE_DIR/share/config/knotify.eventsrc ]; then
982
+		if [    "`grep \"\[startkde\]\" $PROFILE_DIR/share/config/knotify.eventsrc`" ] && \
983
+			 [ -z "`grep \"\[starttde\]\" $PROFILE_DIR/share/config/knotify.eventsrc`" ]; then
984
+	    Log "  Rename startkde -> starttde"
985
+			sed -i "s|\[startkde\]|\[starttde\]|" $PROFILE_DIR/share/config/knotify.eventsrc
986
+		fi
987
+		if [    "`grep \"\[exitkde\]\" $PROFILE_DIR/share/config/knotify.eventsrc`" ] && \
988
+			[ -z "`grep \"\[exittde\]\" $PROFILE_DIR/share/config/knotify.eventsrc`" ]; then
989
+	    Log "  Rename exitkde -> exittde"
990
+			sed -i "s|\[exitkde\]|\[exittde\]|" $PROFILE_DIR/share/config/knotify.eventsrc
991
+		fi
992
+	fi
993
+fi
979 994
 
980 995
 # Perform some nominal update validations.
981 996
 # First clean house from any previous failures.

Loading…
Cancel
Save