Bwidget Source Code
Hex Artifact Content
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Artifact d8ad0db871b1cab8e9d77234b2895bf300ac7439:


0000: 23 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  # --------------
0010: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0020: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0030: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0040: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a  ---------------.
0050: 23 20 20 70 61 73 73 77 64 64 6c 67 2e 74 63 6c  #  passwddlg.tcl
0060: 0a 23 20 20 54 68 69 73 20 66 69 6c 65 20 69 73  .#  This file is
0070: 20 70 61 72 74 20 6f 66 20 55 6e 69 66 69 78 20   part of Unifix 
0080: 42 57 69 64 67 65 74 20 54 6f 6f 6c 6b 69 74 0a  BWidget Toolkit.
0090: 23 20 20 20 62 79 20 53 74 65 70 68 61 6e 65 20  #   by Stephane 
00a0: 4c 61 76 69 72 6f 74 74 65 20 28 53 74 65 70 68  Lavirotte (Steph
00b0: 61 6e 65 2e 4c 61 76 69 72 6f 74 74 65 40 73 6f  [email protected]
00c0: 70 68 69 61 2e 69 6e 72 69 61 2e 66 72 29 0a 23  phia.inria.fr).#
00d0: 20 20 24 49 64 3a 20 70 61 73 73 77 64 64 6c 67    $Id: passwddlg
00e0: 2e 74 63 6c 2c 76 20 31 2e 36 20 32 30 30 31 2f  .tcl,v 1.6 2001/
00f0: 30 39 2f 30 36 20 31 39 3a 35 30 3a 34 31 20 61  09/06 19:50:41 a
0100: 6e 64 72 65 61 73 5f 6b 75 70 72 69 65 73 20 45  ndreas_kupries E
0110: 78 70 20 24 0a 23 20 2d 2d 2d 2d 2d 2d 2d 2d 2d  xp $.# ---------
0120: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0130: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0140: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0150: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0160: 2d 2d 2d 2d 0a 23 20 20 49 6e 64 65 78 20 6f 66  ----.#  Index of
0170: 20 63 6f 6d 6d 61 6e 64 73 3a 0a 23 20 20 20 20   commands:.#    
0180: 20 2d 20 50 61 73 73 77 64 44 6c 67 3a 3a 63 72   - PasswdDlg::cr
0190: 65 61 74 65 0a 23 20 20 20 20 20 2d 20 50 61 73  eate.#     - Pas
01a0: 73 77 64 44 6c 67 3a 3a 63 6f 6e 66 69 67 75 72  swdDlg::configur
01b0: 65 0a 23 20 20 20 20 20 2d 20 50 61 73 73 77 64  e.#     - Passwd
01c0: 44 6c 67 3a 3a 63 67 65 74 0a 23 20 20 20 20 20  Dlg::cget.#     
01d0: 2d 20 50 61 73 73 77 64 44 6c 67 3a 3a 5f 76 65  - PasswdDlg::_ve
01e0: 72 69 66 6f 6e 6c 6f 67 69 6e 0a 23 20 20 20 20  rifonlogin.#    
01f0: 20 2d 20 50 61 73 73 77 64 44 6c 67 3a 3a 5f 76   - PasswdDlg::_v
0200: 65 72 69 66 6f 6e 70 61 73 73 77 64 0a 23 20 20  erifonpasswd.#  
0210: 20 20 20 2d 20 50 61 73 73 77 64 44 6c 67 3a 3a     - PasswdDlg::
0220: 5f 6d 61 78 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  _max.#----------
0230: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0240: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0250: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0260: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0270: 2d 2d 2d 2d 0a 0a 6e 61 6d 65 73 70 61 63 65 20  ----..namespace 
0280: 65 76 61 6c 20 50 61 73 73 77 64 44 6c 67 20 7b  eval PasswdDlg {
0290: 0a 20 20 20 20 44 69 61 6c 6f 67 3a 3a 75 73 65  .    Dialog::use
02a0: 0a 20 20 20 20 4c 61 62 65 6c 45 6e 74 72 79 3a  .    LabelEntry:
02b0: 3a 75 73 65 0a 0a 20 20 20 20 57 69 64 67 65 74  :use..    Widget
02c0: 3a 3a 62 77 69 6e 63 6c 75 64 65 20 50 61 73 73  ::bwinclude Pass
02d0: 77 64 44 6c 67 20 44 69 61 6c 6f 67 20 3a 63 6d  wdDlg Dialog :cm
02e0: 64 20 5c 0a 09 20 20 20 20 72 65 6d 6f 76 65 20  d \..    remove 
02f0: 20 20 20 20 7b 2d 69 6d 61 67 65 20 2d 62 69 74      {-image -bit
0300: 6d 61 70 20 2d 73 69 64 65 20 2d 64 65 66 61 75  map -side -defau
0310: 6c 74 20 2d 63 61 6e 63 65 6c 20 2d 73 65 70 61  lt -cancel -sepa
0320: 72 61 74 6f 72 7d 20 5c 0a 09 20 20 20 20 69 6e  rator} \..    in
0330: 69 74 69 61 6c 69 7a 65 20 7b 2d 6d 6f 64 61 6c  itialize {-modal
0340: 20 6c 6f 63 61 6c 20 2d 61 6e 63 68 6f 72 20 63   local -anchor c
0350: 7d 0a 20 20 20 20 0a 20 20 20 20 57 69 64 67 65  }.    .    Widge
0360: 74 3a 3a 62 77 69 6e 63 6c 75 64 65 20 50 61 73  t::bwinclude Pas
0370: 73 77 64 44 6c 67 20 4c 61 62 65 6c 45 6e 74 72  swdDlg LabelEntr
0380: 79 20 2e 66 72 61 6d 65 2e 6c 61 62 6c 6f 67 20  y .frame.lablog 
0390: 5c 0a 09 20 20 20 20 72 65 6d 6f 76 65 20 5b 6c  \..    remove [l
03a0: 69 73 74 20 2d 63 6f 6d 6d 61 6e 64 20 2d 6a 75  ist -command -ju
03b0: 73 74 69 66 79 20 2d 6e 61 6d 65 20 2d 73 68 6f  stify -name -sho
03c0: 77 20 2d 73 69 64 65 09 20 20 20 20 20 20 20 20  w -side.        
03d0: 5c 0a 09 09 2d 73 74 61 74 65 20 2d 74 61 6b 65  \...-state -take
03e0: 66 6f 63 75 73 20 2d 77 69 64 74 68 20 2d 78 73  focus -width -xs
03f0: 63 72 6f 6c 6c 63 6f 6d 6d 61 6e 64 20 2d 70 61  crollcommand -pa
0400: 64 78 20 2d 70 61 64 79 09 5c 0a 09 09 2d 64 72  dx -pady.\...-dr
0410: 61 67 65 6e 61 62 6c 65 64 20 2d 64 72 61 67 65  agenabled -drage
0420: 6e 64 63 6d 64 20 2d 64 72 61 67 65 76 65 6e 74  ndcmd -dragevent
0430: 20 2d 64 72 61 67 69 6e 69 74 63 6d 64 09 5c 0a   -draginitcmd.\.
0440: 09 09 2d 64 72 61 67 74 79 70 65 20 2d 64 72 6f  ..-dragtype -dro
0450: 70 65 6e 61 62 6c 65 64 20 2d 64 72 6f 70 63 6d  penabled -dropcm
0460: 64 20 2d 64 72 6f 70 6f 76 65 72 63 6d 64 20 2d  d -dropovercmd -
0470: 64 72 6f 70 74 79 70 65 73 09 5c 0a 09 09 5d 20  droptypes.\...] 
0480: 5c 0a 09 20 20 20 20 70 72 65 66 69 78 20 5b 6c  \..    prefix [l
0490: 69 73 74 20 6c 6f 67 69 6e 20 2d 65 64 69 74 61  ist login -edita
04a0: 62 6c 65 20 2d 68 65 6c 70 74 65 78 74 20 2d 68  ble -helptext -h
04b0: 65 6c 70 76 61 72 20 2d 6c 61 62 65 6c 20 20 20  elpvar -label   
04c0: 20 20 20 5c 0a 09 09 2d 74 65 78 74 20 2d 74 65     \...-text -te
04d0: 78 74 76 61 72 69 61 62 6c 65 20 2d 75 6e 64 65  xtvariable -unde
04e0: 72 6c 69 6e 65 09 09 09 09 5c 0a 09 09 5d 20 5c  rline....\...] \
04f0: 0a 09 20 20 20 20 69 6e 69 74 69 61 6c 69 7a 65  ..    initialize
0500: 20 5b 6c 69 73 74 20 2d 72 65 6c 69 65 66 20 73   [list -relief s
0510: 75 6e 6b 65 6e 20 2d 62 6f 72 64 65 72 77 69 64  unken -borderwid
0520: 74 68 20 32 09 09 5c 0a 09 09 2d 6c 61 62 65 6c  th 2..\...-label
0530: 61 6e 63 68 6f 72 20 77 20 2d 77 69 64 74 68 20  anchor w -width 
0540: 31 35 20 2d 6c 6f 67 69 6e 6c 61 62 65 6c 20 22  15 -loginlabel "
0550: 4c 6f 67 69 6e 22 09 09 5c 0a 09 09 5d 0a 20 20  Login"..\...].  
0560: 20 20 0a 20 20 20 20 57 69 64 67 65 74 3a 3a 62    .    Widget::b
0570: 77 69 6e 63 6c 75 64 65 20 50 61 73 73 77 64 44  winclude PasswdD
0580: 6c 67 20 4c 61 62 65 6c 45 6e 74 72 79 20 2e 66  lg LabelEntry .f
0590: 72 61 6d 65 2e 6c 61 62 70 61 73 73 09 09 5c 0a  rame.labpass..\.
05a0: 09 20 20 20 20 72 65 6d 6f 76 65 20 5b 6c 69 73  .    remove [lis
05b0: 74 20 2d 63 6f 6d 6d 61 6e 64 20 2d 77 69 64 74  t -command -widt
05c0: 68 20 2d 73 68 6f 77 20 2d 73 69 64 65 20 2d 74  h -show -side -t
05d0: 61 6b 65 66 6f 63 75 73 09 09 5c 0a 09 09 2d 78  akefocus..\...-x
05e0: 73 63 72 6f 6c 6c 63 6f 6d 6d 61 6e 64 20 2d 64  scrollcommand -d
05f0: 72 61 67 65 6e 61 62 6c 65 64 20 2d 64 72 61 67  ragenabled -drag
0600: 65 6e 64 63 6d 64 20 2d 64 72 61 67 65 76 65 6e  endcmd -drageven
0610: 74 09 5c 0a 09 09 2d 64 72 61 67 69 6e 69 74 63  t.\...-draginitc
0620: 6d 64 20 2d 64 72 61 67 74 79 70 65 20 2d 64 72  md -dragtype -dr
0630: 6f 70 65 6e 61 62 6c 65 64 20 2d 64 72 6f 70 63  openabled -dropc
0640: 6d 64 09 09 5c 0a 09 09 2d 64 72 6f 70 6f 76 65  md..\...-dropove
0650: 72 63 6d 64 20 2d 64 72 6f 70 74 79 70 65 73 20  rcmd -droptypes 
0660: 2d 6a 75 73 74 69 66 79 20 2d 70 61 64 78 20 2d  -justify -padx -
0670: 70 61 64 79 20 2d 6e 61 6d 65 09 5c 0a 09 09 5d  pady -name.\...]
0680: 20 5c 0a 09 20 20 20 20 70 72 65 66 69 78 20 5b   \..    prefix [
0690: 6c 69 73 74 20 70 61 73 73 77 64 20 2d 65 64 69  list passwd -edi
06a0: 74 61 62 6c 65 20 2d 68 65 6c 70 74 65 78 74 20  table -helptext 
06b0: 2d 68 65 6c 70 76 61 72 20 2d 6c 61 62 65 6c 09  -helpvar -label.
06c0: 5c 0a 09 09 2d 73 74 61 74 65 20 2d 74 65 78 74  \...-state -text
06d0: 20 2d 74 65 78 74 76 61 72 69 61 62 6c 65 20 2d   -textvariable -
06e0: 75 6e 64 65 72 6c 69 6e 65 09 09 09 5c 0a 09 09  underline...\...
06f0: 5d 20 5c 0a 09 20 20 20 20 69 6e 69 74 69 61 6c  ] \..    initial
0700: 69 7a 65 20 5b 6c 69 73 74 20 2d 72 65 6c 69 65  ize [list -relie
0710: 66 20 73 75 6e 6b 65 6e 20 2d 62 6f 72 64 65 72  f sunken -border
0720: 77 69 64 74 68 20 32 09 09 5c 0a 09 09 2d 6c 61  width 2..\...-la
0730: 62 65 6c 61 6e 63 68 6f 72 20 77 20 2d 77 69 64  belanchor w -wid
0740: 74 68 20 31 35 20 2d 70 61 73 73 77 64 6c 61 62  th 15 -passwdlab
0750: 65 6c 20 22 50 61 73 73 77 6f 72 64 22 09 5c 0a  el "Password".\.
0760: 09 09 5d 0a 20 20 20 20 0a 20 20 20 20 57 69 64  ..].    .    Wid
0770: 67 65 74 3a 3a 64 65 63 6c 61 72 65 20 50 61 73  get::declare Pas
0780: 73 77 64 44 6c 67 20 7b 0a 20 20 20 20 20 20 20  swdDlg {.       
0790: 20 7b 2d 74 79 70 65 20 20 20 20 20 20 20 20 45   {-type        E
07a0: 6e 75 6d 20 20 20 20 20 20 20 6f 6b 20 20 20 20  num       ok    
07b0: 20 20 20 20 20 20 20 30 20 7b 6f 6b 20 6f 6b 63         0 {ok okc
07c0: 61 6e 63 65 6c 7d 7d 0a 20 20 20 20 20 20 20 20  ancel}}.        
07d0: 7b 2d 6c 61 62 65 6c 77 69 64 74 68 20 20 54 6b  {-labelwidth  Tk
07e0: 52 65 73 6f 75 72 63 65 20 2d 31 20 20 20 20 20  Resource -1     
07f0: 20 20 20 20 20 20 30 20 7b 6c 61 62 65 6c 20 2d        0 {label -
0800: 77 69 64 74 68 7d 7d 0a 20 20 20 20 20 20 20 20  width}}.        
0810: 7b 2d 63 6f 6d 6d 61 6e 64 20 20 20 20 20 53 74  {-command     St
0820: 72 69 6e 67 20 20 20 20 20 22 22 20 20 20 20 20  ring     ""     
0830: 20 20 20 20 20 20 30 7d 0a 20 20 20 20 7d 0a 0a        0}.    }..
0840: 20 20 20 20 70 72 6f 63 20 3a 3a 50 61 73 73 77      proc ::Passw
0850: 64 44 6c 67 20 7b 20 70 61 74 68 20 61 72 67 73  dDlg { path args
0860: 20 7d 20 7b 20 72 65 74 75 72 6e 20 5b 65 76 61   } { return [eva
0870: 6c 20 50 61 73 73 77 64 44 6c 67 3a 3a 63 72 65  l PasswdDlg::cre
0880: 61 74 65 20 24 70 61 74 68 20 24 61 72 67 73 5d  ate $path $args]
0890: 20 7d 0a 20 20 20 20 70 72 6f 63 20 75 73 65 20   }.    proc use 
08a0: 7b 7d 20 7b 7d 0a 7d 0a 0a 0a 23 20 2d 2d 2d 2d  {} {}.}...# ----
08b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
08c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
08d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
08e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
08f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 20 43 6f 6d  ---------.#  Com
0900: 6d 61 6e 64 20 50 61 73 73 77 64 44 6c 67 3a 3a  mand PasswdDlg::
0910: 63 72 65 61 74 65 0a 23 20 2d 2d 2d 2d 2d 2d 2d  create.# -------
0920: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0930: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0940: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0950: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
0960: 2d 2d 2d 2d 2d 2d 0a 70 72 6f 63 20 50 61 73 73  ------.proc Pass
0970: 77 64 44 6c 67 3a 3a 63 72 65 61 74 65 20 7b 20  wdDlg::create { 
0980: 70 61 74 68 20 61 72 67 73 20 7d 20 7b 0a 0a 20  path args } {.. 
0990: 20 20 20 61 72 72 61 79 20 73 65 74 20 6d 61 70     array set map
09a0: 73 20 5b 6c 69 73 74 20 50 61 73 73 77 64 44 6c  s [list PasswdDl
09b0: 67 20 7b 7d 20 3a 63 6d 64 20 7b 7d 20 2e 66 72  g {} :cmd {} .fr
09c0: 61 6d 65 2e 6c 61 62 6c 6f 67 20 7b 7d 20 5c 0a  ame.lablog {} \.
09d0: 09 20 20 20 20 2e 66 72 61 6d 65 2e 6c 61 62 70  .    .frame.labp
09e0: 61 73 73 20 7b 7d 5d 0a 20 20 20 20 61 72 72 61  ass {}].    arra
09f0: 79 20 73 65 74 20 6d 61 70 73 20 5b 57 69 64 67  y set maps [Widg
0a00: 65 74 3a 3a 70 61 72 73 65 41 72 67 73 20 50 61  et::parseArgs Pa
0a10: 73 73 77 64 44 6c 67 20 24 61 72 67 73 5d 0a 0a  sswdDlg $args]..
0a20: 20 20 20 20 57 69 64 67 65 74 3a 3a 69 6e 69 74      Widget::init
0a30: 46 72 6f 6d 4f 44 42 20 50 61 73 73 77 64 44 6c  FromODB PasswdDl
0a40: 67 20 22 24 70 61 74 68 23 50 61 73 73 77 64 44  g "$path#PasswdD
0a50: 6c 67 22 20 24 6d 61 70 73 28 50 61 73 73 77 64  lg" $maps(Passwd
0a60: 44 6c 67 29 0a 0a 20 20 20 20 23 20 45 78 74 72  Dlg)..    # Extr
0a70: 61 63 74 20 74 68 65 20 50 61 73 73 77 64 44 6c  act the PasswdDl
0a80: 67 20 6d 65 67 61 77 69 64 67 65 74 20 6f 70 74  g megawidget opt
0a90: 69 6f 6e 73 20 28 74 68 6f 73 65 20 74 68 61 74  ions (those that
0aa0: 20 64 6f 6e 27 74 20 6d 61 70 20 74 6f 20 61 0a   don't map to a.
0ab0: 20 20 20 20 23 20 73 75 62 77 69 64 67 65 74 29      # subwidget)
0ac0: 0a 20 20 20 20 73 65 74 20 74 79 70 65 20 20 20  .    set type   
0ad0: 20 20 20 5b 57 69 64 67 65 74 3a 3a 63 67 65 74     [Widget::cget
0ae0: 20 22 24 70 61 74 68 23 50 61 73 73 77 64 44 6c   "$path#PasswdDl
0af0: 67 22 20 2d 74 79 70 65 5d 0a 20 20 20 20 73 65  g" -type].    se
0b00: 74 20 63 6d 64 20 20 20 20 20 20 20 5b 57 69 64  t cmd       [Wid
0b10: 67 65 74 3a 3a 63 67 65 74 20 22 24 70 61 74 68  get::cget "$path
0b20: 23 50 61 73 73 77 64 44 6c 67 22 20 2d 63 6f 6d  #PasswdDlg" -com
0b30: 6d 61 6e 64 5d 0a 0a 20 20 20 20 73 65 74 20 64  mand]..    set d
0b40: 65 66 62 20 2d 31 0a 20 20 20 20 73 65 74 20 63  efb -1.    set c
0b50: 61 6e 62 20 2d 31 0a 20 20 20 20 73 77 69 74 63  anb -1.    switc
0b60: 68 20 2d 2d 20 24 74 79 70 65 20 7b 0a 20 20 20  h -- $type {.   
0b70: 20 20 20 20 20 6f 6b 20 20 20 20 20 20 20 20 7b       ok        {
0b80: 20 73 65 74 20 6c 62 75 74 20 7b 6f 6b 7d 3b 20   set lbut {ok}; 
0b90: 73 65 74 20 64 65 66 62 20 30 20 7d 0a 20 20 20  set defb 0 }.   
0ba0: 20 20 20 20 20 6f 6b 63 61 6e 63 65 6c 20 20 7b       okcancel  {
0bb0: 20 73 65 74 20 6c 62 75 74 20 7b 6f 6b 20 63 61   set lbut {ok ca
0bc0: 6e 63 65 6c 7d 20 3b 20 73 65 74 20 64 65 66 62  ncel} ; set defb
0bd0: 20 30 3b 20 73 65 74 20 63 61 6e 62 20 31 20 7d   0; set canb 1 }
0be0: 0a 20 20 20 20 7d 0a 0a 20 20 20 20 65 76 61 6c  .    }..    eval
0bf0: 20 44 69 61 6c 6f 67 3a 3a 63 72 65 61 74 65 20   Dialog::create 
0c00: 24 70 61 74 68 20 24 6d 61 70 73 28 3a 63 6d 64  $path $maps(:cmd
0c10: 29 20 2d 63 6c 61 73 73 20 50 61 73 73 77 64 44  ) -class PasswdD
0c20: 6c 67 20 5c 0a 20 20 20 20 20 20 20 20 2d 69 6d  lg \.        -im
0c30: 61 67 65 20 5b 42 69 74 6d 61 70 3a 3a 67 65 74  age [Bitmap::get
0c40: 20 70 61 73 73 77 64 5d 20 2d 73 69 64 65 20 62   passwd] -side b
0c50: 6f 74 74 6f 6d 20 2d 64 65 66 61 75 6c 74 20 24  ottom -default $
0c60: 64 65 66 62 20 2d 63 61 6e 63 65 6c 20 24 63 61  defb -cancel $ca
0c70: 6e 62 0a 20 20 20 20 66 6f 72 65 61 63 68 20 62  nb.    foreach b
0c80: 75 74 20 24 6c 62 75 74 20 7b 0a 20 20 20 20 20  ut $lbut {.     
0c90: 20 20 20 69 66 20 7b 20 24 62 75 74 20 3d 3d 20     if { $but == 
0ca0: 22 6f 6b 22 20 26 26 20 24 63 6d 64 20 21 3d 20  "ok" && $cmd != 
0cb0: 22 22 20 7d 20 7b 0a 20 20 20 20 20 20 20 20 20  "" } {.         
0cc0: 20 20 20 44 69 61 6c 6f 67 3a 3a 61 64 64 20 24     Dialog::add $
0cd0: 70 61 74 68 20 2d 74 65 78 74 20 24 62 75 74 20  path -text $but 
0ce0: 2d 6e 61 6d 65 20 24 62 75 74 20 2d 63 6f 6d 6d  -name $but -comm
0cf0: 61 6e 64 20 24 63 6d 64 0a 20 20 20 20 20 20 20  and $cmd.       
0d00: 20 7d 20 65 6c 73 65 20 7b 0a 20 20 20 20 20 20   } else {.      
0d10: 20 20 20 20 20 20 44 69 61 6c 6f 67 3a 3a 61 64        Dialog::ad
0d20: 64 20 24 70 61 74 68 20 2d 74 65 78 74 20 24 62  d $path -text $b
0d30: 75 74 20 2d 6e 61 6d 65 20 24 62 75 74 0a 20 20  ut -name $but.  
0d40: 20 20 20 20 20 20 7d 0a 20 20 20 20 7d 0a 0a 20        }.    }.. 
0d50: 20 20 20 73 65 74 20 66 72 61 6d 65 20 5b 44 69     set frame [Di
0d60: 61 6c 6f 67 3a 3a 67 65 74 66 72 61 6d 65 20 24  alog::getframe $
0d70: 70 61 74 68 5d 0a 23 20 20 20 20 62 69 6e 64 20  path].#    bind 
0d80: 24 70 61 74 68 20 20 3c 52 65 74 75 72 6e 3e 20  $path  <Return> 
0d90: 20 22 22 0a 20 20 20 20 62 69 6e 64 20 24 66 72   "".    bind $fr
0da0: 61 6d 65 20 3c 44 65 73 74 72 6f 79 3e 20 22 57  ame <Destroy> "W
0db0: 69 64 67 65 74 3a 3a 64 65 73 74 72 6f 79 20 24  idget::destroy $
0dc0: 70 61 74 68 23 50 61 73 73 77 64 44 6c 67 22 0a  path#PasswdDlg".
0dd0: 0a 20 20 20 20 73 65 74 20 6c 61 62 6c 6f 67 20  .    set lablog 
0de0: 5b 65 76 61 6c 20 4c 61 62 65 6c 45 6e 74 72 79  [eval LabelEntry
0df0: 3a 3a 63 72 65 61 74 65 20 24 66 72 61 6d 65 2e  ::create $frame.
0e00: 6c 61 62 6c 6f 67 20 24 6d 61 70 73 28 2e 66 72  lablog $maps(.fr
0e10: 61 6d 65 2e 6c 61 62 6c 6f 67 29 20 5c 0a 09 20  ame.lablog) \.. 
0e20: 20 20 20 2d 6e 61 6d 65 20 6c 6f 67 69 6e 20 2d     -name login -
0e30: 64 72 61 67 65 6e 61 62 6c 65 64 20 30 20 2d 64  dragenabled 0 -d
0e40: 72 6f 70 65 6e 61 62 6c 65 64 20 30 20 5c 0a 09  ropenabled 0 \..
0e50: 20 20 20 20 2d 63 6f 6d 6d 61 6e 64 20 5c 22 50      -command \"P
0e60: 61 73 73 77 64 44 6c 67 3a 3a 5f 76 65 72 69 66  asswdDlg::_verif
0e70: 6f 6e 70 61 73 73 77 64 20 24 70 61 74 68 20 24  onpasswd $path $
0e80: 66 72 61 6d 65 2e 6c 61 62 70 61 73 73 5c 22 5d  frame.labpass\"]
0e90: 0a 0a 20 20 20 20 73 65 74 20 6c 61 62 70 61 73  ..    set labpas
0ea0: 73 20 5b 65 76 61 6c 20 4c 61 62 65 6c 45 6e 74  s [eval LabelEnt
0eb0: 72 79 3a 3a 63 72 65 61 74 65 20 24 66 72 61 6d  ry::create $fram
0ec0: 65 2e 6c 61 62 70 61 73 73 20 24 6d 61 70 73 28  e.labpass $maps(
0ed0: 2e 66 72 61 6d 65 2e 6c 61 62 70 61 73 73 29 20  .frame.labpass) 
0ee0: 5c 0a 09 20 20 20 20 2d 6e 61 6d 65 20 70 61 73  \..    -name pas
0ef0: 73 77 6f 72 64 20 2d 73 68 6f 77 20 22 2a 22 20  sword -show "*" 
0f00: 2d 64 72 61 67 65 6e 61 62 6c 65 64 20 30 20 2d  -dragenabled 0 -
0f10: 64 72 6f 70 65 6e 61 62 6c 65 64 20 30 20 5c 0a  dropenabled 0 \.
0f20: 09 20 20 20 20 2d 63 6f 6d 6d 61 6e 64 20 5c 22  .    -command \"
0f30: 50 61 73 73 77 64 44 6c 67 3a 3a 5f 76 65 72 69  PasswdDlg::_veri
0f40: 66 6f 6e 6c 6f 67 69 6e 20 24 70 61 74 68 20 24  fonlogin $path $
0f50: 66 72 61 6d 65 2e 6c 61 62 6c 6f 67 5c 22 5d 0a  frame.lablog\"].
0f60: 0a 20 20 20 20 23 20 63 6f 6d 70 75 74 65 20 6c  .    # compute l
0f70: 61 62 65 6c 20 77 69 64 74 68 20 2d 2d 20 54 4f  abel width -- TO
0f80: 44 4f 3a 20 74 68 69 73 20 73 68 6f 75 6c 64 20  DO: this should 
0f90: 70 72 6f 62 61 62 6c 79 20 6e 6f 74 20 6f 76 65  probably not ove
0fa0: 72 72 69 64 65 20 74 68 65 0a 20 20 20 20 23 20  rride the.    # 
0fb0: 63 6d 64 6c 69 6e 65 20 61 72 67 0a 20 20 20 20  cmdline arg.    
0fc0: 73 65 74 20 6c 6f 67 6c 61 62 65 6c 20 20 5b 24  set loglabel  [$
0fd0: 6c 61 62 6c 6f 67 20 63 67 65 74 20 2d 6c 61 62  lablog cget -lab
0fe0: 65 6c 5d 0a 20 20 20 20 73 65 74 20 70 61 73 73  el].    set pass
0ff0: 6c 61 62 65 6c 20 5b 24 6c 61 62 70 61 73 73 20  label [$labpass 
1000: 63 67 65 74 20 2d 6c 61 62 65 6c 5d 0a 20 20 20  cget -label].   
1010: 20 73 65 74 20 6c 61 62 77 69 64 74 68 20 20 5b   set labwidth  [
1020: 5f 6d 61 78 20 5b 73 74 72 69 6e 67 20 6c 65 6e  _max [string len
1030: 67 74 68 20 24 6c 6f 67 6c 61 62 65 6c 5d 20 5b  gth $loglabel] [
1040: 73 74 72 69 6e 67 20 6c 65 6e 67 74 68 20 24 70  string length $p
1050: 61 73 73 6c 61 62 65 6c 5d 5d 0a 20 20 20 20 69  asslabel]].    i
1060: 6e 63 72 20 6c 61 62 77 69 64 74 68 20 31 0a 20  ncr labwidth 1. 
1070: 20 20 20 24 6c 61 62 6c 6f 67 20 20 63 6f 6e 66     $lablog  conf
1080: 69 67 75 72 65 20 2d 6c 61 62 65 6c 77 69 64 74  igure -labelwidt
1090: 68 20 24 6c 61 62 77 69 64 74 68 0a 20 20 20 20  h $labwidth.    
10a0: 24 6c 61 62 70 61 73 73 20 63 6f 6e 66 69 67 75  $labpass configu
10b0: 72 65 20 2d 6c 61 62 65 6c 77 69 64 74 68 20 24  re -labelwidth $
10c0: 6c 61 62 77 69 64 74 68 0a 0a 20 20 20 20 70 72  labwidth..    pr
10d0: 6f 63 20 3a 3a 24 70 61 74 68 20 7b 20 63 6d 64  oc ::$path { cmd
10e0: 20 61 72 67 73 20 7d 20 22 72 65 74 75 72 6e 20   args } "return 
10f0: 5c 5b 65 76 61 6c 20 50 61 73 73 77 64 44 6c 67  \[eval PasswdDlg
1100: 3a 3a 5c 24 63 6d 64 20 24 70 61 74 68 20 5c 24  ::\$cmd $path \$
1110: 61 72 67 73 5c 5d 22 0a 0a 20 20 20 20 70 61 63  args\]"..    pac
1120: 6b 20 20 24 66 72 61 6d 65 2e 6c 61 62 6c 6f 67  k  $frame.lablog
1130: 20 24 66 72 61 6d 65 2e 6c 61 62 70 61 73 73 20   $frame.labpass 
1140: 2d 66 69 6c 6c 20 78 20 2d 65 78 70 61 6e 64 20  -fill x -expand 
1150: 31 0a 0a 20 20 20 20 23 20 61 64 64 65 64 20 62  1..    # added b
1160: 79 20 62 61 63 68 40 6d 77 67 64 6e 61 2e 63 6f  y [email protected]
1170: 6d 0a 20 20 20 20 23 20 20 67 69 76 65 20 66 6f  m.    #  give fo
1180: 63 75 73 20 74 6f 20 6c 6f 67 69 6e 6c 61 62 65  cus to loginlabe
1190: 6c 20 75 6e 6c 65 73 73 20 74 68 65 20 73 74 61  l unless the sta
11a0: 74 65 20 69 73 20 64 69 73 61 62 6c 65 64 0a 20  te is disabled. 
11b0: 20 20 20 69 66 20 7b 5b 24 6c 61 62 6c 6f 67 20     if {[$lablog 
11c0: 63 67 65 74 20 2d 65 64 69 74 61 62 6c 65 5d 7d  cget -editable]}
11d0: 20 7b 0a 09 66 6f 63 75 73 20 24 66 72 61 6d 65   {..focus $frame
11e0: 2e 6c 61 62 6c 6f 67 2e 65 0a 20 20 20 20 7d 20  .lablog.e.    } 
11f0: 65 6c 73 65 20 7b 0a 09 66 6f 63 75 73 20 24 66  else {..focus $f
1200: 72 61 6d 65 2e 6c 61 62 70 61 73 73 2e 65 0a 20  rame.labpass.e. 
1210: 20 20 20 7d 0a 20 20 20 20 73 65 74 20 72 65 73     }.    set res
1220: 20 5b 44 69 61 6c 6f 67 3a 3a 64 72 61 77 20 24   [Dialog::draw $
1230: 70 61 74 68 5d 0a 0a 20 20 20 20 69 66 20 7b 20  path]..    if { 
1240: 24 72 65 73 20 3d 3d 20 30 20 7d 20 7b 0a 20 20  $res == 0 } {.  
1250: 20 20 20 20 20 20 73 65 74 20 72 65 73 20 5b 6c        set res [l
1260: 69 73 74 20 5b 24 6c 61 62 6c 6f 67 2e 65 20 63  ist [$lablog.e c
1270: 67 65 74 20 2d 74 65 78 74 5d 20 5b 24 6c 61 62  get -text] [$lab
1280: 70 61 73 73 2e 65 20 63 67 65 74 20 2d 74 65 78  pass.e cget -tex
1290: 74 5d 5d 0a 20 20 20 20 7d 20 65 6c 73 65 20 7b  t]].    } else {
12a0: 0a 20 20 20 20 20 20 20 20 73 65 74 20 72 65 73  .        set res
12b0: 20 5b 6c 69 73 74 5d 0a 20 20 20 20 7d 0a 20 20   [list].    }.  
12c0: 20 20 57 69 64 67 65 74 3a 3a 64 65 73 74 72 6f    Widget::destro
12d0: 79 20 22 24 70 61 74 68 23 50 61 73 73 77 64 44  y "$path#PasswdD
12e0: 6c 67 22 0a 20 20 20 20 64 65 73 74 72 6f 79 20  lg".    destroy 
12f0: 24 70 61 74 68 0a 0a 20 20 20 20 72 65 74 75 72  $path..    retur
1300: 6e 20 24 72 65 73 0a 7d 0a 0a 23 20 2d 2d 2d 2d  n $res.}..# ----
1310: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1320: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1330: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1340: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1350: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 20 43 6f 6d  ---------.#  Com
1360: 6d 61 6e 64 20 50 61 73 73 77 64 44 6c 67 3a 3a  mand PasswdDlg::
1370: 63 6f 6e 66 69 67 75 72 65 0a 23 20 2d 2d 2d 2d  configure.# ----
1380: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1390: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
13a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
13b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
13c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 70 72 6f 63 20  ---------..proc 
13d0: 50 61 73 73 77 64 44 6c 67 3a 3a 63 6f 6e 66 69  PasswdDlg::confi
13e0: 67 75 72 65 20 7b 20 70 61 74 68 20 61 72 67 73  gure { path args
13f0: 20 7d 20 7b 0a 20 20 20 20 73 65 74 20 72 65 73   } {.    set res
1400: 20 5b 57 69 64 67 65 74 3a 3a 63 6f 6e 66 69 67   [Widget::config
1410: 75 72 65 20 22 24 70 61 74 68 23 50 61 73 73 77  ure "$path#Passw
1420: 64 44 6c 67 22 20 24 61 72 67 73 5d 0a 7d 0a 0a  dDlg" $args].}..
1430: 23 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  # --------------
1440: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1450: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1460: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1470: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a  ---------------.
1480: 23 20 20 43 6f 6d 6d 61 6e 64 20 50 61 73 73 77  #  Command Passw
1490: 64 44 6c 67 3a 3a 63 67 65 74 0a 23 20 2d 2d 2d  dDlg::cget.# ---
14a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
14b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
14c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
14d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
14e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 70 72 6f 63  ----------..proc
14f0: 20 50 61 73 73 77 64 44 6c 67 3a 3a 63 67 65 74   PasswdDlg::cget
1500: 20 7b 20 70 61 74 68 20 6f 70 74 69 6f 6e 20 7d   { path option }
1510: 20 7b 0a 20 20 20 20 72 65 74 75 72 6e 20 5b 57   {.    return [W
1520: 69 64 67 65 74 3a 3a 63 67 65 74 20 22 24 70 61  idget::cget "$pa
1530: 74 68 23 50 61 73 73 77 64 44 6c 67 22 20 24 6f  th#PasswdDlg" $o
1540: 70 74 69 6f 6e 5d 0a 7d 0a 0a 0a 23 20 2d 2d 2d  ption].}...# ---
1550: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1560: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1570: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1580: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1590: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 20 43 6f  ----------.#  Co
15a0: 6d 6d 61 6e 64 20 50 61 73 73 77 64 44 6c 67 3a  mmand PasswdDlg:
15b0: 3a 5f 76 65 72 69 66 6f 6e 6c 6f 67 69 6e 0a 23  :_verifonlogin.#
15c0: 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d   ---------------
15d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
15e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
15f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1600: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 70  --------------.p
1610: 72 6f 63 20 50 61 73 73 77 64 44 6c 67 3a 3a 5f  roc PasswdDlg::_
1620: 76 65 72 69 66 6f 6e 6c 6f 67 69 6e 20 7b 20 70  verifonlogin { p
1630: 61 74 68 20 6c 61 62 70 61 73 73 20 7d 20 7b 0a  ath labpass } {.
1640: 20 20 20 20 69 66 20 7b 20 5b 24 6c 61 62 70 61      if { [$labpa
1650: 73 73 2e 65 20 63 67 65 74 20 2d 74 65 78 74 5d  ss.e cget -text]
1660: 20 3d 3d 20 22 22 20 7d 20 7b 0a 20 20 20 20 20   == "" } {.     
1670: 20 20 20 66 6f 63 75 73 20 24 6c 61 62 70 61 73     focus $labpas
1680: 73 0a 20 20 20 20 7d 20 65 6c 73 65 20 7b 0a 20  s.    } else {. 
1690: 20 20 20 20 20 20 20 44 69 61 6c 6f 67 3a 3a 73         Dialog::s
16a0: 65 74 66 6f 63 75 73 20 24 70 61 74 68 20 64 65  etfocus $path de
16b0: 66 61 75 6c 74 0a 20 20 20 20 7d 0a 7d 0a 0a 23  fault.    }.}..#
16c0: 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d   ---------------
16d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
16e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
16f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1700: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23  --------------.#
1710: 20 20 43 6f 6d 6d 61 6e 64 20 50 61 73 73 77 64    Command Passwd
1720: 44 6c 67 3a 3a 5f 76 65 72 69 66 6f 6e 70 61 73  Dlg::_verifonpas
1730: 73 77 64 0a 23 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  swd.# ----------
1740: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1750: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1760: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1770: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1780: 2d 2d 2d 0a 70 72 6f 63 20 50 61 73 73 77 64 44  ---.proc PasswdD
1790: 6c 67 3a 3a 5f 76 65 72 69 66 6f 6e 70 61 73 73  lg::_verifonpass
17a0: 77 64 20 7b 20 70 61 74 68 20 6c 61 62 6c 6f 67  wd { path lablog
17b0: 20 7d 20 7b 0a 20 20 20 20 69 66 20 7b 20 5b 24   } {.    if { [$
17c0: 6c 61 62 6c 6f 67 2e 65 20 63 67 65 74 20 2d 74  lablog.e cget -t
17d0: 65 78 74 5d 20 3d 3d 20 22 22 20 7d 20 7b 0a 20  ext] == "" } {. 
17e0: 20 20 20 20 20 20 20 66 6f 63 75 73 20 24 6c 61         focus $la
17f0: 62 6c 6f 67 0a 20 20 20 20 7d 20 65 6c 73 65 20  blog.    } else 
1800: 7b 0a 20 20 20 20 20 20 20 20 44 69 61 6c 6f 67  {.        Dialog
1810: 3a 3a 73 65 74 66 6f 63 75 73 20 24 70 61 74 68  ::setfocus $path
1820: 20 64 65 66 61 75 6c 74 0a 20 20 20 20 7d 0a 7d   default.    }.}
1830: 0a 0a 23 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ..# ------------
1840: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1850: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1860: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1870: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
1880: 2d 0a 23 20 20 43 6f 6d 6d 61 6e 64 20 50 61 73  -.#  Command Pas
1890: 73 77 64 44 6c 67 3a 3a 5f 6d 61 78 0a 23 20 2d  swdDlg::_max.# -
18a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
18b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
18c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
18d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
18e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 70 72 6f  ------------.pro
18f0: 63 20 50 61 73 73 77 64 44 6c 67 3a 3a 5f 6d 61  c PasswdDlg::_ma
1900: 78 20 7b 20 76 61 6c 31 20 76 61 6c 32 20 7d 20  x { val1 val2 } 
1910: 7b 20 0a 20 20 20 20 72 65 74 75 72 6e 20 5b 65  { .    return [e
1920: 78 70 72 20 7b 28 24 76 61 6c 31 20 3e 20 24 76  xpr {($val1 > $v
1930: 61 6c 32 29 20 3f 20 28 24 76 61 6c 31 29 20 3a  al2) ? ($val1) :
1940: 20 28 24 76 61 6c 32 29 7d 5d 20 0a 7d 0a         ($val2)}] .}.