Fix error when no select option

This commit is contained in:
q3aql 2021-07-07 12:14:26 +02:00
parent 09b8eb3f3c
commit f68e76c37a
2 changed files with 188 additions and 168 deletions

View File

@ -44,6 +44,8 @@ while [ ${showMenu} -eq 0 ] ; do
color_selected=$(zenity --width=260 --height=520 --list --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \
--window-icon=${iconPath} --column "Select color from list :" "Black" "White" "Red" "Lime" "Blue" "Yellow" "Cyan" "Magenta" \
"Silver" "Gray" "Maroon" "Olive" "Green" "Purple" "Teal" "Navy" )
canceled=$?
if [ ${canceled} -eq 0 ] ; then
if [ "${color_selected}" == "Black" ] ; then
color_apply="000000"
elif [ "${color_selected}" == "White" ] ; then
@ -88,6 +90,9 @@ while [ ${showMenu} -eq 0 ] ; do
--text "Device not found or connected"
fi
color_apply="none"
else
color_apply="none"
fi
elif [ "${opcion}" == "Cycle" ] ; then
sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Applying Cycle effect" \
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
@ -103,6 +108,8 @@ while [ ${showMenu} -eq 0 ] ; do
color_selected=$(zenity --width=260 --height=520 --list --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \
--window-icon=${iconPath} --column "Select color from list :" "Black" "White" "Red" "Lime" "Blue" "Yellow" "Cyan" "Magenta" \
"Silver" "Gray" "Maroon" "Olive" "Green" "Purple" "Teal" "Navy" )
canceled=$?
if [ ${canceled} -eq 0 ] ; then
if [ "${color_selected}" == "Black" ] ; then
color_apply="000000"
elif [ "${color_selected}" == "White" ] ; then
@ -147,6 +154,9 @@ while [ ${showMenu} -eq 0 ] ; do
--text "Device not found or connected"
fi
color_apply="none"
else
color_apply="none"
fi
elif [ "${opcion}" == "Wave" ] ; then
sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Applying Wave effect" \
--window-icon=${iconPath} --pulsate --no-cancel --auto-close

View File

@ -43,6 +43,8 @@ while [ ${showMenu} -eq 0 ] ; do
color_selected=$(zenity --width=260 --height=520 --list --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \
--window-icon=${iconPath} --column "Select color from list :" "Black" "White" "Red" "Lime" "Blue" "Yellow" "Cyan" "Magenta" \
"Silver" "Gray" "Maroon" "Olive" "Green" "Purple" "Teal" "Navy" )
canceled=$?
if [ ${canceled} -eq 0 ] ; then
if [ "${color_selected}" == "Black" ] ; then
color_apply="000000"
elif [ "${color_selected}" == "White" ] ; then
@ -87,6 +89,9 @@ while [ ${showMenu} -eq 0 ] ; do
--text "Device not found or connected"
fi
color_apply="none"
else
color_apply="none"
fi
elif [ "${opcion}" == "Cycle" ] ; then
sleep 2 | zenity --progress --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --text "Applying Cycle effect" \
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
@ -102,6 +107,8 @@ while [ ${showMenu} -eq 0 ] ; do
color_selected=$(zenity --width=260 --height=520 --list --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \
--window-icon=${iconPath} --column "Select color from list :" "Black" "White" "Red" "Lime" "Blue" "Yellow" "Cyan" "Magenta" \
"Silver" "Gray" "Maroon" "Olive" "Green" "Purple" "Teal" "Navy" )
canceled=$?
if [ ${canceled} -eq 0 ] ; then
if [ "${color_selected}" == "Black" ] ; then
color_apply="000000"
elif [ "${color_selected}" == "White" ] ; then
@ -146,6 +153,9 @@ while [ ${showMenu} -eq 0 ] ; do
--text "Device not found or connected"
fi
color_apply="none"
else
color_apply="none"
fi
elif [ "${opcion}" == "Intro (On)" ] ; then
sleep 2 | zenity --progress --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --text "Enabling startup effect" \
--window-icon=${iconPath} --pulsate --no-cancel --auto-close