home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January, February, March & April
/
Chip-Cover-CD-2007-02.iso
/
boot
/
i386
/
root
/
usr
/
share
/
YaST2
/
clients
/
password.ycp
< prev
next >
Wrap
Text File
|
2006-11-29
|
779b
|
37 lines
/**
* File: clients/password.ycp
* Package: yast2
* Summary: Ask user for password
* Authors: Michal Svec <msvec@suse.cz>
*
* $Id: password.ycp 14119 2004-02-11 10:03:43Z msvec $
*
* Return the password, if user entered one.
* Return nil, if user canceled or closed the window.
*/
{
textdomain "base";
import "Label";
term contents = `VBox(
/* TextEntry label */
`Password(`id(`pw), _("&Enter Password:")),
`HBox(
`PushButton(`id(`ok), `opt(`hstretch, `default), Label::OKButton()),
`PushButton(`id(`cancel), `opt(`hstretch), Label::CancelButton())
)
);
UI::OpenDialog(contents);
UI::SetFocus(`id(`pw));
string ret = nil;
if(UI::UserInput() == `ok)
ret = (string) UI::QueryWidget(`id(`pw), `Value);
UI::CloseDialog();
return ret;
/* EOF */
}