Commit 35ba7b9e authored by Dustin Navea's avatar Dustin Navea Committed by Alexandre Julliard

Write menu information to /usr/lib/menu/wine.

Try to autodetect KDE version using kde-config.
parent fc2be7ed
...@@ -145,6 +145,10 @@ then ...@@ -145,6 +145,10 @@ then
xpmicon="" xpmicon=""
fi fi
mdk_entry >> "$HOME/.menu/wine" mdk_entry >> "$HOME/.menu/wine"
if [ -d "/usr/lib/menu" ]
then
mdk_entry >> "/usr/lib/menu/wine"
fi
update-menus > /dev/null 2>&1 update-menus > /dev/null 2>&1
fi fi
...@@ -152,23 +156,41 @@ fi ...@@ -152,23 +156,41 @@ fi
if [ -d "$HOME/.kde" ] if [ -d "$HOME/.kde" ]
then then
copy_icon "$HOME/.kde/share/applnk/Wine" kdeversion=0
if [ $mode = "menu" ] if which kde-config >/dev/null 2>&1
then then
kde_entry > "$HOME/.kde/share/applnk/Wine/$link.kdelnk" kdeversion=`kde-config -v | grep KDE: | sed -n "s/^KDE: \([^.]*\)\..*$/\1/p"`
fi
# KDE 1.x kludge. Wake up KDE, if we can find kpanel running
which kwmcom >/dev/null 2>/dev/null && \
ps u -C kpanel >/dev/null 2>/dev/null && \
kwmcom kpanel:restart
elif [ -d "$HOME/Desktop" ] if [ $kdeversion = 2 ]
then then
kde_entry > "$HOME/Desktop/$link.kdelnk" copy_icon "$HOME/.kde/share/applnk/Wine"
# KDE 1.x kludge: wake up KDE, if we can find kfm running... if [ $mode = "menu" ]
which kfmclient >/dev/null 2>/dev/null && \ then
ps u -C kfm >/dev/null 2>/dev/null && \ gnome_entry > "$HOME/.kde/share/applnk/Wine/$link.desktop"
kfmclient refreshDesktop elif [ -d "$HOME/Desktop" ]
then
gnome_entry > "$HOME/Desktop/$link.desktop"
fi
else
copy_icon "$HOME/.kde/share/applnk/Wine"
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
which 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...
which kfmclient >/dev/null 2>/dev/null && \
ps u -C kfm >/dev/null 2>/dev/null && \
kfmclient refreshDesktop
fi
fi fi
fi fi
...@@ -182,8 +204,6 @@ then ...@@ -182,8 +204,6 @@ then
then then
gnome_entry > "$HOME/Desktop2/$link.desktop" gnome_entry > "$HOME/Desktop2/$link.desktop"
fi fi
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment