fix for listboxes. It did not like LINES and COLS being zero now

This commit is contained in:
Miguel de Icaza 1999-01-02 18:16:09 +00:00
parent 6d273c8eae
commit 533998c0fa
2 changed files with 5 additions and 1 deletions

View File

@ -445,6 +445,9 @@ x_create_listbox (Dlg_head *h, widget_data parent, WListbox *l)
GTK_SIGNAL_FUNC (listbox_select), l);
l->widget.wdata = (widget_data) sw;
gtk_widget_show (listbox);
g_warning ("FIXME: actually compute the real size of the listbox");
l->height = 8;
for (p = l->list, i = 0; i < l->count; i++, p = p->next){
char *text [1];

View File

@ -2208,7 +2208,8 @@ listbox_new (int y, int x, int width, int height,
l->list = l->top = l->current = 0;
l->pos = 0;
l->width = width;
l->height = height;
if (height <= 0)
l->height = 0;
l->count = 0;
l->top = 0;
l->current= 0;