From 8932007887638b76f95e4a23cb2ae4f8f2235389 Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Sat, 18 Dec 1999 02:04:02 +0000 Subject: [PATCH] Better screen handling in X desktop setup. Don't get cute with nested dialogs now. --- release/sysinstall/config.c | 3 +-- release/sysinstall/label.c | 11 ----------- usr.sbin/sade/config.c | 3 +-- usr.sbin/sade/label.c | 11 ----------- usr.sbin/sysinstall/config.c | 3 +-- usr.sbin/sysinstall/label.c | 11 ----------- 6 files changed, 3 insertions(+), 39 deletions(-) diff --git a/release/sysinstall/config.c b/release/sysinstall/config.c index b33b01768bcb..c4c241a8e3b0 100644 --- a/release/sysinstall/config.c +++ b/release/sysinstall/config.c @@ -564,11 +564,10 @@ configXSetup(dialogMenuItem *self) { char *config, *execfile, *style; char *moused; - WINDOW *w; + WINDOW *w = savescr(); setenv("XWINHOME", "/usr/X11R6", 1); tryagain: - w = savescr(); variable_unset(VAR_DESKSTYLE); variable_unset(VAR_XF86_CONFIG); dialog_clear_norefresh(); diff --git a/release/sysinstall/label.c b/release/sysinstall/label.c index 9e9049a75800..bce434ebb6f9 100644 --- a/release/sysinstall/label.c +++ b/release/sysinstall/label.c @@ -327,12 +327,7 @@ get_mountpoint(struct chunk *old) tmp = old->private_data; else tmp = NULL; - if (!old) { - DialogX = 14; - DialogY = 16; - } val = msgGetInput(tmp ? tmp->mountpoint : NULL, "Please specify a mount point for the partition"); - DialogX = DialogY = 0; if (!val || !*val) { if (!old) return NULL; @@ -391,13 +386,10 @@ get_partition_type(void) }; WINDOW *w = savescr(); - DialogX = 7; - DialogY = 8; i = dialog_menu("Please choose a partition type", "If you want to use this partition for swap space, select Swap.\n" "If you want to put a filesystem on it, choose FS.", -1, -1, 2, 2, fs_types, selection, NULL, NULL); - DialogX = DialogY = 0; restorescr(w); if (!i) { if (!strcmp(selection, "FS")) @@ -908,13 +900,10 @@ diskLabel(Device *dev) u_long flags = 0; sprintf(osize, "%d", sz); - DialogX = 3; - DialogY = 2; val = msgGetInput(osize, "Please specify the partition size in blocks or append a trailing M for\n" "megabytes or C for cylinders. %d blocks (%dMB) are free.", sz, sz / ONE_MEG); - DialogX = DialogY = 0; if (!val || (size = strtol(val, &cp, 0)) <= 0) { clear_wins(); break; diff --git a/usr.sbin/sade/config.c b/usr.sbin/sade/config.c index b33b01768bcb..c4c241a8e3b0 100644 --- a/usr.sbin/sade/config.c +++ b/usr.sbin/sade/config.c @@ -564,11 +564,10 @@ configXSetup(dialogMenuItem *self) { char *config, *execfile, *style; char *moused; - WINDOW *w; + WINDOW *w = savescr(); setenv("XWINHOME", "/usr/X11R6", 1); tryagain: - w = savescr(); variable_unset(VAR_DESKSTYLE); variable_unset(VAR_XF86_CONFIG); dialog_clear_norefresh(); diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c index 9e9049a75800..bce434ebb6f9 100644 --- a/usr.sbin/sade/label.c +++ b/usr.sbin/sade/label.c @@ -327,12 +327,7 @@ get_mountpoint(struct chunk *old) tmp = old->private_data; else tmp = NULL; - if (!old) { - DialogX = 14; - DialogY = 16; - } val = msgGetInput(tmp ? tmp->mountpoint : NULL, "Please specify a mount point for the partition"); - DialogX = DialogY = 0; if (!val || !*val) { if (!old) return NULL; @@ -391,13 +386,10 @@ get_partition_type(void) }; WINDOW *w = savescr(); - DialogX = 7; - DialogY = 8; i = dialog_menu("Please choose a partition type", "If you want to use this partition for swap space, select Swap.\n" "If you want to put a filesystem on it, choose FS.", -1, -1, 2, 2, fs_types, selection, NULL, NULL); - DialogX = DialogY = 0; restorescr(w); if (!i) { if (!strcmp(selection, "FS")) @@ -908,13 +900,10 @@ diskLabel(Device *dev) u_long flags = 0; sprintf(osize, "%d", sz); - DialogX = 3; - DialogY = 2; val = msgGetInput(osize, "Please specify the partition size in blocks or append a trailing M for\n" "megabytes or C for cylinders. %d blocks (%dMB) are free.", sz, sz / ONE_MEG); - DialogX = DialogY = 0; if (!val || (size = strtol(val, &cp, 0)) <= 0) { clear_wins(); break; diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c index b33b01768bcb..c4c241a8e3b0 100644 --- a/usr.sbin/sysinstall/config.c +++ b/usr.sbin/sysinstall/config.c @@ -564,11 +564,10 @@ configXSetup(dialogMenuItem *self) { char *config, *execfile, *style; char *moused; - WINDOW *w; + WINDOW *w = savescr(); setenv("XWINHOME", "/usr/X11R6", 1); tryagain: - w = savescr(); variable_unset(VAR_DESKSTYLE); variable_unset(VAR_XF86_CONFIG); dialog_clear_norefresh(); diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c index 9e9049a75800..bce434ebb6f9 100644 --- a/usr.sbin/sysinstall/label.c +++ b/usr.sbin/sysinstall/label.c @@ -327,12 +327,7 @@ get_mountpoint(struct chunk *old) tmp = old->private_data; else tmp = NULL; - if (!old) { - DialogX = 14; - DialogY = 16; - } val = msgGetInput(tmp ? tmp->mountpoint : NULL, "Please specify a mount point for the partition"); - DialogX = DialogY = 0; if (!val || !*val) { if (!old) return NULL; @@ -391,13 +386,10 @@ get_partition_type(void) }; WINDOW *w = savescr(); - DialogX = 7; - DialogY = 8; i = dialog_menu("Please choose a partition type", "If you want to use this partition for swap space, select Swap.\n" "If you want to put a filesystem on it, choose FS.", -1, -1, 2, 2, fs_types, selection, NULL, NULL); - DialogX = DialogY = 0; restorescr(w); if (!i) { if (!strcmp(selection, "FS")) @@ -908,13 +900,10 @@ diskLabel(Device *dev) u_long flags = 0; sprintf(osize, "%d", sz); - DialogX = 3; - DialogY = 2; val = msgGetInput(osize, "Please specify the partition size in blocks or append a trailing M for\n" "megabytes or C for cylinders. %d blocks (%dMB) are free.", sz, sz / ONE_MEG); - DialogX = DialogY = 0; if (!val || (size = strtol(val, &cp, 0)) <= 0) { clear_wins(); break;