summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/newt-frontend.c
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2000-12-12 21:49:14 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2000-12-12 21:49:14 +0000
commitb8a6765874054e3f3966896a8763f7352d9ff8f1 (patch)
tree58a6aacfc446cf363ef147e1cb8b5166ca410d12 /mdk-stage1/newt-frontend.c
parent2b2914cc04a93ca362e4eb3663061c3039aa4049 (diff)
downloaddrakx-b8a6765874054e3f3966896a8763f7352d9ff8f1.tar
drakx-b8a6765874054e3f3966896a8763f7352d9ff8f1.tar.gz
drakx-b8a6765874054e3f3966896a8763f7352d9ff8f1.tar.bz2
drakx-b8a6765874054e3f3966896a8763f7352d9ff8f1.tar.xz
drakx-b8a6765874054e3f3966896a8763f7352d9ff8f1.zip
progressbar for newt+stdio while loading ramdisk
Diffstat (limited to 'mdk-stage1/newt-frontend.c')
-rw-r--r--mdk-stage1/newt-frontend.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/mdk-stage1/newt-frontend.c b/mdk-stage1/newt-frontend.c
index 8a057f98e..f5bfae047 100644
--- a/mdk-stage1/newt-frontend.c
+++ b/mdk-stage1/newt-frontend.c
@@ -114,6 +114,36 @@ void remove_wait_message(void)
}
+static newtComponent form = NULL, scale = NULL;
+static int size_progress;
+static int actually_drawn;
+
+void init_progression(char *msg, int size)
+{
+ size_progress = size;
+ actually_drawn = 0;
+ newtCenteredWindow(70, 5, "Please wait...");
+ form = newtForm(NULL, NULL, 0);
+ newtFormAddComponent(form, newtLabel(1, 1, msg));
+ scale = newtScale(1, 3, 68, size);
+ newtFormAddComponent(form, scale);
+ newtDrawForm(form);
+ newtRefresh();
+}
+
+void update_progression(int current_size)
+{
+ newtScaleSet(scale, current_size);
+ newtRefresh();
+}
+
+void end_progression(void)
+{
+ newtPopWindow();
+ newtFormDestroy(form);
+}
+
+
enum return_type ask_from_list_comments(char *msg, char ** elems, char ** elems_comments, char ** choice)
{
char * items[50];