[comp.windows.x] Whoops...

bajan@OPUS.CS.MCGILL.CA (Alan Emtage) (04/14/89)

Sorry people. The previously posted (hacked) patch to the List widget was
not the right version. Hopefully you haven't added it yet. If you have
then backing it out should be relatively easy (it's only a couple of lines).
The following it the right one. Sorry about that. 

-------------------


*** List.c.old	Thu Jan 26 12:00:14 1989
--- List.c	Thu Apr 13 18:01:36 1989
***************
*** 206,212 ****
--- 206,215 ----
      ListWidget lw = (ListWidget) w;
      int width = w->core.width;
      int height = w->core.height;
+     char **array;
+     int i;
  
+ 
      if (lw->list.nitems == 0)	/* Get number of items. */
          while (lw->list.list[lw->list.nitems] != NULL)
  	    lw->list.nitems++;
***************
*** 224,229 ****
--- 227,239 ----
      else 
          lw->list.col_width = lw->list.longest;
      lw->list.col_width += lw->list.column_space;
+ 
+     array = (char **) XtCalloc((Cardinal) lw->list.nitems, sizeof(String));
+ 
+     for(i=0; i < lw->list.nitems; i++)
+ 	array[i] = XtNewString(lw->list.list[i]);
+ 
+     lw->list.list = array;
  
      if (Layout(w, changex, changey, &width, &height))
        ChangeSize(w, width, height);

Alan (bajan@cs.mcgill.ca,listmaster@cs.mcgill.ca)