Revised wineshelllink to wake up KDE 1.x so that applications that get
installed show up without a manual KDE menu refresh required. Added a few usage checks to make manual invocation a little less painful.
This commit is contained in:
parent
1b2e90e31b
commit
8dad1d8ed3
|
@ -33,6 +33,10 @@ EOF
|
|||
exit 1
|
||||
}
|
||||
|
||||
if [ $# -eq 0 ] ; then
|
||||
usage
|
||||
fi
|
||||
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
|
@ -48,6 +52,16 @@ do
|
|||
esac
|
||||
done
|
||||
|
||||
if [ "$mode" = "" ] ; then
|
||||
echo Either --desktop or --menu required
|
||||
usage
|
||||
fi
|
||||
|
||||
if [ "$link" = "" ] ; then
|
||||
echo You must specify a link name with --link
|
||||
usage
|
||||
fi
|
||||
|
||||
kde_entry()
|
||||
{
|
||||
cat <<EOF
|
||||
|
@ -98,12 +112,27 @@ then
|
|||
if [ $mode = "menu" ]
|
||||
then
|
||||
kde_entry > "$HOME/.kde/share/applnk/Wine/$link.kdelnk"
|
||||
|
||||
# KDE 1.x kludge. Wake up KDE, if we can find kpanel running
|
||||
type kwmcom >/dev/null 2>/dev/null && \
|
||||
ps u -C kpanel >/dev/null 2>/dev/null && \
|
||||
kwmcom kpanel:restart
|
||||
|
||||
elif [ -d "$HOME/Desktop" ]
|
||||
then
|
||||
kde_entry > "$HOME/Desktop/$link.kdelnk"
|
||||
|
||||
|
||||
# KDE 1.x kludge: wake up KDE, if we can find kfm running...
|
||||
type kfmclient >/dev/null 2>/dev/null && \
|
||||
ps u -C kfm >/dev/null 2>/dev/null && \
|
||||
kfmclient refreshDesktop
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# Gnome
|
||||
|
||||
if [ -d "$HOME/.gnome" ]
|
||||
|
|
Loading…
Reference in New Issue