summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade/label.c
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 /usr.sbin/sade/label.c
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 'usr.sbin/sade/label.c')
-rw-r--r--usr.sbin/sade/label.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c
index b51abb2..850d94d 100644
--- a/usr.sbin/sade/label.c
+++ b/usr.sbin/sade/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;
OpenPOWER on IntegriCloud