From 8dad1d8ed3f294ab9626f17bd5c43f8699a69621 Mon Sep 17 00:00:00 2001 From: Jeremy White Date: Wed, 17 Jan 2001 20:17:03 +0000 Subject: [PATCH] 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. --- tools/wineshelllink | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tools/wineshelllink b/tools/wineshelllink index b716e1efade..1979ca7c680 100755 --- a/tools/wineshelllink +++ b/tools/wineshelllink @@ -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 < "$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" ]