diff options
author | jkh <jkh@FreeBSD.org> | 1999-12-14 04:25:29 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1999-12-14 04:25:29 +0000 |
commit | d3944eb60a18bfd5f8b4b6ff033a61a20f2383cc (patch) | |
tree | e8c2e2130b60892a8d69589245c55613e2ca6edf /usr.sbin/sysinstall/anonFTP.c | |
parent | 796518d06842cbc05ce0994ade4027837c42cec0 (diff) | |
download | FreeBSD-src-d3944eb60a18bfd5f8b4b6ff033a61a20f2383cc.zip FreeBSD-src-d3944eb60a18bfd5f8b4b6ff033a61a20f2383cc.tar.gz |
Completely rip-out and redesign sysinstall's refresh model as well
as redoing all the menus to have proper, or at least non-hallucinogenic,
keyboard accelerators.
This requires my recent update to libdialog to work properly and will
probably also exhibit some other "interesting" behavior while the last
few missing screen clears are found (which is why I'm not going to MFC
immediately). At least now, however, sysinstall does not gratuitously
redraw random screens at the drop of a hat and drive serial console
installers out of their minds.
Diffstat (limited to 'usr.sbin/sysinstall/anonFTP.c')
-rw-r--r-- | usr.sbin/sysinstall/anonFTP.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/usr.sbin/sysinstall/anonFTP.c b/usr.sbin/sysinstall/anonFTP.c index 134c9d3..04f8fbc 100644 --- a/usr.sbin/sysinstall/anonFTP.c +++ b/usr.sbin/sysinstall/anonFTP.c @@ -191,12 +191,14 @@ anonftpOpenDialog(void) int n = 0, cancel = FALSE; int max; char title[80]; - + WINDOW *w = savescr(); + /* We need a curses window */ if (!(ds_win = openLayoutDialog(ANONFTP_HELPFILE, " Anonymous FTP Configuration ", ANONFTP_DIALOG_X, ANONFTP_DIALOG_Y, ANONFTP_DIALOG_WIDTH, ANONFTP_DIALOG_HEIGHT))) { beep(); msgConfirm("Cannot open anonymous ftp dialog window!!"); + restorescr(w); return DITEM_FAILURE; } @@ -225,9 +227,8 @@ anonftpOpenDialog(void) /* Clear this crap off the screen */ delwin(ds_win); - dialog_clear_norefresh(); use_helpfile(NULL); - + restorescr(w); if (cancel) return DITEM_FAILURE; return DITEM_SUCCESS; @@ -241,11 +242,10 @@ configAnonFTP(dialogMenuItem *self) /* Be optimistic */ i = DITEM_SUCCESS; - dialog_clear_norefresh(); i = anonftpOpenDialog(); if (DITEM_STATUS(i) != DITEM_SUCCESS) { msgConfirm("Configuration of Anonymous FTP cancelled per user request."); - return i | DITEM_RESTORE; + return i; } /*** Use defaults for any invalid values ***/ @@ -296,7 +296,6 @@ configAnonFTP(dialogMenuItem *self) if (!msgYesNo("Create a welcome message file for anonymous FTP users?")) { char cmd[256]; - dialog_clear(); vsystem("echo Your welcome message here. > %s/etc/%s", tconf.homedir, MOTD_FILE); sprintf(cmd, "%s %s/etc/%s", variable_get(VAR_EDITOR), tconf.homedir, MOTD_FILE); if (!systemExecute(cmd)) @@ -312,5 +311,5 @@ configAnonFTP(dialogMenuItem *self) } if (DITEM_STATUS(i) == DITEM_SUCCESS) variable_set2("anon_ftp", "YES", 0); - return i | DITEM_RESTORE; + return i; } |