r2541 - people/synrg/xjig
Ben Armstrong
synrg at alioth.debian.org
Sat Apr 7 16:05:21 UTC 2007
Author: synrg
Date: 2007-04-07 16:05:21 +0000 (Sat, 07 Apr 2007)
New Revision: 2541
Modified:
people/synrg/xjig/xjig-menu
Log:
Fix kdeinit autodetection and startup
Modified: people/synrg/xjig/xjig-menu
===================================================================
--- people/synrg/xjig/xjig-menu 2007-04-07 12:43:15 UTC (rev 2540)
+++ people/synrg/xjig/xjig-menu 2007-04-07 16:05:21 UTC (rev 2541)
@@ -126,6 +126,9 @@
Cleanup ()
{
rm -f "$tmpout"
+ if [ $kde_initialized -eq 1 ] ; then
+ kdeinit_shutdown
+ fi
}
Zenity ()
@@ -176,7 +179,11 @@
SetupDialog ()
{
if [ "$dialog" = "kdialog" ] ; then
- kdeinit &>/dev/null
+ dcopid="$(dcopserver --serverid 2>&1)"
+ if [ -z "$dcopid" ] ; then
+ kdeinit &>/dev/null
+ export kde_initialized=1
+ fi
fi
}
@@ -328,6 +335,7 @@
Error "${PROGRAM}: Invalid dialog: $specified_dialog"
;;
esac
+ SetupDialog
if [ -z "$filename" ] ; then
Dialog file "Select a file to turn into a puzzle"
filename="$dialog_answer"
@@ -384,12 +392,12 @@
Main ()
{
typeset -i width=0 height=0 scale_width=0 scale_height=0
+ export kde_initialized=0
typeset dialog_answer=""
Defaults
Arguments "${@}"
Validate
- SetupDialog
if [ "$make" = "enabled" ] ; then
Error "${PROGRAM}: FIXME: make a desktop link in $desktop_directory"
else
More information about the Pkg-games-commits
mailing list