make XMESSAGE a variable and use it consistently

Previously, gxmessage was getting substituted in one place and not
another.
This commit is contained in:
slakmagik 2011-03-29 00:04:23 -04:00 committed by Mathias Gumz
parent a8583b79ae
commit 906166f42d

View file

@ -1543,6 +1543,13 @@ else
LAUNCHER_CMD=$LAUNCHER
fi
# if gxmessage exists, use it; else use xmessage
if find_it gxmessage; then
XMESSAGE=gxmessage
else
XMESSAGE=xmessage
fi
# Start of menu
cat << EOF > ${MENUFILENAME}
# Generated by fluxbox-generate_menu
@ -1864,11 +1871,8 @@ append_submenu "${FBSETTINGSMENU}"
append_submenu "${TOOLS}"
normal_find fluxconf fluxkeys fluxmenu
find_it fbpanel append "[exec] (Fluxbox panel) {fbpanel}"
# if gxmessage exists, use it; else use xmessage
find_it gxmessage append \
"[exec] (${WINDOWNAME}) {xprop WM_CLASS|cut -d \\\" -f 2|gxmessage -file - -center}" || \
find_it xmessage append \
"[exec] (${WINDOWNAME}) {xprop WM_CLASS|cut -d \\\" -f 2|xmessage -file - -center}"
find_it $XMESSAGE append \
"[exec] (${WINDOWNAME}) {xprop WM_CLASS|cut -d \\\" -f 2|$XMESSAGE -file - -center}"
find_it import append "[exec] (${SCREENSHOT} - JPG) {import screenshot.jpg && display -resize 50% screenshot.jpg}"
find_it import append "[exec] (${SCREENSHOT} - PNG) {import screenshot.png && display -resize 50% screenshot.png}"
find_it ${LAUNCHER} append "[exec] (${RUNCOMMAND}) {$LAUNCHER_CMD}"
@ -1894,7 +1898,7 @@ append_submenu "${FBSETTINGSMENU}"
append "[commanddialog] (${FLUXBOXCOMMAND})"
append "[reconfig] (${RELOADITEM})"
append "[restart] (${RESTARTITEM})"
append "[exec] (${ABOUTITEM}) {(@pkgprefix@fluxbox@pkgsuffix@ -v; @pkgprefix@fluxbox@pkgsuffix@ -info | sed 1d) | xmessage -file - -center}"
append "[exec] (${ABOUTITEM}) {(@pkgprefix@fluxbox@pkgsuffix@ -v; @pkgprefix@fluxbox@pkgsuffix@ -info | sed 1d) | $XMESSAGE -file - -center}"
append "[separator]"
append "[exit] (${EXITITEM})"