Deleted Added
full compact
type (249746) type (249751)
1#!/bin/sh
2#-
3# Copyright (c) 2012-2013 Devin Teske
4# All Rights Reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 10 unchanged lines hidden (view full) ---

19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
1#!/bin/sh
2#-
3# Copyright (c) 2012-2013 Devin Teske
4# All Rights Reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 10 unchanged lines hidden (view full) ---

19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
27# $FreeBSD: head/usr.sbin/bsdconfig/mouse/type 249746 2013-04-22 05:02:34Z dteske $
27# $FreeBSD: head/usr.sbin/bsdconfig/mouse/type 249751 2013-04-22 05:52:06Z dteske $
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_dprintf "%s: loading includes..." "$0"
34f_include $BSDCFG_SHARE/dialog.subr
35f_include $BSDCFG_SHARE/mustberoot.subr

--- 8 unchanged lines hidden (view full) ---

44############################################################ FUNCTIONS
45
46# dialog_menu_main
47#
48# Display the dialog(1)-based application main menu.
49#
50dialog_menu_main()
51{
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_dprintf "%s: loading includes..." "$0"
34f_include $BSDCFG_SHARE/dialog.subr
35f_include $BSDCFG_SHARE/mustberoot.subr

--- 8 unchanged lines hidden (view full) ---

44############################################################ FUNCTIONS
45
46# dialog_menu_main
47#
48# Display the dialog(1)-based application main menu.
49#
50dialog_menu_main()
51{
52 local menu_list size
52 local menu_list size defaultitem=
53 local hline=""
54 local prompt="$msg_protocol_menu_text"
55
56 menu_list="
57 '1 $msg_auto' '$msg_auto_desc'
58 '2 $msg_glidepoint' '$msg_glidepoint_desc'
59 '3 $msg_hitachi' '$msg_hitachi_desc'
60 '4 $msg_intellimouse' '$msg_intellimouse_desc'

--- 7 unchanged lines hidden (view full) ---

68
69 size=$( eval f_dialog_menu_size \
70 \"\$DIALOG_TITLE\" \
71 \"\$DIALOG_BACKTITLE\" \
72 \"\$prompt\" \
73 \"\$hline\" \
74 $menu_list )
75
53 local hline=""
54 local prompt="$msg_protocol_menu_text"
55
56 menu_list="
57 '1 $msg_auto' '$msg_auto_desc'
58 '2 $msg_glidepoint' '$msg_glidepoint_desc'
59 '3 $msg_hitachi' '$msg_hitachi_desc'
60 '4 $msg_intellimouse' '$msg_intellimouse_desc'

--- 7 unchanged lines hidden (view full) ---

68
69 size=$( eval f_dialog_menu_size \
70 \"\$DIALOG_TITLE\" \
71 \"\$DIALOG_BACKTITLE\" \
72 \"\$prompt\" \
73 \"\$hline\" \
74 $menu_list )
75
76 case "$( f_sysrc_get moused_type )" in
77 auto) defaultitem="1 $msg_auto" ;;
78 glidepoint) defaultitem="2 $msg_glidepoint" ;;
79 mmhittab) defaultitem="3 $msg_hitachi" ;;
80 intellimouse) defaultitem="4 $msg_intellimouse" ;;
81 logitech) defaultitem="5 $msg_logitech" ;;
82 microsoft) defaultitem="6 $msg_microsoft" ;;
83 mmseries) defaultitem="7 $msg_mm_series" ;;
84 mouseman) defaultitem="8 $msg_mouseman" ;;
85 mousesystems) defaultitem="9 $msg_mousesystems" ;;
86 thinkingmouse) defaultitem="A $msg_thinkingmouse" ;;
87 esac
88
76 local dialog_menu
77 dialog_menu=$( eval $DIALOG \
89 local dialog_menu
90 dialog_menu=$( eval $DIALOG \
78 --clear --title \"\$DIALOG_TITLE\" \
91 --title \"\$DIALOG_TITLE\" \
79 --backtitle \"\$DIALOG_BACKTITLE\" \
80 --hline \"\$hline\" \
81 --ok-label \"\$msg_ok\" \
82 --cancel-label \"\$msg_cancel\" \
92 --backtitle \"\$DIALOG_BACKTITLE\" \
93 --hline \"\$hline\" \
94 --ok-label \"\$msg_ok\" \
95 --cancel-label \"\$msg_cancel\" \
96 --default-item \"\$defaultitem\" \
83 --menu \"\$prompt\" $size \
84 $menu_list \
85 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
86 )
87 local retval=$?
88 setvar DIALOG_MENU_$$ "$dialog_menu"
89 return $retval
90}

--- 73 unchanged lines hidden ---
97 --menu \"\$prompt\" $size \
98 $menu_list \
99 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
100 )
101 local retval=$?
102 setvar DIALOG_MENU_$$ "$dialog_menu"
103 return $retval
104}

--- 73 unchanged lines hidden ---