diff options
author | jkh <jkh@FreeBSD.org> | 1996-05-09 09:42:17 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-05-09 09:42:17 +0000 |
commit | 0f600e3b3639c4d0d645e43e9b3790d659fdfbbc (patch) | |
tree | 47e7c675397ffb7f38fb8ea89b10f5d6718bff8d /release/sysinstall/disks.c | |
parent | 37b4c046b896694291284f351c7bc95a1819cda1 (diff) | |
download | FreeBSD-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/sysinstall/disks.c')
-rw-r--r-- | release/sysinstall/disks.c | 26 |
1 files changed, 16 insertions, 10 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 |