~ubuntu-branches/ubuntu/precise/zenity/precise-updates

« back to all changes in this revision

Viewing changes to help/oc/password.page

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2012-03-29 14:50:15 UTC
  • mfrom: (1.1.45)
  • Revision ID: package-import@ubuntu.com-20120329145015-p6jkb44cf19r2qyi
Tags: 3.4.0-0ubuntu1
* New upstream release:
  - Add support for lists and trees with --forms
  - Fix warning reading list from stdin
* debian/zenity-common.install:
  - Doesn't install omf files anymore

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="utf-8"?>
 
2
<page xmlns="http://projectmallard.org/1.0/" type="topic" id="password" xml:lang="oc">
 
3
  <info>
 
4
    <link type="guide" xref="index#dialogs"/>
 
5
    <desc>Use the <cmd>--password</cmd> option.</desc>
 
6
  </info>
 
7
  <title>Password Dialog</title>
 
8
  <p>
 
9
    Use the <cmd>--password</cmd> option to create a password entry dialog. 
 
10
  </p>
 
11
  <p>
 
12
    The password entry dialog supports the following options:
 
13
  </p>
 
14
 
 
15
  <terms>
 
16
    <item>
 
17
      <title><cmd>--username</cmd></title>
 
18
      <p>Display the username field.</p>
 
19
    </item>
 
20
  </terms>
 
21
 
 
22
  <p>
 
23
    The following example script shows how to create a password entry dialog:
 
24
  </p>
 
25
 
 
26
<code>
 
27
#!/bin/sh
 
28
 
 
29
ENTRY=`zenity --password --username`
 
30
 
 
31
case $? in
 
32
         0)
 
33
                echo "User Name: `echo $ENTRY | cut -d'|' -f1`"
 
34
                echo "Password : `echo $ENTRY | cut -d'|' -f2`"
 
35
                ;;
 
36
         1)
 
37
                echo "Stop login.";;
 
38
        -1)
 
39
                echo "An unexpected error has occurred.";;
 
40
esac
 
41
</code>
 
42
 
 
43
  <figure id="zenity-password-screenshot">
 
44
    <title>Password Entry Dialog Example</title>
 
45
    <desc><app>Zenity</app> password entry dialog example</desc>
 
46
    <media type="image" mime="image/png" src="figures/zenity-password-screenshot.png"/>
 
47
  </figure>
 
48
 
 
49
</page>