diff options
author | Yasumichi Akahoshi <yasumichi@vinelinux.org> | 2011-11-19 02:55:00 +0900 |
---|---|---|
committer | Tiffany Antopolski <tiffany.antopolski@gmail.com> | 2011-12-17 13:23:47 -0500 |
commit | f1bf713d0fcd86d38b119d95b276f67245123810 (patch) | |
tree | 0c6fe0869ff8d74b15850cdb15c4c0975c45f373 | |
parent | Updated Turkish translation (diff) | |
download | zenity-f1bf713d0fcd86d38b119d95b276f67245123810.tar.gz zenity-f1bf713d0fcd86d38b119d95b276f67245123810.tar.bz2 zenity-f1bf713d0fcd86d38b119d95b276f67245123810.zip |
Add mallard pages and update screenshots.
Signed-off-by: Yasumichi Akahoshi <yasumichi@vinelinux.org>
-rw-r--r-- | help/C/calendar.page | 68 | ||||
-rw-r--r-- | help/C/color-selection.page | 55 | ||||
-rw-r--r-- | help/C/entry.page | 57 | ||||
-rw-r--r-- | help/C/error.page | 30 | ||||
-rw-r--r-- | help/C/figures/zenity-colorselection-screenshot.png | bin | 0 -> 35025 bytes | |||
-rw-r--r-- | help/C/figures/zenity-forms-screenshot.png | bin | 0 -> 10000 bytes | |||
-rw-r--r-- | help/C/figures/zenity-password-screenshot.png | bin | 0 -> 5933 bytes | |||
-rw-r--r-- | help/C/figures/zenity-scale-screenshot.png | bin | 0 -> 4907 bytes | |||
-rw-r--r-- | help/C/file-selection.page | 70 | ||||
-rw-r--r-- | help/C/forms.page | 83 | ||||
-rw-r--r-- | help/C/index.page | 25 | ||||
-rw-r--r-- | help/C/info.page | 30 | ||||
-rw-r--r-- | help/C/intro.page | 34 | ||||
-rw-r--r-- | help/C/list.page | 86 | ||||
-rw-r--r-- | help/C/message.page | 18 | ||||
-rw-r--r-- | help/C/notification.page | 39 | ||||
-rw-r--r-- | help/C/password.page | 50 | ||||
-rw-r--r-- | help/C/progress.page | 79 | ||||
-rw-r--r-- | help/C/question.page | 30 | ||||
-rw-r--r-- | help/C/scale.page | 80 | ||||
-rw-r--r-- | help/C/text.page | 85 | ||||
-rw-r--r-- | help/C/usage.page | 292 | ||||
-rw-r--r-- | help/C/warning.page | 30 |
23 files changed, 1241 insertions, 0 deletions
diff --git a/help/C/calendar.page b/help/C/calendar.page new file mode 100644 index 00000000..cd2191c2 --- /dev/null +++ b/help/C/calendar.page @@ -0,0 +1,68 @@ +<page xmlns="http://projectmallard.org/1.0/" + type="topic" + id="calendar"> + <info> + <link type="guide" xref="index#dialogs"/> + <desc>Use the <cmd>--calendar</cmd> option.</desc> + </info> + <title>Calendar Dialog</title> + <p> + Use the <cmd>--calendar</cmd> option to create a calendar dialog. Zenity returns the selected date to standard output. If no date is specified on the command line, the dialog uses the current date. + </p> + <p> + The calendar dialog supports the following options: + </p> + + <terms> + + <item> + <title><cmd>--text</cmd>=<var>text</var></title> + <p>Specifies the text that is displayed in the calendar dialog.</p> + </item> + + <item> + <title><cmd>--day</cmd>=<var>day</var></title> + <p>Specifies the day that is selected in the calendar dialog. day must be a number between 1 and 31 inclusive.</p> + </item> + + <item> + <title><cmd>--month</cmd>=<var>month</var></title> + <p>Specifies the month that is selected in the calendar dialog. month must be a number between 1 and 12 inclusive.</p> + </item> + + <item> + <title><cmd>--year</cmd>=<var>year</var></title> + <p>Specifies the year that is selected in the calendar dialog.</p> + </item> + + <item> + <title><cmd>--date-format</cmd>=<var>format</var></title> + <p>Specifies the format that is returned from the calendar dialog after date selection. The default format depends on your locale. Format must be a format that is acceptable to the <cmd>strftime</cmd> function, for example <var>%A %d/%m/%y</var>.</p> + </item> + + </terms> + + <p> + The following example script shows how to create a calendar dialog: + </p> + +<code> +#!/bin/sh + + +if zenity --calendar \ +--title="Select a Date" \ +--text="Click on a date to select that date." \ +--day=10 --month=8 --year=2004 + then echo $? + else echo "No date selected" +fi +</code> + + + <figure id="zenity-calendar-screenshot"> + <title>Calendar Dialog Example</title> + <desc>Zenity calendar dialog example</desc> + <media type="image" mime="image/png" src="figures/zenity-calendar-screenshot.png"/> + </figure> +</page> diff --git a/help/C/color-selection.page b/help/C/color-selection.page new file mode 100644 index 00000000..55402b92 --- /dev/null +++ b/help/C/color-selection.page @@ -0,0 +1,55 @@ +<page xmlns="http://projectmallard.org/1.0/" + type="topic" + id="color-selection"> + <info> + <link type="guide" xref="index#dialogs"/> + <desc>Use the <cmd>--color-selection</cmd> option.</desc> + </info> + <title>Color Selection Dialog</title> + <p> + Use the <cmd>--color-selection</cmd> option to create a color selection dialog. + </p> + <p> + The color selection dialog supports the following options: + </p> + + <terms> + + <item> + <title><cmd>--color</cmd>=<var>VALUE</var></title> + <p>Set the initial color.(ex: #FF0000)</p> + </item> + + <item> + <title><cmd>--show-palette</cmd></title> + <p>Show the palette.</p> + </item> + + </terms> + + <p> + The following example script shows how to create a color selection dialog: + </p> + +<code> +#!/bin/sh + +COLOR=`zenity --color-selection --show-palette` + +case $? in + 0) + echo "You selected $COLOR.";; + 1) + echo "No color selected.";; + -1) + echo "An unexpected error has occurred.";; +esac +</code> + + <figure id="zenity-colorselection-screenshot"> + <title>Password Entry Dialog Example</title> + <desc><app>Zenity</app> password entry dialog example</desc> + <media type="image" mime="image/png" src="figures/zenity-colorselection-screenshot.png"/> + </figure> + +</page> diff --git a/help/C/entry.page b/help/C/entry.page new file mode 100644 index 00000000..69ad4641 --- /dev/null +++ b/help/C/entry.page @@ -0,0 +1,57 @@ +<page xmlns="http://projectmallard.org/1.0/" + type="topic" + id="entry"> + <info> + <link type="guide" xref="index#dialogs"/> + <desc>Use the <cmd>--entry</cmd> option.</desc> + </info> + <title>Text Entry Dialog</title> + <p> + Use the <cmd>--entry</cmd> option to create a text entry dialog. <app>Zenity</app> returns the contents of the text entry to standard output. + </p> + <p> + The text entry dialog supports the following options: + </p> + + <terms> + + <item> + <title><cmd>--text</cmd>=<var>text</var></title> + <p>Specifies the text that is displayed in the text entry dialog.</p> + </item> + + <item> + <title><cmd>--entry-text</cmd>=<var>text</var></title> + <p>Specifies the text that is displayed in the entry field of the text entry dialog.</p> + </item> + + <item> + <title><cmd>--hide-text</cmd></title> + <p>Hides the text in the entry field of the text entry dialog.</p> + </item> + + </terms> + + <p> + The following example script shows how to create a text entry dialog: + </p> + +<code> +#!/bin/sh + +if zenity --entry \ +--title="Add new profile" \ +--text="Enter name of new profile:" \ +--entry-text "NewProfile" + then echo $? + else echo "No name entered" +fi +</code> + + + <figure id="zenity-entry-screenshot"> + <title>Text Entry Dialog Example</title> + <desc><app>Zenity</app> text entry dialog example</desc> + <media type="image" mime="image/png" src="figures/zenity-entry-screenshot.png"/> + </figure> +</page> diff --git a/help/C/error.page b/help/C/error.page new file mode 100644 index 00000000..5c9113ac --- /dev/null +++ b/help/C/error.page @@ -0,0 +1,30 @@ +<page xmlns="http://projectmallard.org/1.0/" + type="topic" + id="error"> + <info> + <link type="guide" xref="message"/> + <desc>Use the <cmd>--error</cmd> option.</desc> + </info> + <title>Error Dialog</title> + <p> + Use the <cmd>--error</cmd> option to create an error dialog. + </p> + + <p> + The following example script shows how to create an error dialog: + </p> + +<code> +#!/bin/bash + +zenity --error \ +--text="Could not find /var/log/syslog." +</code> + + + <figure id="zenity-error-screenshot"> + <title>Error Dialog Example</title> + <desc><app>Zenity</app> error dialog example</desc> + <media type="image" mime="image/png" src="figures/zenity-error-screenshot.png"/> + </figure> +</page> diff --git a/help/C/figures/zenity-colorselection-screenshot.png b/help/C/figures/zenity-colorselection-screenshot.png Binary files differnew file mode 100644 index 00000000..bd9c9bba --- /dev/null +++ b/help/C/figures/zenity-colorselection-screenshot.png diff --git a/help/C/figures/zenity-forms-screenshot.png b/help/C/figures/zenity-forms-screenshot.png Binary files differnew file mode 100644 index 00000000..70e50eb5 --- /dev/null +++ b/help/C/figures/zenity-forms-screenshot.png diff --git a/help/C/figures/zenity-password-screenshot.png b/help/C/figures/zenity-password-screenshot.png Binary files differnew file mode 100644 index 00000000..987394cb --- /dev/null +++ b/help/C/figures/zenity-password-screenshot.png diff --git a/help/C/figures/zenity-scale-screenshot.png b/help/C/figures/zenity-scale-screenshot.png Binary files differnew file mode 100644 index 00000000..902db1f8 --- /dev/null +++ b/help/C/figures/zenity-scale-screenshot.png diff --git a/help/C/file-selection.page b/help/C/file-selection.page new file mode 100644 index 00000000..0ec8c5bd --- /dev/null +++ b/help/C/file-selection.page @@ -0,0 +1,70 @@ +<page xmlns="http://projectmallard.org/1.0/" + type="topic" + id="file-selection"> + <info> + <link type="guide" xref="index#dialogs"/> + <desc>Use the <cmd>--file-selection</cmd> option.</desc> + </info> + <title>File Selection Dialog</title> + <p> + Use the <cmd>--file-selection</cmd> option to create a file selection dialog. <app>Zenity</app> returns the selected files or directories to standard + output. The default mode of the file selection dialog is open. + </p> + <p> + The file selection dialog supports the following options: + </p> + + <terms> + + <item> + <title><cmd>--filename</cmd>=<var>filename</var></title> + <p>Specifies the file or directory that is selected in the file selection dialog when the dialog is first shown.</p> + </item> + + <item> + <title><cmd>--multiple</cmd></title> + <p>Allows the selection of multiple filenames in the file selection dialog.</p> + </item> + + <item> + <title><cmd>--directory</cmd></title> + <p>Allows only selection of directories in the file selection dialog.</p> + </item> + + <item> + <title><cmd>--save</cmd></title> + <p>Set the file selection dialog into save mode.</p> + </item> + + <item> + <title><cmd>--separator</cmd>=<var>separator</var></title> + <p>Specifies the string that is used to divide the returned list of filenames.</p> + </item> + + </terms> + + <p> + The following example script shows how to create a file selection dialog: + </p> + +<code> +#!/bin/sh + +FILE=`zenity --file-selection --title="Select a File"` + +case $? in + 0) + echo "\"$FILE\" selected.";; + 1) + echo "No file selected.";; + -1) + echo "An unexpected error has occurred.";; +esac +</code> + + <figure id="zenity-fileselection-screenshot"> + <title>File Selection Dialog Example</title> + <desc><app>Zenity</app> file selection dialog example</desc> + <media type="image" mime="image/png" src="figures/zenity-fileselection-screenshot.png"/> + </figure> +</page> diff --git a/help/C/forms.page b/help/C/forms.page new file mode 100644 index 00000000..fcf6c657 --- /dev/null +++ b/help/C/forms.page @@ -0,0 +1,83 @@ +<page xmlns="http://projectmallard.org/1.0/" + type="topic" + id="forms"> + <info> + <link type="guide" xref="index#dialogs"/> + <desc>Use the <cmd>--forms</cmd> option.</desc> + </info> + <title>Forms Dialog</title> + <p> + Use the <cmd>--forms</cmd> option to create a forms dialog. + </p> + + <p> + The forms dialog supports the following options: + </p> + + <terms> + + <item> + <title><cmd>--add-entry</cmd>=<var>FieldName</var></title> + <p>Add a new Entry in forms dialog.</p> + </item> + + <item> + <title>--add-password<cmd></cmd>=<var>FieldName</var></title> + <p>Add a new Password Entry in forms dialog. (Hide text)</p> + </item> + + <item> + <title><cmd>--add-calendar</cmd>=<var>FieldName</var></title> + <p>Add a new Calendar in forms dialog.</p> + </item> + + <item> + <title><cmd>--text</cmd>=<var>TEXT</var></title> + <p>Set the dialog text.</p> + </item> + + <item> + <title><cmd>--separator</cmd>=<var>SEPARATOR</var></title> + <p>Set output separator character. (Default: | )</p> + </item> + + <item> + <title><cmd>--forms-date-format</cmd>=<var>PATTERN</var></title> + <p>Set the format for the returned date. The default format depends on your locale. format must be a Format that is acceptable to the <cmd>strftime</cmd> function, for example <var>%A %d/%m/%y</var>.</p> + </item> + + </terms> + + <p> + The following example script shows how to create a forms dialog: + </p> + +<code> +#!/bin/sh + +zenity --forms --title="Add Friend" \ + --text="Enter information about your friend." \ + --separator="," \ + --add-entry="First Name" \ + --add-entry="Family Name" \ + --add-entry="Email" \ + --add-calendar="Birthday" >> addr.csv + +case $? in + 0) + echo "Friend added.";; + 1) + echo "No friend added." + ;; + -1) + echo "An unexpected error has occurred." + ;; +esac +</code> + + <figure id="zenity-forms-screenshot"> + <title>Forms Dialog Example</title> + <desc><app>Zenity</app> forms dialog example</desc> + <media type="image" mime="image/png" src="figures/zenity-forms-screenshot.png"/> + </figure> +</page> diff --git a/help/C/index.page b/help/C/index.page new file mode 100644 index 00000000..96a9cd0d --- /dev/null +++ b/help/C/index.page @@ -0,0 +1,25 @@ +<page xmlns="http://projectmallard.org/1.0/" + type="guide" + id="index"> +<info> + <credit type="author"> + <name>Sun Java Desktop System Documentation Team</name> + </credit> + <credit type="author"> + <name>Glynn Foster</name> + </credit> + <credit type="editor"> + <name>Nicholas Curran</name> + <email></email> + </credit> + <credit type="editor"> + <name>Yasumichi Akahoshi</name> + <email>yasumichi@vinelinux.org</email> + </credit> +</info> +<title>Zenity Manual</title> +<!--links type="topic" groups="dialogs" /--> +<section id="dialogs" style="2column"> + <title>Dialogs</title> +</section> +</page> diff --git a/help/C/info.page b/help/C/info.page new file mode 100644 index 00000000..1ea62324 --- /dev/null +++ b/help/C/info.page @@ -0,0 +1,30 @@ +<page xmlns="http://projectmallard.org/1.0/" + type="topic" + id="info"> + <info> + <link type="guide" xref="message"/> + <desc>Use the <cmd>--info</cmd> option.</desc> + </info> + <title>Info Dialog</title> + <p> + Use the <cmd>--info</cmd> option to create an information dialog. + </p> + + <p> + The following example script shows how to create an information dialog: + </p> + +<code> +#!/bin/bash + +zenity --info \ +--text="Merge complete. Updated 3 of 10 files." +</code> + + + <figure id="zenity-information-screenshot"> + <title>Information Dialog Example</title> + <desc><app>Zenity</app> information dialog example</desc> + <media type="image" mime="image/png" src="figures/zenity-information-screenshot.png"/> + </figure> +</page> diff --git a/help/C/intro.page b/help/C/intro.page new file mode 100644 index 00000000..8a7bdec1 --- /dev/null +++ b/help/C/intro.page @@ -0,0 +1,34 @@ +<page xmlns="http://projectmallard.org/1.0/" + type="topic" + id="introduction"> +<info> + <link type="guide" xref="index"/> + <desc><app>Zenity</app> enables you to create the various types of simple dialog.</desc> +</info> +<title>Introduction</title> +<p> + <app>Zenity</app> enables you to create the following types of simple dialog: +</p> + +<list> + <item><p>Calendar</p></item> + <item><p>File selection</p></item> + <item><p>Forms</p></item> + <item><p>List</p></item> + <item><p>Notification icon</p></item> + <item><p>Message</p> + <list> + <item><p>Error</p></item> + <item><p>Information</p></item> + <item><p>Question</p></item> + <item><p>Warning</p></item> + </list> + </item> + <item><p>Password entry</p></item> + <item><p>Progress</p></item> + <item><p>Text entry</p></item> + <item><p>Text information</p></item> + <item><p>Scale</p></item> + <item><p>Color selection</p></item> +</list> +</page> diff --git a/help/C/list.page b/help/C/list.page new file mode 100644 index 00000000..39e86cd4 --- /dev/null +++ b/help/C/list.page @@ -0,0 +1,86 @@ +<page xmlns="http://projectmallard.org/1.0/" + type="topic" + id="list"> + <info> + <link type="guide" xref="index#dialogs"/> + <desc>Use the <cmd>--list</cmd> option.</desc> + </info> + <title>List Dialog</title> + <p> + Use the <cmd>--list</cmd> option to create a list dialog. <app>Zenity</app> returns the entries in the first column of text of selected rows to standard output. + </p> + + <p> + Data for the dialog must specified column by column, row by row. Data can be provided to the dialog through standard input. Each entry must be separated by a newline character. + </p> + + <p> + If you use the <cmd>--checklist</cmd> or <cmd>--radiolist</cmd> options, each row must start with either 'TRUE' or 'FALSE'. + </p> + + <p> + The list dialog supports the following options: + </p> + + <terms> + + <item> + <title><cmd>--column</cmd>=<var>column</var></title> + <p>Specifies the column headers that are displayed in the list dialog. You must specify a <cmd>--column</cmd> option for each column that you want to display in the dialog. + </p> + </item> + + <item> + <title><cmd>--checklist</cmd></title> + <p>Specifies that the first column in the list dialog contains check boxes. + </p> + </item> + + <item> + <title><cmd>--radiolist</cmd></title> + <p>Specifies that the first column in the list dialog contains radio boxes. + </p> + </item> + + <item> + <title><cmd>--editable</cmd></title> + <p>Allows the displayed items to be edited. + </p> + </item> + + <item> + <title><cmd>--separator</cmd>=<var>separator</var></title> + <p>Specifies what string is used when the list dialog returns the selected entries. + </p> + </item> + + <item> + <title><cmd>--print-column</cmd>=<var>column</var></title> + <p>Specifies what column should be printed out upon selection. The default column is + '1'. 'ALL' can be used to print out all columns in the list. + </p> + </item> + + </terms> + + <p> + The following example script shows how to create a list dialog: + </p> +<code> +#!/bin/sh + +zenity --list \ + --title="Choose the Bugs You Wish to View" \ + --column="Bug Number" --column="Severity" --column="Description" \ + 992383 Normal "GtkTreeView crashes on multiple selections" \ + 293823 High "GNOME Dictionary does not handle proxy" \ + 393823 Critical "Menu editing does not work in GNOME 2.0" +</code> + + + <figure id="zenity-list-screenshot"> + <title>List Dialog Example</title> + <desc><app>Zenity</app> list dialog example</desc> + <media type="image" mime="image/png" src="figures/zenity-list-screenshot.png"/> + </figure> +</page> diff --git a/help/C/message.page b/help/C/message.page new file mode 100644 index 00000000..a375efa7 --- /dev/null +++ b/help/C/message.page @@ -0,0 +1,18 @@ +<page xmlns="http://projectmallard.org/1.0/" + type="guide" + id="message"> + <info> + <link type="guide" xref="index#dialogs" group="message"/> + <desc> + <link xref="error">Error</link>, + <link xref="info">Info</link>, + <link xref="question">Question</link>, + <link xref="warning">Warning</link> + </desc> + </info> + <title>Message Dialog</title> + <p> +For each type, use the <cmd>--text</cmd> option to specify the text that is displayed in the dialog. + </p> + <links type="topic" style="2column"/> +</page> diff --git a/help/C/notification.page b/help/C/notification.page new file mode 100644 index 00000000..ac556378 --- /dev/null +++ b/help/C/notification.page @@ -0,0 +1,39 @@ +<page xmlns="http://projectmallard.org/1.0/" + type="topic" + id="notification"> + <info> + <link type="guide" xref="index#dialogs"/> + <desc>Use the <cmd>--notification</cmd> option.</desc> + </info> + <title>Notification Icon</title> + <p> + Use the <cmd>--notification</cmd> option to create a notification icon. + </p> + + <terms> + + <item> + <title><cmd>--text</cmd>=<var>text</var></title> + <p>Specifies the text that is displayed in the notification area.</p> + </item> + + </terms> + + <p> + The following example script shows how to create a notification icon: + </p> +<code> +#!/bin/sh + +zenity --notification\ + --window-icon="info" \ + --text="There are system updates necessary!" +</code> + + + <figure id="zenity-notification-screenshot"> + <title>Notification Icon Example</title> + <desc><app>Zenity</app> notification icon example</desc> + <media type="image" mime="image/png" src="figures/zenity-notification-screenshot.png"/> + </figure> +</page> diff --git a/help/C/password.page b/help/C/password.page new file mode 100644 index 00000000..22094d89 --- /dev/null +++ b/help/C/password.page @@ -0,0 +1,50 @@ +<page xmlns="http://projectmallard.org/1.0/" + type="topic" + id="password"> + <info> + <link type="guide" xref="index#dialogs"/> + <desc>Use the <cmd>--password</cmd> option.</desc> + </info> + <title>Password Dialog</title> + <p> + Use the <cmd>--password</cmd> option to create a password entry dialog. + </p> + <p> + The password entry dialog supports the following options: + </p> + + <terms> + <item> + <title><cmd>--username</cmd></title> + <p>Display the username field.</p> + </item> + </terms> + + <p> + The following example script shows how to create a password entry dialog: + </p> + +<code> +#!/bin/sh + +ENTRY=`zenity --password --username` + +case $? in + 0) + echo "User Name: `echo $ENTRY | cut -d'|' -f1`" + echo "Password : `echo $ENTRY | cut -d'|' -f2`" + ;; + 1) + echo "Stop login.";; + -1) + echo "An unexpected error has occurred.";; +esac +</code> + + <figure id="zenity-password-screenshot"> + <title>Password Entry Dialog Example</title> + <desc><app>Zenity</app> password entry dialog example</desc> + <media type="image" mime="image/png" src="figures/zenity-password-screenshot.png"/> + </figure> + +</page> diff --git a/help/C/progress.page b/help/C/progress.page new file mode 100644 index 00000000..caabb16a --- /dev/null +++ b/help/C/progress.page @@ -0,0 +1,79 @@ +<page xmlns="http://projectmallard.org/1.0/" + type="topic" + id="progress"> + <info> + <link type="guide" xref="index#dialogs"/> + <desc>Use the <cmd>--progress</cmd> option.</desc> + </info> + <title>Progress Dialog</title> + <p> + Use the <cmd>--progress</cmd> option to create a progress dialog. + </p> + + <p> + <app>Zenity</app> reads data from standard input line by line. If a line is prefixed with #, the text is updated with the text on that line. If a line contains only a number, the percentage is updated with that number. + </p> + + <p> + The progress dialog supports the following options: + </p> + + <terms> + + <item> + <title><cmd>--text</cmd>=<var>text</var></title> + <p>Specifies the text that is displayed in the progress dialog.</p> + </item> + + <item> + <title><cmd>--percentage</cmd>=<var>percentage</var></title> + <p>Specifies the initial percentage that is set in the progress dialog.</p> + </item> + + <item> + <title><cmd>--auto-close</cmd></title> + <p>Closes the progress dialog when 100% has been reached.</p> + </item> + + <item> + <title><cmd>--pulsate</cmd></title> + <p>Specifies that the progress bar pulsates until an EOF character is read from standard input.</p> + </item> + + </terms> + + <p> + The following example script shows how to create a progress dialog: + </p> + +<code> +#!/bin/sh +( +echo "10" ; sleep 1 +echo "# Updating mail logs" ; sleep 1 +echo "20" ; sleep 1 +echo "# Resetting cron jobs" ; sleep 1 +echo "50" ; sleep 1 +echo "This line will just be ignored" ; sleep 1 +echo "75" ; sleep 1 +echo "# Rebooting system" ; sleep 1 +echo "100" ; sleep 1 +) | +zenity --progress \ + --title="Update System Logs" \ + --text="Scanning mail logs..." \ + --percentage=0 + +if [ "$?" = -1 ] ; then + zenity --error \ + --text="Update canceled." +fi +</code> + + + <figure id="zenity-progress-screenshot"> + <title>Progress Dialog Example</title> + <desc><app>Zenity</app> progress dialog example</desc> + <media type="image" mime="image/png" src="figures/zenity-progress-screenshot.png"/> + </figure> +</page> diff --git a/help/C/question.page b/help/C/question.page new file mode 100644 index 00000000..6e435c57 --- /dev/null +++ b/help/C/question.page @@ -0,0 +1,30 @@ +<page xmlns="http://projectmallard.org/1.0/" + type="topic" + id="question"> + <info> + <link type="guide" xref="message"/> + <desc>Use the <cmd>--question</cmd> option.</desc> + </info> + <title>Question Dialog</title> + <p> + Use the <cmd>--question</cmd> option to create a question dialog. + </p> + + <p> + The following example script shows how to create a question dialog: + </p> + +<code> +#!/bin/bash + +zenity --question \ +--text="Are you sure you wish to proceed?" +</code> + + + <figure id="zenity-question-screenshot"> + <title>Question Dialog Example</title> + <desc><app>Zenity</app> question dialog example</desc> + <media type="image" mime="image/png" src="figures/zenity-question-screenshot.png"/> + </figure> +</page> diff --git a/help/C/scale.page b/help/C/scale.page new file mode 100644 index 00000000..7d35b533 --- /dev/null +++ b/help/C/scale.page @@ -0,0 +1,80 @@ +<page xmlns="http://projectmallard.org/1.0/" + type="topic" + id="scale"> + <info> + <link type="guide" xref="index#dialogs"/> + <desc>Use the <cmd>--scale</cmd> option.</desc> + </info> + <title>Scale Dialog</title> + <p> + Use the <cmd>--scale</cmd> option to create a scale dialog. + </p> + <p> + The scale dialog supports the following options: + </p> + + <terms> + + <item> + <title><cmd>--text</cmd>=<var>TEXT</var></title> + <p>Set the dialog text. (Default: Adjust the scale value)</p> + </item> + + <item> + <title><cmd>--value</cmd>=<var>VALUE</var></title> + <p>Set initial value. (Default: 0) You must specify value between minimum value to maximum value.</p> + </item> + + <item> + <title><cmd>--min-value</cmd>=<var>VALUE</var></title> + <p>Set minimum value. (Default: 0)</p> + </item> + + <item> + <title><cmd>--max-value</cmd>=<var>VALUE</var></title> + <p>Set maximum value. (Default: 100)</p> + </item> + + <item> + <title><cmd>--step</cmd>=<var>VALUE</var></title> + <p>Set step size. (Default: 1)</p> + </item> + + <item> + <title><cmd>--print-partial</cmd></title> + <p>Print value to standard output, whenever a value is changed. </p> + </item> + + <item> + <title><cmd>--hide-value</cmd></title> + <p>Hide value on dialog.</p> + </item> + + </terms> + + <p> + The following example script shows how to create a scale dialog: + </p> + +<code> +#!/bin/sh + +VALUE=`zenity --scale --text="Select window transparency." --value=50` + +case $? in + 0) + echo "You selected $VALUE%.";; + 1) + echo "No value selected.";; + -1) + echo "An unexpected error has occurred.";; +esac +</code> + + <figure id="zenity-scale-screenshot"> + <title>Password Entry Dialog Example</title> + <desc><app>Zenity</app> password entry dialog example</desc> + <media type="image" mime="image/png" src="figures/zenity-scale-screenshot.png"/> + </figure> + +</page> diff --git a/help/C/text.page b/help/C/text.page new file mode 100644 index 00000000..f01166ec --- /dev/null +++ b/help/C/text.page @@ -0,0 +1,85 @@ +<page xmlns="http://projectmallard.org/1.0/" + type="topic" + id="text"> + <info> + <link type="guide" xref="index#dialogs"/> + <desc>Use the <cmd>--text-info</cmd> option.</desc> + </info> + <title>Text Information Dialog</title> + <p> + Use the <cmd>--text-info</cmd> option to create a text information dialog. + </p> + + <p> + The text information dialog supports the following options: + </p> + + <terms> + + <item> + <title><cmd>--filename</cmd>=<var>filename</var></title> + <p>Specifies a file that is loaded in the text information dialog.</p> + </item> + + <item> + <title><cmd>--editable</cmd></title> + <p>Allows the displayed text to be edited. The edited text is returned to standard output when the dialog is closed.</p> + </item> + + <item> + <title><cmd>--font</cmd>=<var>FONT</var></title> + <p>Specifies the text font.</p> + </item> + + <item> + <title><cmd>--checkbox</cmd>=<var>TEXT</var></title> + <p>Enable a checkbox for use like a 'I read and accept the terms.'</p> + </item> + + <item> + <title><cmd>--html</cmd></title> + <p>Enable html support.</p> + </item> + + <item> + <title><cmd>--url</cmd>=<var>URL</var></title> + <p>Sets an url instead of a file. Only works if you use --html option.</p> + </item> + + </terms> + + <p> + The following example script shows how to create a text information dialog: + </p> + +<code> +#!/bin/sh + +# You must place file "COPYING" in same folder of this script. +FILE=`dirname $0`/COPYING + +zenity --text-info \ + --title="License" \ + --filename=$FILE \ + --checkbox="I read and accept the terms." + +case $? in + 0) + echo "Start installation!" + # next step + ;; + 1) + echo "Stop installation!" + ;; + -1) + echo "An unexpected error has occurred." + ;; +esac +</code> + + <figure id="zenity-text-screenshot"> + <title>Text Information Dialog Example</title> + <desc><app>Zenity</app> text information dialog example</desc> + <media type="image" mime="image/png" src="figures/zenity-text-screenshot.png"/> + </figure> +</page> diff --git a/help/C/usage.page b/help/C/usage.page new file mode 100644 index 00000000..6aab6005 --- /dev/null +++ b/help/C/usage.page @@ -0,0 +1,292 @@ +<page xmlns="http://projectmallard.org/1.0/" + type="topic" + id="usage"> +<info> + <link type="guide" xref="index"/> + <desc>You can use <app>Zenity</app> to create simple dialogs that interact graphically with the user.</desc> +</info> +<title>Usage</title> + <p> + When you write scripts, you can use <app>Zenity</app> to create simple dialogs that interact graphically with the user, as follows: + </p> + <list> + <item> + <p> + You can create a dialog to obtain information from the user. For example, you can prompt the user to select a date from a calendar dialog, or to select a file from a file selection dialog. + </p> + </item> + <item> + <p> + You can create a dialog to provide the user with information. For example, you can use a progress dialog to indicate the current status of an operation, or use a warning message dialog to alert the user. + </p> + </item> + </list> + <p> + When the user closes the dialog, <app>Zenity</app> prints the text produced by the dialog to standard output. + </p> + + <note> + <p> + When you write <app>Zenity</app> commands, ensure that you place quotation marks around each argument. + </p> + <p>For example, use:</p> + <screen>zenity --calendar --title="Holiday Planner"</screen> + <p>Do not use:</p> + <screen>zenity --calendar --title=Holiday Planner</screen> + <p> + If you do not use quotation marks, you might get unexpected results. + </p> + </note> + + <section id="zenity-usage-mnemonics"> + <title>Access Keys</title> + <p> + An access key is a key that enables you to perform an action from the keyboard rather than use the mouse to choose a command from a menu or dialog. Each access key is identified by an underlined letter on a menu or dialog option. + </p> + <p> + Some <app>Zenity</app> dialogs support the use of access keys. To specify the character to use as the access key, place an underscore before that character in the text of the dialog. The following example shows how to specify the letter 'C' as the access key: + </p> + <screen><input>"_Choose a name".</input></screen> + </section> + + <section id="zenity-usage-exitcodes"> + <title>Exit Codes</title> + <p> + Zenity returns the following exit codes: + </p> + + <table frame="all" rules="all"> + <thead> + <tr valign="top"> + <td colname="COLSPEC0"> + <p>Exit Code</p></td> + <td colname="COLSPEC1"> + <p>Description</p></td> + </tr> + </thead> + <tbody> + <tr valign="top"> + <td> + <p><var>0</var></p> + </td> + <td> + <p>The user has pressed either <gui style="button">OK</gui> or <gui style="button">Close</gui>.</p> + </td> + </tr> + <tr valign="top"> + <td> + <p><var>1</var></p> + </td> + <td> + <p>The user has either pressed <gui style="button">Cancel</gui>, or used the window functions to close the dialog.</p> + </td> + </tr> + <tr valign="top"> + <td> + <p><var>-1</var></p> + </td> + <td> + <p>An unexpected error has occurred.</p> + </td> + </tr> + <tr valign="top"> + <td> + <p><var>5</var></p> + </td> + <td> + <p>The dialog has been closed because the timeout has been reached.</p> + </td> + </tr> + </tbody> + </table> + + </section> + + + <!-- ==== General Options ====== --> + + <section id="zenity-usage-general-options"> + <title>General Options</title> + + <p> + All Zenity dialogs support the following general options: + </p> + + <terms> + + <item> + <title><cmd>--title</cmd>=<var>title</var></title> + <p>Specifies the title of a dialog.</p> + </item> + + <item> + <title><cmd>--window-icon</cmd>=<var>icon_path</var></title> + <p>Specifies the icon that is displayed in the window frame of the dialog. There are + 4 stock icons also available by providing the following keywords - 'info', 'warning', 'question' and + 'error'. + </p> + </item> + + <item> + <title><cmd>--width</cmd>=<var>width</var></title> + <p>Specifies the width of the dialog.</p> + </item> + + <item> + <title><cmd>--height</cmd>=<var>height</var></title> + <p>Specifies the height of the dialog.</p> + </item> + + <item> + <title><cmd>--timeout</cmd>=<var>timeout</var></title> + <p>Specifies the timeout in seconds after which the dialog is closed.</p> + </item> + + </terms> + + </section> + +<!-- ==== Miscellaneous Options ====== --> + + <section id="zenity-help-options"> + <title>Help Options</title> + + <p> + Zenity provides the following help options: + </p> + + <terms> + + <item> + <title><cmd>--help</cmd></title> + <p>Displays shortened help text.</p> + </item> + + <item> + <title><cmd>--help-all</cmd></title> + <p>Displays full help text for all dialogs.</p> + </item> + + <item> + <title><cmd>--help-general</cmd></title> + <p>Displays help text for general dialog options.</p> + </item> + + <item> + <title><cmd>--help-calendar</cmd></title> + <p>Displays help text for calendar dialog options.</p> + </item> + + <item> + <title><cmd>--help-entry</cmd></title> + <p>Displays help text for text entry dialog options.</p> + </item> + + <item> + <title><cmd>--help-error</cmd></title> + <p>Displays help text for error dialog options.</p> + </item> + + <item> + <title><cmd>--help-info</cmd></title> + <p>Displays help text for information dialog options.</p> + </item> + + <item> + <title><cmd>--help-file-selection</cmd></title> + <p>Displays help text for file selection dialog options.</p> + </item> + + <item> + <title><cmd>--help-list</cmd></title> + <p>Displays help text for list dialog options.</p> + </item> + + <item> + <title><cmd>--help-notification</cmd></title> + <p>Displays help text for notification icon options.</p> + </item> + + <item> + <title><cmd>--help-progress</cmd></title> + <p>Displays help text for progress dialog options.</p> + </item> + + <item> + <title><cmd>--help-question</cmd></title> + <p>Displays help text for question dialog options.</p> + </item> + + <item> + <title><cmd>--help-warning</cmd></title> + <p>Displays help text for warning dialog options.</p> + </item> + + <item> + <title><cmd>--help-text-info</cmd></title> + <p>Displays help for text information dialog options.</p> + </item> + + <item> + <title><cmd>--help-misc</cmd></title> + <p>Displays help for miscellaneous options.</p> + </item> + + <item> + <title><cmd>--help-gtk</cmd></title> + <p>Displays help for GTK+ options.</p> + </item> + + </terms> + + </section> + +<!-- ==== Miscellaneous Options ====== --> + + <section id="zenity-miscellaneous-options"> + <title>Miscellaneous Options</title> + + <p> + Zenity also provides the following miscellaneous options: + </p> + + <terms> + + <item> + <title><cmd>--about</cmd></title> + <p>Displays the <gui>About Zenity</gui> dialog, which contains Zenity version information, copyright information, and developer information.</p> + </item> + + <item> + <title><cmd>--version</cmd></title> + <p>Displays the version number of Zenity.</p> + </item> + + </terms> + + </section> + +<!-- ==== GTK+ Options ====== --> + + <section id="zenity-gtk-options"> + <title>GTK+ Options</title> + + <p> + Zenity supports the standard GTK+ options. For more information about the GTK+ options, execute the <cmd>zenity --help-gtk</cmd> command. + </p> + + </section> + +<!-- ==== Environment variables ==== --> + + <section id="zenity-environment-variables"> + <title>Environment Variables</title> + + <p> + Normally, Zenity detects the terminal window from which it was launched + and keeps itself above that window. This behavior can be disabled by + unsetting the <var>WINDOWID</var> environment variable. + </p> + + </section> +</page> diff --git a/help/C/warning.page b/help/C/warning.page new file mode 100644 index 00000000..1b7a642f --- /dev/null +++ b/help/C/warning.page @@ -0,0 +1,30 @@ +<page xmlns="http://projectmallard.org/1.0/" + type="topic" + id="warning"> + <info> + <link type="guide" xref="message"/> + <desc>Use the <cmd>--warning</cmd> option.</desc> + </info> + <title>Warning Dialog</title> + <p> + Use the <cmd>--warning</cmd> option to create a warning dialog. + </p> + + <p> + The following example script shows how to create a warning dialog: + </p> + +<code> +#!/bin/bash + +zenity --warning \ +--text="Disconnect the power cable to avoid electrical shock." +</code> + + + <figure id="zenity-warning-screenshot"> + <title>Warning Dialog Example</title> + <desc><app>Zenity</app> warning dialog example</desc> + <media type="image" mime="image/png" src="figures/zenity-warning-screenshot.png"/> + </figure> +</page> |