Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > 7528c2f0034b5e6ab4ac60c4ee775b93 > files > 22

kdebase-workspace-4.5.5-1.fc13.src.rpm

diff -up kdebase-workspace-4.5.2/startkde.cmake.zenity kdebase-workspace-4.5.2/startkde.cmake
--- kdebase-workspace-4.5.2/startkde.cmake.zenity	2010-10-20 10:09:31.943643219 -0500
+++ kdebase-workspace-4.5.2/startkde.cmake	2010-10-20 10:15:13.310645585 -0500
@@ -13,12 +13,20 @@ fi
 # because we still need to do some cleanup.
 trap 'echo GOT SIGHUP' HUP
 
+# See http://bugzilla.redhat.com/537609 , a naive attempt to drop dep 
+# on xmessage and allow alternatives like zenity.  
+message() {
+  xmessage -geometry 500x100 "$1" > /dev/null 2>/dev/null || \
+    zenity --info --text="$1" > /dev/null 2>/dev/null ||:
+  return $?
+}
+
 # Check if a KDE session already is running and whether it's possible to connect to X
 kcheckrunning
 kcheckrunning_result=$?
 if test $kcheckrunning_result -eq 0 ; then
 	echo "KDE seems to be already running on this display."
-	xmessage -geometry 500x100 "KDE seems to be already running on this display." > /dev/null 2>/dev/null
+	message "KDE seems to be already running on this display." > /dev/null 2>/dev/null
 	exit 1
 elif test $kcheckrunning_result -eq 2 ; then
 	echo "\$DISPLAY is not set or cannot connect to the X server."
@@ -116,7 +124,7 @@ fi
 kstartupconfig4
 returncode=$?
 if test $returncode -ne 0; then
-    xmessage -geometry 500x100 "kstartupconfig4 does not exist or fails. The error code is $returncode. Check your installation."
+    message "kstartupconfig4 does not exist or fails. The error code is $returncode. Check your installation."
     exit 1
 fi
 [ -r $kdehome/share/config/startupconfig ] && . $kdehome/share/config/startupconfig
@@ -245,7 +253,7 @@ for resource in tmp cache socket; do
     else
         echo 'startkde: Call to lnusertemp failed (temporary directories full?). Check your installation.'  1>&2
         test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null
-        xmessage -geometry 600x100 "Call to lnusertemp failed (temporary directories full?). Check your installation."
+        message "Call to lnusertemp failed (temporary directories full?). Check your installation."
         exit 1
     fi
 done
@@ -269,7 +277,7 @@ if qdbus >/dev/null 2>/dev/null; then
 else
     echo 'startkde: Could not start D-Bus. Can you call qdbus?'  1>&2
     test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null
-    xmessage -geometry 500x100 "Could not start D-Bus. Can you call qdbus?"
+    message "Could not start D-Bus. Can you call qdbus?"
     exit 1
 fi
 
@@ -314,7 +322,7 @@ if test $? -ne 0; then
   # Startup error
   echo 'startkde: Could not start kdeinit4. Check your installation.'  1>&2
   test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null
-  xmessage -geometry 500x100 "Could not start kdeinit4. Check your installation."
+  message "Could not start kdeinit4. Check your installation."
   exit 1
 fi
 
@@ -343,7 +351,7 @@ if test $? -eq 255; then
   # Startup error
   echo 'startkde: Could not start ksmserver. Check your installation.'  1>&2
   test -n "$ksplash_pid" && kill "$ksplash_pid" 2>/dev/null
-  xmessage -geometry 500x100 "Could not start ksmserver. Check your installation."
+  message "Could not start ksmserver. Check your installation."
 fi
 
 # wait if there's any crashhandler shown