summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-05-09 09:42:17 +0000
committerjkh <jkh@FreeBSD.org>1996-05-09 09:42:17 +0000
commit0f600e3b3639c4d0d645e43e9b3790d659fdfbbc (patch)
tree47e7c675397ffb7f38fb8ea89b10f5d6718bff8d /release
parent37b4c046b896694291284f351c7bc95a1819cda1 (diff)
downloadFreeBSD-src-0f600e3b3639c4d0d645e43e9b3790d659fdfbbc.zip
FreeBSD-src-0f600e3b3639c4d0d645e43e9b3790d659fdfbbc.tar.gz
Some cosmetic changes:
Make "selection bar" inverse video white-on-blue on color screens to avoid it getting muddled up with popup dialogs. Do disk selection in a more friendly fashion (for one thing, allow a drive to be de-selected again if you change your mind). Add a few strategic screen-saves to prevent corruption of screen contents (thanks, Michael Elbel!).
Diffstat (limited to 'release')
-rw-r--r--release/sysinstall/disks.c26
-rw-r--r--release/sysinstall/floppy.c25
-rw-r--r--release/sysinstall/label.c27
-rw-r--r--release/sysinstall/menus.c6
-rw-r--r--release/sysinstall/options.c12
5 files changed, 54 insertions, 42 deletions
diff --git a/release/sysinstall/disks.c b/release/sysinstall/disks.c
index bb27859..987f2ea 100644
--- a/release/sysinstall/disks.c
+++ b/release/sysinstall/disks.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: disks.c,v 1.46 1996/04/29 06:47:08 jkh Exp $
+ * $Id: disks.c,v 1.47 1996/04/30 05:23:45 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -101,7 +101,7 @@ print_chunks(Disk *d)
"Subtype", "Flags");
for (i = 0, row = CHUNK_START_ROW; chunk_info[i]; i++, row++) {
if (i == current_chunk)
- attrset(A_REVERSE);
+ attrset(item_selected_attr);
mvprintw(row, 2, "%10ld %10lu %10lu %8s %8d %8s %8d\t%-6s",
chunk_info[i]->offset, chunk_info[i]->size,
chunk_info[i]->end, chunk_info[i]->name,
@@ -120,10 +120,8 @@ print_command_summary()
mvprintw(17, 0, "D = Delete Partition G = Set Drive Geometry S = Set Bootable");
mvprintw(18, 0, "U = Undo All Changes Q = Finish");
if (!RunningAsInit)
- mvprintw(18, 48, "W = Write Changes");
- mvprintw(20, 0, "The currently selected partition is displayed in ");
- attrset(A_REVERSE); addstr("reverse"); attrset(A_NORMAL); addstr(" video.");
- mvprintw(21, 0, "Use F1 or ? to get more help, arrow keys to move.");
+ mvprintw(18, 46, "W = Write Changes");
+ mvprintw(21, 0, "Use F1 or ? to get more help, arrow keys to select.");
move(0, 0);
}
@@ -186,7 +184,7 @@ diskPartition(Device *dev, Disk *d)
print_chunks(d);
print_command_summary();
if (msg) {
- standout(); mvprintw(23, 0, msg); standend();
+ attrset(title_attr); mvprintw(23, 0, msg); attrset(A_NORMAL);
beep();
msg = NULL;
}
@@ -341,6 +339,8 @@ diskPartition(Device *dev, Disk *d)
"are installing FreeBSD for the first time! This is not\n"
"an option for use during the standard install.\n\n"
"Are you absolutely sure you want to do this now?")) {
+ WINDOW *save = savescr();
+
variable_set2(DISK_PARTITIONED, "yes");
clear();
@@ -356,6 +356,7 @@ diskPartition(Device *dev, Disk *d)
msgConfirm("Disk partition write returned an error status!");
else
msgConfirm("Wrote FDISK partition information out successfully.");
+ restorescr(save);
}
break;
@@ -420,9 +421,14 @@ partitionHook(dialogMenuItem *selected)
msgConfirm("Unable to find disk %s!", selected->prompt);
return DITEM_FAILURE;
}
- devs[0]->enabled = TRUE;
- diskPartition(devs[0], (Disk *)devs[0]->private);
- return DITEM_SUCCESS;
+ /* Toggle enabled status? */
+ if (!devs[0]->enabled) {
+ devs[0]->enabled = TRUE;
+ diskPartition(devs[0], (Disk *)devs[0]->private);
+ }
+ else
+ devs[0]->enabled = FALSE;
+ return DITEM_SUCCESS | DITEM_REDRAW;
}
static int
diff --git a/release/sysinstall/floppy.c b/release/sysinstall/floppy.c
index 16b5301..e3cb41e 100644
--- a/release/sysinstall/floppy.c
+++ b/release/sysinstall/floppy.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: floppy.c,v 1.10 1996/04/13 13:31:34 jkh Exp $
+ * $Id: floppy.c,v 1.11 1996/04/23 01:29:20 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -74,7 +74,9 @@ getRootFloppy(void)
{
int fd = -1;
- while (floppyDev == NULL || fd == -1) {
+ if (mediaDevice->type == DEVICE_TYPE_FLOPPY)
+ floppyDev = mediaDevice;
+ else {
Device **devs;
int cnt;
@@ -84,23 +86,28 @@ getRootFloppy(void)
msgConfirm("No floppy devices found! Something is seriously wrong!");
return -1;
}
- else if (cnt == 1) {
+ else if (cnt == 1)
floppyDev = devs[0];
- msgConfirm("Please insert the ROOT floppy in %s and press [ENTER]", floppyDev->description);
- }
- else {
+ else {
DMenu *menu;
+ int ret;
+ WINDOW *save = savescr();
menu = deviceCreateMenu(&MenuMediaFloppy, DEVICE_TYPE_FLOPPY, floppyChoiceHook, NULL);
menu->title = "Please insert the ROOT floppy";
- if (!dmenuOpenSimple(menu))
+ ret = dmenuOpenSimple(menu);
+ restorescr(save);
+ if (!ret)
return -1;
}
- if (!floppyDev)
- continue;
+ }
+ while (fd == -1) {
+ msgConfirm("Please insert the ROOT floppy in %s and press [ENTER]", floppyDev->description);
fd = open(floppyDev->devname, O_RDONLY);
if (isDebug())
msgDebug("getRootFloppy on %s yields fd of %d\n", floppyDev->devname, fd);
+ if (fd == -1 && msgYesNo("Couldn't open the floppy - do you want to try again?"))
+ break;
}
return fd;
}
diff --git a/release/sysinstall/label.c b/release/sysinstall/label.c
index b51abb2..850d94d 100644
--- a/release/sysinstall/label.c
+++ b/release/sysinstall/label.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: label.c,v 1.46 1996/04/28 22:54:18 jkh Exp $
+ * $Id: label.c,v 1.47 1996/04/29 05:09:23 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -103,9 +103,9 @@ diskLabelEditor(dialogMenuItem *self)
++enabled;
}
if (!enabled) {
- devs[0]->enabled = TRUE;
- if (DITEM_STATUS(diskPartitionEditor(self)) == DITEM_FAILURE)
- return DITEM_FAILURE;
+ msgConfirm("No disks have been selected. Please visit the Partition\n"
+ "editor first to specify which disks you wish to operate on.");
+ return DITEM_FAILURE;
}
i = diskLabel(devs[0]->name);
if (DITEM_STATUS(i) != DITEM_FAILURE)
@@ -400,7 +400,7 @@ print_label_chunks(void)
if (label_chunk_info[i].type == PART_SLICE) {
sz = space_free(label_chunk_info[i].c);
if (i == here)
- attrset(A_REVERSE);
+ attrset(item_selected_attr);
mvprintw(srow++, 0, "Disk: %s\tPartition name: %s\tFree: %d blocks (%dMB)",
label_chunk_info[i].c->disk->name, label_chunk_info[i].c->name, sz, (sz / ONE_MEG));
attrset(A_NORMAL);
@@ -447,7 +447,7 @@ print_label_chunks(void)
memcpy(onestr + PART_NEWFS_COL, newfs, strlen(newfs));
onestr[PART_NEWFS_COL + strlen(newfs)] = '\0';
if (i == here)
- wattrset(ChunkWin, A_REVERSE);
+ wattrset(ChunkWin, item_selected_attr);
mvwaddstr(ChunkWin, prow, pcol, onestr);
wattrset(ChunkWin, A_NORMAL);
wrefresh(ChunkWin);
@@ -463,16 +463,10 @@ print_command_summary()
mvprintw(17, 0, "The following commands are valid here (upper or lower case):");
mvprintw(18, 0, "C = Create D = Delete M = Mount");
if (!RunningAsInit)
- mvprintw(18, 48, "W = Write");
+ mvprintw(18, 47, "W = Write");
mvprintw(19, 0, "N = Newfs Opts T = Newfs Toggle U = Undo Q = Finish");
mvprintw(20, 0, "A = Auto Defaults for all!");
- mvprintw(22, 0, "The default target will be displayed in ");
-
- attrset(A_REVERSE);
- addstr("reverse");
- attrset(A_NORMAL);
- addstr(" video.");
- mvprintw(23, 0, "Use F1 or ? to get more help, arrow keys to move.");
+ mvprintw(22, 0, "Use F1 or ? to get more help, arrow keys to select.");
move(0, 0);
}
@@ -506,7 +500,7 @@ diskLabel(char *str)
first_time = 0;
}
if (msg) {
- attrset(A_REVERSE); mvprintw(23, 0, msg); attrset(A_NORMAL);
+ attrset(title_attr); mvprintw(23, 0, msg); attrset(A_NORMAL);
clrtoeol();
beep();
msg = NULL;
@@ -837,8 +831,11 @@ diskLabel(char *str)
"operation, and it should also be noted that this option is NOT for\n"
"use during new installations but rather for modifying existing ones.\n\n"
"Are you absolutely SURE you want to do this now?")) {
+ WINDOW *save = savescr();
+
variable_set2(DISK_LABELLED, "yes");
diskLabelCommit(NULL);
+ restorescr(save);
}
break;
diff --git a/release/sysinstall/menus.c b/release/sysinstall/menus.c
index 4237041..9706286 100644
--- a/release/sysinstall/menus.c
+++ b/release/sysinstall/menus.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: menus.c,v 1.58 1996/04/29 18:06:07 jkh Exp $
+ * $Id: menus.c,v 1.59 1996/05/05 21:54:23 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -828,8 +828,8 @@ this operation. If you are attempting to install a boot partition\n\
on a drive other than the first one or have multiple operating\n\
systems on your machine, you will have the option to install a boot\n\
manager later. To select a drive, use the arrow keys to move to it\n\
-and press [SPACE].\n\n\
-When you're finished, select Cancel to go on to the next step.",
+and press [SPACE]. To de-select it, press [SPACE] again.\n\n\
+Select OK or Cancel to leave this menu.",
"Press F1 for important information regarding disk geometry!",
"drives",
{ { NULL } },
diff --git a/release/sysinstall/options.c b/release/sysinstall/options.c
index 003a0bd..bcfbda3 100644
--- a/release/sysinstall/options.c
+++ b/release/sysinstall/options.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
- * $Id: options.c,v 1.34 1996/04/23 01:29:31 jkh Exp $
+ * $Id: options.c,v 1.35 1996/04/25 17:31:25 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -217,18 +217,20 @@ optionsEditor(dialogMenuItem *self)
for (i = 0; Options[i].name; i++) {
/* Names are painted somewhat gratuitously each time, but it's easier this way */
mvprintw(optrow, OPT_NAME_COL + optcol, Options[i].name);
- if (currOpt == i) standout();
+ if (currOpt == i)
+ attrset(item_selected_attr);
mvprintw(optrow++, OPT_VALUE_COL + optcol, value_of(Options[i]));
- if (currOpt == i) standend();
+ if (currOpt == i)
+ attrset(A_NORMAL);
if (optrow == OPT_END_ROW) {
optrow = OPT_START_ROW;
optcol += GROUP_OFFSET;
}
clrtoeol();
}
- standout();
+ attrset(item_attr);
mvaddstr(OPT_END_ROW + 3, 0, Options[currOpt].desc);
- standend();
+ attrset(A_NORMAL);
clrtoeol();
move(0, 14);
refresh();
OpenPOWER on IntegriCloud