This patch allows the window containing the sheet to be expanded and removes the memory corruption when closing the sheet. However, I suspect it is not a complete solution - it ends up adding another memory leak and there are quite a few of those in gtksheet already.
:-)

Hopefully, it will help identify the real problem.

--

Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

--- gtk+extra2-2.1.1/gtkextra/gtksheet.c	2005-06-24 18:51:00.000000000 +0100
+++ gtk+extra-patch/gtkextra/gtksheet.c	2006-09-26 10:58:16.000000000 +0100
@@ -634,7 +634,7 @@
 {
   g_return_if_fail (range != NULL);
 
-  g_free (range);
+/*  g_free (range);*/
 }
 
 GType
@@ -4149,7 +4149,7 @@
 			   &pixmap_width, &pixmap_height);
       if ((pixmap_width != width) || (pixmap_height != height))
 	{
-          g_free(sheet->pixmap);
+/*          g_free(sheet->pixmap);*/
 	  sheet->pixmap = gdk_pixmap_new (sheet->sheet_window,
 					       width, height,
 					       -1);
@@ -8491,7 +8491,7 @@
       if(!child->floating){
         if(child_requisition.width + 2*child->xpadding <= sheet->column[child->col].width){
           if(child->xfill){
-            child_requisition.width = child_allocation.width = sheet->column[child->col].width - 2*child->xpadding;
+            child_requisition.width = child_allocation.width = sheet->column[child->col].width;
           } else {
             if(child->xexpand){
               child->x = area.x + sheet->column[child->col].width / 2 -
@@ -8508,7 +8508,7 @@
 
         if(child_requisition.height + 2*child->ypadding <= sheet->row[child->row].height){
           if(child->yfill){
-            child_requisition.height = child_allocation.height = sheet->row[child->row].height - 2*child->ypadding;
+            child_requisition.height = child_allocation.height = sheet->row[child->row].height;
           } else {
             if(child->yexpand){
               child->y = area.y + sheet->row[child->row].height / 2 -

Attachment: pgpdC5JLCOonv.pgp
Description: PGP signature

Reply via email to