]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
scroll logic needed updating
authorewt <ewt>
Sat, 1 Aug 1998 16:06:02 +0000 (16:06 +0000)
committerewt <ewt>
Sat, 1 Aug 1998 16:06:02 +0000 (16:06 +0000)
dialogboxes.c

index fd9d269f5a419412449a7dcb4de9d51db933a913..3bf87de58332fdd447634a560cb2f719ee85f89c 100644 (file)
@@ -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++) {