zenity"> ]>
Zenity Manual 2003 Sun Microsystems GNOME Documentation Project Version 1.0 of Zenity Manual Feedback Information To report a bug or make a suggestion regarding this application or this documentation, please see the GNOME Feedback Page Glynn Foster GNOME Documentation Project 1.0 &date; Glynn Foster GNOME Documentation Project Introduction &app; allows allows you to display simple dialogs from the command line or from shell scripts. The following list of dialogs are available with &app;: --calendar Display a Calendar dialog. --entry Display a Text Entry dialog. --error Display an Error dialog. --info Display an Informational dialog. --file-selection Display a File Selection dialog. --list Display a List dialog. --progress Display a Progress dialog. --question Display a Question dialog. --text-info Display a Text Information dialog. --warning Display a Warning dialog. Basic Use &app; can only be used to create relatively simple dialogs, but is especially useful when used in scripts. When a user has completed an action requested of them, and the dialog closes, &app; prints any text specific to the dialog to standard error and an exit code is returned. Information about what text is printed to standard error will be detailed in the individual dialog sections. The following exit codes are observed by &app;: 0 The user has pressed either 'OK' or 'Close'. 1 The user has pressed either 'Cancel' or closed the dialog through the window functions. -1 An unexpected error has occurred. General Options Each dialog shares some general command line options. If these are not provided, there are some default values that depend on the type of dialog being displayed. The following list of general options are available: --title=TITLE Specify the title of a dialog. --window-icon=ICON_PATH Specify the icon that should appear in the window frame of the dialog. Calendar To create a Calendar dialog, use --calendar. &app; will return the date selected to standard error. The following list of options are also available for the Calendar dialog: --text=TEXT Specify the text to appear in the Calendar dialog. --day=DAY Specify the day to be pre-selected in the Calendar dialog. This must be a number between 1 and 31. --month=MONTH Specify the day to be pre-selected in the Calendar dialog. This must be a number between 1 and 12. --year=YEAR Specify the year to be pre-selected in the Calendar dialog. --data-format=FORMAT Specify the format to be returned from the Calendar dialog after the selection has been made. This defaults to a format depending on your locale. The format must be of strftime style eg. "%A %d/%m%y" Text Entry To create a Text Entry dialog, use --text-entry. &app; returns the contents of the text entry to standard error. The following list of options are also available for the Text Entry dialog: --text=TEXT Specify the text to appear in the Text Entry dialog. --entry-text=TEXT Specify the text to appear in the entry field of the Text Entry dialog. --hide-text Specify that the text in the entry field of the Text Entry dialog be hidden. Messages There are 4 types of message dialogs in &app; - Error, Informational, Question and Warning. To create an Error dialog, use --error. To create an Informational dialog, use --info. To create a Question dialog, use --question. To create a Warning dialog, use --question. The following list of options is available for the message dialogs. --text=TEXT Specify the text to appear in the message dialog. File Selection To create a File Selection dialog, use --file-selection. &app; returns the file or directory selected to standard error. The following list of options are also available for the File Selection dialog: --filename=FILENAME Specify the file or directory to be pre-selected in the File Selection dialog. Lists To create a List dialog, use --list. &app; returns the entries of the first columns selected to standard error. If --checklist or --radiolist is used, then &app; will return the entries of the second columns selected to standard error. The following list of options are also available for the File Selection dialog: --column=COLUMN Specify the column headers to appear in the List dialog. This option must be called for each column that you want to appear in the dialog. --checklist Specify if the first column should contain check boxes in the List dialog. --radiolist Specify if the first column should contain radio boxes in the List dialog. --seperator=SEPERATOR Specify what seperator character should be used when the List dialog returns the selected entries. The default character is '\'. If you want to specify a newline, use '\n'. Progress To create a Progress dialog, use --progress. The following list of options are also available for the Progress dialog: --text=TEXT Specify the text to appear in the Progress dialog. --percentage=PERCENTAGE Specify the initial percentage that should be set in the Progress dialog. --pulsate Specify if the Progress dialog should pulsate until an EOF character is read from standard input. Text Information To create a Text Information dialog, use --text-info. The following list of options are also available for the Text Information dialog: --filename=FILENAME Specify the file to be loaded in the Text Information dialog. Miscellaneous The following list of options are also available for &app;: --about Display some information about &app;. --version Print the version number of &app;. License This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, of (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. A copy of the GNU General Public License is included as an appendix to the GNOME Users Guide . You may also obtain a copy of the GNU General Public License from the Free Software Foundation by visiting their Web site or by writing to
Free Software Foundation, Inc. 59 Temple Place - Suite 330 Boston, MA 02111-1307 USA