added compile time switch to put the tree views into a hpaned for owen to
Sun Mar 3 06:39:19 2002 Tim Janik <timj@gtk.org> * gtk/gtkfilesel.c: added compile time switch to put the tree views into a hpaned for owen to play with. * gtk/gtktreedatalist.c (_gtk_tree_data_list_header_free): * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_cell_data_func), (gtk_tree_view_column_finalize): * gtk/gtktreestore.c (gtk_tree_store_set_default_sort_func), (gtk_tree_store_set_sort_func), (gtk_tree_store_finalize): * gtk/gtktreeselection.c (gtk_tree_selection_finalize): * gtk/gtktreemodelsort.c (gtk_tree_model_sort_reset_default_sort_func), (gtk_tree_model_sort_set_default_sort_func), (gtk_tree_model_sort_set_sort_func): * gtk/gtkliststore.c (gtk_list_store_set_default_sort_func), (gtk_list_store_set_default_sort_func), (gtk_list_store_set_sort_func), (gtk_list_store_finalize): add reentrancy protection around destroy() function invocation. * gtk/gtktreeselection.c (gtk_tree_selection_set_select_function): fix destroy function invocation (which was missing).
This commit is contained in:
@ -98,8 +98,15 @@ gtk_tree_selection_init (GtkTreeSelection *selection)
|
||||
static void
|
||||
gtk_tree_selection_finalize (GObject *object)
|
||||
{
|
||||
if (GTK_TREE_SELECTION (object)->destroy)
|
||||
(* GTK_TREE_SELECTION (object)->destroy) (GTK_TREE_SELECTION (object)->user_data);
|
||||
GtkTreeSelection *selection = GTK_TREE_SELECTION (object);
|
||||
|
||||
if (selection->destroy)
|
||||
{
|
||||
GtkDestroyNotify d = selection->destroy;
|
||||
|
||||
selection->destroy = NULL;
|
||||
d (selection->user_data);
|
||||
}
|
||||
|
||||
/* chain parent_class' handler */
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
@ -276,6 +283,14 @@ gtk_tree_selection_set_select_function (GtkTreeSelection *selection,
|
||||
g_return_if_fail (GTK_IS_TREE_SELECTION (selection));
|
||||
g_return_if_fail (func != NULL);
|
||||
|
||||
if (selection->destroy)
|
||||
{
|
||||
GtkDestroyNotify d = selection->destroy;
|
||||
|
||||
selection->destroy = NULL;
|
||||
d (selection->user_data);
|
||||
}
|
||||
|
||||
selection->user_func = func;
|
||||
selection->user_data = data;
|
||||
selection->destroy = destroy;
|
||||
|
||||
Reference in New Issue
Block a user