1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

Use dialog_clear_norefresh() if possible

This commit is contained in:
Andrey A. Chernov 1994-11-17 23:36:49 +00:00
parent 80aee6ac1f
commit 4195601de8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=4577
5 changed files with 19 additions and 20 deletions

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
* *
* $Id: main.c,v 1.15 1994/11/12 05:40:26 phk Exp $ * $Id: main.c,v 1.16 1994/11/17 19:44:49 ache Exp $
* *
*/ */
@ -41,8 +41,7 @@ extern int alloc_memory();
void void
handle_intr(int sig) handle_intr(int sig)
{ {
dialog_clear(); dialog_clear_norefresh();
dialog_update();
dialog_msgbox("User Interrupt", dialog_msgbox("User Interrupt",
"User interrupted. Aborting the installation", "User interrupted. Aborting the installation",
-1, -1, 1); -1, -1, 1);

View File

@ -185,10 +185,11 @@ ShowFile(char *filename, char *header)
if (access(filename, R_OK)) { if (access(filename, R_OK)) {
sprintf(buf, "The %s file is not provided on the 1.2MB floppy image.", filename); sprintf(buf, "The %s file is not provided on the 1.2MB floppy image.", filename);
dialog_msgbox("Sorry!", buf, -1, -1, 1); dialog_msgbox("Sorry!", buf, -1, -1, 1);
dialog_clear_norefresh();
return; return;
} }
dialog_clear(); dialog_clear_norefresh();
dialog_textbox(header, filename, LINES, COLS); dialog_textbox(header, filename, LINES, COLS);
dialog_clear(); dialog_clear_norefresh();
} }

View File

@ -200,7 +200,7 @@ select_disk()
if (dialog_menu("FreeBSD Installation", scratch, -1, -1, 5, no_disks, if (dialog_menu("FreeBSD Installation", scratch, -1, -1, 5, no_disks,
options, selection)) { options, selection)) {
dialog_clear(); dialog_clear_norefresh();
sprintf(scratch,"\n\n\nYou did not select a valid disk.\n\n"); sprintf(scratch,"\n\n\nYou did not select a valid disk.\n\n");
AskAbort(scratch); AskAbort(scratch);
valid = 0; valid = 0;
@ -234,7 +234,7 @@ select_partition(int disk)
if (dialog_menu(TITLE, if (dialog_menu(TITLE,
scratch, -1, -1, 5, 5, options, selection)) { scratch, -1, -1, 5, 5, options, selection)) {
sprintf(scratch,"You did not select a valid partition"); sprintf(scratch,"You did not select a valid partition");
dialog_clear(); dialog_clear_norefresh();
AskAbort(scratch); AskAbort(scratch);
valid = 0; valid = 0;
} }
@ -388,7 +388,7 @@ stage1()
if (!dialog_yesno(TITLE, if (!dialog_yesno(TITLE,
"Are you sure you wish to proceed?", "Are you sure you wish to proceed?",
-1, -1)) { -1, -1)) {
dialog_clear(); dialog_clear_norefresh();
if (clear_mbr(mbr, boot1) == -1) { if (clear_mbr(mbr, boot1) == -1) {
sprintf(scratch, "\n\nCouldn't create new master boot record.\n\n%s", errmsg); sprintf(scratch, "\n\nCouldn't create new master boot record.\n\n%s", errmsg);
Fatal(scratch);; Fatal(scratch);;
@ -401,11 +401,11 @@ stage1()
if (custom_install) if (custom_install)
if (!dialog_yesno(TITLE, "Do you wish to edit the DOS partition table?", if (!dialog_yesno(TITLE, "Do you wish to edit the DOS partition table?",
-1, -1)) { -1, -1)) {
dialog_clear(); dialog_clear_norefresh();
edit_mbr(mbr, &avail_disklabels[inst_disk]); edit_mbr(mbr, &avail_disklabels[inst_disk]);
} }
dialog_clear(); dialog_clear_norefresh();
inst_part = select_partition(inst_disk); inst_part = select_partition(inst_disk);
ok = 0; ok = 0;
@ -416,10 +416,10 @@ stage1()
} else { } else {
sprintf(scratch, "The DOS partition table is inconsistent.\n\n%s\nDo you wish to edit it by hand?", errmsg); sprintf(scratch, "The DOS partition table is inconsistent.\n\n%s\nDo you wish to edit it by hand?", errmsg);
if (!dialog_yesno(TITLE, scratch, -1, -1)) { if (!dialog_yesno(TITLE, scratch, -1, -1)) {
dialog_clear(); dialog_clear_norefresh();
edit_mbr(mbr, &avail_disklabels[inst_disk]); edit_mbr(mbr, &avail_disklabels[inst_disk]);
} else { } else {
dialog_clear(); dialog_clear_norefresh();
AskAbort("Installation cannot proceed without\na valid master boot record\n"); AskAbort("Installation cannot proceed without\na valid master boot record\n");
ok = 1; ok = 1;
ready = 0; ready = 0;
@ -433,7 +433,7 @@ stage1()
mbr->dospart[inst_part].dp_size, mbr->dospart[inst_part].dp_size,
mbr->dospart[inst_part].dp_start); mbr->dospart[inst_part].dp_start);
dialog_msgbox(TITLE, "This is an experimental disklabel configuration\nmenu. It doesn't perform any validation of the entries\nas yet so BE SURE YOU TYPE THINGS CORRECTLY.\n\n Hit escape to quit the editor.\n\nThere may be some delay exiting because of a dialog bug", -1,-1,1); dialog_msgbox(TITLE, "This is an experimental disklabel configuration\nmenu. It doesn't perform any validation of the entries\nas yet so BE SURE YOU TYPE THINGS CORRECTLY.\n\n Hit escape to quit the editor.\n\nThere may be some delay exiting because of a dialog bug", -1,-1,1);
dialog_clear(); dialog_clear_norefresh();
edit_disklabel(&avail_disklabels[inst_disk]); edit_disklabel(&avail_disklabels[inst_disk]);
build_disklabel(&avail_disklabels[inst_disk]); build_disklabel(&avail_disklabels[inst_disk]);
@ -444,7 +444,7 @@ stage1()
/* ready could have been reset above */ /* ready could have been reset above */
if (ready) { if (ready) {
if (dialog_yesno(TITLE, "We are now ready to format the hard disk for FreeBSD.\n\nSome or all of the disk will be overwritten during this process.\n\nAre you sure you wish to proceed ?", -1, -1)) { if (dialog_yesno(TITLE, "We are now ready to format the hard disk for FreeBSD.\n\nSome or all of the disk will be overwritten during this process.\n\nAre you sure you wish to proceed ?", -1, -1)) {
dialog_clear(); dialog_clear_norefresh();
AskAbort("Do you want to quit?"); AskAbort("Do you want to quit?");
ready = 0; ready = 0;
} }

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
* *
* $Id: stage4.c,v 1.7 1994/11/17 14:18:43 jkh Exp $ * $Id: stage4.c,v 1.8 1994/11/17 19:44:53 ache Exp $
* *
*/ */
@ -43,7 +43,7 @@ stage4()
if (ffd > 0) if (ffd > 0)
break; break;
} }
dialog_clear(); dialog_clear_norefresh();
TellEm("cd /stand ; gunzip < /dev/fd0 | cpio -idum"); TellEm("cd /stand ; gunzip < /dev/fd0 | cpio -idum");
pipe(pfd); pipe(pfd);
zpid = fork(); zpid = fork();

View File

@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
* *
* $Id: utils.c,v 1.28 1994/11/17 14:12:38 jkh Exp $ * $Id: utils.c,v 1.29 1994/11/17 19:44:55 ache Exp $
* *
*/ */
@ -66,8 +66,7 @@ TellEm(char *fmt, ...)
write(debug_fd,"Progress <",10); write(debug_fd,"Progress <",10);
write(debug_fd,p,strlen(p)); write(debug_fd,p,strlen(p));
write(debug_fd,">\n\r",3); write(debug_fd,">\n\r",3);
dialog_clear(); dialog_clear_norefresh();
dialog_update();
dialog_msgbox("Progress", p, -1, -1, 0); dialog_msgbox("Progress", p, -1, -1, 0);
free(p); free(p);
} }
@ -102,7 +101,7 @@ AskAbort(char *fmt, ...)
va_end(ap); va_end(ap);
strcat(p, "\n\nDo you wish to abort the installation?"); strcat(p, "\n\nDo you wish to abort the installation?");
if (!dialog_yesno("Abort", p, -1, -1)) { if (!dialog_yesno("Abort", p, -1, -1)) {
dialog_clear(); dialog_clear_norefresh();
Abort(); Abort();
} }
dialog_clear(); dialog_clear();