Fix error message if cancel DPI option
This commit is contained in:
parent
7192d5d295
commit
705d6ebeb5
|
@ -213,15 +213,19 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
fi
|
fi
|
||||||
elif [ "${opcion}" == "${imagesPath}/mouse-dpi.png" ] ; then
|
elif [ "${opcion}" == "${imagesPath}/mouse-dpi.png" ] ; then
|
||||||
dpi_number=$(zenity --entry --title "Set DPI (from 50 to 8000)" --window-icon=${iconPath} --text "Enter DPI number (from 50 to 8000):" --entry-text "800")
|
dpi_number=$(zenity --entry --title "Set DPI (from 50 to 8000)" --window-icon=${iconPath} --text "Enter DPI number (from 50 to 8000):" --entry-text "800")
|
||||||
sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Setting DPI to ${dpi_number}" \
|
if [ -z ${dpi_number} ] ; then
|
||||||
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
|
||||||
g203-led.py lightsync dpi ${dpi_number}
|
|
||||||
device_error=$?
|
|
||||||
if [ ${device_error} -eq 0 ] ; then
|
|
||||||
echo > /dev/null
|
echo > /dev/null
|
||||||
else
|
else
|
||||||
zenity --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Setting DPI to ${dpi_number}" \
|
||||||
--text "Device not found or connected"
|
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
||||||
|
g203-led.py lightsync dpi ${dpi_number}
|
||||||
|
device_error=$?
|
||||||
|
if [ ${device_error} -eq 0 ] ; then
|
||||||
|
echo > /dev/null
|
||||||
|
else
|
||||||
|
zenity --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
||||||
|
--text "Device not found or connected"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
elif [ "${opcion}" == "${imagesPath}/light-off.png" ] ; then
|
elif [ "${opcion}" == "${imagesPath}/light-off.png" ] ; then
|
||||||
sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Turning off the light on the mouse" \
|
sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Turning off the light on the mouse" \
|
||||||
|
|
|
@ -191,15 +191,19 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
fi
|
fi
|
||||||
elif [ "${opcion}" == "${imagesPath}/mouse-dpi.png" ] ; then
|
elif [ "${opcion}" == "${imagesPath}/mouse-dpi.png" ] ; then
|
||||||
dpi_number=$(zenity --entry --title "Set DPI (from 200 to 8000)" --window-icon=${iconPath} --text "Enter DPI number (from 200 to 8000):" --entry-text "800")
|
dpi_number=$(zenity --entry --title "Set DPI (from 200 to 8000)" --window-icon=${iconPath} --text "Enter DPI number (from 200 to 8000):" --entry-text "800")
|
||||||
sleep 2 | zenity --progress --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --text "Setting DPI to ${dpi_number}" \
|
if [ -z ${dpi_number} ] ; then
|
||||||
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
|
||||||
g203-led.py dpi ${dpi_number}
|
|
||||||
device_error=$?
|
|
||||||
if [ ${device_error} -eq 0 ] ; then
|
|
||||||
echo > /dev/null
|
echo > /dev/null
|
||||||
else
|
else
|
||||||
zenity --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
sleep 2 | zenity --progress --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --text "Setting DPI to ${dpi_number}" \
|
||||||
--text "Device not found or connected"
|
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
||||||
|
g203-led.py dpi ${dpi_number}
|
||||||
|
device_error=$?
|
||||||
|
if [ ${device_error} -eq 0 ] ; then
|
||||||
|
echo > /dev/null
|
||||||
|
else
|
||||||
|
zenity --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
||||||
|
--text "Device not found or connected"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
elif [ "${opcion}" == "${imagesPath}/light-off.png" ] ; then
|
elif [ "${opcion}" == "${imagesPath}/light-off.png" ] ; then
|
||||||
sleep 2 | zenity --progress --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --text "Turning off the light on the mouse" \
|
sleep 2 | zenity --progress --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --text "Turning off the light on the mouse" \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user