update from Han

This commit is contained in:
fluxgen 2003-08-07 10:35:19 +00:00
parent 1fd437b4ee
commit c5073893d1

View file

@ -22,7 +22,7 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
# $Id: fluxbox-generate_menu,v 1.48 2003/08/05 12:36:54 rathnor Exp $
# $Id: fluxbox-generate_menu,v 1.49 2003/08/07 10:35:19 fluxgen Exp $
#
# Portability notes:
@ -45,7 +45,7 @@
WHOAMI=`whoami`
[ "$WHOAMI" = "root" ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin
[ "$WHOAMI" = root ] && PATH=/bin:/usr/bin/:/usr/local/bin:/usr/X11R6/bin
# Functions
display_usage() {
@ -142,7 +142,7 @@ append_submenu() {
}
append_menu_end() {
append_menu "[end]"
append_menu '[end]'
[ "${REMOVE}" ] && echo >> ${MENUFILENAME} # only an empty line in templates
}
@ -547,7 +547,7 @@ USERMENU="${USERMENU:=${HOME}/.fluxbox/usermenu}"
# Read the menuconfig file if it exists or else create it.
# But not during install time, use envvar for sun
if [ ! "${INSTALL}" = "Yes" ];then
if [ ! "${INSTALL}" = Yes ]; then
if [ -r ${HOME}/.fluxbox/menuconfig ]; then
. ${HOME}/.fluxbox/menuconfig
else
@ -685,9 +685,11 @@ if [ -z "$BACKGROUND_DIRS" ]; then
fi
# find the default terminal
find_it $MY_TERM
if [ $? -ne 0 ]; then
echo "Warning: you chose an invalid term." >&2
if find_it $MY_TERM; then
DEFAULT_TERM=$MY_TERM
else
[ -n "$MY_TERM" ] && echo "Warning: you chose an invalid term." >&2
#The precise order is up for debate.
for term in Eterm aterm rxvt wterm xterm konsole gnome-terminal; do
if find_it $term; then
@ -695,24 +697,21 @@ if [ $? -ne 0 ]; then
break
fi
done
else
DEFAULT_TERM=$MY_TERM
fi
# find the default browser
find_it $MY_BROWSER
if [ $? -ne 0 ]; then
echo "Warning: you chose an invalid browser." >&2
if find_it $MY_BROWSER; then
DEFAULT_BROWSER=$MY_BROWSER
else
[ -n "$MY_BROWSER" ] && echo "Warning: you chose an invalid browser." >&2
#The precise order is up for debate.
for browser in MozillaFirebird firebird opera skipstone phoenix mozilla galeon konqueror dillo netscape links w3m lynx; do
for browser in mozilla-firebird MozillaFirebird opera skipstone mozilla galeon konqueror dillo netscape w3m links lynx; do
if find_it $browser; then
DEFAULT_BROWSER=$browser
break
fi
done
else
DEFAULT_BROWSER=$MY_BROWSER
fi
@ -910,7 +909,7 @@ append_submenu "${FBSETTINGSMENU}"
append "[exec] (${picturename%.???}) {fbsetbg -f \"$1\" }"
}
if [ "$BACKGROUNDMENUITEM" = "yes" ]; then
if [ "$BACKGROUNDMENUITEM" = yes ]; then
IFS=: # set delimetor for find
NUMBER_OF_BACKGROUNDS=`find $BACKGROUND_DIRS -follow -type f 2> /dev/null|wc -l`
if [ "$NUMBER_OF_BACKGROUNDS" -gt 0 ]; then