Name: newt
%define version 0.50
Version: %{version}
-Release: 3
+Release: 4
Copyright: LGPL
Group: System Environment/Libraries
Source: ftp://ftp.redhat.com/pub/redhat/code/newt/newt-%{version}.tar.gz
%postun -p /sbin/ldconfig
%changelog
+* Mon Aug 9 1999 Matt Wilson <msw@redhat.com>
+- added snack wrappings for checkbox flag setting
+
* Thu Aug 5 1999 Matt Wilson <msw@redhat.com>
- added snack bindings for setting current listbox selection
- added argument to set default selection in snack ListboxChoiceWindow
class TextboxReflowed(Textbox):
- def __init__(self, width, text, flexDown = 5, flexUp = 10):
+ def __init__(self, width, text, flexDown = 5, flexUp = 10, maxHeight = -1):
(newtext, width, height) = reflow(text, width, flexDown, flexUp)
- Textbox.__init__(self, width, height, newtext, 0)
+ if maxHeight != -1 and height > maxHeight:
+ Textbox.__init__(self, width, maxHeight, newtext, 1)
+ else:
+ Textbox.__init__(self, width, height, newtext, 0)
class Label(Widget):
buttons = [ 'Ok', 'Cancel' ],
width = 40):
bb = ButtonBar(screen, buttons)
- t = TextboxReflowed(width, text)
+ t = TextboxReflowed(width, text, maxHeight = screen.height - 12)
g = GridForm(screen, title, 1, 2)
g.add(t, 0, 0, padding = (0, 0, 0, 1))