diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2000-12-14 23:47:36 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2000-12-14 23:47:36 +0000 |
commit | 752c59eb0ab37ca75bb410052aaf40514818cd54 (patch) | |
tree | f083ed8b39dedee72a7eadaa4f7631f6b11fc0e7 /mdk-stage1/newt-frontend.c | |
parent | 4cfd9a056d6e652efb751a6a2ea56c700886ce51 (diff) | |
download | drakx-752c59eb0ab37ca75bb410052aaf40514818cd54.tar drakx-752c59eb0ab37ca75bb410052aaf40514818cd54.tar.gz drakx-752c59eb0ab37ca75bb410052aaf40514818cd54.tar.bz2 drakx-752c59eb0ab37ca75bb410052aaf40514818cd54.tar.xz drakx-752c59eb0ab37ca75bb410052aaf40514818cd54.zip |
- do progressbar since it seems nobody can live without it
- write real separation between cdrom, disk, and network code; have multiple targets for that issue
- begin network code: network interface is up and runing (static IP only), network is configured
Diffstat (limited to 'mdk-stage1/newt-frontend.c')
-rw-r--r-- | mdk-stage1/newt-frontend.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/mdk-stage1/newt-frontend.c b/mdk-stage1/newt-frontend.c index f5bfae047..4f62f87f0 100644 --- a/mdk-stage1/newt-frontend.c +++ b/mdk-stage1/newt-frontend.c @@ -202,3 +202,35 @@ enum return_type ask_yes_no(char *msg) return RETURN_BACK; else return RETURN_ERROR; } + +enum return_type ask_from_entries(char *msg, char ** questions, char *** answers, int entry_size) +{ + struct newtWinEntry entries[50]; + int j, i = 0; + int rc; + + while (questions && *questions) { + entries[i].text = *questions; + entries[i].flags = NEWT_FLAG_SCROLL; + i++; + questions++; + } + entries[i].text = NULL; + entries[i].value = NULL; + + *answers = (char **) malloc(sizeof(char *) * i); + + for (j = 0 ; j < i ; j++) { + entries[j].value = &((*answers)[j]); + *(entries[j].value) = NULL; + } + + rc = newtWinEntries("Please fill entries...", msg, 52, 5, 5, entry_size, entries, "Ok", "Cancel", NULL); + + if (rc == 3) + return RETURN_BACK; + if (rc != 1) + return RETURN_ERROR; + + return RETURN_OK; +} |