]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
1) updated version to 0.11
authorewt <ewt>
Tue, 30 Sep 1997 16:30:27 +0000 (16:30 +0000)
committerewt <ewt>
Tue, 30 Sep 1997 16:30:27 +0000 (16:30 +0000)
2) fixed growing listboxes

listbox.c
newt.spec

index ebbbd43c006d61b433ec10bd8b3c493659a3eab6..589e8812fc87c65423316f23b3ae0c6c9a34c848 100644 (file)
--- a/listbox.c
+++ b/listbox.c
@@ -104,9 +104,11 @@ newtComponent newtListbox(int left, int top, int height, int flags) {
                                       COLORSET_ACTLISTBOX);
            li->sbAdjust = 3;
        }
+       co->height = height;
     } else {
        li->grow = 1;
        sb = NULL;
+       co->height = 2 * li->bdyAdjust;
     }
 
     li->sb = sb;
@@ -114,13 +116,12 @@ newtComponent newtListbox(int left, int top, int height, int flags) {
     co->isMapped = 0;
     co->left = left;
     co->top = top;
-    co->height = height;
     co->ops = &listboxOps;
     co->takesFocus = 1;
     co->callback = NULL;
 
     updateWidth(co, li, 5);
-    li->curHeight = height - (2 * li->bdyAdjust);
+    li->curHeight = co->height - (2 * li->bdyAdjust);
 
     return co;
 }
@@ -307,7 +308,7 @@ int newtListboxAddEntry(newtComponent co, const char * text,
     item->isSelected = 0;
     
     if (li->grow)
-       co->height++;
+       co->height++, li->curHeight++;
     li->numItems++;
 
     return li->numItems;
index 4d8c518e9385497183e7478d0d4208614468931a..6b792f97fefebb844b8c6db8308d016312184db4 100644 (file)
--- a/newt.spec
+++ b/newt.spec
@@ -4,7 +4,7 @@ Version: 0.11
 Release: 1
 Copyright: LGPL
 Group: Libraries
-Source: ftp://ftp.redhat.com/pub/redhat/code/newt/newt-0.9.tar.gz
+Source: ftp://ftp.redhat.com/pub/redhat/code/newt/newt-0.11.tar.gz
 Requires: slang
 %package devel
 Summary: Developer's toolkit for newt windowing library