From b4a738589e221d136ef7532b9c0ca1965ecbb9cc Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 22 Jan 2008 19:40:45 +0000 Subject: ** Fix for bug #511105 2008-01-22 Milan Crha ** Fix for bug #511105 * e-tree-table-adapter.c: (e_tree_table_adapter_load_expanded_state): * e-table-item.c: (eti_draw): * e-table-column-specification.c: (free_strings): Free allocated memory properly. svn path=/trunk/; revision=34868 --- widgets/table/ChangeLog | 9 +++++++++ widgets/table/e-table-column-specification.c | 2 ++ widgets/table/e-table-item.c | 11 ++++++----- widgets/table/e-tree-table-adapter.c | 2 ++ 4 files changed, 19 insertions(+), 5 deletions(-) (limited to 'widgets/table') diff --git a/widgets/table/ChangeLog b/widgets/table/ChangeLog index 707472b79f..30d266f683 100644 --- a/widgets/table/ChangeLog +++ b/widgets/table/ChangeLog @@ -1,3 +1,12 @@ +2008-01-22 Milan Crha + + ** Fix for bug #511105 + + * e-tree-table-adapter.c: (e_tree_table_adapter_load_expanded_state): + * e-table-item.c: (eti_draw): + * e-table-column-specification.c: (free_strings): + Free allocated memory properly. + 2008-01-22 Milan Crha ** Fix for bug #511094 diff --git a/widgets/table/e-table-column-specification.c b/widgets/table/e-table-column-specification.c index 8371176738..1c1a320fad 100644 --- a/widgets/table/e-table-column-specification.c +++ b/widgets/table/e-table-column-specification.c @@ -50,6 +50,8 @@ free_strings (ETableColumnSpecification *etcs) etcs->compare = NULL; g_free(etcs->search); etcs->search = NULL; + g_free (etcs->sortable); + etcs->sortable = NULL; } static void diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index c3521836a6..75dfce7ce7 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -1872,7 +1872,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, * Nothing to paint */ if (first_col == -1) - return; + goto exit; /* * Compute row span. @@ -1881,7 +1881,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, first_row = (y - floor (eti_base.y) - height_extra) / (eti_row_height (eti, -1) + height_extra); last_row = (y + height - floor (eti_base.y) ) / (eti_row_height (eti, -1) + height_extra) + 1; if (first_row > last_row) - return; + goto exit; y_offset = floor (eti_base.y) - y + height_extra + first_row * (eti_row_height (eti, -1) + height_extra); if (first_row < 0) first_row = 0; @@ -1912,11 +1912,11 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, last_row = row; if (first_row == -1) - return; + goto exit; } if (first_row == -1) - return; + goto exit; /* * Draw cells @@ -2107,8 +2107,9 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, gdk_draw_rectangle (drawable, eti->focus_gc, FALSE, f_x1, f_y1, f_x2 - f_x1 - 1, f_y2 - f_y1); } - cairo_destroy (cr); +exit: + cairo_destroy (cr); } static double diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c index 17e1987e86..5712069581 100644 --- a/widgets/table/e-tree-table-adapter.c +++ b/widgets/table/e-tree-table-adapter.c @@ -1050,6 +1050,8 @@ e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta, const char *f file_default = TRUE; else file_default = FALSE; /* Even unspecified we'll consider as false */ + + g_free (state); } /* Incase the default is changed, lets forget the changes and stick to default */ -- cgit v1.2.3