On Tue, Nov 11, 2003 at 01:41:02PM -0500, Joey Hess wrote: > Denis Barbier wrote: > > Could someone please test the attached patch? > > I cannot test it myself at the moment, but I believe that it eliminates > > those flashing boxes. > > It seems rather broken. When the hw-detect progress bar was displayed, > it cleared the screen to blue each time the bar was updated. Then it > displayed the inside of the dialg box, but not the border. This was very > slow and very obvious on vmware.
Here is another patch. I managed to get hw-detect to work directly under cdebconf and so could test it, but I prefer anyway to have it reviewed. As the previous one, it only addresses the flashing boxes problem, I still do not know what to do with resized boxes. Denis
Index: src/modules/frontend/newt/newt.c =================================================================== RCS file: /cvs/debian-boot/debian-installer/tools/cdebconf/src/modules/frontend/newt/newt.c,v retrieving revision 1.40 diff -u -r1.40 newt.c --- src/modules/frontend/newt/newt.c 8 Nov 2003 22:39:41 -0000 1.40 +++ src/modules/frontend/newt/newt.c 11 Nov 2003 20:56:29 -0000 @@ -901,17 +901,19 @@ obj->interactive = 1; obj->data = calloc(1, sizeof(struct newt_data)); newtInit(); + newtCls(); newtGetScreenSize(&width, &height); // Fill the screen so people can shift-pgup properly for (i = 0; i < height; i++) putchar('\n'); - newtFinished(); + newtRefresh(); return DC_OK; } static int newt_shutdown(struct frontend *obj) { + newtFinished(); return DC_OK; } @@ -926,36 +928,25 @@ static int newt_go(struct frontend *obj) { - struct newt_data *data = (struct newt_data *)obj->data; struct question *q = obj->questions; - int i, ret = DC_OK, cleared; + int i, ret = DC_OK; - cleared = 0; while (q != NULL) { for (i = 0; i < DIM(question_handlers); i++) { if (strcmp(q->template->type, question_handlers[i].type) == 0) { - if (!cleared && !data->scale_form) { - cleared = 1; - newtInit(); - newtCls(); - } ret = question_handlers[i].handler(obj, q); if (ret == DC_OK) obj->qdb->methods.set(obj->qdb, q); else if (ret == DC_GOBACK && q->prev != NULL) q = q->prev; - else { - newtFinished(); + else return ret; - } break; } } if (ret == DC_OK) q = q->next; } - if (cleared && !data->scale_form) - newtFinished(); return DC_OK; } @@ -981,8 +972,6 @@ obj->progress_min = min; obj->progress_max = max; obj->progress_cur = min; - newtInit(); - newtCls(); newtGetScreenSize(&width, NULL); win_width = width-7; newtCenteredWindow(win_width, 5, title); @@ -1070,7 +1059,6 @@ if (data->scale_form != NULL) { newtFormDestroy(data->scale_form); newtPopWindow(); - newtFinished(); data->scale_form = data->scale_bar = data->perc_label = data->scale_textbox = NULL; } }