diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-04-17 17:28:17 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-04-17 17:28:17 +0000 |
commit | 471ee1c85a9d20520815f2294ff60f4a68b1961f (patch) | |
tree | a6a1749470f0ef0127fdd632338023490a5fee50 /contrib/dialog/samples | |
parent | 0082d50ef6e83de5022497c14421f2dcefb71537 (diff) | |
parent | 9904759c67ae2ed3f18aef4891fb52900bcfb03f (diff) | |
download | FreeBSD-src-471ee1c85a9d20520815f2294ff60f4a68b1961f.zip FreeBSD-src-471ee1c85a9d20520815f2294ff60f4a68b1961f.tar.gz |
Update dialog to version 1.1-20110302.
Diffstat (limited to 'contrib/dialog/samples')
-rw-r--r-- | contrib/dialog/samples/debian.rc | 16 | ||||
-rwxr-xr-x | contrib/dialog/samples/infobox5 | 4 | ||||
-rwxr-xr-x | contrib/dialog/samples/infobox6 | 4 | ||||
-rwxr-xr-x | contrib/dialog/samples/msgbox-utf8 | 14 | ||||
-rwxr-xr-x | contrib/dialog/samples/pause-both | 14 | ||||
-rwxr-xr-x | contrib/dialog/samples/pause-extra | 13 | ||||
-rwxr-xr-x | contrib/dialog/samples/prgbox | 6 | ||||
-rwxr-xr-x | contrib/dialog/samples/prgbox2 | 6 | ||||
-rwxr-xr-x | contrib/dialog/samples/programbox | 19 | ||||
-rwxr-xr-x | contrib/dialog/samples/programbox2 | 19 | ||||
-rw-r--r-- | contrib/dialog/samples/setup-vars | 6 | ||||
-rwxr-xr-x | contrib/dialog/samples/shortlist | 19 | ||||
-rw-r--r-- | contrib/dialog/samples/slackware.rc | 9 | ||||
-rw-r--r-- | contrib/dialog/samples/sourcemage.rc | 9 | ||||
-rw-r--r-- | contrib/dialog/samples/suse.rc | 6 | ||||
-rwxr-xr-x | contrib/dialog/samples/textbox-both | 21 | ||||
-rwxr-xr-x | contrib/dialog/samples/textbox-help | 20 | ||||
-rw-r--r-- | contrib/dialog/samples/whiptail.rc | 16 |
18 files changed, 211 insertions, 10 deletions
diff --git a/contrib/dialog/samples/debian.rc b/contrib/dialog/samples/debian.rc index f624dba..3b42eb8 100644 --- a/contrib/dialog/samples/debian.rc +++ b/contrib/dialog/samples/debian.rc @@ -1,6 +1,14 @@ -# $Id: debian.rc,v 1.4 2005/12/01 01:18:57 tom Exp $ +# $Id: debian.rc,v 1.5 2011/01/17 00:14:53 tom Exp $ +# vile:confmode # Run-time configuration file for dialog, matches Debian color scheme. # (these are the default values for dialog) +# +# Types of values: +# +# Number - <number> +# String - "string" +# Boolean - <ON|OFF> +# Attribute - (foreground,background,highlight?) # Set aspect-ration. aspect = 0 @@ -115,3 +123,9 @@ form_active_text_color = (WHITE,BLUE,ON) # Form text color form_text_color = (WHITE,CYAN,ON) + +# Readonly form item color +form_item_readonly_color = (CYAN,WHITE,ON) + +# Dialog box gauge color +gauge_color = (BLUE,WHITE,ON) diff --git a/contrib/dialog/samples/infobox5 b/contrib/dialog/samples/infobox5 index 7f4599e..58512c9 100755 --- a/contrib/dialog/samples/infobox5 +++ b/contrib/dialog/samples/infobox5 @@ -1,5 +1,5 @@ #! /bin/sh -# $Id: infobox5,v 1.6 2010/01/13 10:20:03 tom Exp $ +# $Id: infobox5,v 1.7 2011/01/18 09:19:09 tom Exp $ # get rid of all flickering by constructing a script unroll the loop, leaving # us in curses-mode until we're done counting. @@ -21,7 +21,7 @@ do cat >>$tempfile <<EOF --sleep 1 \ --begin 0 5 \ - --title "INFO BOX" "$@" \ + --title "INFO BOX" $* \ --infobox "Hi, this is an information box. It is different from a message box: it will not pause waiting for input after displaying diff --git a/contrib/dialog/samples/infobox6 b/contrib/dialog/samples/infobox6 index 2e4505c..a3a06ce 100755 --- a/contrib/dialog/samples/infobox6 +++ b/contrib/dialog/samples/infobox6 @@ -1,5 +1,5 @@ #! /bin/sh -# $Id: infobox6,v 1.6 2010/01/13 10:20:03 tom Exp $ +# $Id: infobox6,v 1.7 2011/01/18 09:20:59 tom Exp $ # get rid of all flickering by constructing a script unroll the loop, leaving # us in curses-mode until we're done counting. # @@ -23,7 +23,7 @@ do cat >>$tempfile <<EOF --sleep 1 \ --begin $left `expr $left + 5` \ - --title "INFO BOX" $last "$@" \ + --title "INFO BOX" $* $last --infobox "Hi, this is an information box. It is different from a message box: it will not pause waiting for input after displaying diff --git a/contrib/dialog/samples/msgbox-utf8 b/contrib/dialog/samples/msgbox-utf8 new file mode 100755 index 0000000..e733150 --- /dev/null +++ b/contrib/dialog/samples/msgbox-utf8 @@ -0,0 +1,14 @@ +#!/bin/sh +# $Id: msgbox-utf8,v 1.1 2011/01/18 00:25:30 tom Exp $ +# from Debian #570634 + +. ./setup-vars + +. ./setup-utf8 + +${DIALOG-dialog} "$@" \ + --title "ทดสอบวรรณยุกต์" \ + --msgbox "วรรณยุกต์อยู่ท้ายบรรทัดได้หรือไม่" 8 23 +retval=$? + +. ./report-button diff --git a/contrib/dialog/samples/pause-both b/contrib/dialog/samples/pause-both new file mode 100755 index 0000000..aa72936 --- /dev/null +++ b/contrib/dialog/samples/pause-both @@ -0,0 +1,14 @@ +#!/bin/sh +# $Id: pause-both,v 1.1 2011/01/18 09:49:24 tom Exp $ + +. ./setup-vars + +$DIALOG --title "PAUSE" \ + --help-button \ + --extra-button "$@" \ + --pause "Hi, this is a pause widget" 20 70 10 + +retval=$? +echo return $retval + +. ./report-button diff --git a/contrib/dialog/samples/pause-extra b/contrib/dialog/samples/pause-extra new file mode 100755 index 0000000..846e108 --- /dev/null +++ b/contrib/dialog/samples/pause-extra @@ -0,0 +1,13 @@ +#!/bin/sh +# $Id: pause-extra,v 1.1 2011/01/18 09:49:07 tom Exp $ + +. ./setup-vars + +$DIALOG --title "PAUSE" \ + --extra-button "$@" \ + --pause "Hi, this is a pause widget" 20 70 10 + +retval=$? +echo return $retval + +. ./report-button diff --git a/contrib/dialog/samples/prgbox b/contrib/dialog/samples/prgbox new file mode 100755 index 0000000..9170a36 --- /dev/null +++ b/contrib/dialog/samples/prgbox @@ -0,0 +1,6 @@ +#!/bin/sh +# $Id: prgbox,v 1.1 2011/03/02 00:10:54 tom Exp $ + +. ./setup-vars + +$DIALOG --title "PRGBOX" "$@" --prgbox "./shortlist" 20 70 diff --git a/contrib/dialog/samples/prgbox2 b/contrib/dialog/samples/prgbox2 new file mode 100755 index 0000000..53f3daa --- /dev/null +++ b/contrib/dialog/samples/prgbox2 @@ -0,0 +1,6 @@ +#!/bin/sh +# $Id: prgbox2,v 1.1 2011/03/02 01:25:54 tom Exp $ + +. ./setup-vars + +$DIALOG --title "PRGBOX" "$@" --prgbox "./shortlist 3" 20 70 diff --git a/contrib/dialog/samples/programbox b/contrib/dialog/samples/programbox new file mode 100755 index 0000000..9fa0abc --- /dev/null +++ b/contrib/dialog/samples/programbox @@ -0,0 +1,19 @@ +#!/bin/sh +# $Id: programbox,v 1.1 2011/03/02 01:17:28 tom Exp $ + +. ./setup-vars + +. ./setup-tempfile + +ls -1 >$tempfile +( +while true +do +read text +test -z "$text" && break +ls -ld "$text" +sleep 0.1 +done <$tempfile +) | + +$DIALOG --title "PROGRAMBOX" "$@" --programbox 20 70 diff --git a/contrib/dialog/samples/programbox2 b/contrib/dialog/samples/programbox2 new file mode 100755 index 0000000..63f87df --- /dev/null +++ b/contrib/dialog/samples/programbox2 @@ -0,0 +1,19 @@ +#!/bin/sh +# $Id: programbox2,v 1.1 2011/03/02 01:25:31 tom Exp $ + +. ./setup-vars + +. ./setup-tempfile + +ls -1 >$tempfile +( +while true +do +read text +test -z "$text" && break +ls -ld "$text" +sleep 0.1 +done <$tempfile +) | + +$DIALOG --title "PROGRAMBOX" "$@" --programbox "ProgramBox" 20 70 diff --git a/contrib/dialog/samples/setup-vars b/contrib/dialog/samples/setup-vars index cf79353..ae5e725 100644 --- a/contrib/dialog/samples/setup-vars +++ b/contrib/dialog/samples/setup-vars @@ -1,6 +1,10 @@ -# $Id: setup-vars,v 1.1 2010/01/13 00:16:38 tom Exp $ +# $Id: setup-vars,v 1.2 2011/01/04 00:21:43 tom Exp $ # vile:shmode +# These symbols are defined to use in the sample shell scripts to make them +# more readable. But they are (intentionally) not exported. If they were +# exported, they would also be visible in the dialog program (a subprocess). + : ${DIALOG=dialog} : ${DIALOG_OK=0} diff --git a/contrib/dialog/samples/shortlist b/contrib/dialog/samples/shortlist new file mode 100755 index 0000000..bda8b4e --- /dev/null +++ b/contrib/dialog/samples/shortlist @@ -0,0 +1,19 @@ +#!/bin/sh +# $Id: shortlist,v 1.2 2011/03/02 00:11:50 tom Exp $ +# make a short listing, which writes to both stdout and stderr. + +if test $# != 0 +then + count=$1 +else + count=10 +fi + +while test $count != 0 +do + echo "** $count -- `date`" + w >&2 + sleep 1 + count=`expr $count - 1 2>/dev/null` + test -z "$count" && count=0 +done diff --git a/contrib/dialog/samples/slackware.rc b/contrib/dialog/samples/slackware.rc index 9942db6..967147e 100644 --- a/contrib/dialog/samples/slackware.rc +++ b/contrib/dialog/samples/slackware.rc @@ -1,4 +1,5 @@ -# $Id: slackware.rc,v 1.6 2005/12/01 01:20:16 tom Exp $ +# $Id: slackware.rc,v 1.7 2011/01/17 00:14:41 tom Exp $ +# vile:confmode # Run-time configuration file for dialog, matches Slackware color scheme. # # Types of values: @@ -122,3 +123,9 @@ form_active_text_color = (BLUE,WHITE,OFF) # Form text color form_text_color = (CYAN,BLUE,ON) + +# Readonly form item color +form_item_readonly_color = (CYAN,WHITE,ON) + +# Dialog box gauge color +gauge_color = (BLUE,WHITE,ON) diff --git a/contrib/dialog/samples/sourcemage.rc b/contrib/dialog/samples/sourcemage.rc index bf187ea..1ba826f 100644 --- a/contrib/dialog/samples/sourcemage.rc +++ b/contrib/dialog/samples/sourcemage.rc @@ -1,4 +1,5 @@ -# $Id: sourcemage.rc,v 1.3 2005/12/01 01:20:45 tom Exp $ +# $Id: sourcemage.rc,v 1.4 2011/01/17 00:14:25 tom Exp $ +# vile:confmode # Run-time configuration file for dialog, matches SourceMage color scheme. # # Types of values: @@ -121,3 +122,9 @@ form_active_text_color = (BLACK,WHITE,OFF) # Form text color form_text_color = (RED,BLACK,ON) + +# Readonly form item color +form_item_readonly_color = (CYAN,WHITE,ON) + +# Dialog box gauge color +gauge_color = (BLUE,WHITE,ON) diff --git a/contrib/dialog/samples/suse.rc b/contrib/dialog/samples/suse.rc index 233157d..f2417b2 100644 --- a/contrib/dialog/samples/suse.rc +++ b/contrib/dialog/samples/suse.rc @@ -1,4 +1,5 @@ -# $Id: suse.rc,v 1.2 2007/02/25 17:49:12 tom Exp $ +# $Id: suse.rc,v 1.3 2011/01/17 00:15:27 tom Exp $ +# vile:confmode # Run-time configuration file for dialog, matches SuSE color scheme. # # Types of values: @@ -124,3 +125,6 @@ form_text_color = (WHITE,CYAN,ON) # Readonly form item color form_item_readonly_color = (CYAN,WHITE,ON) + +# Dialog box gauge color +gauge_color = (BLUE,WHITE,ON) diff --git a/contrib/dialog/samples/textbox-both b/contrib/dialog/samples/textbox-both new file mode 100755 index 0000000..7875153 --- /dev/null +++ b/contrib/dialog/samples/textbox-both @@ -0,0 +1,21 @@ +#!/bin/sh +# $Id: textbox-both,v 1.1 2011/01/18 09:59:47 tom Exp $ + +. ./setup-vars + +. ./setup-tempfile + +TEXT=/usr/share/common-licenses/GPL +test -f $TEXT || TEXT=../COPYING + +cat textbox.txt | expand > $tempfile +cat $TEXT | expand >> $tempfile + +$DIALOG --clear --title "TEXT BOX" \ + --help-button \ + --extra-button "$@" \ + --textbox "$tempfile" 22 77 + +retval=$? + +. ./report-button diff --git a/contrib/dialog/samples/textbox-help b/contrib/dialog/samples/textbox-help new file mode 100755 index 0000000..cb30253 --- /dev/null +++ b/contrib/dialog/samples/textbox-help @@ -0,0 +1,20 @@ +#!/bin/sh +# $Id: textbox-help,v 1.1 2011/01/18 09:59:20 tom Exp $ + +. ./setup-vars + +. ./setup-tempfile + +TEXT=/usr/share/common-licenses/GPL +test -f $TEXT || TEXT=../COPYING + +cat textbox.txt | expand > $tempfile +cat $TEXT | expand >> $tempfile + +$DIALOG --clear --title "TEXT BOX" \ + --help-button "$@" \ + --textbox "$tempfile" 22 77 + +retval=$? + +. ./report-button diff --git a/contrib/dialog/samples/whiptail.rc b/contrib/dialog/samples/whiptail.rc index 47d5032..8515012 100644 --- a/contrib/dialog/samples/whiptail.rc +++ b/contrib/dialog/samples/whiptail.rc @@ -1,5 +1,13 @@ -# $Id: whiptail.rc,v 1.2 2005/12/01 01:21:31 tom Exp $ +# $Id: whiptail.rc,v 1.3 2011/01/17 00:15:54 tom Exp $ +# vile:confmode # Run-time configuration file for dialog, matches whiptail's color scheme. +# +# Types of values: +# +# Number - <number> +# String - "string" +# Boolean - <ON|OFF> +# Attribute - (foreground,background,highlight?) # Set aspect-ration. aspect = 0 @@ -114,3 +122,9 @@ form_active_text_color = (WHITE,BLUE,ON) # Form text color form_text_color = (WHITE,CYAN,ON) + +# Readonly form item color +form_item_readonly_color = (CYAN,WHITE,ON) + +# Dialog box gauge color +gauge_color = (BLUE,WHITE,ON) |