Debian Codegraph @

develop/ui-checklist

raw
1 #!/bin/sh -e
2 # UI test
3 # (C) 2026 Osamu Aoki <[email protected]>, GPL-2+
4 # vim: set sts=4 expandtab:
5 #############################################################
6 # Parse command line arguments
7 #############################################################
8 IM_CONFIG_DIALOG=ZENITY
9 while [ -n "$1" ]; do
10 case $1 in
11 -z)
12 IM_CONFIG_DIALOG=ZENITY
13 ;;
14 -k)
15 IM_CONFIG_DIALOG=KDIALOG
16 ;;
17 -w)
18 IM_CONFIG_DIALOG=WHIPTAIL
19 ;;
20 *)
21 break
22 ;;
23 esac
24 shift
25 done
26 export IM_CONFIG_DIALOG
27 MSG="$(im-config -t checklist_init "Title (example)" "TOP TEXT\n2nd line" "Select" "ID" "Description")"
28 MSG="$MSG $(im-config -t list_add "US" "U.S.A." "on")"
29 MSG="$MSG $(im-config -t list_add "JP" "Japane" "off")"
30 MSG="$MSG $(im-config -t list_add "FR" "France" "off")"
31 MSG="$MSG $(im-config -t list_add "DE" "Germany" "on")"
32 im-config -t menulist_eval "$MSG"
33 echo