From: ewt Date: Tue, 30 Sep 1997 16:30:27 +0000 (+0000) Subject: 1) updated version to 0.11 X-Git-Tag: r0-12~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9b1b15f5596844b738e7c8b89c9a16c393deb5f8;p=thirdparty%2Fnewt.git 1) updated version to 0.11 2) fixed growing listboxes --- diff --git a/listbox.c b/listbox.c index ebbbd43..589e881 100644 --- 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; diff --git a/newt.spec b/newt.spec index 4d8c518..6b792f9 100644 --- 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