summaryrefslogtreecommitdiff
path: root/help/C/zenity.xml
blob: 4dc745d6ce91227d5c4f7ffad11863193cfb23f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
<?xml version="1.0"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
     "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
     <!ENTITY legal SYSTEM "legal.xml">
     <!ENTITY version "1.0">
     <!ENTITY app "<application>Zenity</application>">
]>

<!-- ================ Document Header ================= -->

<article id="index" lang="en">

  <articleinfo>
    <title>Zenity Manual</title>
    <copyright>
	    <year>2003</year>
	    <holder>Sun Microsystems</holder>
    </copyright>

    <!-- Translators: uncomment this
    <copyright>
	    <year>2003</year>
	    <holder>ME_THE_TRANSLATOR</holder>
    </copyright>
    -->

    <publisher>
	    <publishername>GNOME Documentation Project</publishername>
    </publisher>

    <releaseinfo>Version 1.0 of Zenity Manual</releaseinfo>

    <legalnotice id="feedback">
	    <title>Feedback Information</title>
	    <para>
		    To report a bug or make a suggestion regarding this
		    application or this documentation, please see the
		    <ulink type="help" url="ghelp:gnome-feedback">
			    GNOME Feedback Page
		    </ulink>
	    </para>
    </legalnotice>

    <authorgroup>
	    <author>
		    <firstname>Glynn</firstname>
		    <surname>Foster</surname>
		    <affiliation>
			    <orgname>GNOME Documentation Project</orgname>
		    </affiliation>
            </author>
	    <editor>
	            <firstname>Nicholas</firstname>
		    <surname>Curran</surname>
		    <affiliation>
		            <orgname>GNOME Documentation Project</orgname>
		    </affiliation>
	    </editor>
    </authorgroup>

    <revhistory>
	    <revision>
		    <revnumber>1.0</revnumber>
		    <date>18-01-2003</date>
		    <revdescription>
			    <para role="author">Glynn Foster</para>
			    <para role="publisher">
				    GNOME Documentation Project
			    </para>
		    </revdescription>
            </revision>
    </revhistory>
  </articleinfo>
  
<!-- ================ Document Body ================= -->

<!-- ==== Introduction ====== -->

  <sect1 id="zenity-introduction">
    <title>Introduction</title>

    <para>
        &app; displays simple GNOME dialogs.
    </para>

    <para>
    	&app; can display the following dialogs:
    </para>

    <itemizedlist>
        <listitem><para>
	    <link linkend="zenity-calendar-options">Calendar dialog.</link>
	</para></listitem>
        <listitem><para>
	    <link linkend="zenity-text-entry-options">Text entry dialog.</link>
	</para></listitem>
        <listitem><para>Various message dialogs including:</para>
            <itemizedlist>
	        <listitem><para>
		    <link linkend="zenity-error-dialog">Error dialog.</link>
		</para></listitem>
		<listitem><para>
		    <link linkend="zenity-info-dialog">Information dialog.</link>
		</para></listitem>
		<listitem><para>
		    <link linkend="zenity-question-dialog">Question dialog.</link>
		</para></listitem>
		<listitem><para>
		    <link linkend="zenity-warning-dialog">Warning dialog.</link>
		</para></listitem>
	    </itemizedlist>
	</listitem>
	<listitem><para>
	     <link linkend="zenity-file-selection-options">File selection dialog.</link>
	</para></listitem>
	<listitem><para>
	     <link linkend="zenity-list-options">List options dialog.</link>
	</para></listitem>
	<listitem><para>
	     <link linkend="zenity-progress-options">Progress dialog.</link>
	</para></listitem>
	<listitem><para>
	     <link linkend="zenity-text-options">Text dialog.</link>
	</para></listitem>
    </itemizedlist>

  </sect1>

<!-- ==== General Options ====== -->
  <sect1 id="zenity-basic-use">
    <title>Basic Use</title>

    <para>
	&app; creates simple dialogs.  You can use &app; to create a script that
	interacts graphically with the user.
    </para>
    
    <para>
        When the user closes the dialog,
	&app; prints text produced by the dialog to standard error.
    </para>

    <para>
        Ensure that all arguments to &app; are surrounded by quotes.  For example, use
	<command>zenity --calendar --title="Holiday Planner"</command> instead of
	<command>zenity --calendar --title=Holiday Planner</command>.
	If you do not use quotes, you can get unexpected results.
    </para>

    <note>
        <title>NOTE</title>
	<para>
	Some dialogs support the use of keyboard mnemonics.  To specify the character to use as
	the mnemonic, place an underscore before that character in the text of the dialog.  For
	example, to specify the 'P' as the keyboard mnemonic in the following sentence, use
	"_Please choose a name".
	</para>
    </note>

    <para>
        &app; returns the following exit codes:
    </para>

    <variablelist>

      <varlistentry>
        <term><varname>0</varname></term>
	<listitem>
	  <para>The user has pressed either 'OK' or 'Close'.</para>
	</listitem>
      </varlistentry>
     	
      <varlistentry>
        <term><varname>1</varname></term>
	<listitem>
	  <para>The user has pressed either 'Cancel' or closed the dialog through the window functions.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>-1</varname></term>
	<listitem>
	  <para>An unexpected error has occurred.</para>
	</listitem>
      </varlistentry>

    </variablelist>

  </sect1>

<!-- ==== General Options ====== -->

  <sect1 id="zenity-general-options">
    <title>General Options</title>

    <para>
	All dialogs have the following general options:
    </para>

    <variablelist>

      <varlistentry>
        <term><varname>--title</varname>=TITLE</term>
	<listitem>
	  <para>Specifies the title of a dialog.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>--window-icon</varname>=ICON_PATH</term>
	<listitem>
	  <para>Specifies the icon that should appear in the window frame of the dialog.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>--width</varname>=WIDTH</term>
	<listitem>
	  <para>Specifies the width of the dialog.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>--height</varname>=HEIGHT</term>
	<listitem>
	  <para>Specifies the height of the dialog.</para>
	</listitem>
      </varlistentry>

    </variablelist>

  </sect1>

<!-- ==== Calendar Options ====== -->

  <sect1 id="zenity-calendar-options">
    <title>Calendar Dialog</title>

    <para>
        Use <command>--calendar</command> to create a Calendar dialog.  &app; returns the
	date selected to standad error.  The current date will be used by the dialog if
	no date is given on the command line.
    </para>
    <para>
	The Calendar dialog has the following options:
    </para>

    <variablelist>

      <varlistentry>
        <term><varname>--text</varname>=TEXT</term>
	<listitem>
	  <para>Specifies the text to appear in the Calendar dialog.</para>
	</listitem>
      </varlistentry>
     	
      <varlistentry>
        <term><varname>--day</varname>=DAY</term>
	<listitem>
	  <para>Specifies the day to be pre-selected in the Calendar dialog. The day 
	        ust be a number between 1 and 31.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>--month</varname>=MONTH</term>
	<listitem>
	  <para>Specifies the day to be pre-selected in the Calendar dialog. The day must be
	  	a number between 1 and 12.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>--year</varname>=YEAR</term>
	<listitem>
	  <para>Specifies the year to be pre-selected in the Calendar dialog.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>--date-format</varname>=FORMAT</term>
	<listitem>
	  <para>Specifies the format to be returned from the Calendar dialog after
	  	the selection has been made. The default format depends
		on your locale. The format must be of <command>strftime</command>
		style, for example "%A %d/%m%y".
	  </para>
	</listitem>
      </varlistentry>

    </variablelist>

    <para>
    	The following script is an example of how to use the Calendar dialog:

		<programlisting>
		#!/bin/sh

		if zenity --calendar --title="Calendar selection" --text="Select a date from below" --day=18 --month=1 --year=2003
		  then echo $?
		  else echo "No date selected"
		fi
		</programlisting>
    </para>

    <figure id="zenity-calendar-screenshot">
      <title>Calendar dialog example</title>
      <screenshot>
        <mediaobject>
          <imageobject>
              <imagedata fileref="figures/zenity-calendar-screenshot.png" format="PNG"/>
          </imageobject>
          <textobject>
              <phrase>&app; Calendar dialog example</phrase>
          </textobject>
        </mediaobject>
      </screenshot>
   </figure>
													  
  </sect1>

<!-- ==== Text Entry Options ====== -->

  <sect1 id="zenity-text-entry-options">
    <title>Text Entry Dialog</title>

    <para>
        Use <command>--entry</command> to create a Text Entry dialog.
	&app; returns the 
	contents of the text entry to standard error. 
    </para>	
    <para>	
	The Text Entry dialog has the following options:
    </para>

    <variablelist>

      <varlistentry>
        <term><varname>--text</varname>=TEXT</term>
	<listitem>
	  <para>Specifies the text to appear in the Text Entry dialog.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>--entry-text</varname>=TEXT</term>
	<listitem>
	  <para>Specifies the text to appear in the entry field of the Text Entry dialog.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>--hide-text</varname></term>
	<listitem>
	  <para>Specifies that the text in the entry field of the Text Entry dialog be hidden.</para>
	</listitem>
      </varlistentry>

    </variablelist>

    <para>
    	The following script is an example of how to use the Text Entry dialog:

		<programlisting>
		#!/bin/sh

		if zenity --entry --title="Add a new entry" --text="Enter your _Password" --hide-text
		  then echo $?
		  else echo "No password entered"
		fi
		</programlisting>
    </para>

    <figure id="zenity-entry-screenshot">
      <title>Text Entry dialog example</title>
      <screenshot>
        <mediaobject>
          <imageobject>
            <imagedata fileref="figures/zenity-entry-screenshot.png" format="PNG"/>
	  </imageobject>
	  <textobject>
	    <phrase>&app; Text Entry dialog example</phrase>
	  </textobject>
        </mediaobject>
      </screenshot>
    </figure>
  </sect1>

<!-- ==== Message Options ====== -->

  <sect1 id="zenity-message-options">
    <title>Message Dialogs</title>

    <para>
        &app; can create four types of message dialog.  
	Use the <command>--text</command> option to set the text shown in the
	dialog.
    </para>
    <sect2 id="zenity-warning-dialog">
      <title>Warning Dialog</title>

      <para>
          Use <command>--warning</command> to create a Warning dialog.
      </para>

      <para>
    	  The following script is an example of how to use the Warning message dialog:

		<programlisting>
		#!/bin/bash

		FILE_TYPE=$(file -b $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS|awk '{ print $1}')

		if [ "$FILE_TYPE" != "PNG" ]; then
		  zenity --warning --text="Could not rotate image :" --hide-text
		fi
		</programlisting>
      </para>

      <figure id="zenity-warning-screenshot">
        <title>Warning dialog example</title>
        <screenshot>
          <mediaobject>
            <imageobject>
              <imagedata fileref="figures/zenity-warning-screenshot.png" format="PNG"/>
	    </imageobject>
	    <textobject>
	      <phrase>&app; Warning dialog example</phrase>
	    </textobject>
          </mediaobject>
        </screenshot>
      </figure>
    </sect2>

    <sect2 id="zenity-error-dialog">
      <title>Error Dialog</title>

      <para>
          Use <command>--error</command> to create an Error dialog.  
      </para>

      <figure id="zenity-error-screenshot">
        <title>Error dialog example</title>
        <screenshot>
          <mediaobject>
            <imageobject>
              <imagedata fileref="figures/zenity-error-screenshot.png" format="PNG"/>
	    </imageobject>
	    <textobject>
	      <phrase>&app; Error dialog example</phrase>
	    </textobject>
          </mediaobject>
        </screenshot>
      </figure>
    </sect2>

    <sect2 id="zenity-info-dialog">
      <title>Information Dialog</title>

      <para>
          Use <command>--info</command> to create an Information dialog.
      </para>

      <figure id="zenity-information-screenshot">
        <title>Informational dialog example</title>
        <screenshot>
          <mediaobject>
            <imageobject>
              <imagedata fileref="figures/zenity-information-screenshot.png" format="PNG"/>
	    </imageobject>
	    <textobject>
	      <phrase>&app; Informational dialog example</phrase>
	    </textobject>
          </mediaobject>
        </screenshot>
      </figure>
    </sect2>

    <sect2 id="zenity-question-dialog">
      <title>Question Dialog</title>

      <para>
          Use <command>--question</command> to create a Question dialog.
      </para>

      <figure id="zenity-question-screenshot">
        <title>Question dialog example</title>
        <screenshot>
          <mediaobject>
            <imageobject>
              <imagedata fileref="figures/zenity-question-screenshot.png" format="PNG"/>
	    </imageobject>
	    <textobject>
	      <phrase>&app; Question dialog example</phrase>
	    </textobject>
          </mediaobject>
        </screenshot>
      </figure>
    </sect2>

  </sect1>

<!-- ==== File Selection Options ====== -->

  <sect1 id="zenity-file-selection-options">
    <title>File Selection Dialog</title>

    <para>
	Use <command>--file-selection</command> to create a file selection
	dialog. &app; returns 
	the files or directories selected to standard error. 
    </para>
    <para>
	The File Selection dialog has the following options:
    </para>

    <variablelist>

      <varlistentry>
        <term><varname>--filename</varname>=FILENAME</term>
	<listitem>
	  <para>Specifies the file or directory to be selected in the File Selection dialog
	        when the dialog is first shown.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><varname>--multiple</varname></term>
	<listitem>
	  <para>Allows selection of multiple filenames in the File Selection dialog.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><varname>--separator</varname>=SEPARATOR</term>
	<listitem>
	  <para>Specifies the string used to divide the returned list of filenames.</para>
	</listitem>
      </varlistentry>

    </variablelist>

    <para>
    	The following script is an example of how to use the File Selection dialog:

		<programlisting>
		#!/bin/sh

		FILE=`zenity --file-selection --title="Select a file"'

		case $? in
		         0)
			  	echo "\"$FILE\" selected.";;
		         1)
			        echo "No file selected.";;
			-1)
			        echo "No file selected.";;
		esac
		</programlisting>
    </para>

    <figure id="zenity-fileselection-screenshot">
      <title>File Selection dialog example</title>
      <screenshot>
        <mediaobject>
          <imageobject>
            <imagedata fileref="figures/zenity-fileselection-screenshot.png" format="PNG"/>
	  </imageobject>
	  <textobject>
	    <phrase>&app; File Selection dialog example</phrase>
	  </textobject>
        </mediaobject>
      </screenshot>
    </figure>

  </sect1>

<!-- ==== List Options ====== -->

  <sect1 id="zenity-list-options">
    <title>List Dialog</title>

    <para>
	Use <command>--list</command> to create a list dialog.  &app; returns the entries in
	the first column of text of selected rows to standard error.
    </para>

    <para>
	Every column must be specified by the <command>--column</command> option.  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.
    </para>

    <para>
	If you use the <command>--checklist</command> or <command>--radiolist</command>
        options, each row must start with either 'TRUE' or 'FALSE'.
    </para>

    <para>
	The List dialog has the following options:
    </para>

    <variablelist>

      <varlistentry>
        <term><varname>--text</varname>=TEXT</term>
	<listitem>
	  <para>Specifies the text to appear in the List dialog.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>--column</varname>=COLUMN</term>
	<listitem>
	  <para>Specifies the column headers to appear in the List dialog.
		You must call the <command>--column</command> option for
		each column you want to appear in the dialog.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>--checklist</varname></term>
	<listitem>
	  <para>Specifies that the first column should contain check boxes in the List dialog.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>--radiolist</varname></term>
	<listitem>
	  <para>Specifies that the first column should contain radio boxes in the List dialog.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>--editable</varname></term>
	<listitem>
	  <para>Allows the displayed items to be edited.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>--seperator</varname>=SEPERATOR</term>
	<listitem>
	  <para>Specifies what string should be used when the List dialog returns the selected entries.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>--print-column</varname>=COLUMN</term>
	<listitem>
	  <para>Specifies what column should be printed to standard output. The default is to return
		the first column. 'ALL' may be specified to print out all columns.
	  </para>
	</listitem>
      </varlistentry>

    </variablelist>

    <para>
    	The following commandline is an example of how to use the List dialog:
		<programlisting>
		zenity --list --title="Choose bugs you wish to view" \
		       --text="Select items from the list below." \
		       --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"
		</programlisting>
    </para>

    <figure id="zenity-list-screenshot">
      <title>List Selection dialog example</title>
      <screenshot>
        <mediaobject>
          <imageobject>
            <imagedata fileref="figures/zenity-list-screenshot.png" format="PNG"/>
	  </imageobject>
	  <textobject>
	    <phrase>&app; List dialog example</phrase>
	  </textobject>
        </mediaobject>
      </screenshot>
    </figure>

  </sect1>

<!-- ==== Progress Options ====== -->

  <sect1 id="zenity-progress-options">
    <title>Progress Dialog</title>

    <para>
	Use <command>--progress</command> to create a Progress dialog. 
    </para>

    <para>
 &app; reads data from
	standard input line by line.  If a line is prefixed with a hash (#), the text is 
	updated with the text on that line.  If a line contains only a number, the percentage
	is updated with that number.
    </para>
	
    <para>
	The Progress dialog has the following options:
    </para>

    <variablelist>

      <varlistentry>
        <term><varname>--text</varname>=TEXT</term>
	<listitem>
	  <para>Specifies the text to appear in the Progress dialog.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>--percentage</varname>=PERCENTAGE</term>
	<listitem>
	  <para>Specifies the initial percentage that should be set in the Progress dialog.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term><varname>--auto-close</varname></term>
	<listitem>
	  <para>Closes the progress dialog when 100% has been reached.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>--pulsate</varname></term>
	<listitem>
	  <para>Specifies that the Progress dialog should pulsate until an EOF character is read
	        from standard input.</para>
	</listitem>
      </varlistentry>

    </variablelist>

    <para>
    	The following script is an example of how to use the Progress dialog:
		<programlisting>
		#!/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 cancelled."
		fi
		</programlisting>
    </para>

    <figure id="zenity-progress-screenshot">
      <title>Progress dialog example</title>
      <screenshot>
        <mediaobject>
          <imageobject>
            <imagedata fileref="figures/zenity-progress-screenshot.png" format="PNG"/>
	  </imageobject>
	  <textobject>
	    <phrase>&app; Progress dialog example</phrase>
	  </textobject>
        </mediaobject>
      </screenshot>
    </figure>

  </sect1>

<!-- ==== Text Information Options ====== -->

  <sect1 id="zenity-text-options">
    <title>Text Information Dialog</title>

    <para>
	Use <command>--text-info</command> to create a Text Information dialog. 
    </para>
	
    <para>
	The Text Information dialog has the following options:
    </para>

    <variablelist>

      <varlistentry>
        <term><varname>--filename</varname>=FILENAME</term>
	<listitem>
	  <para>Specifies a file to be loaded in the Text Information dialog.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>--editable</varname></term>
        <listitem>
          <para>Allows the displayed text to be edited.  The edited text is
	  returned to standard error when the dialog is closed.</para>
        </listitem>
      </varlistentry>

    </variablelist>

    <para>
    	The following script is an example of how to use the Text Infomation dialog:
		<programlisting>
		#!/bin/sh

		FILE=`zenity --file-selection --title="Select a file"'

		case $? in
		         0)
			  	zenity --text-info --title=$FILE --filename=$FILE --editable 2>/tmp/tmp.txt
							
		         1)
			        echo "No file selected.";;
			-1)
				echo "No file selected.";;
		esac
		</programlisting>
    </para>

    <figure id="zenity-text-screenshot">
      <title>Text Information dialog example</title>
      <screenshot>
        <mediaobject>
          <imageobject>
            <imagedata fileref="figures/zenity-text-screenshot.png" format="PNG"/>
	  </imageobject>
	  <textobject>
	    <phrase>&app; Text Information dialog example</phrase>
	  </textobject>
        </mediaobject>
      </screenshot>
    </figure>

  </sect1>

<!-- ==== Miscellaneous Options ====== -->

  <sect1 id="zenity-miscellaneous-options">
    <title>Miscellaneous Options</title>

    <para>
	&app; has the following miscellaneous options:
    </para>

    <variablelist>

      <varlistentry>
        <term><varname>--about</varname></term>
	<listitem>
	  <para>Displays some information about &app;.</para>
	</listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>--version</varname></term>
	<listitem>
	  <para>Prints the version number of &app;.</para>
	</listitem>
      </varlistentry>

    </variablelist>

  </sect1>

<!-- ================ Application License ================= -->
  <sect1 id="license">
	  <title>License</title>
	  <para>
		  This program is free software; you can redistribute
		  it and/or modify it under the terms of the 
		  <ulink type="help" url="gnome-help:gpl">
			  <citetitle>GNU General Public License</citetitle>
	          </ulink>
		  as published by the Free Software Foundation; either 
		  version 2 of the License, of (at your option) any later
		  version.
	  </para>
	  <para>
		  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
		  <citetitle>GNU General Public License</citetitle>
		  for more details.
          </para>
	  <para>
		  A copy of the 
		  <citetitle>GNU General Public License</citetitle>
		  is included as an appendix to the 
		  <citetitle>GNOME Users Guide</citetitle>
		  . You may also obtain a copy of the 
		  <citetitle>GNU General Public License</citetitle>
		  from the Free Software Foundation by visiting
		  <ulink type="http" url="http://www.fsf.org">
			  their Web site
		  </ulink>
		  or by writing to 
		  <address>Free Software Foundation, Inc.
			  <street>59 Temple Place</street> - Suite 330
			  <city>Boston</city>,
			  <state>MA</state>
			  <postcode>02111-1307</postcode>
			  <country>USA</country>
		  </address>
	  </para>
  </sect1>

</article>
bgstack15