Add Debian/Mandrake menu system support.
This commit is contained in:
parent
0ca07c972d
commit
8e44ba1c89
|
@ -89,6 +89,14 @@ EOF
|
||||||
[ -z "$xpmicon" ] || echo "Icon=$xpmicon"
|
[ -z "$xpmicon" ] || echo "Icon=$xpmicon"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mdk_entry()
|
||||||
|
{
|
||||||
|
base=`basename "$link"`
|
||||||
|
section=`dirname "$link"`
|
||||||
|
[ -z "$icon" ] || xicon="icon=\"$xpmicon\""
|
||||||
|
echo "?package(local.Wine):needs=x11 section=\"Wine/$section\" title=\"$base\" longtitle=\"$descr\" command=\"wine \\\"$path\\\" $args\" $xicon"
|
||||||
|
}
|
||||||
|
|
||||||
# copy the icon file to a specified dir and set xpmicon to the resulting path
|
# copy the icon file to a specified dir and set xpmicon to the resulting path
|
||||||
copy_icon()
|
copy_icon()
|
||||||
{
|
{
|
||||||
|
@ -104,6 +112,25 @@ copy_icon()
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Debian/Mandrake
|
||||||
|
|
||||||
|
type update-menus > /dev/null 2>&1
|
||||||
|
if [ $? = 0 -a $mode = "menu" ]
|
||||||
|
then
|
||||||
|
iconname="`basename "$link"`.xpm"
|
||||||
|
dir="$HOME/.menu/icons"
|
||||||
|
if [ -f "$icon" ]
|
||||||
|
then
|
||||||
|
mkdir -p $dir
|
||||||
|
cp "$icon" "$dir/$iconname"
|
||||||
|
xpmicon="$dir/$iconname"
|
||||||
|
else
|
||||||
|
xpmicon=""
|
||||||
|
fi
|
||||||
|
mdk_entry >> "$HOME/.menu/wine"
|
||||||
|
update-menus > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
# KDE
|
# KDE
|
||||||
|
|
||||||
if [ -d "$HOME/.kde" ]
|
if [ -d "$HOME/.kde" ]
|
||||||
|
|
Loading…
Reference in New Issue