home *** CD-ROM | disk | FTP | other *** search
- // Ask user for a password.
- // Return the password, if he/she enters one
- // Return nil, if he/she cancels or closes the window
- {
- return UI(``{
- OpenDialog(
- `VBox(
- `Password(`id(`pw), _("Enter password:")),
- `HBox(`PushButton(`id(`ok), `opt(`hstretch, `default), _("&OK")),
- `PushButton(`id(`cancel),`opt(`hstretch), _("&Cancel")))));
- any ret = nil;
- if (UserInput() == `ok)
- ret = QueryWidget(`id(`pw), `Value);
- CloseDialog();
- return ret;
- });
- }
-