diff options
author | Jean-Yves Lefort <jylefort@FreeBSD.org> | 2005-11-25 06:38:42 +0000 |
---|---|---|
committer | Jean-Yves Lefort <jylefort@FreeBSD.org> | 2005-11-25 06:38:42 +0000 |
commit | b579a63ab62a89b482495c9841696ae026bf3189 (patch) | |
tree | c9beca8409522343e93cad986feb920ab3df2c42 | |
parent | 209da06bb169a0e242bf304a8f928d38d22de72d (diff) | |
download | ports-b579a63ab62a89b482495c9841696ae026bf3189.tar.gz ports-b579a63ab62a89b482495c9841696ae026bf3189.zip |
Fix some memory leaks in gailtreeview.c (now Glade will not crash
anymore when saving a project).
Reference: http://bugzilla.gnome.org/show_bug.cgi?id=322299
Notes
Notes:
svn path=/head/; revision=149394
-rw-r--r-- | accessibility/gail/Makefile | 1 | ||||
-rw-r--r-- | accessibility/gail/files/patch-gail_gailtreeview.c | 71 |
2 files changed, 72 insertions, 0 deletions
diff --git a/accessibility/gail/Makefile b/accessibility/gail/Makefile index cc41e5fc58b4..5d6be27a6e99 100644 --- a/accessibility/gail/Makefile +++ b/accessibility/gail/Makefile @@ -7,6 +7,7 @@ PORTNAME= gail PORTVERSION= 1.8.7 +PORTREVISION= 1 CATEGORIES= accessibility x11-toolkits MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME}/1.8 diff --git a/accessibility/gail/files/patch-gail_gailtreeview.c b/accessibility/gail/files/patch-gail_gailtreeview.c new file mode 100644 index 000000000000..8d1cd41e1b93 --- /dev/null +++ b/accessibility/gail/files/patch-gail_gailtreeview.c @@ -0,0 +1,71 @@ +--- gail/gailtreeview.c.orig Tue Nov 22 19:01:37 2005 ++++ gail/gailtreeview.c Fri Nov 25 07:12:33 2005 +@@ -678,7 +678,9 @@ + { + GailTreeView *view = GAIL_TREE_VIEW (object); + +- /* remove anyg idle handlers still pending */ ++ clear_cached_data (view); ++ ++ /* remove any idle handlers still pending */ + if (view->idle_garbage_collect_id) + g_source_remove (view->idle_garbage_collect_id); + +@@ -692,8 +694,6 @@ + if (view->tree_model) + disconnect_model_signals (view); + +- clear_cached_data (view); +- + if (view->col_data) + { + GArray *array = view->col_data; +@@ -3295,8 +3295,10 @@ + GtkTreeIter new_iter; + gboolean row_expanded; + +- if (increment == row) ++ if (increment == row) { ++ gtk_tree_path_free (current_path); + return iter; ++ } + + row_expanded = gtk_tree_view_row_expanded (tree_view, current_path); + gtk_tree_path_free (current_path); +@@ -3574,7 +3576,7 @@ + + g_assert (GAIL_IS_TREE_VIEW (data)); + tree_view = (GailTreeView *)data; +- temp_list = tree_view->cell_data; ++ temp_list = g_list_copy (tree_view->cell_data); + + tree_view->garbage_collection_pending = FALSE; + tree_view->idle_garbage_collect_id = 0; +@@ -3586,14 +3588,15 @@ + if (!cell_info->in_use) + { + /* g_object_unref (cell_info->cell); */ +- tree_view->cell_data = g_list_remove_link (tree_view->cell_data, +- temp_list); ++ tree_view->cell_data = g_list_remove (tree_view->cell_data, ++ cell_info); + if (cell_info->cell_row_ref) + gtk_tree_row_reference_free (cell_info->cell_row_ref); + g_free (cell_info); + } + temp_list = temp_list->next; + } ++ g_list_free (temp_list); + + return tree_view->garbage_collection_pending; + } +@@ -3989,7 +3992,8 @@ + g_assert (GAIL_IS_TREE_VIEW (cell_info->view)); + if (!cell_info->view->garbage_collection_pending) { + cell_info->view->garbage_collection_pending = TRUE; +- g_idle_add (garbage_collect_cell_data, cell_info->view); ++ cell_info->view->idle_garbage_collect_id = ++ g_idle_add (garbage_collect_cell_data, cell_info->view); + } + } + } |