aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2008-01-23 03:40:45 +0800
committerMilan Crha <mcrha@src.gnome.org>2008-01-23 03:40:45 +0800
commitb4a738589e221d136ef7532b9c0ca1965ecbb9cc (patch)
tree7575e4e932245b9a521e64ff3c28676975c80a7f /widgets/table
parent4825d465d6052855db119e6005ad38b30c685cc5 (diff)
downloadgsoc2013-evolution-b4a738589e221d136ef7532b9c0ca1965ecbb9cc.tar
gsoc2013-evolution-b4a738589e221d136ef7532b9c0ca1965ecbb9cc.tar.gz
gsoc2013-evolution-b4a738589e221d136ef7532b9c0ca1965ecbb9cc.tar.bz2
gsoc2013-evolution-b4a738589e221d136ef7532b9c0ca1965ecbb9cc.tar.lz
gsoc2013-evolution-b4a738589e221d136ef7532b9c0ca1965ecbb9cc.tar.xz
gsoc2013-evolution-b4a738589e221d136ef7532b9c0ca1965ecbb9cc.tar.zst
gsoc2013-evolution-b4a738589e221d136ef7532b9c0ca1965ecbb9cc.zip
** Fix for bug #511105
2008-01-22 Milan Crha <mcrha@redhat.com> ** 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
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/ChangeLog9
-rw-r--r--widgets/table/e-table-column-specification.c2
-rw-r--r--widgets/table/e-table-item.c11
-rw-r--r--widgets/table/e-tree-table-adapter.c2
4 files changed, 19 insertions, 5 deletions
diff --git a/widgets/table/ChangeLog b/widgets/table/ChangeLog
index 707472b79f..30d266f683 100644
--- a/widgets/table/ChangeLog
+++ b/widgets/table/ChangeLog
@@ -1,5 +1,14 @@
2008-01-22 Milan Crha <mcrha@redhat.com>
+ ** 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 <mcrha@redhat.com>
+
** Fix for bug #511094
* e-cell-text.c: (ect_draw): Set proper foreground color based
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 */