Make GtkTreeRowReference a boxed type.

Wed Sep 11 15:48:38 2002  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreemodel.c (gtk_tree_row_reference_get_type): Make
	GtkTreeRowReference a boxed type.

	* gtk/gtkliststore.c (gtk_list_store_finalize): free the root
	list.

	* gtk/gtktreestore.c (gtk_tree_store_finalize): free the root
	nodes.
This commit is contained in:
Jonathan Blandford 2002-09-11 19:52:31 +00:00 committed by Jonathan Blandford
parent 429409d40f
commit e8215b3325
10 changed files with 97 additions and 1 deletions

View File

@ -1,3 +1,14 @@
Wed Sep 11 15:48:38 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreemodel.c (gtk_tree_row_reference_get_type): Make
GtkTreeRowReference a boxed type.
* gtk/gtkliststore.c (gtk_list_store_finalize): free the root
list.
* gtk/gtktreestore.c (gtk_tree_store_finalize): free the root
nodes.
Wed Sep 11 12:33:34 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkstyle.c: Draw radio buttons more symmetric. Draw shadow

View File

@ -1,3 +1,14 @@
Wed Sep 11 15:48:38 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreemodel.c (gtk_tree_row_reference_get_type): Make
GtkTreeRowReference a boxed type.
* gtk/gtkliststore.c (gtk_list_store_finalize): free the root
list.
* gtk/gtktreestore.c (gtk_tree_store_finalize): free the root
nodes.
Wed Sep 11 12:33:34 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkstyle.c: Draw radio buttons more symmetric. Draw shadow

View File

@ -1,3 +1,14 @@
Wed Sep 11 15:48:38 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreemodel.c (gtk_tree_row_reference_get_type): Make
GtkTreeRowReference a boxed type.
* gtk/gtkliststore.c (gtk_list_store_finalize): free the root
list.
* gtk/gtktreestore.c (gtk_tree_store_finalize): free the root
nodes.
Wed Sep 11 12:33:34 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkstyle.c: Draw radio buttons more symmetric. Draw shadow

View File

@ -1,3 +1,14 @@
Wed Sep 11 15:48:38 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreemodel.c (gtk_tree_row_reference_get_type): Make
GtkTreeRowReference a boxed type.
* gtk/gtkliststore.c (gtk_list_store_finalize): free the root
list.
* gtk/gtktreestore.c (gtk_tree_store_finalize): free the root
nodes.
Wed Sep 11 12:33:34 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkstyle.c: Draw radio buttons more symmetric. Draw shadow

View File

@ -1,3 +1,14 @@
Wed Sep 11 15:48:38 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreemodel.c (gtk_tree_row_reference_get_type): Make
GtkTreeRowReference a boxed type.
* gtk/gtkliststore.c (gtk_list_store_finalize): free the root
list.
* gtk/gtktreestore.c (gtk_tree_store_finalize): free the root
nodes.
Wed Sep 11 12:33:34 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkstyle.c: Draw radio buttons more symmetric. Draw shadow

View File

@ -1,3 +1,14 @@
Wed Sep 11 15:48:38 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreemodel.c (gtk_tree_row_reference_get_type): Make
GtkTreeRowReference a boxed type.
* gtk/gtkliststore.c (gtk_list_store_finalize): free the root
list.
* gtk/gtktreestore.c (gtk_tree_store_finalize): free the root
nodes.
Wed Sep 11 12:33:34 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkstyle.c: Draw radio buttons more symmetric. Draw shadow

View File

@ -424,7 +424,9 @@ gtk_list_store_finalize (GObject *object)
{
GtkListStore *list_store = GTK_LIST_STORE (object);
g_list_foreach (list_store->root, (GFunc) _gtk_tree_data_list_free, list_store->column_headers);
g_slist_foreach (list_store->root, (GFunc) _gtk_tree_data_list_free, list_store->column_headers);
g_slist_free (list_store->root);
_gtk_tree_data_list_header_free (list_store->sort_list);
g_free (list_store->column_headers);
@ -437,6 +439,7 @@ gtk_list_store_finalize (GObject *object)
list_store->default_sort_data = NULL;
}
/* must chain up */
(* parent_class->finalize) (object);
}

View File

@ -1322,6 +1322,20 @@ static void gtk_tree_row_reference_unref_path (GtkTreePath *path,
gint depth);
GType
gtk_tree_row_reference_get_type (void)
{
static GType our_type = 0;
if (our_type == 0)
our_type = g_boxed_type_register_static ("GtkTreeRowReference",
(GBoxedCopyFunc) gtk_tree_row_reference_copy,
(GBoxedFreeFunc) gtk_tree_row_reference_free);
return our_type;
}
#define ROW_REF_DATA_STRING "gtk-tree-row-refs"
struct _GtkTreeRowReference
@ -1745,6 +1759,15 @@ gtk_tree_row_reference_valid (GtkTreeRowReference *reference)
return TRUE;
}
GtkTreeRowReference *
gtk_tree_row_reference_copy (GtkTreeRowReference *reference)
{
return gtk_tree_row_reference_new_proxy (reference->proxy,
reference->model,
reference->path);
}
/**
* gtk_tree_row_reference_free:
* @reference: A #GtkTreeRowReference, or NULL

View File

@ -31,6 +31,7 @@ G_BEGIN_DECLS
#define GTK_TYPE_TREE_ITER (gtk_tree_iter_get_type ())
#define GTK_TYPE_TREE_PATH (gtk_tree_path_get_type ())
#define GTK_TYPE_TREE_ROW_REFERENCE (gtk_tree_row_reference_get_type ())
typedef struct _GtkTreeIter GtkTreeIter;
typedef struct _GtkTreePath GtkTreePath;
@ -154,6 +155,7 @@ GtkTreeRowReference *gtk_tree_row_reference_new_proxy (GObject *prox
GtkTreePath *path);
GtkTreePath *gtk_tree_row_reference_get_path (GtkTreeRowReference *reference);
gboolean gtk_tree_row_reference_valid (GtkTreeRowReference *reference);
GtkTreeRowReference *gtk_tree_row_reference_copy (GtkTreeRowReference *reference);
void gtk_tree_row_reference_free (GtkTreeRowReference *reference);
/* These two functions are only needed if you created the row reference with a
* proxy object */

View File

@ -447,6 +447,7 @@ gtk_tree_store_finalize (GObject *object)
g_node_traverse (tree_store->root, G_POST_ORDER, G_TRAVERSE_ALL, -1,
node_free, tree_store->column_headers);
g_node_destroy (tree_store->root);
_gtk_tree_data_list_header_free (tree_store->sort_list);
g_free (tree_store->column_headers);
@ -459,6 +460,7 @@ gtk_tree_store_finalize (GObject *object)
tree_store->default_sort_data = NULL;
}
/* must chain up */
(* parent_class->finalize) (object);
}