Perform some code consolidation and add some additional error
checking/reporting. (similar to SVN revisions 251905 and 251915)
This commit is contained in:
parent
d6abc28bf4
commit
23fb944196
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=251919
@ -86,6 +86,7 @@ msg_thinkingmouse="ThinkingMouse"
|
||||
msg_thinkingmouse_desc="Kensington ThinkingMouse (serial)"
|
||||
msg_trying_to_start_the_mouse_daemon="Trying to start the mouse daemon..."
|
||||
msg_type="Type"
|
||||
msg_unknown_mouse_menu_selection="Unknown mouse menu selection"
|
||||
msg_unknown_mouse_port_selection="Unknown mouse port selection"
|
||||
msg_unknown_mouse_protocol_selection="Unknown mouse protocol selection"
|
||||
msg_user_confirmation_requested="User Confirmation Requested"
|
||||
|
@ -120,19 +120,21 @@ while :; do
|
||||
dialog_menu_main || f_die
|
||||
f_dialog_menutag_fetch mtag
|
||||
|
||||
command=
|
||||
case "$mtag" in
|
||||
"X $msg_exit") break ;;
|
||||
"2 $msg_enable") # Test and run the mouse daemon
|
||||
$BSDCFG_LIBE/$APP_DIR/enable ${USE_XDIALOG:+-X} ;;
|
||||
"3 $msg_type") # Select mouse protocol type
|
||||
$BSDCFG_LIBE/$APP_DIR/type ${USE_XDIALOG:+-X} ;;
|
||||
"4 $msg_port") # Select mouse port
|
||||
$BSDCFG_LIBE/$APP_DIR/port ${USE_XDIALOG:+-X} ;;
|
||||
"5 $msg_flags") # Set additional flags
|
||||
$BSDCFG_LIBE/$APP_DIR/flags ${USE_XDIALOG:+-X} ;;
|
||||
"6 $msg_disable") # Disable the mouse daemon
|
||||
$BSDCFG_LIBE/$APP_DIR/disable ${USE_XDIALOG:+-X} ;;
|
||||
"2 $msg_enable") command=enable ;; # Test and run the mouse daemon
|
||||
"3 $msg_type") command=type ;; # Select mouse protocol type
|
||||
"4 $msg_port") command=port ;; # Select mouse port
|
||||
"5 $msg_flags") command=flags ;; # Set additional flags
|
||||
"6 $msg_disable") command=disable ;; # Disable the mouse daemon
|
||||
esac
|
||||
|
||||
if [ "$command" ]; then
|
||||
$BSDCFG_LIBE/$APP_DIR/$command ${USE_XDIALOG:+-X} ;;
|
||||
else
|
||||
f_die 1 "$msg_unknown_mouse_menu_selection"
|
||||
fi
|
||||
done
|
||||
|
||||
exit $SUCCESS
|
||||
|
Loading…
Reference in New Issue
Block a user