From: ewt Date: Sat, 1 Aug 1998 16:06:02 +0000 (+0000) Subject: scroll logic needed updating X-Git-Tag: r0-30~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=394c9a80170e789d00d508ae577916749a04e188;p=thirdparty%2Fnewt.git scroll logic needed updating --- diff --git a/dialogboxes.c b/dialogboxes.c index fd9d269..3bf87de 100644 --- a/dialogboxes.c +++ b/dialogboxes.c @@ -166,7 +166,7 @@ int listBox(char * text, int height, int width, poptContext optCon, char buf[80], format[20]; int maxTagWidth = 0; int maxTextWidth = 0; - int noScrollFlag; + int scrollFlag; struct { char * text; char * tag; @@ -204,17 +204,17 @@ int listBox(char * text, int height, int width, poptContext optCon, text, flags, &top); if (listHeight >= numItems) { - noScrollFlag = NEWT_FLAG_NOSCROLL; + scrollFlag = 0; i = 0; } else { - noScrollFlag = 0; + scrollFlag = NEWT_FLAG_SCROLL; i = 2; } listBox = newtListbox(3 + ((width - 10 - maxTagWidth - maxTextWidth - i) / 2), top + 1, listHeight, - NEWT_FLAG_RETURNEXIT | noScrollFlag); + NEWT_FLAG_RETURNEXIT | scrollFlag); sprintf(format, "%%-%ds %%s", maxTagWidth); for (i = 0; i < numItems; i++) {